From 02fed1a5862255185fae867261d0c55e232dc889 Mon Sep 17 00:00:00 2001 From: CentOS Buildsys Date: Feb 06 2014 11:17:44 +0000 Subject: import pyparted-3.9-7.el7.src.rpm --- diff --git a/SOURCES/pyparted-3.9-aarch64.patch b/SOURCES/pyparted-3.9-aarch64.patch new file mode 100644 index 0000000..3d9defd --- /dev/null +++ b/SOURCES/pyparted-3.9-aarch64.patch @@ -0,0 +1,36 @@ +diff -up pyparted-3.9/src/parted/__init__.py.aarch64 pyparted-3.9/src/parted/__init__.py +--- pyparted-3.9/src/parted/__init__.py.aarch64 2014-01-23 17:28:28.370005898 -0500 ++++ pyparted-3.9/src/parted/__init__.py 2014-01-23 17:57:51.257702523 -0500 +@@ -275,7 +275,8 @@ archLabels = {'i386': ['msdos', 'gpt'], + 'sparc': ['sun'], + 'ia64': ['msdos', 'gpt'], + 'ppc': ['msdos', 'mac', 'amiga', 'gpt'], +- 'x86_64': ['msdos', 'gpt']} ++ 'x86_64': ['msdos', 'gpt'], ++ 'aarch64': ['msdos', 'gpt']} + + # Adapted from: + # http://stackoverflow.com/questions/922550/how-to-mark-a-global-as-deprecated-in-python +@@ -309,9 +310,9 @@ def Deprecated(mod, deprecated={}): + __archLabels = (('amiga', 'ppc(64)?$'), + ('bsd', 'alpha$'), + ('dasd', 's390x?$'), +- ('gpt', 'i[3-6]86$|x86_64$|ia64$|ppc(64)?$'), ++ ('gpt', 'i[3-6]86$|x86_64$|ia64$|ppc(64)?$|aarch64$'), + ('mac', 'ppc(64)?$'), +- ('msdos', 'i[3-6]86$|x86_64$|s390x?$|alpha$|ia64$|ppc(64)?$'), ++ ('msdos', 'i[3-6]86$|x86_64$|s390x?$|alpha$|ia64$|ppc(64)?$|aarch64$'), + ('sun', 'sparc(64)?$')) + + def getLabels(arch=None): +diff -up pyparted-3.9/tests/test_parted_parted.py.aarch64 pyparted-3.9/tests/test_parted_parted.py +--- pyparted-3.9/tests/test_parted_parted.py.aarch64 2011-06-27 11:24:21.000000000 -0400 ++++ pyparted-3.9/tests/test_parted_parted.py 2014-01-23 17:59:09.640810266 -0500 +@@ -59,6 +59,7 @@ class GetLabelsTestCase(unittest.TestCas + self.assertSetEqual(parted.getLabels('ppc64'), {'amiga', 'gpt', 'mac', 'msdos'}) + self.assertSetEqual(parted.getLabels('alpha'), {'bsd', 'msdos'}) + self.assertSetEqual(parted.getLabels('ia64'), {'gpt', 'msdos'}) ++ self.assertSetEqual(parted.getLabels('aarch64'), {'gpt', 'msdos'}) + + class GetDeviceTestCase(RequiresDeviceNode): + def runTest(self): diff --git a/SOURCES/pyparted-3.9-tests-fixes.patch b/SOURCES/pyparted-3.9-tests-fixes.patch new file mode 100644 index 0000000..5628f5d --- /dev/null +++ b/SOURCES/pyparted-3.9-tests-fixes.patch @@ -0,0 +1,24 @@ +diff -up pyparted-3.9/tests/test__ped_ped.py.orig pyparted-3.9/tests/test__ped_ped.py +--- pyparted-3.9/tests/test__ped_ped.py.orig 2011-06-27 11:24:21.000000000 -0400 ++++ pyparted-3.9/tests/test__ped_ped.py 2014-01-22 09:36:35.031314396 -0500 +@@ -200,6 +200,9 @@ class DeviceGetNextTestCase(unittest.Tes + _ped.device_probe_all() + lst = self.getDeviceList(_ped.device_get_next) + ++ if len(lst) == 0: ++ self.skipTest("no devices in lst") ++ + # Now the test cases. + self.assertGreater(len(lst), 0) + self.assertRaises(TypeError, _ped.device_get_next, None) +@@ -272,8 +275,8 @@ class FileSystemProbeSpecificTestCase(Re + + self.assertTrue(isinstance(result, _ped.Geometry)) + self.assertEquals(result.start, self._geometry.start) +- self.assertEquals(result.end, self._geometry.end) +- self.assertEquals(result.length, self._geometry.length) ++ self.assertLessEqual(result.end, self._geometry.end) ++ self.assertLessEqual(result.length, self._geometry.length) + self.assertEquals(result.dev, self._device) + else: + result = _ped.file_system_probe_specific(type, self._geometry) diff --git a/SPECS/pyparted.spec b/SPECS/pyparted.spec index 2699422..8616280 100644 --- a/SPECS/pyparted.spec +++ b/SPECS/pyparted.spec @@ -2,7 +2,7 @@ Summary: Python module for GNU parted Name: pyparted Epoch: 1 Version: 3.9 -Release: 3%{?dist} +Release: 7%{?dist} License: GPLv2+ Group: System Environment/Libraries URL: http://fedorahosted.org/pyparted @@ -11,11 +11,14 @@ Source0: http://fedorahosted.org/releases/p/y/%{name}/%{name}-%{version}.tar.gz Patch1: 0001-Do-not-traceback-when-calling-setlocale-875354.patch Patch2: 0002-Convert-Constraint-to-__ped.Constraint-in-partition..patch Patch3: 0003-Subject-PATCH-pyparted-export-ped_disk_new-functiona.patch +Patch4: pyparted-3.9-tests-fixes.patch +Patch5: pyparted-3.9-aarch64.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n) BuildRequires: python-devel BuildRequires: parted-devel >= 3.1 BuildRequires: pkgconfig +BuildRequires: e2fsprogs %description Python module for the parted library. It is used for manipulating @@ -26,10 +29,15 @@ partition tables. %patch1 -p 1 %patch2 -p 1 %patch3 -p 1 +%patch4 -p 1 +%patch5 -p 1 %build make %{?_smp_mflags} +%check +make test + %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} @@ -45,6 +53,20 @@ rm -rf %{buildroot} %{python_sitearch}/%{name}-%{version}-*.egg-info %changelog +* Thu Feb 06 2014 David Cantrell - 1:3.9-7 +- Add disklabel support for aarch64 systems + Resolves: rhbz#1060376 + +* Tue Jan 28 2014 Daniel Mach - 1:3.9-6 +- Mass rebuild 2014-01-24 + +* Tue Jan 21 2014 David Cantrell - 1:3.9-5 +- Run test suite from the %%check spec file section + Resolves: rhbz#1025238 + +* Fri Dec 27 2013 Daniel Mach - 1:3.9-4 +- Mass rebuild 2013-12-27 + * Mon Jun 24 2013 Chris Lumens 3.9-3 - Fix a bunch of unicode-related tracebacks during installation.