From c72c47fd0ae6478c7d5208ef83870cb25f25870b Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jul 14 2021 04:16:46 +0000 Subject: import pyparted-3.11.7-4.el8 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..12b265d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/pyparted-3.11.7.tar.gz diff --git a/.pyparted.metadata b/.pyparted.metadata new file mode 100644 index 0000000..a9037d1 --- /dev/null +++ b/.pyparted.metadata @@ -0,0 +1 @@ +8084cb0b64542e57066716505fa4f1d28c031b09 SOURCES/pyparted-3.11.7.tar.gz diff --git a/SOURCES/pyparted-3.11.7-covscan.patch b/SOURCES/pyparted-3.11.7-covscan.patch new file mode 100644 index 0000000..afcb48b --- /dev/null +++ b/SOURCES/pyparted-3.11.7-covscan.patch @@ -0,0 +1,1552 @@ +diff -up pyparted-3.11.7/src/pydisk.c.orig pyparted-3.11.7/src/pydisk.c +--- pyparted-3.11.7/src/pydisk.c.orig 2019-04-23 14:23:44.456665800 -0400 ++++ pyparted-3.11.7/src/pydisk.c 2021-07-09 15:59:00.998981206 -0400 +@@ -205,8 +205,7 @@ int _ped_Partition_init(_ped_Partition * + if (partedExnRaised) { + partedExnRaised = 0; + +- if (!PyErr_ExceptionMatches(PartedException) && +- !PyErr_ExceptionMatches(PyExc_NotImplementedError)) { ++ if (!PyErr_ExceptionMatches(PartedException) && !PyErr_ExceptionMatches(PyExc_NotImplementedError)) { + PyErr_SetString(PartitionException, partedExnMessage); + } + } else { +@@ -423,8 +422,7 @@ int _ped_Disk_init(_ped_Disk *self, PyOb + if (partedExnRaised) { + partedExnRaised = 0; + +- if (!PyErr_ExceptionMatches(PartedException) && +- !PyErr_ExceptionMatches(PyExc_NotImplementedError)) { ++ if (!PyErr_ExceptionMatches(PartedException) && !PyErr_ExceptionMatches(PyExc_NotImplementedError)) { + PyErr_SetString(DiskLabelException, partedExnMessage); + } + } else { +@@ -548,6 +546,7 @@ PyObject *py_ped_disk_type_get_next(PyOb + } + + next = ped_disk_type_get_next(cur); ++ + if (next) { + ret = PedDiskType2_ped_DiskType(next); + return (PyObject *) ret; +@@ -575,6 +574,7 @@ PyObject *py_ped_disk_type_get(PyObject + } + + ret = PedDiskType2_ped_DiskType(out_type); ++ + if (ret == NULL) { + return NULL; + } +@@ -590,16 +590,14 @@ PyObject *py_ped_disk_type_check_feature + int ret = 0; + + if (!PyArg_ParseTuple(args, "i", &feature)) { +- return NULL; ++ return (PyObject *) NULL; + } + + disktype = _ped_DiskType2PedDiskType(s); ++ + if (disktype) { + ret = ped_disk_type_check_feature(disktype, feature); + } +- else { +- return NULL; +- } + + if (ret) { + Py_RETURN_TRUE; +@@ -613,29 +611,28 @@ PyObject *py_ped_disk_clobber(PyObject * + int ret = 0; + + device = _ped_Device2PedDevice(s); +- if (device == NULL) +- return NULL; ++ ++ if (device == NULL) { ++ return (PyObject *) NULL; ++ } + + ret = ped_disk_clobber(device); ++ + if (ret == 0) { + if (partedExnRaised) { + partedExnRaised = 0; + +- if (!PyErr_ExceptionMatches(PartedException) && +- !PyErr_ExceptionMatches(PyExc_NotImplementedError)) ++ if (!PyErr_ExceptionMatches(PartedException) && !PyErr_ExceptionMatches(PyExc_NotImplementedError)) { + PyErr_SetString(IOException, partedExnMessage); +- } +- else ++ } ++ } else { + PyErr_Format(DiskException, "Failed to clobber partition table on device %s", device->path); ++ } + +- return NULL; ++ return (PyObject *) NULL; + } + +- if (ret) { +- Py_RETURN_TRUE; +- } else { +- Py_RETURN_FALSE; +- } ++ Py_RETURN_TRUE; + } + + /* XXX: is this necessary? */ +@@ -644,18 +641,20 @@ PyObject *py_ped_disk_duplicate(PyObject + _ped_Disk *ret = NULL; + + disk = _ped_Disk2PedDisk(s); ++ + if (disk) { + pass_disk = ped_disk_duplicate(disk); ++ + if (pass_disk == NULL) { + if (partedExnRaised) { + partedExnRaised = 0; + +- if (!PyErr_ExceptionMatches(PartedException) && +- !PyErr_ExceptionMatches(PyExc_NotImplementedError)) ++ if (!PyErr_ExceptionMatches(PartedException) && !PyErr_ExceptionMatches(PyExc_NotImplementedError)) { + PyErr_SetString(IOException, partedExnMessage); +- } +- else ++ } ++ } else { + PyErr_Format(DiskException, "Could not duplicate device %s", disk->dev->path); ++ } + + return NULL; + } +@@ -664,8 +663,7 @@ PyObject *py_ped_disk_duplicate(PyObject + if (ret == NULL) { + return NULL; + } +- } +- else { ++ } else { + return NULL; + } + +@@ -685,8 +683,9 @@ PyObject *py_ped_disk_destroy(PyObject * + PedDisk *disk = NULL; + + disk = _ped_Disk2PedDisk(s); ++ + if (disk == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + + ped_disk_destroy(disk); +@@ -701,26 +700,24 @@ PyObject *py_ped_disk_commit(PyObject *s + int ret = 0; + + disk = _ped_Disk2PedDisk(s); ++ + if (disk) { + ret = ped_disk_commit(disk); ++ + if (ret == 0) { + if (partedExnRaised) { + partedExnRaised = 0; + +- if (!PyErr_ExceptionMatches(PartedException) && +- !PyErr_ExceptionMatches(PyExc_NotImplementedError)) ++ if (!PyErr_ExceptionMatches(PartedException) && !PyErr_ExceptionMatches(PyExc_NotImplementedError)) { + PyErr_SetString(IOException, partedExnMessage); ++ } ++ } else { ++ PyErr_Format(DiskException, "Could not commit to disk %s, (%s)", disk->dev->path, __func__); + } +- else +- PyErr_Format(DiskException, "Could not commit to disk %s, (%s)", +- disk->dev->path, __func__); + +- return NULL; ++ return (PyObject *) NULL; + } + } +- else { +- return NULL; +- } + + if (ret) { + Py_RETURN_TRUE; +@@ -734,26 +731,24 @@ PyObject *py_ped_disk_commit_to_dev(PyOb + int ret = 0; + + disk = _ped_Disk2PedDisk(s); ++ + if (disk) { + ret = ped_disk_commit_to_dev(disk); ++ + if (ret == 0) { + if (partedExnRaised) { + partedExnRaised = 0; + +- if (!PyErr_ExceptionMatches(PartedException) && +- !PyErr_ExceptionMatches(PyExc_NotImplementedError)) ++ if (!PyErr_ExceptionMatches(PartedException) && !PyErr_ExceptionMatches(PyExc_NotImplementedError)) { + PyErr_SetString(IOException, partedExnMessage); ++ } ++ } else { ++ PyErr_Format(DiskException, "Could not commit to disk %s, (%s)", disk->dev->path, __func__); + } +- else +- PyErr_Format(DiskException, "Could not commit to disk %s, (%s)", +- disk->dev->path, __func__); + +- return NULL; ++ return (PyObject *) NULL; + } + } +- else { +- return NULL; +- } + + if (ret) { + Py_RETURN_TRUE; +@@ -773,20 +768,16 @@ PyObject *py_ped_disk_commit_to_os(PyObj + if (partedExnRaised) { + partedExnRaised = 0; + +- if (!PyErr_ExceptionMatches(PartedException) && +- !PyErr_ExceptionMatches(PyExc_NotImplementedError)) ++ if (!PyErr_ExceptionMatches(PartedException) && !PyErr_ExceptionMatches(PyExc_NotImplementedError)) { + PyErr_SetString(IOException, partedExnMessage); ++ } ++ } else { ++ PyErr_Format(DiskException, "Could not commit to disk %s, (%s)", disk->dev->path, __func__); + } +- else +- PyErr_Format(DiskException, "Could not commit to disk %s, (%s)", +- disk->dev->path, __func__); + +- return NULL; ++ return (PyObject *) NULL; + } + } +- else { +- return NULL; +- } + + if (ret) { + Py_RETURN_TRUE; +@@ -800,25 +791,24 @@ PyObject *py_ped_disk_check(PyObject *s, + int ret = 0; + + disk = _ped_Disk2PedDisk(s); ++ + if (disk) { + ret = ped_disk_check(disk); ++ + if (ret == 0) { + if (partedExnRaised) { + partedExnRaised = 0; + +- if (!PyErr_ExceptionMatches(PartedException) && +- !PyErr_ExceptionMatches(PyExc_NotImplementedError)) ++ if (!PyErr_ExceptionMatches(PartedException) && !PyErr_ExceptionMatches(PyExc_NotImplementedError)) { + PyErr_SetString(IOException, partedExnMessage); +- } +- else ++ } ++ } else { + PyErr_Format(DiskException, "Could not check disk %s", disk->dev->path); ++ } + +- return NULL; ++ return (PyObject *) NULL; + } + } +- else { +- return NULL; +- } + + if (ret) { + Py_RETURN_TRUE; +@@ -831,12 +821,10 @@ PyObject *py_ped_disk_print(PyObject *s, + PedDisk *disk = NULL; + + disk = _ped_Disk2PedDisk(s); ++ + if (disk) { + ped_disk_print(disk); + } +- else { +- return NULL; +- } + + Py_INCREF(Py_None); + return Py_None; +@@ -847,12 +835,10 @@ PyObject *py_ped_disk_get_primary_partit + int ret = 0; + + disk = _ped_Disk2PedDisk(s); ++ + if (disk) { + ret = ped_disk_get_primary_partition_count(disk); + } +- else { +- return NULL; +- } + + return PyLong_FromLong(ret); + } +@@ -862,38 +848,33 @@ PyObject *py_ped_disk_get_last_partition + int ret = 0; + + disk = _ped_Disk2PedDisk(s); ++ + if (disk) { + ret = ped_disk_get_last_partition_num(disk); + } +- else { +- return NULL; +- } + + return PyLong_FromLong(ret); + } + +-PyObject *py_ped_disk_get_max_primary_partition_count(PyObject *s, +- PyObject *args) { ++PyObject *py_ped_disk_get_max_primary_partition_count(PyObject *s, PyObject *args) { + PedDisk *disk = NULL; + int ret = 0; + + disk = _ped_Disk2PedDisk(s); ++ + if (disk) { + ret = ped_disk_get_max_primary_partition_count(disk); + } +- else { +- return NULL; +- } + + return PyLong_FromLong(ret); + } + +-PyObject *py_ped_disk_get_max_supported_partition_count(PyObject *s, +- PyObject *args) { ++PyObject *py_ped_disk_get_max_supported_partition_count(PyObject *s, PyObject *args) { + PedDisk *disk = NULL; + int max = 0; + + disk = _ped_Disk2PedDisk(s); ++ + if (disk) { + if (ped_disk_get_max_supported_partition_count(disk, &max) == true) { + return Py_BuildValue("i", max); +@@ -910,13 +891,16 @@ PyObject *py_ped_disk_get_partition_alig + _ped_Alignment *ret = NULL; + + disk = _ped_Disk2PedDisk(s); +- if (!disk) +- return NULL; ++ ++ if (!disk) { ++ return (PyObject *) NULL; ++ } + + alignment = ped_disk_get_partition_alignment(disk); ++ + if (!alignment) { + PyErr_SetString(CreateException, "Could not get alignment for device"); +- return NULL; ++ return (PyObject *) NULL; + } + + ret = PedAlignment2_ped_Alignment(alignment); +@@ -929,8 +913,10 @@ PyObject *py_ped_disk_max_partition_leng + PedDisk *disk = NULL; + + disk = _ped_Disk2PedDisk(s); +- if (!disk) +- return NULL; ++ ++ if (!disk) { ++ return (PyObject *) NULL; ++ } + + return PyLong_FromUnsignedLongLong(ped_disk_max_partition_length(disk)); + } +@@ -939,8 +925,10 @@ PyObject *py_ped_disk_max_partition_star + PedDisk *disk = NULL; + + disk = _ped_Disk2PedDisk(s); +- if (!disk) +- return NULL; ++ ++ if (!disk) { ++ return (PyObject *) NULL; ++ } + + return PyLong_FromUnsignedLongLong(ped_disk_max_partition_start_sector(disk)); + } +@@ -950,27 +938,29 @@ PyObject *py_ped_disk_set_flag(PyObject + PedDisk *disk = NULL; + + if (!PyArg_ParseTuple(args, "ii", &flag, &state)) { +- return NULL; ++ return (PyObject *) NULL; + } + + disk = _ped_Disk2PedDisk(s); ++ + if (disk == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + + ret = ped_disk_set_flag(disk, flag, state); ++ + if (ret == 0) { + if (partedExnRaised) { + partedExnRaised = 0; + +- if (!PyErr_ExceptionMatches(PartedException) && +- !PyErr_ExceptionMatches(PyExc_NotImplementedError)) ++ if (!PyErr_ExceptionMatches(PartedException) && !PyErr_ExceptionMatches(PyExc_NotImplementedError)) { + PyErr_SetString(DiskException, partedExnMessage); +- } +- else ++ } ++ } else { + PyErr_Format(DiskException, "Could not set flag on disk %s", disk->dev->path); ++ } + +- return NULL; ++ return (PyObject *) NULL; + } + + Py_RETURN_TRUE; +@@ -981,12 +971,13 @@ PyObject *py_ped_disk_get_flag(PyObject + PedDisk *disk = NULL; + + if (!PyArg_ParseTuple(args, "i", &flag)) { +- return NULL; ++ return (PyObject *) NULL; + } + + disk = _ped_Disk2PedDisk(s); ++ + if (disk == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + + if (ped_disk_get_flag(disk, flag)) { +@@ -1001,12 +992,13 @@ PyObject *py_ped_disk_is_flag_available( + PedDisk *disk = NULL; + + if (!PyArg_ParseTuple(args, "i", &flag)) { +- return NULL; ++ return (PyObject *) NULL; + } + + disk = _ped_Disk2PedDisk(s); ++ + if (disk == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + + if (ped_disk_is_flag_available(disk, flag)) { +@@ -1021,27 +1013,28 @@ PyObject *py_ped_disk_flag_get_name(PyOb + char *ret = NULL; + + if (!PyArg_ParseTuple(args, "i", &flag)) { +- return NULL; ++ return (PyObject *) NULL; + } + + if (flag < PED_DISK_FIRST_FLAG) { + PyErr_SetString(PyExc_ValueError, "Invalid flag provided."); +- return NULL; ++ return (PyObject *) NULL; + } + + ret = (char *) ped_disk_flag_get_name(flag); ++ + if (ret == NULL) { + if (partedExnRaised) { + partedExnRaised = 0; + +- if (!PyErr_ExceptionMatches(PartedException) && +- !PyErr_ExceptionMatches(PyExc_NotImplementedError)) ++ if (!PyErr_ExceptionMatches(PartedException) && !PyErr_ExceptionMatches(PyExc_NotImplementedError)) { + PyErr_SetString(DiskException, partedExnMessage); +- } +- else ++ } ++ } else { + PyErr_Format(DiskException, "Could not get disk flag name for %d", flag); ++ } + +- return NULL; ++ return (PyObject *) NULL; + } + + return PyUnicode_FromString(ret); +@@ -1051,7 +1044,7 @@ PyObject *py_ped_disk_flag_get_by_name(P + char *name = NULL; + + if (!PyArg_ParseTuple(args, "s", &name)) { +- return NULL; ++ return (PyObject *) NULL; + } + + return PyLong_FromLong(ped_disk_flag_get_by_name(name)); +@@ -1061,7 +1054,7 @@ PyObject *py_ped_disk_flag_next(PyObject + int flag; + + if (!PyArg_ParseTuple(args, "i", &flag)) { +- return NULL; ++ return (PyObject *) NULL; + } + + return Py_BuildValue("i", ped_disk_flag_next(flag)); +@@ -1080,8 +1073,9 @@ PyObject *py_ped_partition_destroy(_ped_ + PedPartition *partition = NULL; + + partition = _ped_Partition2PedPartition(s); ++ + if (partition == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + + ped_partition_destroy(partition); +@@ -1096,12 +1090,10 @@ PyObject *py_ped_partition_is_active(_pe + int ret = 0; + + partition = _ped_Partition2PedPartition(s); ++ + if (partition) { + ret = ped_partition_is_active(partition); + } +- else { +- return NULL; +- } + + if (ret) { + Py_RETURN_TRUE; +@@ -1117,28 +1109,30 @@ PyObject *py_ped_partition_set_flag(_ped + int ret = 0; + + if (!PyArg_ParseTuple(args, "ii", &flag, &in_state)) { +- return NULL; ++ return (PyObject *) NULL; + } + + part = _ped_Partition2PedPartition(s); ++ + if (part == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + + if (part && flag && in_state > -1) { + ret = ped_partition_set_flag(part, flag, in_state); ++ + if (ret == 0) { + if (partedExnRaised) { + partedExnRaised = 0; + +- if (!PyErr_ExceptionMatches(PartedException) && +- !PyErr_ExceptionMatches(PyExc_NotImplementedError)) ++ if (!PyErr_ExceptionMatches(PartedException) && !PyErr_ExceptionMatches(PyExc_NotImplementedError)) { + PyErr_SetString(PartitionException, partedExnMessage); +- } +- else ++ } ++ } else { + PyErr_Format(PartitionException, "Could not set flag on partition %s%d", part->disk->dev->path, part->num); ++ } + +- return NULL; ++ return (PyObject *) NULL; + } + } + +@@ -1155,18 +1149,19 @@ PyObject *py_ped_partition_get_flag(_ped + int ret = -1; + + if (!PyArg_ParseTuple(args, "i", &flag)) { +- return NULL; ++ return (PyObject *) NULL; + } + + part = _ped_Partition2PedPartition(s); ++ + if (part == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + + /* ped_partition_get_flag will assert on this. */ + if (!ped_partition_is_active(part)) { + PyErr_Format(PartitionException, "Could not get flag on inactive partition %s%d", part->disk->dev->path, part->num); +- return NULL; ++ return (PyObject *) NULL; + } + + ret = ped_partition_get_flag(part, flag); +@@ -1184,17 +1179,18 @@ PyObject *py_ped_partition_is_flag_avail + int ret = 0; + + if (!PyArg_ParseTuple(args, "i", &flag)) { +- return NULL; ++ return (PyObject *) NULL; + } + + part = _ped_Partition2PedPartition(s); ++ + if (part == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + + if (!ped_partition_is_active(part)) { + PyErr_Format(PartitionException, "Flag is not available on inactive partition %s%d", part->disk->dev->path, part->num); +- return NULL; ++ return (PyObject *) NULL; + } + + ret = ped_partition_is_flag_available(part, flag); +@@ -1213,31 +1209,34 @@ PyObject *py_ped_partition_set_system(_p + int ret = 0; + + if (!PyArg_ParseTuple(args, "O!", &_ped_FileSystemType_Type_obj, &in_fstype)) { +- return NULL; ++ return (PyObject *) NULL; + } + + part = _ped_Partition2PedPartition(s); ++ + if (part == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + + if (in_fstype != NULL) { + out_fstype = _ped_FileSystemType2PedFileSystemType(in_fstype); ++ + if (out_fstype == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + } + + /* ped_partition_set_system will assert on this. */ + if (!ped_partition_is_active(part)) { + PyErr_Format(PartitionException, "Could not set system flag on inactive partition %s%d", part->disk->dev->path, part->num); +- return NULL; ++ return (PyObject *) NULL; + } + + ret = ped_partition_set_system(part, out_fstype); ++ + if (ret == 0) { + PyErr_Format(PartitionException, "Could not set system flag on partition %s%d", part->disk->dev->path, part->num); +- return NULL; ++ return (PyObject *) NULL; + } + + if (ret) { +@@ -1253,34 +1252,35 @@ PyObject *py_ped_partition_set_name(_ped + int ret = 0; + + if (!PyArg_ParseTuple(args, "s", &in_name)) { +- return NULL; ++ return (PyObject *) NULL; + } + + part = _ped_Partition2PedPartition(s); ++ + if (part == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + + /* ped_partition_set_name will assert on this. */ + if (!ped_partition_is_active(part)) { + PyErr_Format(PartitionException, "Could not set system flag on inactive partition %s%d", part->disk->dev->path, part->num); +- return NULL; ++ return (PyObject *) NULL; + } + + ret = ped_partition_set_name(part, in_name); ++ + if (ret == 0) { + if (partedExnRaised) { + partedExnRaised = 0; + +- if (!PyErr_ExceptionMatches(PartedException) && +- !PyErr_ExceptionMatches(PyExc_NotImplementedError)) { ++ if (!PyErr_ExceptionMatches(PartedException) && !PyErr_ExceptionMatches(PyExc_NotImplementedError)) { + PyErr_SetString(PartitionException, partedExnMessage); + } + } else { + PyErr_Format(PartitionException, "Could not set name on partition %s%d", part->disk->dev->path, part->num); + } + +- return NULL; ++ return (PyObject *) NULL; + } + + if (ret) { +@@ -1295,30 +1295,31 @@ PyObject *py_ped_partition_get_name(_ped + char *ret = NULL; + + part = _ped_Partition2PedPartition(s); ++ + if (part == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + + /* ped_partition_get_name will assert on this. */ + if (!ped_partition_is_active(part)) { + PyErr_Format(PartitionException, "Could not get name on inactive partition %s%d", part->disk->dev->path, part->num); +- return NULL; ++ return (PyObject *) NULL; + } + + ret = (char *) ped_partition_get_name(part); ++ + if (ret == NULL) { + if (partedExnRaised) { + partedExnRaised = 0; + +- if (!PyErr_ExceptionMatches(PartedException) && +- !PyErr_ExceptionMatches(PyExc_NotImplementedError)) { ++ if (!PyErr_ExceptionMatches(PartedException) && !PyErr_ExceptionMatches(PyExc_NotImplementedError)) { + PyErr_SetString(PartitionException, partedExnMessage); + } + } else { + PyErr_Format(PartitionException, "Could not read name on partition %s%d", part->disk->dev->path, part->num); + } + +- return NULL; ++ return (PyObject *) NULL; + } + + return PyUnicode_FromString(ret); +@@ -1329,13 +1330,13 @@ PyObject *py_ped_partition_is_busy(_ped_ + int ret = 0; + + part = _ped_Partition2PedPartition(s); +- if (part) { +- ret = ped_partition_is_busy(part); +- } +- else { +- return NULL; ++ ++ if (part == NULL) { ++ return (PyObject *) NULL; + } + ++ ret = ped_partition_is_busy(part); ++ + if (ret) { + Py_RETURN_TRUE; + } else { +@@ -1348,15 +1349,16 @@ PyObject *py_ped_partition_get_path(_ped + char *ret = NULL; + + part = _ped_Partition2PedPartition(s); +- if (part) { +- ret = ped_partition_get_path(part); +- if (ret == NULL) { +- PyErr_Format(PartitionException, "Could not get path for partition %s%d", part->disk->dev->path, part->num); +- return NULL; +- } ++ ++ if (part == NULL) { ++ return (PyObject *) NULL; + } +- else { +- return NULL; ++ ++ ret = ped_partition_get_path(part); ++ ++ if (ret == NULL) { ++ PyErr_Format(PartitionException, "Could not get path for partition %s%d", part->disk->dev->path, part->num); ++ return (PyObject *) NULL; + } + + return PyUnicode_FromString(ret); +@@ -1366,12 +1368,12 @@ PyObject *py_ped_partition_reset_num(_pe + PedPartition *part = NULL; + + part = _ped_Partition2PedPartition(s); ++ + if (part == NULL) { +- Py_RETURN_FALSE; ++ return (PyObject *) NULL; + } + + part->num = -1; +- + Py_RETURN_TRUE; + } + +@@ -1381,17 +1383,18 @@ PyObject *py_ped_partition_type_get_name + char *ret = NULL; + + if (!PyArg_ParseTuple(args, "i", &type)) { +- return NULL; ++ return (PyObject *) NULL; + } + + if (type) { + ret = (char *) ped_partition_type_get_name(type); + } + +- if (ret != NULL) ++ if (ret != NULL) { + return PyUnicode_FromString(ret); +- else +- return PyUnicode_FromString(""); ++ } else { ++ return (PyObject *) NULL; ++ } + } + + PyObject *py_ped_partition_flag_get_name(PyObject *s, PyObject *args) { +@@ -1399,12 +1402,12 @@ PyObject *py_ped_partition_flag_get_name + char *ret = NULL; + + if (!PyArg_ParseTuple(args, "i", &flag)) { +- return NULL; ++ return (PyObject *) NULL; + } + + if (flag < PED_PARTITION_FIRST_FLAG) { + PyErr_SetString(PyExc_ValueError, "Invalid flag provided."); +- return NULL; ++ return (PyObject *) NULL; + } + + if (flag) { +@@ -1413,7 +1416,7 @@ PyObject *py_ped_partition_flag_get_name + if (!ret) { + /* Re-raise the libparted exception. */ + partedExnRaised = 0; +- return NULL; ++ return (PyObject *) NULL; + } + } + +@@ -1424,7 +1427,7 @@ PyObject *py_ped_partition_flag_get_by_n + char *name = NULL; + + if (!PyArg_ParseTuple(args, "s", &name)) { +- return NULL; ++ return (PyObject *) NULL; + } + + return PyLong_FromLong(ped_partition_flag_get_by_name(name)); +@@ -1434,7 +1437,7 @@ PyObject *py_ped_partition_flag_next(PyO + int flag; + + if (!PyArg_ParseTuple(args, "i", &flag)) { +- return NULL; ++ return (PyObject *) NULL; + } + + return Py_BuildValue("i", ped_partition_flag_next(flag)); +@@ -1448,38 +1451,40 @@ PyObject *py_ped_disk_add_partition(PyOb + PedConstraint *out_constraint = NULL; + int ret = 0; + +- if (!PyArg_ParseTuple(args, "O!|O!",&_ped_Partition_Type_obj, +- &in_part, &_ped_Constraint_Type_obj, &in_constraint)) { +- return NULL; ++ if (!PyArg_ParseTuple(args, "O!|O!",&_ped_Partition_Type_obj, &in_part, &_ped_Constraint_Type_obj, &in_constraint)) { ++ return (PyObject *) NULL; + } + + disk = _ped_Disk2PedDisk(s); ++ + if (disk == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + + /* Its non-sense to add an owned partition */ + if (in_part->_owned == 1) { + PyErr_SetString(PartitionException, "Attempting to add a partition " + "that is already owned by a disk."); +- return NULL; ++ return (PyObject *) NULL; + } + + + out_part = _ped_Partition2PedPartition(in_part); ++ + if (out_part == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + + if (out_part->disk != disk) { + PyErr_SetString(PartitionException, "Cannot add a partition to another disk then the one used for creating the partition"); +- return NULL; ++ return (PyObject *) NULL; + } + + if (in_constraint) { + out_constraint = _ped_Constraint2PedConstraint(in_constraint); ++ + if (out_constraint == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + } + +@@ -1492,14 +1497,14 @@ PyObject *py_ped_disk_add_partition(PyOb + if (partedExnRaised) { + partedExnRaised = 0; + +- if (!PyErr_ExceptionMatches(PartedException) && +- !PyErr_ExceptionMatches(PyExc_NotImplementedError)) ++ if (!PyErr_ExceptionMatches(PartedException) && !PyErr_ExceptionMatches(PyExc_NotImplementedError)) { + PyErr_SetString(PartitionException, partedExnMessage); +- } +- else ++ } ++ } else { + PyErr_Format(PartitionException, "Could not create partition %s%d", out_part->disk->dev->path, out_part->num); ++ } + +- return NULL; ++ return (PyObject *) NULL; + } + + /* update our _ped.Partition object with out_part values */ +@@ -1521,56 +1526,62 @@ PyObject *py_ped_disk_remove_partition(P + int ret = 0; + + if (!PyArg_ParseTuple(args, "O!", &_ped_Partition_Type_obj, &in_part)) { +- return NULL; ++ return (PyObject *) NULL; + } + + disk = _ped_Disk2PedDisk(s); ++ + if (disk == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + + /* Its non-sense to remove an unowned partition */ + if (in_part->_owned == 0) { + PyErr_SetString(PartitionException, "Attempting to remove a partition " + "that is not owned by any disk."); +- return NULL; ++ return (PyObject *) NULL; + } + + out_part = _ped_Partition2PedPartition(in_part); ++ + if (out_part == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + + if (out_part->disk != disk) { + PyErr_SetString(PartitionException, "Partition is not part of the disk it is being removed from"); +- return NULL; ++ return (PyObject *) NULL; + } + + if (out_part->part_list != NULL) { + PedPartition *part; ++ + for (part = out_part->part_list; part; part = part->next) { +- if (ped_partition_is_active(part)) ++ if (ped_partition_is_active(part)) { + break; ++ } + } ++ + if (part) { + PyErr_SetString(PartitionException, "Attempting to remove an extended partition that still contains logical partitions"); +- return NULL; ++ return (PyObject *) NULL; + } + } + + ret = ped_disk_remove_partition(disk, out_part); ++ + if (ret == 0) { + if (partedExnRaised) { + partedExnRaised = 0; + +- if (!PyErr_ExceptionMatches(PartedException) && +- !PyErr_ExceptionMatches(PyExc_NotImplementedError)) ++ if (!PyErr_ExceptionMatches(PartedException) && !PyErr_ExceptionMatches(PyExc_NotImplementedError)) { + PyErr_SetString(PartitionException, partedExnMessage); +- } +- else ++ } ++ } else { + PyErr_Format(PartitionException, "Could not remove partition %s%d", out_part->disk->dev->path, out_part->num); ++ } + +- return NULL; ++ return (PyObject *) NULL; + } + + in_part->_owned = 0; +@@ -1591,25 +1602,24 @@ PyObject *py_ped_disk_delete_all(PyObjec + int ret = 0; + + disk = _ped_Disk2PedDisk(s); ++ + if (disk) { + ret = ped_disk_delete_all(disk); ++ + if (ret == 0) { + if (partedExnRaised) { + partedExnRaised = 0; + +- if (!PyErr_ExceptionMatches(PartedException) && +- !PyErr_ExceptionMatches(PyExc_NotImplementedError)) ++ if (!PyErr_ExceptionMatches(PartedException) && !PyErr_ExceptionMatches(PyExc_NotImplementedError)) { + PyErr_SetString(PartitionException, partedExnMessage); +- } +- else ++ } ++ } else { + PyErr_Format(PartitionException, "Could not remove all partitions on %s", disk->dev->path); ++ } + +- return NULL; ++ return (PyObject *) NULL; + } + } +- else { +- return NULL; +- } + + if (ret) { + Py_RETURN_TRUE; +@@ -1627,57 +1637,58 @@ PyObject *py_ped_disk_set_partition_geom + PedSector start, end; + int ret = 0; + +- if (!PyArg_ParseTuple(args, "O!OLL", &_ped_Partition_Type_obj, &in_part, +- &in_constraint, &start, &end)) { +- return NULL; ++ if (!PyArg_ParseTuple(args, "O!OLL", &_ped_Partition_Type_obj, &in_part, &in_constraint, &start, &end)) { ++ return (PyObject *) NULL; + } + +- if (in_constraint != Py_None && !PyObject_IsInstance(in_constraint, +- (PyObject *)&_ped_Constraint_Type_obj)) { ++ if (in_constraint != Py_None && !PyObject_IsInstance(in_constraint, (PyObject *)&_ped_Constraint_Type_obj)) { + PyErr_SetString(PyExc_ValueError, "invalid constraint type"); +- return NULL; ++ return (PyObject *) NULL; + } + + disk = _ped_Disk2PedDisk(s); ++ + if (disk == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + + out_part = _ped_Partition2PedPartition(in_part); ++ + if (out_part == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + + if (out_part->disk != disk) { + PyErr_SetString(PartitionException, "partition.disk does not match disk"); +- return NULL; ++ return (PyObject *) NULL; + } + + if (in_constraint != Py_None) { + out_constraint = _ped_Constraint2PedConstraint(in_constraint); ++ + if (out_constraint == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + } + +- ret = ped_disk_set_partition_geom(disk, out_part, out_constraint, +- start, end); ++ ret = ped_disk_set_partition_geom(disk, out_part, out_constraint, start, end); + +- if (out_constraint) ++ if (out_constraint) { + ped_constraint_destroy(out_constraint); ++ } + + if (ret == 0) { + if (partedExnRaised) { + partedExnRaised = 0; + +- if (!PyErr_ExceptionMatches(PartedException) && +- !PyErr_ExceptionMatches(PyExc_NotImplementedError)) ++ if (!PyErr_ExceptionMatches(PartedException) && !PyErr_ExceptionMatches(PyExc_NotImplementedError)) { + PyErr_SetString(PartitionException, partedExnMessage); +- } +- else ++ } ++ } else { + PyErr_Format(PartitionException, "Could not set geometry on %s%d", disk->dev->path, out_part->num); ++ } + +- return NULL; ++ return (PyObject *) NULL; + } + + *((_ped_Geometry *)in_part->geom)->ped_geometry = out_part->geom; +@@ -1697,50 +1708,53 @@ PyObject *py_ped_disk_maximize_partition + PedConstraint *out_constraint = NULL; + int ret = 0; + +- if (!PyArg_ParseTuple(args, "O!|O!", &_ped_Partition_Type_obj, &in_part, +- &_ped_Constraint_Type_obj, &in_constraint)) { +- return NULL; ++ if (!PyArg_ParseTuple(args, "O!|O!", &_ped_Partition_Type_obj, &in_part, &_ped_Constraint_Type_obj, &in_constraint)) { ++ return (PyObject *) NULL; + } + + disk = _ped_Disk2PedDisk(s); ++ + if (disk == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + + out_part = _ped_Partition2PedPartition(in_part); ++ + if (out_part == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + + if (out_part->disk != disk) { + PyErr_SetString(PartitionException, "partition.disk does not match disk"); +- return NULL; ++ return (PyObject *) NULL; + } + + if (in_constraint) { + out_constraint = _ped_Constraint2PedConstraint(in_constraint); ++ + if (out_constraint == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + } + + ret = ped_disk_maximize_partition(disk, out_part, out_constraint); + +- if (out_constraint) ++ if (out_constraint) { + ped_constraint_destroy(out_constraint); ++ } + + if (ret == 0) { + if (partedExnRaised) { + partedExnRaised = 0; + +- if (!PyErr_ExceptionMatches(PartedException) && +- !PyErr_ExceptionMatches(PyExc_NotImplementedError)) ++ if (!PyErr_ExceptionMatches(PartedException) && !PyErr_ExceptionMatches(PyExc_NotImplementedError)) { + PyErr_SetString(PartitionException, partedExnMessage); +- } +- else ++ } ++ } else { + PyErr_Format(PartitionException, "Could not maximize partition size for %s%d", disk->dev->path, out_part->num); ++ } + +- return NULL; ++ return (PyObject *) NULL; + } + + *((_ped_Geometry *)in_part->geom)->ped_geometry = out_part->geom; +@@ -1761,55 +1775,59 @@ PyObject *py_ped_disk_get_max_partition_ + PedGeometry *pass_geom = NULL; + _ped_Geometry *ret = NULL; + +- if (!PyArg_ParseTuple(args, "O!|O!", &_ped_Partition_Type_obj, &in_part, +- &_ped_Constraint_Type_obj, &in_constraint)) { +- return NULL; ++ if (!PyArg_ParseTuple(args, "O!|O!", &_ped_Partition_Type_obj, &in_part, &_ped_Constraint_Type_obj, &in_constraint)) { ++ return (PyObject *) NULL; + } + + disk = _ped_Disk2PedDisk(s); ++ + if (disk == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + + out_part = _ped_Partition2PedPartition(in_part); ++ + if (out_part == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + + if (out_part->disk != disk) { + PyErr_SetString(PartitionException, "partition.disk does not match disk"); +- return NULL; ++ return (PyObject *) NULL; + } + + if (in_constraint) { + out_constraint = _ped_Constraint2PedConstraint(in_constraint); ++ + if (out_constraint == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + } + + pass_geom = ped_disk_get_max_partition_geometry(disk, out_part, + out_constraint); +- if (out_constraint) ++ if (out_constraint) { + ped_constraint_destroy(out_constraint); ++ } + + if (pass_geom == NULL) { + if (partedExnRaised) { + partedExnRaised = 0; + +- if (!PyErr_ExceptionMatches(PartedException) && +- !PyErr_ExceptionMatches(PyExc_NotImplementedError)) ++ if (!PyErr_ExceptionMatches(PartedException) && !PyErr_ExceptionMatches(PyExc_NotImplementedError)) { + PyErr_SetString(PartitionException, partedExnMessage); +- } +- else ++ } ++ } else { + PyErr_Format(PartitionException, "Could not get maximum partition size for %s%d", disk->dev->path, out_part->num); ++ } + +- return NULL; ++ return (PyObject *) NULL; + } + + ret = PedGeometry2_ped_Geometry(pass_geom); ++ + if (ret == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + + return (PyObject *) ret; +@@ -1820,25 +1838,24 @@ PyObject *py_ped_disk_minimize_extended_ + int ret = 0; + + disk = _ped_Disk2PedDisk(s); ++ + if (disk) { + ret = ped_disk_minimize_extended_partition(disk); ++ + if (ret == 0) { + if (partedExnRaised) { + partedExnRaised = 0; + +- if (!PyErr_ExceptionMatches(PartedException) && +- !PyErr_ExceptionMatches(PyExc_NotImplementedError)) ++ if (!PyErr_ExceptionMatches(PartedException) && !PyErr_ExceptionMatches(PyExc_NotImplementedError)) { + PyErr_SetString(PartitionException, partedExnMessage); +- } +- else ++ } ++ } else { + PyErr_Format(PartitionException, "Could not shrink extended partition on %s", disk->dev->path); ++ } + +- return NULL; ++ return (PyObject *) NULL; + } + } +- else { +- return NULL; +- } + + if (ret) { + Py_RETURN_TRUE; +@@ -1855,38 +1872,41 @@ PyObject *py_ped_disk_next_partition(PyO + _ped_Partition *ret = NULL; + + if (!PyArg_ParseTuple(args, "|O!", &_ped_Partition_Type_obj, &in_part)) { +- return NULL; ++ return (PyObject *) NULL; + } + + disk = _ped_Disk2PedDisk(s); ++ + if (disk == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + + if (in_part) { + out_part = _ped_Partition2PedPartition(in_part); ++ + if (out_part == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + + if (out_part->disk != disk) { + PyErr_SetString(PartitionException, "partition.disk does not match disk"); +- return NULL; ++ return (PyObject *) NULL; + } + } + + pass_part = ped_disk_next_partition(disk, out_part); ++ + if (pass_part == NULL) { + Py_INCREF(Py_None); + return Py_None; + } + + ret = PedPartition2_ped_Partition(pass_part, (_ped_Disk *)s); +- if (ret == NULL) { +- return NULL; ++ ++ if (ret != NULL) { ++ ret->_owned = 1; + } + +- ret->_owned = 1; + return (PyObject *) ret; + } + +@@ -1897,27 +1917,28 @@ PyObject *py_ped_disk_get_partition(PyOb + _ped_Partition *ret = NULL; + + if (!PyArg_ParseTuple(args, "i", &num)) { +- return NULL; ++ return (PyObject *) NULL; + } + + disk = _ped_Disk2PedDisk(s); ++ + if (disk) { + pass_part = ped_disk_get_partition(disk, num); ++ + if (pass_part == NULL) { + PyErr_SetString(PartitionException, "Partition does not exist"); +- return NULL; ++ return (PyObject *) NULL; + } + + ret = PedPartition2_ped_Partition(pass_part, (_ped_Disk *)s); ++ + if (ret == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } +- } +- else { +- return NULL; ++ ++ ret->_owned = 1; + } + +- ret->_owned = 1; + return (PyObject *) ret; + } + +@@ -1928,23 +1949,26 @@ PyObject *py_ped_disk_get_partition_by_s + _ped_Partition *ret = NULL; + + if (!PyArg_ParseTuple(args, "L", §or)) { +- return NULL; ++ return (PyObject *) NULL; + } + + disk = _ped_Disk2PedDisk(s); ++ + if (disk == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + + pass_part = ped_disk_get_partition_by_sector(disk, sector); ++ + if (pass_part == NULL) { + PyErr_SetString(PartitionException, "Partition does not exist"); +- return NULL; ++ return (PyObject *) NULL; + } + + ret = PedPartition2_ped_Partition(pass_part, (_ped_Disk *)s); ++ + if (ret == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + + ret->_owned = 1; +@@ -1957,23 +1981,24 @@ PyObject *py_ped_disk_extended_partition + _ped_Partition *ret = NULL; + + disk = _ped_Disk2PedDisk(s); ++ + if (disk) { + pass_part = ped_disk_extended_partition(disk); ++ + if (pass_part == NULL) { + PyErr_SetString(PartitionException, "Extended partition does not exist"); +- return NULL; ++ return (PyObject *) NULL; + } + + ret = PedPartition2_ped_Partition(pass_part, (_ped_Disk *)s); ++ + if (ret == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } +- } +- else { +- return NULL; ++ ++ ret->_owned = 1; + } + +- ret->_owned = 1; + return (PyObject *) ret; + } + +@@ -1985,26 +2010,25 @@ PyObject *py_ped_disk_new_fresh(PyObject + PedDisk *disk = NULL; + _ped_Disk *ret = NULL; + +- if (!PyArg_ParseTuple(args, "O!O!", &_ped_Device_Type_obj, &in_device, +- &_ped_DiskType_Type_obj, &in_type)) { +- return NULL; ++ if (!PyArg_ParseTuple(args, "O!O!", &_ped_Device_Type_obj, &in_device, &_ped_DiskType_Type_obj, &in_type)) { ++ return (PyObject *) NULL; + } + + if ((device = _ped_Device2PedDevice((PyObject *) in_device)) == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + + if ((type = _ped_DiskType2PedDiskType((PyObject *) in_type)) == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + + if ((disk = ped_disk_new_fresh(device, type)) == NULL) { + if (partedExnRaised) { + partedExnRaised = 0; + +- if (!PyErr_ExceptionMatches(PartedException) && +- !PyErr_ExceptionMatches(PyExc_NotImplementedError)) ++ if (!PyErr_ExceptionMatches(PartedException) && !PyErr_ExceptionMatches(PyExc_NotImplementedError)) { + PyErr_SetString(DiskException, partedExnMessage); ++ } + } else { + if (disk->dev == NULL) { + PyErr_Format(DiskException, "Could not create new disk label"); +@@ -2013,7 +2037,7 @@ PyObject *py_ped_disk_new_fresh(PyObject + } + } + +- return NULL; ++ return (PyObject *) NULL; + } + + ret = PedDisk2_ped_Disk(disk); +@@ -2027,20 +2051,20 @@ PyObject *py_ped_disk_new(PyObject *s, P + _ped_Disk *ret = NULL; + + if (!PyArg_ParseTuple(args, "O!", &_ped_Device_Type_obj, &in_device)) { +- return NULL; ++ return (PyObject *) NULL; + } + + if ((device = _ped_Device2PedDevice((PyObject *) in_device)) == NULL) { +- return NULL; ++ return (PyObject *) NULL; + } + + if ((disk = ped_disk_new(device)) == NULL) { + if (partedExnRaised) { + partedExnRaised = 0; + +- if (!PyErr_ExceptionMatches(PartedException) && +- !PyErr_ExceptionMatches(PyExc_NotImplementedError)) ++ if (!PyErr_ExceptionMatches(PartedException) && !PyErr_ExceptionMatches(PyExc_NotImplementedError)) { + PyErr_SetString(DiskException, partedExnMessage); ++ } + } else { + if (disk->dev == NULL) { + PyErr_Format(DiskException, "Could not create new disk label"); +@@ -2049,7 +2073,7 @@ PyObject *py_ped_disk_new(PyObject *s, P + } + } + +- return NULL; ++ return (PyObject *) NULL; + } + + ret = PedDisk2_ped_Disk(disk); +diff -up pyparted-3.11.7/src/pytimer.c.orig pyparted-3.11.7/src/pytimer.c +--- pyparted-3.11.7/src/pytimer.c.orig 2019-04-23 14:24:26.657517400 -0400 ++++ pyparted-3.11.7/src/pytimer.c 2021-07-09 15:09:17.827164706 -0400 +@@ -104,33 +104,9 @@ int _ped_Timer_clear(_ped_Timer *self) { + } + + int _ped_Timer_init(_ped_Timer *self, PyObject *args, PyObject *kwds) { +- static char *kwlist[] = {"frac", "start", "now", "predicted_end", +- "state_name", NULL}; +- +- self->state_name = NULL; +- + /* XXX: timers aren't really done yet in pyparted */ + PyErr_SetString(PyExc_NotImplementedError, NULL); + return -1; +- +- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|fdddz", kwlist, +- &self->frac, &self->start, &self->now, +- &self->predicted_end, &self->state_name)) { +- return -1; +- } +- +- /* self->state_name now points to the internal buffer of a PyUnicode object, +- * which may be freed when its refcount drops to zero, so strdup it. +- */ +- if (self->state_name) { +- self->state_name = strdup(self->state_name); +- if (!self->state_name) { +- PyErr_NoMemory(); +- return -3; +- } +- } +- +- return 0; + } + + PyObject *_ped_Timer_get(_ped_Timer *self, void *closure) { diff --git a/SPECS/pyparted.spec b/SPECS/pyparted.spec new file mode 100644 index 0000000..78fc081 --- /dev/null +++ b/SPECS/pyparted.spec @@ -0,0 +1,754 @@ +%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} > 28 +# disable python2 by default +%bcond_with python2 +%else +%bcond_without python2 +%endif +%endif + +%global py2dir python2-build + +Summary: Python module for GNU parted +Name: pyparted +Epoch: 1 +Version: 3.11.7 +Release: 4%{?dist} +License: GPLv2+ +Group: System Environment/Libraries +URL: https://github.com/rhinstaller/pyparted + +Source0: https://github.com/rhinstaller/pyparted/archive/%{name}-%{version}.tar.gz + +Patch0: pyparted-3.11.7-covscan.patch + +BuildRequires: gcc +BuildRequires: parted-devel >= 3.2-18 +BuildRequires: pkgconfig +BuildRequires: e2fsprogs + +%if %{with python3} +BuildRequires: python3-devel +BuildRequires: python3-six +%endif + +%if %{with python2} +BuildRequires: python2-devel +BuildRequires: python2-six +%endif + +%global _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 +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 +partition tables. This package provides Python 3 bindings for parted. +%endif + +%prep +%setup -q +%patch0 -p1 + +%if %{with python2} +rm -rf ../%{py2dir} +mkdir -p ../%{py2dir} +cp -a . ../%{py2dir} +mv ../%{py2dir} . +%endif + +%build +%if %{with python3} +PYTHON=python3 CFLAGS="%{optflags}" make %{?_smp_mflags} +%endif + +%if %{with python2} +pushd %{py2dir} +PYTHON=python2 CFLAGS="%{optflags}" make %{?_smp_mflags} +popd +%endif + +%check +%if %{with python3} +PYTHON=python3 CFLAGS="%{optflags}" make test +%endif + +%if %{with python2} +pushd %{py2dir} +PYTHON=python2 CFLAGS="%{optflags}" make test +popd +%endif + +%install +%if %{with python3} +PYTHON=python3 CFLAGS="%{optflags}" make install DESTDIR=%{buildroot} +%endif + +%if %{with python2} +pushd %{py2dir} +PYTHON=python2 CFLAGS="%{optflags}" make install DESTDIR=%{buildroot} +popd +%endif + +%if %{with python3} +%files -n python3-pyparted +%doc AUTHORS COPYING NEWS README TODO +%{python3_sitearch}/_ped.*.so +%{python3_sitearch}/parted +%{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 +* Mon Jul 12 2021 David Cantrell - 1:3.11.7-4 +- Rebuild for gating + Related: rhbz#1927379 + +* Fri Jul 09 2021 David Cantrell - 1:3.11.7-3 +- More covscan patch followup + Related: rhbz#1927379 + +* Fri Jul 09 2021 David Cantrell - 1:3.11.7-2 +- Patched errors found by covscan + Related: rhbz#1927379 + +* Thu Jul 08 2021 David Cantrell - 1:3.11.7-1 +- Upgrade to pyparted-3.11.7 + Resolves: rhbz#1927379 + +* Tue May 18 2021 David Cantrell - 1:3.11.0-21 +- Rebuild for gating + Related: rhbz#1927379 + +* Tue May 18 2021 David Cantrell - 1:3.11.0-20 +- Fixes for gating + Related: rhbz#1927379 + +* Mon May 17 2021 David Cantrell - 1:3.11.0-19 +- Rebuild for gating + Related: rhbz#1927379 + +* Mon May 17 2021 David Cantrell - 1:3.11.0-18 +- Rebuild for gating + Related: rhbz#1927379 + +* Mon May 17 2021 David Cantrell - 1:3.11.0-17 +- Rebuild + Related: rhbz#1927379 + +* Tue Feb 23 2021 David Cantrell - 1:3.11.0-16 +- Handle PED_EXCEPTION_FIX (Fix/Ignore) exceptions + Resolves: rhbz#1927379 + +* Wed Jul 25 2018 David Cantrell - 1:3.11.0-13 +- Do not build python2 subpackage + Resolves: rhbz#1565329 + +* Thu Jul 19 2018 David Cantrell - 1:3.11.0-12 +- Have python3-pyparted package provide 'pyparted' + Resolves: rhbz#1602333 + +* Mon May 28 2018 Charalampos Stratakis - 1:3.11.0-11 +- Conditionalize the python2 subpackage + +* Mon Apr 02 2018 Adam Williamson - 1:3.11.0-10 +- Make pyparted provides/obsoletes include the epoch + +* Fri Feb 09 2018 Fedora Release Engineering - 1:3.11.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Mon Jan 15 2018 Iryna Shcherbina - 1:3.11.0-8 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + +* Sun Aug 20 2017 Zbigniew JÄ™drzejewski-Szmek - 1:3.11.0-7 +- Add Provides for the old name without %%_isa + +* Sat Aug 19 2017 Zbigniew JÄ™drzejewski-Szmek - 1:3.11.0-6 +- Python 2 binary package renamed to python2-pyparted + See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 + +* Thu Aug 03 2017 Fedora Release Engineering - 1:3.11.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 1:3.11.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Thu Jul 13 2017 David Cantrell - 1:3.11.0-3 +- Require parted-3.2-18 in order to ensure #25 does not occur + +* Mon Jun 26 2017 David Cantrell - 1:3.11.0-2 +- BuildRequires python[3]-six + +* Thu Jun 22 2017 David Cantrell - 1:3.11.0-1 +- Upgrade to pyparted-3.11.0 + +* Sat Feb 11 2017 Fedora Release Engineering - 1:3.10.7-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Tue Dec 13 2016 Stratakis Charalampos - 1:3.10.7-5 +- Rebuild for Python 3.6 + +* Tue Jul 19 2016 Fedora Release Engineering - 1:3.10.7-4 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Thu Feb 04 2016 Fedora Release Engineering - 1:3.10.7-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Oct 15 2015 Robert Kuska - 1:3.10.7-2 +- Rebuilt for Python3.5 rebuild + +* Thu Aug 27 2015 David Cantrell - 3.10.7-1 +- test__ped_filesystem.py for for Python 2 vs 3. (dcantrell) + +* Thu Aug 27 2015 David Cantrell - 3.10.6-1 +- Use sys.exit instead of os._exit with pocketlint. (clumens) +- Use addCleanup instead of tearDown for removing temp-device. (clumens) +- Add a new makefile target that does everything needed for jenkins. + (clumens) +- Merge pull request #13 from atodorov/fix_imports (david.l.cantrell) +- Merge pull request #14 from vpodzime/master (david.l.cantrell) +- Do not support and use hashing on pyparted's objects (#1229186) (vpodzime) +- Fix pylint errors (atodorov) +- Merge pull request #12 from atodorov/remove_hardcoded_paths + (david.l.cantrell) +- Merge pull request #8 from atodorov/tests_ped_filesystem (david.l.cantrell) +- Merge pull request #10 from atodorov/tests_ped_partition (david.l.cantrell) +- Merge pull request #6 from atodorov/add_coverage (david.l.cantrell) +- Remove hard-coded paths. You should have all tools in PATH when working on + pyparted. (atodorov) +- run the test suite under python-coverage and report the results (atodorov) +- add test coverage for _ped.Partition (atodorov) +- Merge pull request #9 from atodorov/tests_dont_skip_if_root + (david.l.cantrell) +- Merge pull request #11 from atodorov/fix_api_docs (david.l.cantrell) +- update pydoc descriptions based on actual behavior (atodorov) +- don't skip DeviceGetNextTestCase if running as root (atodorov) +- add test cases for _ped.FileSystem (atodorov) +- Merge pull request #7 from atodorov/tests_readme (david.l.cantrell) +- Remove old BUGS file. (david.l.cantrell) +- add simple test documentation (atodorov) +- Merge pull request #5 from vpodzime/master (david.l.cantrell) +- Beware of Python 3's version of the map() built-in function (vpodzime) +- Remove the MANIFEST file when doing 'make release' (dcantrell) +- Remove fedorahosted steps from the RELEASE file. (dcantrell) +- Update documentation and Makefile for github. (dcantrell) +- Stop using type() to do comparisons. (clumens) +- Merge pull request #4 from vpodzime/master-python3 (david.l.cantrell) +- Don't blindly expect that everything is hashable (vpodzime) +- Replace filter() call with list comprehension (vpodzime) +- Fix an incorrect reference to "type". (clumens) +- Merge pull request #3 from clumens/master (clumens) +- Only run pylint against a python3 build of pyparted. (clumens) +- Fix the fdisk example up to pass pylint. (clumens) +- Catch exact exceptions in a couple places. (clumens) +- Ignore some pylint warnings. (clumens) +- Don't use string formatting in calls to log.whatever. (clumens) +- Fix a couple unused variable warnings. (clumens) +- Define things in the setUp methods, not in runTest. (clumens) +- Don't redefine reserved or already used function names. (clumens) +- Fix import errors turned up by pylint. (clumens) +- Convert to using pocketlint to run pylint. (clumens) +- Don't run "git clean -fdx" in the "make clean" target. (clumens) +- Add extension whitelist for _ped to pylint call (bcl) +- Merge pull request #2 from jflorian/master (david.l.cantrell) +- New - example to create a single bootable partition (john_florian) +- Remember to pass the arguments to the exception handler. (clumens) +- Put new _ped constants and functions into the parted module. (clumens) +- PyInt_FromLong doesn't exist in python3, so always use PyLong_FromLong. + (clumens) +- Add new functions to extend exception handling. (clumens) +- Add function for resetting partition's number. (vpodzime) +- Fix localeC imports in a handful of src/parted/*.py files. (dcantrell) +- Disable false positive E0611 errors on src/parted/__init__.py (dcantrell) +- ped_unit_get_size() returns a long long, not just a long. (dcantrell) +- Adjust test cases to deal with run-time support. (dcantrell) +- Only import partition types that exist. (dcantrell) +- Note x.y.z version number. (dcantrell) +- Remove .travis.yml and tox.ini (dcantrell) +- Skip 'aix' diskType in FreshDiskTestCase (dcantrell) +- Handle running the test suite on armv7l hosts. (dcantrell) +- Fix getPartitionByPath for disks that are just plain files. (dlehman) +- ext2 may be smaller than the end of the device (#1095904) (bcl) +- support ppc64le in pyparted (hamzy) +- Fix up the PYTHONPATH for "make check" and "make test". (clumens) +- Remove geom tests that don't fail (bcl) +- Add btrfs and ext4 for filesystem type test (bcl) +- Revert "Add support for hfs_esp flag" (bcl) +- Teach pyparted that aarch64 support GPT partitions. (dcantrell) +- And disable the length one, too. (clumens) +- Disable one test case that fails on ppc64, for the moment. (clumens) +- Update pylint options for the latest version of that program. (clumens) +- Fix 'make bumpver' to handle multiple decimal points. (dcantrell) +- Add support for hfs_esp flag (dcantrell) +- Add support for esp flag (dcantrell) +- Add support for irst flag (dcantrell) +- Add support for msftdata flag (dcantrell) +- Don't assume tools will be in the user's $PATH. (clumens) +- Fix a lot of problems pylint caught. (clumens) +- Move from pychecker to pylint. (clumens) +- Have pychecker ignore some fale positives on missing class attrs. (clumens) +- setattr doesn't return any value. (clumens) +- Fix up pychecker errors reported by Jenkins. (dcantrell) +- Subject: [PATCH] pyparted: export ped_disk_new functionality (rnsastry) +- Correct boilerplate modifications. (dcantrell) +- Tests also require the parted binary. (g2p.code) +- Work around Travis's broken defaults. (g2p.code) + +* Thu Jun 18 2015 Fedora Release Engineering - 1:3.10.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Thu May 07 2015 David Cantrell - 3.10.5-1 +- Upgrade to pyparted-3.10.5 + +* Tue May 05 2015 David Cantrell - 3.10.4-1 +- Upgrade to pyparted-3.10.4 + +* Fri Jan 16 2015 David Cantrell - 3.10.3-1 +- Upgrade to pyparted-3.10.3 + +* Wed Nov 26 2014 David Cantrell - 3.10.2-1 +- Upgrade to pyparted-3.10.2 + +* Mon Nov 10 2014 David Cantrell - 3.10.1-1 +- Upgrade to pyparted-3.10.1 + +* Wed Sep 24 2014 David Cantrell - 3.10.0a-1 +- Upgrade to pyparted-3.10.0 +- Add python3 subpackage (#985308) + +* Sun Aug 17 2014 Fedora Release Engineering - 1:3.9.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Tue Jun 24 2014 David Cantrell - 3.9.5-1 +- Upgrade to pyparted-3.9.5 + +* Tue Jun 24 2014 David Cantrell - 3.9.4-2 +- Handle building on armv7l hosts + +* Tue Jun 24 2014 David Cantrell - 3.9.4-1 +- Support gpt and msdos disk labels on aarch64 (#1095904) + +* Thu Jun 12 2014 David Cantrell - 3.9.3-3 +- Fix GetLabelsTestCase for aarch64 (#1102854) + +* Sat Jun 07 2014 Fedora Release Engineering - 1:3.9.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Wed May 07 2014 Chris Lumens 3.9.3-1 +- Upgrade to pyparted-3.9.3 +- Revert "Add support for hfs_esp flag" (bcl) +- Add btrfs and ext4 for filesystem type test (bcl) +- Remove geom tests that don't fail (bcl) + +* Mon Sep 09 2013 David Cantrell - 3.9.2-1 +- Upgrade to pyparted-3.9.2 +- Enable 'make check' in the spec file, patch for koji use +- Add armv7l to the list of acceptable arches for gpt and msdos disklabels + +* Mon Sep 09 2013 David Cantrell - 3.9.1-1 +- Fix 'make bumpver' to handle multiple decimal points. (dcantrell) +- Add support for hfs_esp flag (dcantrell) +- Add support for esp flag (bcl) +- Add support for irst flag (bcl) +- Add support for msftdata flag (bcl) +- Subject: [PATCH] pyparted: export ped_disk_new functionality (rnsastry) +- Convert Constraint to __ped.Constraint in partition.getMaxGeometry() + (chris) +- Do not traceback when calling setlocale (#875354). (clumens) +- Enable 'make check' in the spec file, patch for koji use +- Add armv7l to the list of acceptable arches for gpt and msdos disklabels + +* Sun Aug 04 2013 Fedora Release Engineering - 1:3.9-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Mon Jul 08 2013 David Cantrell - 3.9-3 +- Revert to pyparted-3.9 plus critical patches due to issues with the 3.10 + release which are actively being worked on. The 3.10 release does not + work with the installer right now. + +* Thu May 23 2013 David Cantrell - 3.10-2 +- Fix build errors. + +* Thu May 23 2013 David Cantrell - 3.10-1 +- Upgrade to pyparted-3.10 (#886033) + +* Thu Feb 14 2013 Fedora Release Engineering - 3.9-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Dec 05 2012 David Cantrell - 3.9-1 +- Upgrade to pyparted-3.9 + +* Sat Jul 21 2012 Fedora Release Engineering - 3.8-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue Mar 13 2012 Brian C. Lane - 3.8-4 +- Rebuild against parted 3.1 + +* Thu Feb 02 2012 Brian C. Lane - 3.8-3 +- Add patch for new parted PED_DISK_GPT_PMBR_BOOT flag + +* Sat Jan 14 2012 Fedora Release Engineering - 3.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Jun 29 2011 David Cantrell - 3.8-1 +- Upgraded to pyparted-3.8 + +* Wed Jun 29 2011 David Cantrell - 3.7-2 +- BR parted-devel >= 3.0 +- Adjust for distutils build method + +* Wed Jun 29 2011 David Cantrell - 3.7-1 +- Upgraded to pyparted-3.7 (compatibility with parted-3.0) + +* Wed Mar 23 2011 David Cantrell - 3.6-1 +- Upgraded to pyparted-3.6 + +* Thu Mar 17 2011 David Cantrell - 3.5-3 +- Add support for PED_PARTITION_LEGACY_BOOT partition flag now in libparted + +* Tue Feb 08 2011 Fedora Release Engineering - 3.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Jan 17 2011 David Cantrell - 3.5-1 +- Drop dependency on python-decorator module. (dcantrell) +- Differentiate the "Could not commit" messages. (jgranado) +- Import _ped.DiskLabelException into parted namespace (cjwatson) +- Return PED_EXCEPTION_NO for yes/no interactive exceptions. (dcantrell) + +* Wed Jul 21 2010 David Malcolm - 3.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + +* Fri May 21 2010 David Cantrell - 3.4-2 +- Spec file cleanups to comply with current packaging policies + +* Thu Apr 29 2010 David Cantrell - 3.4-1 +- Handle PED_EXCEPTION_WARNING with PED_EXCEPTION_YES_NO (#575749) + (dcantrell) + +* Wed Apr 21 2010 Chris Lumens - 3.3-1 +- Upgrade to pyparted-3.3 (#583628). + +* Wed Mar 31 2010 David Cantrell - 3.2-2 +- Rebuild for libparted soname change + +* Thu Mar 25 2010 Chris Lumens - 3.2-1 +- Upgrade to pyparted-3.2 (#571940). + +* Mon Mar 01 2010 David Cantrell - 3.1-1 +- Upgrade to pyparted-3.1 (#567576). + +* Tue Jan 12 2010 David Cantrell - 3.0-1 +- Upgrade to pyparted-3.0. + +* Mon Jan 11 2010 Hans de Goede - 2.5-4 +- Rebuild for new parted-2.1 +- Remove py_disk_clobber_exclude function binding, as this function was + removed from parted-2.1 + +* Thu Jan 7 2010 Hans de Goede - 2.5-3 +- Change python_sitearch macro to use %%global as the new rpm will break + using %%define here, see: + https://www.redhat.com/archives/fedora-devel-list/2010-January/msg00093.html + +* Sat Dec 19 2009 David Cantrell - 2.5-2 +- Exclude pyparted-2.4.tar.gz from source RPM (oops) + +* Sat Dec 19 2009 David Cantrell - 2.5-1 +- Update release instructions. (dcantrell) +- Remove old cylinder alignment test cases for _ped. (dcantrell) +- Add tests for max partition length / start sector (hdegoede) +- Add _pedmodule and parted functions for max partition length / start + sector (hdegoede) +- Remove align_to_cylinders function bindings (hdegoede) +- Add tests for disk flag methods (hdegoede) +- Add _pedmodule and parted functions for per disk flags (hdegoede) +- Every tuple member requires a comma after it. (dcantrell) +- Fill out a lot of simple _ped.Disk test cases. (dcantrell) +- Disable DeviceDestroyTestCase for now. (dcantrell) +- Add RequiresLabeledDevice to tests/_ped/baseclass.py. (dcantrell) +- Attempt at fixing _ped.Device.destroy(), no dice. (dcantrell) +- Fix UnitFormatCustomTestCase and UnitFormatTestCase. (dcantrell) +- Fix UnitFormatCustomByteTestCase and UnitFormatByteTestCase. (dcantrell) +- Add DeviceStrTestCase, disable DeviceDestroyTestCase. (dcantrell) +- Add DeviceDestroyTestCase and DeviceCacheRemoveTestCase. (dcantrell) +- Implemented ConstraintIsSolutionTestCase(). (dcantrell) +- Implement ConstraintSolveMaxTestCase(). (dcantrell) +- Implement ConstraintSolveNearestTestCase(). (dcantrell) +- Correct py_ped_file_system_probe_specific() for NULL returns. (dcantrell) +- Implement FileSystemProbeSpecificTestCase(). (dcantrell) +- Implement FileSystemProbeTestCase(). (dcantrell) +- Add RequiresFileSystem to tests/_ped/baseclass.py. (dcantrell) +- Add disk alignment test cases in test_ped.py. (dcantrell) +- Fix CHSGeometryStrTestCase(). (dcantrell) +- Fix ConstraintDuplicateTestCase...finally. (dcantrell) +- Put a deprecation warning in py_ped_constraint_duplicate(). (dcantrell) +- Note that we need parted from Fedora for pyparted. (dcantrell) +- Fix UnitGetSizeTestCase in _ped test cases for _ped.UNIT_PERCENT. + (dcantrell) +- Add testcase for new _ped disk get_partition_alignment method (hdegoede) + +* Fri Nov 06 2009 David Cantrell - 2.4-1 +- Upgrade to pyparted-2.4: + Use PedDevice length instead of DIY (#532023) (hdegoede) + Use sectorSize not physicalSectorSize for size calculations (hdegoede) + +* Tue Nov 03 2009 David Cantrell - 2.3-1 +- Upgrade to pyparted-2.3: + Remove root user requirement in _ped + Add testcases for new _ped device methods + Add python wrapper for new PedDisk partition alignment info function + Add support for new PedDisk parition alignment info function + Add python wrappers for new PedDevice alignment info functions + Add support for new PedDevice alignment info functions + Fix a whole pile of test cases. + Remove ped_disk_commit_to_dev() call from py_ped_disk_new_fresh() + Fix error in Constraint __str__ method + Make _ped_Device2PedDevice properly set / throw exceptions + Fixup various errorhandling issues in pydisk.c + Add missing _ped_Device2PedDevice() retval checks + Use libparted commit() for parted.disk.Disk.commit() (hdegoede). +- BR parted-devel >= 1.9.0-20 + +* Fri Oct 02 2009 David Cantrell - 2.2-1 +- Upgrade to pyparted-2.2: + Fixes PedDisk2_ped_Disk() and avoids losing disk label data + in the conversion process (#526999) + +* Mon Aug 17 2009 Chris Lumens - 2.1.2-1 +- Upgrade to pyparted-2.1.2: + PED_DEVICE_DM is always defined in libparted these days. + Handle parted exceptions arising from ped_device_get (#495433). + +* Tue Aug 04 2009 David Cantrell - 2.1.1-1 +- Upgrade to pyparted-2.1.1 + +* Sun Jul 26 2009 Fedora Release Engineering - 2.1.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Thu Jul 16 2009 David Cantrell - 2.1.0-1 +- Upgrade to pyparted-2.1.0, requires parted-1.9.0-1 or higher + +* Fri Jul 10 2009 David Cantrell - 2.0.12-2 +- Rebuild for new parted + +* Tue Apr 14 2009 David Cantrell - 2.0.12-1 +- Upgrade to pyparted-2.0.12 + +* Mon Apr 13 2009 David Cantrell - 2.0.11-1 +- Upgrade to pyparted-2.0.11 + +* Fri Apr 03 2009 David Cantrell - 2.0.10-1 +- Upgrade to pyparted-2.0.10 + Fix LVM problems around parted.Disk.commit() (#491746) + +* Mon Mar 23 2009 David Cantrell - 2.0.9-1 +- Upgrade to pyparted-2.0.9 + +* Fri Mar 20 2009 David Cantrell - 2.0.8-1 +- Upgrade to pyparted-2.0.8 + +* Thu Mar 19 2009 David Cantrell - 2.0.7-1 +- Upgrade to pyparted-2.0.7 + +* Thu Mar 12 2009 David Cantrell - 2.0.6-1 +- Upgrade to pyparted-2.0.6 + +* Thu Mar 05 2009 David Cantrell - 2.0.5-1 +- Upgrade to pyparted-2.0.5 + +* Sat Feb 28 2009 David Cantrell - 2.0.4-1 +- Upgrade to pyparted-2.0.4 + +* Fri Feb 27 2009 David Cantrell - 2.0.3-1 +- Upgrade to pyparted-2.0.3 + +* Wed Feb 25 2009 David Cantrell - 2.0.2-1 +- Upgrade to pyparted-2.0.2 + +* Mon Feb 16 2009 David Cantrell - 2.0.1-1 +- Upgrade to pyparted-2.0.1 (#485632) + +* Thu Feb 12 2009 David Cantrell - 2.0.0-1 +- Upgrade to pyparted-2.0.0 + +* Sat Nov 29 2008 Ignacio Vazquez-Abrams - 1.8.9-6 +- Rebuild for Python 2.6 + +* Fri Feb 08 2008 David Cantrell - 1.8.9-5 +- Rebuild for gcc-4.3 + +* Wed Jan 02 2008 David Cantrell - 1.8.9-4 +- Rebuild + +* Mon Nov 19 2007 Jeremy Katz - 1.8.9-3 +- Add support for exact constraints + +* Tue Aug 21 2007 David Cantrell - 1.8.9-2 +- Rebuild + +* Fri Aug 10 2007 David Cantrell - 1.8.9-1 +- Update license tag to indicate GPL v2 or later +- Update URLs to point to new upstream location + +* Fri Jun 15 2007 David Cantrell - 1.8.8-1 +- Clean up wording in package description (#226337) +- BR pkgconfig (#226337) + +* Fri Jun 15 2007 David Cantrell - 1.8.7-1 +- Merge review (#226337) + +* Mon Apr 23 2007 David Cantrell - 1.8.6-2 +- Ensure build env CFLAGS are included (#226337) + +* Thu Apr 19 2007 David Cantrell - 1.8.6-1 +- Merge review (#226337) + +* Tue Mar 20 2007 David Cantrell - 1.8.5-4 +- Rebuild for GNU parted-1.8.6 + +* Tue Mar 20 2007 David Cantrell - 1.8.5-3 +- Rebuild for GNU parted-1.8.5 + +* Mon Mar 19 2007 David Cantrell - 1.8.5-2 +- Rebuild for GNU parted-1.8.4 + +* Thu Feb 08 2007 David Cantrell - 1.8.5-1 +- Define and use python_sitearch rather than python_sitelib + +* Thu Feb 08 2007 David Cantrell - 1.8.4-1 +- Use preferred BuildRoot (package review) +- Define and use python_sitelib macro (package review) + +* Fri Jan 12 2007 David Cantrell - 1.8.3-1 +- Required parted-1.8.2 or higher + +* Wed Jan 10 2007 Jeremy Katz - 1.8.2-1 +- use PyObject_DEL instead of PyMem_DEL + +* Thu Dec 7 2006 Jeremy Katz - 1.8.1-3 +- rebuild for python 2.5 + +* Tue Dec 05 2006 David Cantrell - 1.8.1-2 +- Rebuild for GNU parted-1.8.1 + +* Thu Nov 30 2006 David Cantrell - 1.8.1-1 +- Determine Python version to use in %%build so the source RPM is more + easily moved between distribution releases. + +* Fri Nov 17 2006 David Cantrell - 1.8.0-1 +- Bump version to 1.8.0 and require parted >= 1.8.0 +- Remove python-abi Requires line since rpm handles that automatically + +* Wed Aug 30 2006 David Cantrell - 1.7.3-1 +- Include parted/constraint.h in required header files + +* Wed Aug 30 2006 David Cantrell - 1.7.2-2 +- Require parted-1.7.1 or higher + +* Tue Jul 25 2006 David Cantrell - 1.7.2-1 +- Add HPSERVICE, PALO, PREP, and MSFT_RESERVED to partition types list + +* Wed Jul 12 2006 Jesse Keating - 1.7.1-1.1 +- rebuild + +* Sun May 28 2006 David Cantrell - 1.7.1-1 +- Bump version to 1.7.1 and require parted >= 1.7.1 + +* Fri May 19 2006 David Cantrell - 1.7.0-1 +- Bump version to 1.7.0 and require parted >= 1.7.0 + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Fri Nov 11 2005 Peter Jones - 1.6.10-1 +- rebuild for new parted. +- add debugging options for make so debuginfo isn't useless + +* Wed Nov 9 2005 Jeremy Katz - 1.6.9-5 +- rebuild for new parted + +* Wed Aug 31 2005 Chris Lumens 1.6.9-4 +- Rebuilt for new parted library. + +* Wed Mar 16 2005 Chris Lumens 1.6.9-3 +- Updated for gcc4 and python2.4. Fixed build warnings. + +* Tue Dec 14 2004 Jeremy Katz - 1.6.9-2 +- add support for sx8 devices + +* Mon Nov 8 2004 Jeremy Katz - 1.6.8-3 +- rebuild for python 2.4 + +* Mon Oct 11 2004 Warren Togami - 1.6.8-2 +- #135100 req python-abi (Robert Scheck) + +* Tue Aug 17 2004 Jeremy Katz - 1.6.8-1 +- update for new parted ABI + - device -> heads, sectors, cylinders now refer to the bios geometry +- require parted >= 1.6.12 + +* Thu Jul 22 2004 Jeremy Katz - 1.6.7-3 +- build on ppc64 again + +* Thu May 13 2004 Jeremy Katz - 1.6.7-1 +- fix build for newer versions of gcc (fix from Jeff Law) + +* Tue Mar 16 2004 Jeremy Katz 1.6.6-2 +- fix PARTITION_PROTECTED definition (#118451) + +* Fri Mar 12 2004 Jeremy Katz +- Initial build split out into separate source from the parted package. +- Don't build on ppc64 right now due to parted build problems (#118183)