]> git.pld-linux.org Git - packages/python-parted.git/commitdiff
upstream patch to fix build with gcc 10; rel 3 auto/th/python-parted-3.11.2-3
authorJan Palus <atler@pld-linux.org>
Sat, 6 Mar 2021 11:55:27 +0000 (12:55 +0100)
committerJan Palus <atler@pld-linux.org>
Sat, 6 Mar 2021 11:55:27 +0000 (12:55 +0100)
gcc10.patch [new file with mode: 0644]
python-parted.spec

diff --git a/gcc10.patch b/gcc10.patch
new file mode 100644 (file)
index 0000000..3cc25b6
--- /dev/null
@@ -0,0 +1,101 @@
+From 104ca13567c08c1188b126a395c4602841aae2c6 Mon Sep 17 00:00:00 2001
+From: David Cantrell <dcantrell@redhat.com>
+Date: Tue, 11 Feb 2020 11:24:08 -0500
+Subject: [PATCH] Move exception declarations to _pedmodule.c
+
+Change the definitions in exceptions.h to extern declarations.  This
+is correct and what I was doing was just lazy.  gcc 10 defaults to
+-fno-common now.
+---
+ include/exceptions.h | 32 ++++++++++++++++----------------
+ src/_pedmodule.c     | 20 +++++++++++++++++++-
+ 2 files changed, 35 insertions(+), 17 deletions(-)
+
+diff --git a/include/exceptions.h b/include/exceptions.h
+index 2a3e1f5..b548214 100644
+--- a/include/exceptions.h
++++ b/include/exceptions.h
+@@ -1,7 +1,7 @@
+ /*
+  * exceptions.h
+  *
+- * Copyright (C) 2007-2013 Red Hat, Inc.
++ * Copyright (C) 2007-2020 Red Hat, Inc.
+  *
+  * This copyrighted material is made available to anyone wishing to use,
+  * modify, copy, or redistribute it subject to the terms and conditions of
+@@ -27,21 +27,21 @@
+ #include <Python.h>
+ /* custom exceptions for _ped */
+-PyObject *AlignmentException;
+-PyObject *CreateException;
+-PyObject *ConstraintException;
+-PyObject *DeviceException;
+-PyObject *DiskException;
+-PyObject *DiskLabelException;
+-PyObject *FileSystemException;
+-PyObject *GeometryException;
+-PyObject *IOException;
+-PyObject *NotNeededException;
+-PyObject *PartedException;
+-PyObject *PartitionException;
+-PyObject *TimerException;
+-PyObject *UnknownDeviceException;
+-PyObject *UnknownTypeException;
++extern PyObject *AlignmentException;
++extern PyObject *CreateException;
++extern PyObject *ConstraintException;
++extern PyObject *DeviceException;
++extern PyObject *DiskException;
++extern PyObject *DiskLabelException;
++extern PyObject *FileSystemException;
++extern PyObject *GeometryException;
++extern PyObject *IOException;
++extern PyObject *NotNeededException;
++extern PyObject *PartedException;
++extern PyObject *PartitionException;
++extern PyObject *TimerException;
++extern PyObject *UnknownDeviceException;
++extern PyObject *UnknownTypeException;
+ extern unsigned int partedExnRaised;
+ extern char *partedExnMessage;
+diff --git a/src/_pedmodule.c b/src/_pedmodule.c
+index 3e98788..6c26747 100644
+--- a/src/_pedmodule.c
++++ b/src/_pedmodule.c
+@@ -5,7 +5,7 @@
+  * Python module that implements the libparted functionality via Python
+  * classes and other high level language features.
+  *
+- * Copyright (C) 2007-2015 Red Hat, Inc.
++ * Copyright (C) 2007-2020 Red Hat, Inc.
+  *
+  * This copyrighted material is made available to anyone wishing to use,
+  * modify, copy, or redistribute it subject to the terms and conditions of
+@@ -59,6 +59,24 @@ unsigned int partedExnRaised = 0;
+ PyObject *exn_handler = NULL;
++/* custom exceptions for _ped */
++/* These are declared in exceptions.h for use elsewhere. */
++PyObject *AlignmentException;
++PyObject *CreateException;
++PyObject *ConstraintException;
++PyObject *DeviceException;
++PyObject *DiskException;
++PyObject *DiskLabelException;
++PyObject *FileSystemException;
++PyObject *GeometryException;
++PyObject *IOException;
++PyObject *NotNeededException;
++PyObject *PartedException;
++PyObject *PartitionException;
++PyObject *TimerException;
++PyObject *UnknownDeviceException;
++PyObject *UnknownTypeException;
++
+ /* Docs strings are broken out of the module structure here to be at least a
+  * little bit readable.
+  */
index c310a8234b1f636db934f0a83fd7a45864c1c8c5..b76255d8df57aadf6063a1a6b18c966e7dd8dbed 100644 (file)
@@ -8,12 +8,13 @@ Summary:      Python 2.x bindings for libparted library
 Summary(pl.UTF-8):     Wiązania Pythona 2.x do biblioteki libparted
 Name:          python-%{module}
 Version:       3.11.2
-Release:       2
+Release:       3
 License:       GPL v2+
 Group:         Libraries/Python
 #Source0Download: https://github.com/dcantrell/pyparted/releases
 Source0:       https://github.com/dcantrell/pyparted/releases/download/v%{version}/pyparted-%{version}.tar.gz
 # Source0-md5: 9477016f5a00bd2d7a280879cdeec3a4
+Patch0:                gcc10.patch
 URL:           https://github.com/dcantrell/pyparted
 BuildRequires: parted-devel >= 3.1
 BuildRequires: pkgconfig
@@ -54,6 +55,7 @@ tablic partycji.
 
 %prep
 %setup -q -n pyparted-%{version}
+%patch0 -p1
 
 %build
 %if %{with python2}
This page took 0.115149 seconds and 4 git commands to generate.