Handle building on armv7l hosts
This commit is contained in:
parent
b772c38d55
commit
dccb5acdff
38
armv7l.patch
Normal file
38
armv7l.patch
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
diff --git a/src/parted/__init__.py b/src/parted/__init__.py
|
||||||
|
index ae7bc4b..eb1bb15 100644
|
||||||
|
--- a/src/parted/__init__.py
|
||||||
|
+++ b/src/parted/__init__.py
|
||||||
|
@@ -281,7 +281,8 @@ archLabels = {'i386': ['msdos', 'gpt'],
|
||||||
|
'ppc64': ['msdos', 'mac', 'amiga', 'gpt'],
|
||||||
|
'ppc64le': ['msdos', 'gpt'],
|
||||||
|
'x86_64': ['msdos', 'gpt'],
|
||||||
|
- 'aarch64': ['msdos', 'gpt']}
|
||||||
|
+ 'aarch64': ['msdos', 'gpt'],
|
||||||
|
+ 'armv7l': ['msdos', 'gpt']}
|
||||||
|
|
||||||
|
# Adapted from:
|
||||||
|
# http://stackoverflow.com/questions/922550/how-to-mark-a-global-as-deprecated-in-python
|
||||||
|
@@ -315,9 +316,9 @@ def Deprecated(mod, deprecated={}):
|
||||||
|
__archLabels = (('amiga', 'ppc(64)?$'),
|
||||||
|
('bsd', 'alpha$'),
|
||||||
|
('dasd', 's390x?$'),
|
||||||
|
- ('gpt', 'i[3-6]86$|x86_64$|ia64$|ppc(64|64le)?$|aarch64$'),
|
||||||
|
+ ('gpt', 'i[3-6]86$|x86_64$|ia64$|ppc(64|64le)?$|aarch64$|armv7l$'),
|
||||||
|
('mac', 'ppc(64)?$'),
|
||||||
|
- ('msdos', 'i[3-6]86$|x86_64$|s390x?$|alpha$|ia64$|ppc(64|64le)?$|aarch64$'),
|
||||||
|
+ ('msdos', 'i[3-6]86$|x86_64$|s390x?$|alpha$|ia64$|ppc(64|64le)?$|aarch64$|armv7l$'),
|
||||||
|
('sun', 'sparc(64)?$'))
|
||||||
|
|
||||||
|
def getLabels(arch=None):
|
||||||
|
diff --git a/tests/test_parted_parted.py b/tests/test_parted_parted.py
|
||||||
|
index b2db935..9f323e3 100755
|
||||||
|
--- a/tests/test_parted_parted.py
|
||||||
|
+++ b/tests/test_parted_parted.py
|
||||||
|
@@ -61,6 +61,7 @@ class GetLabelsTestCase(unittest.TestCase):
|
||||||
|
self.assertSetEqual(parted.getLabels('alpha'), {'bsd', 'msdos'})
|
||||||
|
self.assertSetEqual(parted.getLabels('ia64'), {'gpt', 'msdos'})
|
||||||
|
self.assertSetEqual(parted.getLabels('aarch64'), {'gpt', 'msdos'})
|
||||||
|
+ self.assertSetEqual(parted.getLabels('armv7l'), {'gpt', 'msdos'})
|
||||||
|
|
||||||
|
class GetDeviceTestCase(RequiresDeviceNode):
|
||||||
|
def runTest(self):
|
@ -2,12 +2,13 @@ Summary: Python module for GNU parted
|
|||||||
Name: pyparted
|
Name: pyparted
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 3.9.4
|
Version: 3.9.4
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
URL: http://fedorahosted.org/pyparted
|
URL: http://fedorahosted.org/pyparted
|
||||||
|
|
||||||
Source0: http://fedorahosted.org/releases/p/y/%{name}/%{name}-%{version}.tar.gz
|
Source0: http://fedorahosted.org/releases/p/y/%{name}/%{name}-%{version}.tar.gz
|
||||||
|
Patch0: armv7l.patch
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
|
||||||
BuildRequires: python-devel
|
BuildRequires: python-devel
|
||||||
@ -21,11 +22,7 @@ partition tables.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
echo
|
%patch0 -p1
|
||||||
echo
|
|
||||||
echo "Python platform.machine() output:"
|
|
||||||
python -c "import platform; print platform.machine()"
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
@ -48,6 +45,9 @@ rm -rf %{buildroot}
|
|||||||
%{python_sitearch}/%{name}-%{version}-*.egg-info
|
%{python_sitearch}/%{name}-%{version}-*.egg-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jun 24 2014 David Cantrell <dcantrell@redhat.com> - 3.9.4-2
|
||||||
|
- Handle building on armv7l hosts
|
||||||
|
|
||||||
* Tue Jun 24 2014 David Cantrell <dcantrell@redhat.com> - 3.9.4-1
|
* Tue Jun 24 2014 David Cantrell <dcantrell@redhat.com> - 3.9.4-1
|
||||||
- Support gpt and msdos disk labels on aarch64 (#1095904)
|
- Support gpt and msdos disk labels on aarch64 (#1095904)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user