Compare commits

...

21 Commits
master ... f37

Author SHA1 Message Date
Fedora Release Engineering b71463d9af Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-22 15:50:35 +00:00
David Cantrell 52a1c8bfaf 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 (#2098792)

Signed-off-by: David Cantrell <dcantrell@redhat.com>
2022-06-21 15:22:04 -04:00
Adam Williamson d32b10b877 Backport PR #92 to fix tests with parted 3.5 (#2098792) 2022-06-20 13:24:26 -07:00
Python Maint e8f5fc9089 Rebuilt for Python 3.11 2022-06-13 16:02:42 +02:00
David Cantrell 791a789e24 BR python3-setuptools
Signed-off-by: David Cantrell <dcantrell@redhat.com>
2022-03-07 14:45:25 -05:00
David Cantrell 775cb0e480 Upgrade to pyparted-3.12.0
Signed-off-by: David Cantrell <dcantrell@redhat.com>
2022-03-07 14:22:47 -05:00
Fedora Release Engineering 0ae7d75235 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-21 09:51:49 +00:00
Fedora Release Engineering 10bc59882e - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-23 04:29:12 +00:00
Python Maint b244549e30 Rebuilt for Python 3.10 2021-06-03 13:33:21 +02:00
Fedora Release Engineering 197cf98baa - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-27 08:56:08 +00:00
Tom Stellard c514058933 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2021-01-08 19:41:58 +00:00
David Cantrell fd1528e088 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)

Signed-off-by: David Cantrell <david.l.cantrell@gmail.com>
2020-10-23 15:56:10 -04:00
Tom Stellard 6e7f603dca Use make macros
https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
2020-07-14 03:10:33 +00:00
Miro Hrončok c37e0a86d4 Rebuilt for Python 3.9 2020-05-23 06:49:31 +02:00
David Cantrell 7d25590c0f 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)

Signed-off-by: David Cantrell <dcantrell@redhat.com>
2020-03-09 13:10:53 -04:00
David Cantrell e54c3fce0a 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
2020-02-11 10:58:02 -05:00
Fedora Release Engineering 85315a929d - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-30 10:14:08 +00:00
David Cantrell 2f159223e6 Fix deprecation warning in parted/cachedlist.py (#1772060) 2019-11-15 09:09:03 -05:00
Miro Hrončok 914d8b9212 Drop the %{py3dir} pattern
%{py3dir} is outside of the expected build directory,
causing this error when only building for Python 3:

    Empty %files file /builddir/build/BUILD/pyparted-3.11.2/debugsourcefiles.list

That's because the mechanism that looks for sources checks all the compiled
files in the build directory and because they are all outside, it fails.
This hasn't happened with the python2 subpackage, because it found the
compiled python2 files.

Note that %{py3dir} was part of the Python guidelines early in the Python 3
adoption in Fedora, long before we've introduced the debugsource packages.

Instead, we create a directory called "py3dir" in the build directory.
There are other solutions possible, but this is the least intrusive in this case.
2019-10-20 22:24:31 +02:00
Miro Hrončok 32e3694413 Remove python2-pyparted from Fedora 32+
https://bugzilla.redhat.com/show_bug.cgi?id=1761222
2019-10-20 21:53:16 +02:00
Miro Hrončok e15d28a3aa Rebuilt for Python 3.8.0rc1 (#1748018) 2019-10-03 13:59:49 +02:00
6 changed files with 201 additions and 31 deletions

9
.gitignore vendored
View File

@ -3,3 +3,12 @@
/pyparted-3.11.0.tar.gz
/pyparted-3.11.2.tar.gz
/pyparted-3.11.2.tar.gz.asc
/pyparted-3.11.3.tar.gz
/pyparted-3.11.4.tar.gz
/pyparted-3.11.4.tar.gz.asc
/pyparted-3.11.5.tar.gz
/pyparted-3.11.5.tar.gz.asc
/pyparted-3.11.7.tar.gz
/pyparted-3.11.7.tar.gz.asc
/pyparted-3.12.0.tar.gz
/pyparted-3.12.0.tar.gz.asc

BIN
keyring.gpg Normal file

Binary file not shown.

View File

@ -0,0 +1,85 @@
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-06-21 15:05:10.318939409 -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-06-21 15:04:57.863977820 -0400
@@ -685,6 +685,14 @@ MOD_INIT(_ped) {
PyModule_AddIntConstant(m, "DISK_TYPE_EXTENDED", PED_DISK_TYPE_EXTENDED);
PyModule_AddIntConstant(m, "DISK_TYPE_PARTITION_NAME", PED_DISK_TYPE_PARTITION_NAME);
+#if PED_DISK_TYPE_LAST_FEATURE > 2
+ PyModule_AddIntConstant(m, "DISK_TYPE_PARTITION_TYPE_ID", PED_DISK_TYPE_PARTITION_TYPE_ID);
+#endif
+
+#if PED_DISK_TYPE_LAST_FEATURE > 4
+ PyModule_AddIntConstant(m, "DISK_TYPE_PARTITION_TYPE_UUID", PED_DISK_TYPE_PARTITION_TYPE_UUID);
+#endif
+
/* add PedFileSystemType as _ped.FileSystemType */
if (PyType_Ready(&_ped_FileSystemType_Type_obj) < 0)
return MOD_ERROR_VAL;
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-06-21 15:04:57.863977820 -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')

View File

@ -22,41 +22,43 @@
%bcond_without python3
%endif
# XXX: uncomment this when things that use python2-pyparted can use
# the python3 version. Be sure to change '28' to the appropriate
# version number. Also, replace all the '@' signs with '%' because
# I cannot remember this macro construct, I'm just commenting it out.
# --dcantrell
#@if @{fedora} > 28
## disable python2 by default
#@bcond_with python2
#@else
#@bcond_without python2
#@endif
# XXX: And delete this when you can disable python2 by default. --dcantrell
%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.11.2
Release: 3%{?dist}
Version: 3.12.0
Release: 6%{?dist}
License: GPLv2+
URL: https://github.com/rhinstaller/pyparted
URL: https://github.com/dcantrell/pyparted
Source0: https://github.com/rhinstaller/pyparted/archive/%{name}-%{version}.tar.gz
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-partition-types.patch
BuildRequires: make
BuildRequires: gcc
BuildRequires: parted-devel >= 3.2-18
BuildRequires: parted-devel >= 3.3
BuildRequires: pkgconfig
BuildRequires: e2fsprogs
BuildRequires: gnupg2
%if %{with python3}
BuildRequires: python3-devel
BuildRequires: python3-six
BuildRequires: python3-setuptools
%endif
%if %{with python2}
@ -92,22 +94,26 @@ 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}
rm -rf %{py3dir}
mkdir -p %{py3dir}
cp -a . %{py3dir}
everything=$(ls)
mkdir -p py3dir
cp -a $everything py3dir
%endif
%build
%if %{with python2}
PYTHON=python2 make %{?_smp_mflags}
PYTHON=python2 %make_build CFLAGS="%{optflags} -fcommon"
%endif
%if %{with python3}
pushd %{py3dir}
PYTHON=python3 make %{?_smp_mflags}
pushd py3dir
PYTHON=python3 %make_build CFLAGS="%{optflags} -fcommon"
popd
%endif
@ -117,19 +123,19 @@ PYTHON=python2 make test
%endif
%if %{with python3}
pushd %{py3dir}
pushd py3dir
PYTHON=python3 make test
popd
%endif
%install
%if %{with python2}
PYTHON=python2 make install DESTDIR=%{buildroot}
PYTHON=python2 %make_install
%endif
%if %{with python3}
pushd %{py3dir}
PYTHON=python3 make install DESTDIR=%{buildroot}
pushd py3dir
PYTHON=python3 %make_install
popd
%endif
@ -150,6 +156,76 @@ popd
%endif
%changelog
* 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 (#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
* 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
* 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
* 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

View File

@ -1,2 +1,2 @@
SHA512 (pyparted-3.11.2.tar.gz) = c91b3113951f3bb032f5c1309b5c301754b1aa9a5347a3bf4bbd6d6d23c929da63fbbe8e922660af6249c1037e9594ceb73fd28b77c2fda5f0833b1816f002f3
SHA512 (pyparted-3.11.2.tar.gz.asc) = 4fba573c319518db3b3c9d80f65a8869f687c7abc028b3a153088adfe09b203987983b8e8f4e79e8ff3e0a6c6e584df140d13ac1d276e4f3a691d4e1dd33b60d
SHA512 (pyparted-3.12.0.tar.gz) = 0179e5334be8c04287b10b47d407ad339933cd3e20514d2142fe968acf8a36c40e541ee5165e2b3699a40b133d8f1948d8d12ccf307d3a1736090fb33f28b7e7
SHA512 (pyparted-3.12.0.tar.gz.asc) = 452d386fbc8b84fa0dc186bb75c6c12eb051c8a37575e5a3a0cf504d13c4b2a0134d7e486928f9af7d142d25802bda05c97fd95ff80721ae6f6c0abedb8b1614

BIN
trustdb.gpg Normal file

Binary file not shown.