From f6172d0db0522264fcf0dc2b87a2fbf059f812fe Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 2 Jun 2025 21:23:35 +0200 Subject: [PATCH 01/10] Rebuilt for Python 3.14 --- pyparted.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyparted.spec b/pyparted.spec index 0ce4215..d6e9ec4 100644 --- a/pyparted.spec +++ b/pyparted.spec @@ -2,7 +2,7 @@ Summary: Python module for GNU parted Name: pyparted Epoch: 1 Version: 3.13.0 -Release: 8%{?dist} +Release: 9%{?dist} License: GPL-2.0-or-later URL: https://github.com/dcantrell/pyparted @@ -55,6 +55,9 @@ make test %{python3_sitearch}/%{name}-%{version}-*.egg-info %changelog +* Mon Jun 02 2025 Python Maint - 1:3.13.0-9 +- Rebuilt for Python 3.14 + * Sat Jan 18 2025 Fedora Release Engineering - 1:3.13.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From f5a2e7a5d463740b88228784229e96fc7b40b1ce Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Sun, 15 Jun 2025 12:59:28 -0400 Subject: [PATCH 02/10] Drop unused six dependency six is unused as of 3.13.0: https://github.com/dcantrell/pyparted/commit/2f58eaea26773cd14ec0407f06b9c699abf47a8a --- pyparted.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyparted.spec b/pyparted.spec index d6e9ec4..1f42611 100644 --- a/pyparted.spec +++ b/pyparted.spec @@ -2,7 +2,7 @@ Summary: Python module for GNU parted Name: pyparted Epoch: 1 Version: 3.13.0 -Release: 9%{?dist} +Release: 10%{?dist} License: GPL-2.0-or-later URL: https://github.com/dcantrell/pyparted @@ -18,7 +18,6 @@ BuildRequires: pkgconfig BuildRequires: e2fsprogs BuildRequires: gnupg2 BuildRequires: python3-devel -BuildRequires: python3-six BuildRequires: python3-setuptools %description @@ -55,6 +54,9 @@ make test %{python3_sitearch}/%{name}-%{version}-*.egg-info %changelog +* Sun Jun 15 2025 Yaakov Selkowitz - 1:3.13.0-10 +- Drop unused six dependency + * Mon Jun 02 2025 Python Maint - 1:3.13.0-9 - Rebuilt for Python 3.14 From e753df8da255df179a032b60af04b6c4adf3410b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 06:23:09 +0000 Subject: [PATCH 03/10] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- pyparted.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyparted.spec b/pyparted.spec index 1f42611..f7ed7f8 100644 --- a/pyparted.spec +++ b/pyparted.spec @@ -2,7 +2,7 @@ Summary: Python module for GNU parted Name: pyparted Epoch: 1 Version: 3.13.0 -Release: 10%{?dist} +Release: 11%{?dist} License: GPL-2.0-or-later URL: https://github.com/dcantrell/pyparted @@ -54,6 +54,9 @@ make test %{python3_sitearch}/%{name}-%{version}-*.egg-info %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 1:3.13.0-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Sun Jun 15 2025 Yaakov Selkowitz - 1:3.13.0-10 - Drop unused six dependency From d5724a4b259ddc57ebf1ed22e6deff2087e5bcf1 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Wed, 23 Jul 2025 15:00:35 -0700 Subject: [PATCH 04/10] tests: Move pyparted tests from sti to tmt This converts to using tmt style tests, and adds a test that actually uses the installed pyparted library to manipulate a temporary disk image. Resolves: rhbz#2383021 --- .fmf/version | 1 + plans/run-tests.fmf | 9 ++++ tests/scripts/pyparted-tests | 88 ++++++++++++++++++++++++++++++++++++ tests/scripts/run_tests.sh | 29 ------------ tests/tests.yml | 15 ------ 5 files changed, 98 insertions(+), 44 deletions(-) create mode 100644 .fmf/version create mode 100644 plans/run-tests.fmf create mode 100755 tests/scripts/pyparted-tests delete mode 100755 tests/scripts/run_tests.sh delete mode 100644 tests/tests.yml diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/plans/run-tests.fmf b/plans/run-tests.fmf new file mode 100644 index 0000000..cf8a582 --- /dev/null +++ b/plans/run-tests.fmf @@ -0,0 +1,9 @@ +summary: Run pyparted tests +prepare: + how: install + package: + - python3-pyparted +execute: + script: | + fallocate -l 1G $PWD/disk.img + ./tests/scripts/pyparted-tests $PWD/disk.img diff --git a/tests/scripts/pyparted-tests b/tests/scripts/pyparted-tests new file mode 100755 index 0000000..8edcca1 --- /dev/null +++ b/tests/scripts/pyparted-tests @@ -0,0 +1,88 @@ +#!/usr/bin/python3 + +import parted +import sys + + +def init_disk(disk_img): + # Make a disklabel (failures here will raise an error) + dev = parted.getDevice(disk_img) + disk = parted.freshDisk(dev, "gpt") + + # Make a partition + geom = parted.Geometry(device=dev, + start=2048, + end=50*2048) + fs = parted.FileSystem(type="ext4", geometry=geom) + part = parted.Partition(disk=disk, + type=parted.PARTITION_NORMAL, + fs=fs, + geometry=geom) + disk.addPartition(partition=part, + constraint=dev.optimalAlignedConstraint) + part.setFlag(parted.PARTITION_BOOT) + disk.commit() + +def read_disk(disk_img): + # Read the disk and check the partitions + dev = parted.getDevice(disk_img) + disk = parted.newDisk(dev) + + if dev.length == 0: + print("ERROR: Disk has no length", file=sys.stderr) + sys.exit(1) + + if len(disk.partitions) != 1: + print("ERROR: Wrong number of partitions", file=sys.stderr) + sys.exit(1) + + part = disk.partitions[0] + if part.geometry.end != 50*2048: + print("ERROR: Partition is wrong length", file=sys.stderr) + sys.exit(1) + + if part.geometry.start != 2048: + print("ERROR: Parition doesn't start at sector 2048", file=sys.stderr) + sys.exit(1) + + +def remove_partition(disk_img): + # Remove partition and check disk + dev = parted.getDevice(disk_img) + disk = parted.newDisk(dev) + + if len(disk.partitions) != 1: + print("ERROR: Wrong number of partitions", file=sys.stderr) + sys.exit(1) + + disk.removePartition(partition=disk.partitions[0]) + disk.commit() + + dev = parted.getDevice(disk_img) + disk = parted.newDisk(dev) + + if len(disk.partitions) != 0: + print("ERROR: Failed to delete partition", file=sys.stderr) + sys.exit(1) + + +def main(disk_img): + print(f"Running tests on {disk_img}") + + try: + init_disk(disk_img) + read_disk(disk_img) + remove_partition(disk_img) + except Exception as e: + print(f"ERROR: {str(e)}", file=sys.stderr) + sys.exit(1) + + print("PASS", file=sys.stderr) + sys.exit(0) + +if __name__ == '__main__': + if len(sys.argv) < 2: + print("Usage: %s " % sys.argv[0], file=sys.stderr) + sys.exit(1) + + main(sys.argv[1]) diff --git a/tests/scripts/run_tests.sh b/tests/scripts/run_tests.sh deleted file mode 100755 index 21804db..0000000 --- a/tests/scripts/run_tests.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -PATH=/usr/bin -TMPDIR="$(mktemp -d)" -CWD="$(pwd)" - -PACKAGE=pyparted -BRANCH= - -# clone the dist-git tree for this package -cd ${TMPDIR} -fedpkg co ${PACKAGE} -cd ${PACKAGE} -[ -z "${BRANCH}" ] || fedpkg switch-branch ${BRANCH} -fedpkg prep - -# scramble together the extracted source tree name -SRCDIR="${PACKAGE}-$(grep Version: ${PACKAGE}.spec | cut -d ' ' -f 2)" - -# run the tests -cd ${SRCDIR} -#make check # this runs pylint, which is sometimes wrong/noisy -make test -RET=$? - -# clean up and exit -cd ${CWD} -rm -rf ${TMPDIR} -exit ${RET} diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index 171d4d0..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- - -- hosts: localhost - roles: - - role: standard-test-basic - tags: - - classic - - required_packages: - - fedpkg - - tests: - - simple: - dir: scripts/ - run: ./run_tests.sh From bd307c7d69a015eb1371b3ea7380653c7d24a139 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 15 Aug 2025 13:09:13 +0200 Subject: [PATCH 05/10] Rebuilt for Python 3.14.0rc2 bytecode --- pyparted.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyparted.spec b/pyparted.spec index f7ed7f8..cf6cd09 100644 --- a/pyparted.spec +++ b/pyparted.spec @@ -2,7 +2,7 @@ Summary: Python module for GNU parted Name: pyparted Epoch: 1 Version: 3.13.0 -Release: 11%{?dist} +Release: 12%{?dist} License: GPL-2.0-or-later URL: https://github.com/dcantrell/pyparted @@ -54,6 +54,9 @@ make test %{python3_sitearch}/%{name}-%{version}-*.egg-info %changelog +* Fri Aug 15 2025 Python Maint - 1:3.13.0-12 +- Rebuilt for Python 3.14.0rc2 bytecode + * Fri Jul 25 2025 Fedora Release Engineering - 1:3.13.0-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 2e82ee90f003a56fbbcf3893247e32f8b398a57d Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 19 Sep 2025 12:40:14 +0200 Subject: [PATCH 06/10] Rebuilt for Python 3.14.0rc3 bytecode --- pyparted.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyparted.spec b/pyparted.spec index cf6cd09..a6d63a7 100644 --- a/pyparted.spec +++ b/pyparted.spec @@ -2,7 +2,7 @@ Summary: Python module for GNU parted Name: pyparted Epoch: 1 Version: 3.13.0 -Release: 12%{?dist} +Release: 13%{?dist} License: GPL-2.0-or-later URL: https://github.com/dcantrell/pyparted @@ -54,6 +54,9 @@ make test %{python3_sitearch}/%{name}-%{version}-*.egg-info %changelog +* Fri Sep 19 2025 Python Maint - 1:3.13.0-13 +- Rebuilt for Python 3.14.0rc3 bytecode + * Fri Aug 15 2025 Python Maint - 1:3.13.0-12 - Rebuilt for Python 3.14.0rc2 bytecode From 0ad0fbeef9a20fce8025f20cd01bfd6a48441498 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 17 Jan 2026 06:00:48 +0000 Subject: [PATCH 07/10] Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild --- pyparted.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyparted.spec b/pyparted.spec index a6d63a7..751923e 100644 --- a/pyparted.spec +++ b/pyparted.spec @@ -2,7 +2,7 @@ Summary: Python module for GNU parted Name: pyparted Epoch: 1 Version: 3.13.0 -Release: 13%{?dist} +Release: 14%{?dist} License: GPL-2.0-or-later URL: https://github.com/dcantrell/pyparted @@ -54,6 +54,9 @@ make test %{python3_sitearch}/%{name}-%{version}-*.egg-info %changelog +* Sat Jan 17 2026 Fedora Release Engineering - 1:3.13.0-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + * Fri Sep 19 2025 Python Maint - 1:3.13.0-13 - Rebuilt for Python 3.14.0rc3 bytecode From df740093ccc535b125e09e03acd476bcc7ef1850 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Wed, 3 Jun 2026 17:46:10 +0200 Subject: [PATCH 08/10] Rebuilt for Python 3.15 --- pyparted.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyparted.spec b/pyparted.spec index 751923e..4c52b45 100644 --- a/pyparted.spec +++ b/pyparted.spec @@ -2,7 +2,7 @@ Summary: Python module for GNU parted Name: pyparted Epoch: 1 Version: 3.13.0 -Release: 14%{?dist} +Release: 15%{?dist} License: GPL-2.0-or-later URL: https://github.com/dcantrell/pyparted @@ -54,6 +54,9 @@ make test %{python3_sitearch}/%{name}-%{version}-*.egg-info %changelog +* Wed Jun 03 2026 Python Maint - 1:3.13.0-15 +- Rebuilt for Python 3.15 + * Sat Jan 17 2026 Fedora Release Engineering - 1:3.13.0-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild From d1e72e367715cb2dc1382378b96aaad86d703db0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 16 Jul 2026 17:55:18 +0000 Subject: [PATCH 09/10] Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild --- pyparted.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyparted.spec b/pyparted.spec index 4c52b45..5775ce1 100644 --- a/pyparted.spec +++ b/pyparted.spec @@ -2,7 +2,7 @@ Summary: Python module for GNU parted Name: pyparted Epoch: 1 Version: 3.13.0 -Release: 15%{?dist} +Release: 16%{?dist} License: GPL-2.0-or-later URL: https://github.com/dcantrell/pyparted @@ -54,6 +54,9 @@ make test %{python3_sitearch}/%{name}-%{version}-*.egg-info %changelog +* Thu Jul 16 2026 Fedora Release Engineering - 1:3.13.0-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild + * Wed Jun 03 2026 Python Maint - 1:3.13.0-15 - Rebuilt for Python 3.15 From f00b886f17cea03b03df51eefce8446efd6b2680 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Wed, 22 Jul 2026 10:51:18 +0200 Subject: [PATCH 10/10] Rebuilt for Python 3.15.0b4 ABI change --- pyparted.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyparted.spec b/pyparted.spec index 5775ce1..ad79d71 100644 --- a/pyparted.spec +++ b/pyparted.spec @@ -2,7 +2,7 @@ Summary: Python module for GNU parted Name: pyparted Epoch: 1 Version: 3.13.0 -Release: 16%{?dist} +Release: 17%{?dist} License: GPL-2.0-or-later URL: https://github.com/dcantrell/pyparted @@ -54,6 +54,9 @@ make test %{python3_sitearch}/%{name}-%{version}-*.egg-info %changelog +* Wed Jul 22 2026 Python Maint - 1:3.13.0-17 +- Rebuilt for Python 3.15.0b4 ABI change + * Thu Jul 16 2026 Fedora Release Engineering - 1:3.13.0-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild