Compare commits

...

No commits in common. 'c9' and 'c8' have entirely different histories.
c9 ... c8

4
.gitignore vendored

@ -1,3 +1 @@
SOURCES/keyring.gpg
SOURCES/pyparted-3.12.0.tar.gz
SOURCES/trustdb.gpg
SOURCES/pyparted-3.11.7.tar.gz

@ -1,3 +1 @@
d272fb3943123d3e62c480b17520fb5532021a4f SOURCES/keyring.gpg
c52dfa02064a67d5a09b5fbe4d85f9bdea104db9 SOURCES/pyparted-3.12.0.tar.gz
cff4e174c36e950906f15a2fc139bc59539929ad SOURCES/trustdb.gpg
8084cb0b64542e57066716505fa4f1d28c031b09 SOURCES/pyparted-3.11.7.tar.gz

File diff suppressed because it is too large Load Diff

@ -1,115 +0,0 @@
diff -up pyparted-3.12.0/src/parted/__init__.py.orig pyparted-3.12.0/src/parted/__init__.py
--- pyparted-3.12.0/src/parted/__init__.py.orig 2022-03-07 12:38:56.000000000 -0500
+++ pyparted-3.12.0/src/parted/__init__.py 2022-07-14 12:28:09.687155151 -0400
@@ -217,6 +217,14 @@ from _ped import DISK_GPT_PMBR_BOOT
from _ped import DISK_TYPE_EXTENDED
from _ped import DISK_TYPE_PARTITION_NAME
+if hasattr(_ped, 'DISK_TYPE_PARTITION_TYPE_ID'):
+ # pylint: disable=E0611
+ from _ped import DISK_TYPE_PARTITION_TYPE_ID
+
+if hasattr(_ped, 'DISK_TYPE_PARTITION_TYPE_UUID'):
+ # pylint: disable=E0611
+ from _ped import DISK_TYPE_PARTITION_TYPE_UUID
+
from _ped import EXCEPTION_TYPE_INFORMATION
from _ped import EXCEPTION_TYPE_WARNING
from _ped import EXCEPTION_TYPE_ERROR
diff -up pyparted-3.12.0/src/_pedmodule.c.orig pyparted-3.12.0/src/_pedmodule.c
--- pyparted-3.12.0/src/_pedmodule.c.orig 2022-03-07 12:49:11.000000000 -0500
+++ pyparted-3.12.0/src/_pedmodule.c 2022-07-14 12:59:46.270416021 -0400
@@ -648,42 +648,20 @@ MOD_INIT(_ped) {
PyModule_AddIntConstant(m, "PARTITION_BIOS_GRUB", PED_PARTITION_BIOS_GRUB);
PyModule_AddIntConstant(m, "PARTITION_DIAG", PED_PARTITION_DIAG);
PyModule_AddIntConstant(m, "PARTITION_LEGACY_BOOT", PED_PARTITION_LEGACY_BOOT);
-
- /* NOTE: You cannot evaluate the enum PED_PARTITION_* values using the
- * preprocessor. DO NOT use #if or #ifdef with them.
- *
- * Conditionally add constants, based on PED_PARTITION_LAST_FLAG, and what
- * we know about parted/disk.h
- */
-#if PED_PARTITION_LAST_FLAG > 15
PyModule_AddIntConstant(m, "PARTITION_MSFT_DATA", PED_PARTITION_MSFT_DATA);
-#endif
-
-#if PED_PARTITION_LAST_FLAG > 16
PyModule_AddIntConstant(m, "PARTITION_IRST", PED_PARTITION_IRST);
-#endif
-
-#if PED_PARTITION_LAST_FLAG > 17
PyModule_AddIntConstant(m, "PARTITION_ESP", PED_PARTITION_ESP);
-#endif
-
-#if PED_PARTITION_LAST_FLAG > 18
PyModule_AddIntConstant(m, "PARTITION_CHROMEOS_KERNEL", PED_PARTITION_CHROMEOS_KERNEL);
-#endif
-
-#if PED_PARTITION_LAST_FLAG > 19
PyModule_AddIntConstant(m, "PARTITION_BLS_BOOT", PED_PARTITION_BLS_BOOT);
-#endif
-
-#if PED_PARTITION_LAST_FLAG > 20
PyModule_AddIntConstant(m, "PARTITION_LINUX_HOME", PED_PARTITION_LINUX_HOME);
-#endif
PyModule_AddIntConstant(m, "DISK_CYLINDER_ALIGNMENT", PED_DISK_CYLINDER_ALIGNMENT);
PyModule_AddIntConstant(m, "DISK_GPT_PMBR_BOOT", PED_DISK_GPT_PMBR_BOOT);
PyModule_AddIntConstant(m, "DISK_TYPE_EXTENDED", PED_DISK_TYPE_EXTENDED);
PyModule_AddIntConstant(m, "DISK_TYPE_PARTITION_NAME", PED_DISK_TYPE_PARTITION_NAME);
+ PyModule_AddIntConstant(m, "DISK_TYPE_PARTITION_TYPE_ID", PED_DISK_TYPE_PARTITION_TYPE_ID);
+ PyModule_AddIntConstant(m, "DISK_TYPE_PARTITION_TYPE_UUID", PED_DISK_TYPE_PARTITION_TYPE_UUID);
/* add PedFileSystemType as _ped.FileSystemType */
if (PyType_Ready(&_ped_FileSystemType_Type_obj) < 0)
diff -up pyparted-3.12.0/tests/test__ped_disktype.py.orig pyparted-3.12.0/tests/test__ped_disktype.py
--- pyparted-3.12.0/tests/test__ped_disktype.py.orig 2018-01-12 13:31:40.000000000 -0500
+++ pyparted-3.12.0/tests/test__ped_disktype.py 2022-07-14 12:28:09.687155151 -0400
@@ -63,11 +63,22 @@ class DiskTypeCheckFeatureTestCase(Requi
self.assertTrue(self.disktype[name].check_feature(_ped.DISK_TYPE_EXTENDED))
self.assertFalse(self.disktype[name].check_feature(_ped.DISK_TYPE_PARTITION_NAME))
+ if hasattr(_ped, "DISK_TYPE_PARTITION_TYPE_ID"):
+ self.assertTrue(self.disktype[name].check_feature(_ped.DISK_TYPE_PARTITION_TYPE_ID))
+
+ if hasattr(_ped, "DISK_TYPE_PARTITION_TYPE_UUID"):
+ self.assertFalse(self.disktype[name].check_feature(_ped.DISK_TYPE_PARTITION_TYPE_UUID))
+
# The following types support DISK_TYPE_PARTITION_NAME
for name in ['amiga', 'gpt', 'mac', 'pc98']:
self.assertFalse(self.disktype[name].check_feature(_ped.DISK_TYPE_EXTENDED))
self.assertTrue(self.disktype[name].check_feature(_ped.DISK_TYPE_PARTITION_NAME))
+ # The following types support DISK_TYPE_PARTITION_TYPE_UUID
+ for name in ['gpt']:
+ if hasattr(_ped, "DISK_TYPE_PARTITION_TYPE_UUID"):
+ self.assertTrue(self.disktype[name].check_feature(_ped.DISK_TYPE_PARTITION_TYPE_UUID))
+
# The following types support all features
for name in ['dvh']:
self.assertTrue(self.disktype[name].check_feature(_ped.DISK_TYPE_EXTENDED))
@@ -75,11 +86,20 @@ class DiskTypeCheckFeatureTestCase(Requi
class DiskTypeStrTestCase(RequiresDiskTypes):
def runTest(self):
- self.assertEqual(str(self.disktype['msdos']), '_ped.DiskType instance --\n name: msdos features: 1')
+ if hasattr(_ped, "DISK_TYPE_PARTITION_TYPE_ID"):
+ self.assertEqual(str(self.disktype['msdos']), '_ped.DiskType instance --\n name: msdos features: 5')
+ else:
+ self.assertEqual(str(self.disktype['msdos']), '_ped.DiskType instance --\n name: msdos features: 1')
+
self.assertEqual(str(self.disktype['aix']), '_ped.DiskType instance --\n name: aix features: 0')
self.assertEqual(str(self.disktype['sun']), '_ped.DiskType instance --\n name: sun features: 0')
self.assertEqual(str(self.disktype['amiga']), '_ped.DiskType instance --\n name: amiga features: 2')
- self.assertEqual(str(self.disktype['gpt']), '_ped.DiskType instance --\n name: gpt features: 2')
+
+ if hasattr(_ped, "DISK_TYPE_PARTITION_TYPE_UUID"):
+ self.assertEqual(str(self.disktype['gpt']), '_ped.DiskType instance --\n name: gpt features: 10')
+ else:
+ self.assertEqual(str(self.disktype['gpt']), '_ped.DiskType instance --\n name: gpt features: 2')
+
self.assertEqual(str(self.disktype['mac']), '_ped.DiskType instance --\n name: mac features: 2')
self.assertEqual(str(self.disktype['bsd']), '_ped.DiskType instance --\n name: bsd features: 0')
self.assertEqual(str(self.disktype['pc98']), '_ped.DiskType instance --\n name: pc98 features: 2')

@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEECPfIs8YhlQwTj3ZhYpd7uchBuWUFAmImWioACgkQYpd7uchB
uWXxWg//agGaATH8u0LsMeDTUFc3tM6fDhSyYnJX8QepqU0gu+FqfhG59FKrG/ey
6DW05rLnbDySpL/O4rQvGsiM1t6zZPBWpxNSp0akT3mbSPxPBoqjtXw0bkXNIH46
rreAXUEJnQ0TkXejv301zi6ZiiOEJ8rQSygw3lq66MS/8o1cN4mi1AopbWGsKWo0
sR6MFoX7DImqx6SsaPVZo+362+eZKe4fNkkQVnM9R3/HUYjCcsM3MhRizkZeutJB
ArBM+MvTvTyNddqa8qdUjZU4A2wrWs5ZQLRZci+MFS96zjhAlzAHMnsRoxeXqWL6
DxIZXD/0nG2cDerJS8x8DX4gNhavQcJc+qdYKpAI+bLIz+6laRWILskao6JA9DRJ
XFI1ChsPGrzj8kn2WGm08ctvXvxv+dG8tdufY32wIGl5j4fFFB2JI1pHoujegzQ5
SfdpaXUSVfSuHhMYz7erZekncD6H3f/953+lNuA/J9bApViWGpFXpQIydC7JZ/6K
2TT+VmcOlPmH38mBXY3A08k1ZTJTYI1UTDyD3s7PW+X4EVad6R4yGJFoQtausIpC
Bkg7626W53xJvbRmby0gEV+CBjUKe3ZVRdTPkPKK9k4N4aPgkbi2PeUeT7ULYtLX
Lv8WjhOa+lhUR9wOR59SaUf77Ev5CdheMO6R/mauCd/Jj25xoXA=
=rtAz
-----END PGP SIGNATURE-----

@ -22,7 +22,7 @@
%bcond_without python3
%endif
%if %{fedora} > 31
%if %{fedora} > 28
# disable python2 by default
%bcond_with python2
%else
@ -30,35 +30,29 @@
%endif
%endif
%global py2dir python2-build
Summary: Python module for GNU parted
Name: pyparted
Epoch: 1
Version: 3.12.0
Release: 1%{?dist}
Version: 3.11.7
Release: 4%{?dist}
License: GPLv2+
URL: https://github.com/dcantrell/pyparted
Group: System Environment/Libraries
URL: https://github.com/rhinstaller/pyparted
Source0: https://github.com/dcantrell/pyparted/releases/download/v%{version}/%{name}-%{version}.tar.gz
Source1: https://github.com/dcantrell/pyparted/releases/download/v%{version}/%{name}-%{version}.tar.gz.asc
Source2: keyring.gpg
Source3: trustdb.gpg
Source0: https://github.com/rhinstaller/pyparted/archive/%{name}-%{version}.tar.gz
# Support new disk type features from parted 3.5:
# https://bugzilla.redhat.com/show_bug.cgi?id=2098792
# https://github.com/dcantrell/pyparted/issues/91
Patch0: pyparted-3.12.0-types.patch
Patch0: pyparted-3.11.7-covscan.patch
BuildRequires: make
BuildRequires: gcc
BuildRequires: parted-devel >= 3.5
BuildRequires: parted-devel >= 3.2-18
BuildRequires: pkgconfig
BuildRequires: e2fsprogs
BuildRequires: gnupg2
%if %{with python3}
BuildRequires: python3-devel
BuildRequires: python3-six
BuildRequires: python3-setuptools
%endif
%if %{with python2}
@ -86,7 +80,11 @@ Obsoletes: pyparted < %{epoch}:%{version}-%{release}
%if %{with python3}
%package -n python3-pyparted
Summary: Python 3 module for GNU parted
Summary: Python 3 module for GNU parted
Group: System Environment/Libraries
%if !%{with python2}
Provides: pyparted = %{epoch}:%{version}-%{release}
%endif
%description -n python3-pyparted
Python module for the parted library. It is used for manipulating
@ -94,57 +92,47 @@ partition tables. This package provides Python 3 bindings for parted.
%endif
%prep
# Verify source archive signature
gpg --no-default-keyring --keyring %{SOURCE2} --trustdb-name %{SOURCE3} --verify %{SOURCE1} %{SOURCE0} || exit 1
%setup -q
%patch0 -p1
%if %{with python3}
everything=$(ls)
mkdir -p py3dir
cp -a $everything py3dir
%endif
%build
%if %{with python2}
PYTHON=python2 %make_build CFLAGS="%{optflags} -fcommon"
rm -rf ../%{py2dir}
mkdir -p ../%{py2dir}
cp -a . ../%{py2dir}
mv ../%{py2dir} .
%endif
%build
%if %{with python3}
pushd py3dir
PYTHON=python3 %make_build CFLAGS="%{optflags} -fcommon"
popd
PYTHON=python3 CFLAGS="%{optflags}" make %{?_smp_mflags}
%endif
%check
%if %{with python2}
PYTHON=python2 make test
pushd %{py2dir}
PYTHON=python2 CFLAGS="%{optflags}" make %{?_smp_mflags}
popd
%endif
%check
%if %{with python3}
pushd py3dir
PYTHON=python3 make test
popd
PYTHON=python3 CFLAGS="%{optflags}" make test
%endif
%install
%if %{with python2}
PYTHON=python2 %make_install
pushd %{py2dir}
PYTHON=python2 CFLAGS="%{optflags}" make test
popd
%endif
%install
%if %{with python3}
pushd py3dir
PYTHON=python3 %make_install
popd
PYTHON=python3 CFLAGS="%{optflags}" make install DESTDIR=%{buildroot}
%endif
%if %{with python2}
%files -n python2-pyparted
%doc AUTHORS COPYING NEWS README TODO
%{python2_sitearch}/_ped.so
%{python2_sitearch}/parted
%{python2_sitearch}/%{name}-%{version}-*.egg-info
pushd %{py2dir}
PYTHON=python2 CFLAGS="%{optflags}" make install DESTDIR=%{buildroot}
popd
%endif
%if %{with python3}
@ -155,106 +143,65 @@ popd
%{python3_sitearch}/%{name}-%{version}-*.egg-info
%endif
%if %{with python2}
%files -n python2-pyparted
%doc AUTHORS COPYING NEWS README TODO
%{python2_sitearch}/_ped.so
%{python2_sitearch}/parted
%{python2_sitearch}/%{name}-%{version}-*.egg-info
%endif
%changelog
* Tue Jun 21 2022 David Cantrell <dcantrell@redhat.com> - 1:3.12.0-1
- Patch pyparted to handle PED_DISK_TYPE_PARTITION_TYPE_ID for the
msdos disk type and PED_DISK_TYPE_PARTITION_TYPE_UUID for the gpt
label
Resolves: rhbz#2103243
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1:3.11.7-4
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1:3.11.7-3
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.11.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Fri Oct 23 2020 David Cantrell <dcantrell@redhat.com> - 1:3.11.7-1
- Upgrade to pyparted-3.11.7 (BZ#1890443)
- Set PY_SSIZE_T_CLEAN for the build (bcl)
- add nvme support
- Update RELEASE file to make last step be "make pypi" (dcantrell)
* Tue Jul 14 2020 Tom Stellard <tstellar@redhat.com> - 1:3.11.5-3
- Use make macros
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 1:3.11.5-2
- Rebuilt for Python 3.9
* Mon Mar 09 2020 David Cantrell <dcantrell@redhat.com> - 1:3.11.5-1
- Require at least libparted 3.3 and python 3.7 (dcantrell)
- pedmodule.c: Fix partition enum flag handling (bcl)
- Add support for chromeos_kernel and bls_boot partition flags (bcl)
- Move exception declarations to _pedmodule.c (dcantrell)
* Tue Feb 11 2020 David Cantrell <dcantrell@redhat.com> - 1:3.11.4-1
- Use Decimal for Device.getSize() operations, return a
float (#1801355)
- Update the 'twine upload' line in the Makefile
- Don't intentionally prohibit Python 2 usage (#67)
- mips64 support
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.11.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Fri Nov 15 2019 David Cantrell <dcantrell@redhat.com> - 1:3.11.3-1
- Fix deprecation warning in parted/cachedlist.py (#1772060)
* Sun Oct 20 2019 Miro Hrončok <mhroncok@redhat.com> - 1:3.11.2-5
- Remove python2-pyparted from Fedora 32+
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1:3.11.2-4
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 1:3.11.2-3
- Rebuilt for Python 3.8
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.11.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Feb 01 2019 David Cantrell <dcantrell@redhat.com> - 1:3.11.2-1
- pyparted-3.11.2 (dcantrell)
- Do not remove the generated tarballs. (dcantrell)
- Update the RELEASE file. (dcantrell)
- tests: Fix flag_get_name tests (bcl)
- Avoid potential NULL dereferences in pydisk.c and pytimer.c
(dcantrell)
- New - example to query device capacity (jflorian)
- correct spelling mistake (edward)
- _ped's *_flag_get_name methods now throw a PartedException instead of
ValueError on unsupported flags. (lukasz.zemczak)
- Make the partition name a property on parted.Partition objects (#34)
(dcantrell)
* Mon Jul 12 2021 David Cantrell <dcantrell@redhat.com> - 1:3.11.7-4
- Rebuild for gating
Related: rhbz#1927379
* Fri Jul 09 2021 David Cantrell <dcantrell@redhat.com> - 1:3.11.7-3
- More covscan patch followup
Related: rhbz#1927379
* Tue Jul 31 2018 Florian Weimer <fweimer@redhat.com> - 1:3.11.0-17
- Rebuild with fixed binutils
* Fri Jul 09 2021 David Cantrell <dcantrell@redhat.com> - 1:3.11.7-2
- Patched errors found by covscan
Related: rhbz#1927379
* Fri Jul 27 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1:3.11.0-16
- Rebuild for new binutils
* Thu Jul 08 2021 David Cantrell <dcantrell@redhat.com> - 1:3.11.7-1
- Upgrade to pyparted-3.11.7
Resolves: rhbz#1927379
* Thu Jul 26 2018 David Cantrell <dcantrell@redhat.com> - 1:3.11.0-15
- Do not disable python2 builds by default. There are still some packages
that have not been updated to python3 and require python2-pyparted.
* Tue May 18 2021 David Cantrell <dcantrell@redhat.com> - 1:3.11.0-21
- Rebuild for gating
Related: rhbz#1927379
* Tue May 18 2021 David Cantrell <dcantrell@redhat.com> - 1:3.11.0-20
- Fixes for gating
Related: rhbz#1927379
* Mon May 17 2021 David Cantrell <dcantrell@redhat.com> - 1:3.11.0-19
- Rebuild for gating
Related: rhbz#1927379
* Mon May 17 2021 David Cantrell <dcantrell@redhat.com> - 1:3.11.0-18
- Rebuild for gating
Related: rhbz#1927379
* Mon May 17 2021 David Cantrell <dcantrell@redhat.com> - 1:3.11.0-17
- Rebuild
Related: rhbz#1927379
* Wed Jul 25 2018 David Cantrell <dcantrell@redhat.com> - 1:3.11.0-14
- Conditionalize python2 and python3 builds to make the SRPM more portable
across releases. On RHEL > 7 and Fedora > 28, do not build for python2.
On RHEL <= 7, do not build for python3.
* Tue Feb 23 2021 David Cantrell <dcantrell@redhat.com> - 1:3.11.0-16
- Handle PED_EXCEPTION_FIX (Fix/Ignore) exceptions
Resolves: rhbz#1927379
* Tue Jul 24 2018 David Cantrell <dcantrell@redhat.com> - 1:3.11.0-13
- Use 'python2' when building the Python 2.x bindings (#1605566)
- BuildRequires gcc (#1605566)
- %%{python_sitearch} -> %%{python2_sitearch} (#1605566)
* Wed Jul 25 2018 David Cantrell <dcantrell@redhat.com> - 1:3.11.0-13
- Do not build python2 subpackage
Resolves: rhbz#1565329
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.11.0-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu Jul 19 2018 David Cantrell <dcantrell@redhat.com> - 1:3.11.0-12
- Have python3-pyparted package provide 'pyparted'
Resolves: rhbz#1602333
* Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 1:3.11.0-11
- Rebuilt for Python 3.7
* Mon May 28 2018 Charalampos Stratakis <cstratak@redhat.com> - 1:3.11.0-11
- Conditionalize the python2 subpackage
* Mon Apr 02 2018 Adam Williamson <awilliam@redhat.com> - 1:3.11.0-10
- Make pyparted provides/obsoletes include the epoch

Loading…
Cancel
Save