Compare commits

...

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

2
.gitignore vendored

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

@ -1,3 +1,3 @@
d272fb3943123d3e62c480b17520fb5532021a4f SOURCES/keyring.gpg
c52dfa02064a67d5a09b5fbe4d85f9bdea104db9 SOURCES/pyparted-3.12.0.tar.gz
1a9cddb8995a74efa6385bedb4c0f536e6e50ddb SOURCES/pyparted-3.13.0.tar.gz
cff4e174c36e950906f15a2fc139bc59539929ad SOURCES/trustdb.gpg

@ -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/0nG2c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c+dAyooNX2hoL60B64OIoSMxc5z2daf2HM3YtgugWcE3kqdEEfZhqi1U
+x3bPbAc4298JO8Pd5w7c9Zz5hXcS4z+n/VXLxwG8sWB2raDsXs=
=f59d
-----END PGP SIGNATURE-----

@ -1,173 +1,129 @@
%if 0%{?rhel}
%if %{rhel} <= 7
# disable python3 by default
%bcond_with python3
%else
%bcond_without python3
%endif
%if %{rhel} > 7
# disable python2 by default
%bcond_with python2
%else
%bcond_without python2
%endif
%endif
%if 0%{?fedora}
%if %{fedora} < 23
# disable python3 by default
%bcond_with python3
%else
%bcond_without python3
%endif
%if %{fedora} > 31
# disable python2 by default
%bcond_with python2
%else
%bcond_without python2
%endif
%endif
Summary: Python module for GNU parted
Name: pyparted
Epoch: 1
Version: 3.12.0
Release: 1%{?dist}
License: GPLv2+
URL: https://github.com/dcantrell/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
# 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
Summary: Python module for GNU parted
Name: pyparted
Epoch: 1
Version: 3.13.0
Release: 7%{?dist}
License: GPL-2.0-or-later
URL: https://github.com/dcantrell/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
BuildRequires: make
BuildRequires: gcc
BuildRequires: parted-devel >= 3.5
BuildRequires: parted-devel >= 3.4
BuildRequires: pkgconfig
BuildRequires: e2fsprogs
BuildRequires: gnupg2
%if %{with python3}
BuildRequires: python3-devel
BuildRequires: python3-six
BuildRequires: python3-setuptools
%endif
%if %{with python2}
BuildRequires: python2-devel
BuildRequires: python2-six
%endif
%global _description\
Python module for the parted library. It is used for manipulating\
%description
Python module for the parted library. It is used for manipulating
partition tables.
%description %_description
%if %{with python2}
%package -n python2-pyparted
Summary: %summary
%{?python_provide:%python_provide python2-pyparted}
# Remove before F30
Provides: pyparted = %{epoch}:%{version}-%{release}
Provides: pyparted%{?_isa} = %{epoch}:%{version}-%{release}
Obsoletes: pyparted < %{epoch}:%{version}-%{release}
%description -n python2-pyparted %_description
%endif
%if %{with python3}
%package -n python3-pyparted
Summary: Python 3 module for GNU parted
%description -n python3-pyparted
Python module for the parted library. It is used for manipulating
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
%autosetup
%build
%if %{with python2}
PYTHON=python2 %make_build CFLAGS="%{optflags} -fcommon"
%endif
%if %{with python3}
pushd py3dir
PYTHON=python3 %make_build CFLAGS="%{optflags} -fcommon"
popd
%endif
%make_build CFLAGS="%{optflags} -fcommon"
%check
%if %{with python2}
PYTHON=python2 make test
%endif
%if %{with python3}
pushd py3dir
PYTHON=python3 make test
popd
%endif
make test
%install
%if %{with python2}
PYTHON=python2 %make_install
%endif
%if %{with python3}
pushd py3dir
PYTHON=python3 %make_install
popd
%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
%if %{with python3}
%make_install
%files -n python3-pyparted
%doc AUTHORS COPYING NEWS README TODO
%doc AUTHORS HACKING NEWS README.md RELEASE TODO
%license LICENSE
%{python3_sitearch}/_ped.*.so
%{python3_sitearch}/parted
%{python3_sitearch}/%{name}-%{version}-*.egg-info
%endif
%changelog
* Tue Jun 21 2022 David Cantrell <dcantrell@redhat.com> - 1:3.12.0-1
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1:3.13.0-7
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Fri Oct 25 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 1:3.13.0-6
- Rebuilt for MSVSphere 10
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1:3.13.0-6
- Bump release for June 2024 mass rebuild
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.13.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.13.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.13.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jun 22 2023 Python Maint <python-maint@redhat.com> - 1:3.13.0-2
- Rebuilt for Python 3.12
* Wed Jun 21 2023 David Cantrell <dcantrell@redhat.com> - 1:3.13.0-1
- Upgrade to pyparted-3.13.0
* Thu Jun 15 2023 Python Maint <python-maint@redhat.com> - 1:3.12.0-11
- Rebuilt for Python 3.12
* Wed Jun 14 2023 David Cantrell <dcantrell@redhat.com> - 1:3.12.0-10
- Use non-deprecated syntax for the %%patch macros
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 1:3.12.0-9
- Rebuilt for Python 3.12
* Thu Mar 02 2023 David Cantrell <dcantrell@redhat.com> - 1:3.12.0-8
- Fix FTBFS with _ped.disktype test case for gpt (#2171656)
- Update License tag to SPDX expression
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.12.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.12.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Tue Jun 21 2022 David Cantrell <dcantrell@redhat.com> - 1:3.12.0-5
- 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
label (#2098792)
* Mon Jun 20 2022 Adam Williamson <awilliam@redhat.com> - 1:3.12.0-4
- Backport PR #92 to fix tests with parted 3.5 (#2098792)
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1:3.12.0-3
- Rebuilt for Python 3.11
* Mon Mar 07 2022 David Cantrell <dcantrell@redhat.com> - 3.12.0-2
- BR python3-setuptools
* Mon Mar 07 2022 David Cantrell <dcantrell@redhat.com> - 3.12.0-1
- Upgrade to pyparted-3.12.0
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.11.7-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* 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 Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.11.7-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* 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
* Thu Jun 03 2021 Python Maint <python-maint@redhat.com> - 1:3.11.7-3
- Rebuilt for Python 3.10
* 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

Loading…
Cancel
Save