forked from pool/python-parted
- update to 3.11.7:
* Do not remove the generated tarballs. * Update the RELEASE file. * tests: Fix flag_get_name tests * Avoid potential NULL dereferences in pydisk.c and pytimer.c * New - example to query device capacity * correct spelling mistake * Make the partition name a property on parted.Partition objects * 'from collections' -> 'from collections.abc' * Add some more examples * Small correction to the PED_EXCEPTION_FIX handling. * Restore returning None for get_name * Handle PED_EXCEPTION_FIX * check for undefined flags * added support for newer pyparted versions * Support pypi.python.org for releases * Forgot the "/" in the path name * Remove assumption that temp devices get created in /tmp * Adjust test case numbers for GeometryWriteTestCase again * Revert "Use copy.deepcopy() rather than .duplicate()" * Remove another unnecessary os.close() from baseclass.py * Remove rogue close() call in baseclass.py * Ignore the 'const' and just use these values as 'char *' * Use copy.deepcopy * More file descriptor close statements. * Fixes for the RequiresDeviceNode class * Use a smaller length for GeometryWriteTestCase * Close the RequiresDeviceNode file descriptor before removal. * Fix writing NULL sectors using a Geometry object * Use Decimal OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-parted?expand=0&rev=12
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
Description: Remove *_LAST_FLAG checks
|
||||
The last flag in an enumeration is not really part of the ABI. Checking it
|
||||
here means that changes to parted may unexpectedly break pyparted.
|
||||
Author: Colin Watson <cjwatson@debian.org>
|
||||
Reviewed-by: Herbert Parentes Fortes Neto <hpfn@ig.com.br>
|
||||
Bug-Debian: http://bugs.debian.org/697588
|
||||
Last-Update: 2014-11-30
|
||||
--- a/src/pydisk.c
|
||||
+++ b/src/pydisk.c
|
||||
@@ -1020,7 +1020,7 @@
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- if ((flag < PED_DISK_FIRST_FLAG) || (flag > PED_DISK_LAST_FLAG)) {
|
||||
+ if ((flag < PED_DISK_FIRST_FLAG)) {
|
||||
PyErr_SetString(PyExc_ValueError, "Invalid flag provided.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -1404,7 +1404,7 @@
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- if ((flag < PED_PARTITION_FIRST_FLAG) || (flag > PED_PARTITION_LAST_FLAG)) {
|
||||
+ if ((flag < PED_PARTITION_FIRST_FLAG)) {
|
||||
PyErr_SetString(PyExc_ValueError, "Invalid flag provided.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:983b5123742d0124b640eafbeee9c5413d23b5ada29fb0adb34c5940a4f43664
|
||||
size 100585
|
||||
3
pyparted-3.11.7.tar.gz
Normal file
3
pyparted-3.11.7.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0df225691b19ef8097e3d990e99323a1c5a6ba1579b508ec479575222e7ba3d3
|
||||
size 105671
|
||||
@@ -1,17 +1,17 @@
|
||||
Index: pyparted-3.11.1/tests/baseclass.py
|
||||
Index: pyparted-3.11.7/tests/baseclass.py
|
||||
===================================================================
|
||||
--- pyparted-3.11.1.orig/tests/baseclass.py
|
||||
+++ pyparted-3.11.1/tests/baseclass.py
|
||||
@@ -68,7 +68,7 @@ class RequiresFileSystem(unittest.TestCa
|
||||
os.write(fd, b"0")
|
||||
f.close()
|
||||
--- pyparted-3.11.7.orig/tests/baseclass.py
|
||||
+++ pyparted-3.11.7/tests/baseclass.py
|
||||
@@ -72,7 +72,7 @@ class RequiresFileSystem(unittest.TestCa
|
||||
os.write(self.fd, b"0")
|
||||
self.f.close()
|
||||
|
||||
- os.system("mke2fs -F -q %s" % (self.path,))
|
||||
+ os.system("/usr/sbin/mke2fs -F -q %s" % (self.path,))
|
||||
|
||||
self._device = _ped.device_get(self.path)
|
||||
self._geometry = _ped.Geometry(self._device, 0, self._device.length - 1)
|
||||
@@ -133,7 +133,7 @@ class RequiresDeviceAlignment(RequiresDe
|
||||
@@ -137,7 +137,7 @@ class RequiresDeviceAlignment(RequiresDe
|
||||
class RequiresLabeledDevice(RequiresDevice):
|
||||
def setUp(self):
|
||||
RequiresDevice.setUp(self)
|
||||
@@ -20,7 +20,7 @@ Index: pyparted-3.11.1/tests/baseclass.py
|
||||
|
||||
# Base class for any test case that requires a _ped.Disk or parted.Disk.
|
||||
class RequiresDisk(RequiresDevice):
|
||||
@@ -150,7 +150,7 @@ class RequiresMount(RequiresDevice):
|
||||
@@ -161,7 +161,7 @@ class RequiresMount(RequiresDevice):
|
||||
self.mountpoint = None
|
||||
|
||||
def mkfs(self):
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
From 52762a217fdc702e3f8ed869d1d8ccf30babed05 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C5=81ukasz=20=27sil2100=27=20Zemczak?=
|
||||
<lukasz.zemczak@ubuntu.com>
|
||||
Date: Mon, 17 Jul 2017 12:36:01 +0200
|
||||
Subject: [PATCH] _ped's *_flag_get_name methods now throw a PartedException
|
||||
instead of ValueError on unsupported flags.
|
||||
|
||||
---
|
||||
tests/test__ped_ped.py | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tests/test__ped_ped.py b/tests/test__ped_ped.py
|
||||
index 79046ab..e7ce116 100755
|
||||
--- a/tests/test__ped_ped.py
|
||||
+++ b/tests/test__ped_ped.py
|
||||
@@ -48,7 +48,7 @@ def runTest(self):
|
||||
self.assertNotEqual(_ped.partition_flag_get_name(attr), "", "Could not get name for flag _ped.%s" % f)
|
||||
|
||||
self.assertRaises(ValueError, _ped.partition_flag_get_name, -1)
|
||||
- self.assertRaises(ValueError, _ped.partition_flag_get_name, 1000)
|
||||
+ self.assertRaises(_ped.PartedException, _ped.partition_flag_get_name, 1000)
|
||||
|
||||
class PartitionFlagGetByNameTestCase(unittest.TestCase):
|
||||
def runTest(self):
|
||||
@@ -82,7 +82,7 @@ def runTest(self):
|
||||
self.assertNotEqual(_ped.disk_flag_get_name(f), "", "Could not get name for flag %s" % f)
|
||||
|
||||
self.assertRaises(ValueError, _ped.disk_flag_get_name, -1)
|
||||
- self.assertRaises(ValueError, _ped.disk_flag_get_name, 1000)
|
||||
+ self.assertRaises(_ped.PartedException, _ped.disk_flag_get_name, 1000)
|
||||
|
||||
class DiskFlagGetByNameTestCase(unittest.TestCase):
|
||||
def runTest(self):
|
||||
@@ -1,3 +1,64 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 11 10:09:22 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 3.11.7:
|
||||
* Do not remove the generated tarballs.
|
||||
* Update the RELEASE file.
|
||||
* tests: Fix flag_get_name tests
|
||||
* Avoid potential NULL dereferences in pydisk.c and pytimer.c
|
||||
* New - example to query device capacity
|
||||
* correct spelling mistake
|
||||
* Make the partition name a property on parted.Partition objects
|
||||
* 'from collections' -> 'from collections.abc'
|
||||
* Add some more examples
|
||||
* Small correction to the PED_EXCEPTION_FIX handling.
|
||||
* Restore returning None for get_name
|
||||
* Handle PED_EXCEPTION_FIX
|
||||
* check for undefined flags
|
||||
* added support for newer pyparted versions
|
||||
* Support pypi.python.org for releases
|
||||
* Forgot the "/" in the path name
|
||||
* Remove assumption that temp devices get created in /tmp
|
||||
* Adjust test case numbers for GeometryWriteTestCase again
|
||||
* Revert "Use copy.deepcopy() rather than .duplicate()"
|
||||
* Remove another unnecessary os.close() from baseclass.py
|
||||
* Remove rogue close() call in baseclass.py
|
||||
* Ignore the 'const' and just use these values as 'char *'
|
||||
* Use copy.deepcopy
|
||||
* More file descriptor close statements.
|
||||
* Fixes for the RequiresDeviceNode class
|
||||
* Use a smaller length for GeometryWriteTestCase
|
||||
* Close the RequiresDeviceNode file descriptor before removal.
|
||||
* Fix writing NULL sectors using a Geometry object
|
||||
* Use Decimal
|
||||
* Fix reference to fedorahosted.org in README
|
||||
* Check for PartedException for upper disk and partition get flag ops.
|
||||
* Only define PARTITION_ESP if libparted provides PED_PARTITION_ESP
|
||||
* Only define PARTITION_IRST if libparted provides PED_PARTITION_IRST
|
||||
* I did not remember, Debian spells it "libparted-dev".
|
||||
* Add support for RISC-V
|
||||
* Typo fix: mimimum -> minimum
|
||||
* Replace 'iff' with 'if and only if' in pynatmath.h.
|
||||
* Fix a type for the get_max_primary_partition_count() doc string.
|
||||
* Remove *_LAST_FLAG checks
|
||||
* Use Decimal for Device.getSize
|
||||
* Update the 'twine upload' line in the Makefile
|
||||
* Don't intentionally prohibit Python 2 usage
|
||||
* mips64 support
|
||||
* Require at least libparted 3.3 and python 3.7
|
||||
* pedmodule.c: Fix partition enum flag handling
|
||||
* Add support for chromeos_kernel and bls_boot partition flags
|
||||
* Move exception declarations to _pedmodule.c
|
||||
* Use preprocessor for the _ped module and what constants to include.
|
||||
* Reduce libparted requirement to 3.2
|
||||
* Update the pypi target in the Makefile
|
||||
* Reduce minimum Python required to 3.5
|
||||
* Set PY_SSIZE_T_CLEAN for the build
|
||||
* add nvme support
|
||||
* Update RELEASE file to make last step be "make pypi"
|
||||
- drop no-last-flag-check.patch, python-parted-unittests.patch: obsolete
|
||||
- drop -fcommon, obsolete
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 2 12:08:22 UTC 2020 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-parted
|
||||
#
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -19,18 +19,15 @@
|
||||
%define srcname pyparted
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-parted
|
||||
Version: 3.11.1
|
||||
Version: 3.11.7
|
||||
Release: 0
|
||||
Summary: Python module for GNU parted
|
||||
License: GPL-2.0-or-later
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/dcantrell/pyparted/
|
||||
Source0: https://github.com/dcantrell/pyparted/archive/v3.11.1.tar.gz#/%{srcname}-%{version}.tar.gz
|
||||
Source0: https://github.com/dcantrell/pyparted/archive/v%{version}.tar.gz#/%{srcname}-%{version}.tar.gz
|
||||
# catch exception for unknown 'disk flag', kkaempf@suse.de
|
||||
Patch0: pyparted-3.10.patch
|
||||
# do not check for PED_PARTITION)_LAST_FLAG as it is not part of ABI
|
||||
Patch1: no-last-flag-check.patch
|
||||
Patch2: python-parted-unittests.patch
|
||||
Patch3: python-parted-parted-binary.patch
|
||||
Patch4: python-parted-featurestest.patch
|
||||
BuildRequires: %{python_module devel}
|
||||
@@ -54,8 +51,6 @@ partition tables.
|
||||
%autopatch -p1
|
||||
|
||||
%build
|
||||
export CFLAGS="%{optflags} -fcommon"
|
||||
export CXXFLAGS="%{optflags} -fcommon"
|
||||
%python_build
|
||||
|
||||
%install
|
||||
|
||||
Reference in New Issue
Block a user