From 9eb8647751cb5f8e297aca408d8e27a53e2cf719 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 10 2018 05:39:51 +0000 Subject: import pyparted-3.9-15.el7 --- diff --git a/SOURCES/pyparted-3.9-clang-warning.patch b/SOURCES/pyparted-3.9-clang-warning.patch new file mode 100644 index 0000000..63d9652 --- /dev/null +++ b/SOURCES/pyparted-3.9-clang-warning.patch @@ -0,0 +1,30 @@ +diff -up pyparted-3.9/src/pydisk.c.orig pyparted-3.9/src/pydisk.c +--- pyparted-3.9/src/pydisk.c.orig 2018-01-12 13:49:41.071972417 -0500 ++++ pyparted-3.9/src/pydisk.c 2018-01-12 13:52:55.264256591 -0500 +@@ -2003,7 +2003,11 @@ PyObject *py_ped_disk_new_fresh(PyObject + !PyErr_ExceptionMatches(PyExc_NotImplementedError)) + PyErr_SetString(DiskException, partedExnMessage); + } else { +- PyErr_Format(DiskException, "Could not create new disk label on %s", disk->dev->path); ++ if (disk->dev == NULL) { ++ PyErr_Format(DiskException, "Could not create new disk label"); ++ } else { ++ PyErr_Format(DiskException, "Could not create new disk label on %s", disk->dev->path); ++ } + } + + return NULL; +@@ -2035,7 +2039,11 @@ PyObject *py_ped_disk_new(PyObject *s, P + !PyErr_ExceptionMatches(PyExc_NotImplementedError)) + PyErr_SetString(DiskException, partedExnMessage); + } else { +- PyErr_Format(DiskException, "Could not create new disk label on %s", disk->dev->path); ++ if (disk->dev == NULL) { ++ PyErr_Format(DiskException, "Could not create new disk label"); ++ } else { ++ PyErr_Format(DiskException, "Could not create new disk label on %s", disk->dev->path); ++ } + } + + return NULL; +diff -up pyparted-3.9/src/pyfilesys.c.orig pyparted-3.9/src/pyfilesys.c diff --git a/SOURCES/pyparted-3.9-null-dereference.patch b/SOURCES/pyparted-3.9-null-dereference.patch new file mode 100644 index 0000000..9fc7efd --- /dev/null +++ b/SOURCES/pyparted-3.9-null-dereference.patch @@ -0,0 +1,16 @@ +diff -up pyparted-3.9/src/pydisk.c.orig pyparted-3.9/src/pydisk.c +--- pyparted-3.9/src/pydisk.c.orig 2018-01-12 13:47:27.488464829 -0500 ++++ pyparted-3.9/src/pydisk.c 2018-01-12 13:47:04.129550934 -0500 +@@ -209,7 +209,11 @@ int _ped_Partition_init(_ped_Partition * + PyErr_SetString(PartitionException, partedExnMessage); + } + } else { +- PyErr_Format(PartitionException, "Could not create new partition on device %s", disk->dev->path); ++ if (disk == NULL) { ++ PyErr_Format(PartitionException, "Could not create new partition"); ++ } else { ++ PyErr_Format(PartitionException, "Could not create new partition on device %s", disk->dev->path); ++ } + } + + self->disk = self->fs_type = NULL; diff --git a/SPECS/pyparted.spec b/SPECS/pyparted.spec index 2b6a7a7..c04913d 100644 --- a/SPECS/pyparted.spec +++ b/SPECS/pyparted.spec @@ -2,12 +2,12 @@ Summary: Python module for GNU parted Name: pyparted Epoch: 1 Version: 3.9 -Release: 13%{?dist} +Release: 15%{?dist} License: GPLv2+ Group: System Environment/Libraries -URL: http://fedorahosted.org/pyparted +URL: https://github.com/dcantrell/pyparted -Source0: http://fedorahosted.org/releases/p/y/%{name}/%{name}-%{version}.tar.gz +Source0: https://github.com/dcantrell/pyparted/archive/%{name}-%{version}.tar.gz Patch1: 0001-Do-not-traceback-when-calling-setlocale-875354.patch Patch2: 0002-Convert-Constraint-to-__ped.Constraint-in-partition..patch Patch3: 0003-Subject-PATCH-pyparted-export-ped_disk_new-functiona.patch @@ -20,7 +20,8 @@ Patch9: 0004-Add-new-functions-to-extend-exception-handling.patch Patch10: 0005-PyInt_FromLong-doesn-t-exist-in-python3-so-always-us.patch Patch11: 0006-Remember-to-pass-the-arguments-to-the-exception-hand.patch Patch12: 0007-Put-new-_ped-constants-and-functions-into-the-parted.patch - +Patch13: pyparted-3.9-null-dereference.patch +Patch14: pyparted-3.9-clang-warning.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n) BuildRequires: python-devel @@ -51,6 +52,8 @@ partition tables. %patch10 -p 1 %patch11 -p 1 %patch12 -p 1 +%patch13 -p 1 +%patch14 -p 1 %build make %{?_smp_mflags} @@ -73,6 +76,15 @@ rm -rf %{buildroot} %{python_sitearch}/%{name}-%{version}-*.egg-info %changelog +* Fri Jan 12 2018 David Cantrell - 1:3.9-15 +- Fix a number Coverity bugs in the _ped module source + Resolves: rhbz#1534014 + +* Fri Oct 20 2017 David Cantrell - 1:3.9-14 +- Update URLs to point to github.com since that's where upstream lives + these days + Resolves: rhbz#1502389 + * Tue Jun 23 2015 David Cantrell - 1:3.9-13 - Rebuild Resolves: rhbz#1188163