From 4804f15c61ddde66a2cf44a542f1fe1604d60ee9 Mon Sep 17 00:00:00 2001 From: Carl George Date: Feb 04 2019 17:00:53 +0000 Subject: Use python3 style of calling super() without arguments in rpath patch to prevent recursion in UnixCCompiler subclasses Backported from Fedora: https://src.fedoraproject.org/rpms/python3/c/eef42fd7ea9065fbb33026ca99ffd86566e14567 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1593660 --- diff --git a/00001-rpath.patch b/00001-rpath.patch new file mode 100644 index 0000000..9fae54c --- /dev/null +++ b/00001-rpath.patch @@ -0,0 +1,19 @@ +diff -up Python-3.1.1/Lib/distutils/unixccompiler.py.rpath Python-3.1.1/Lib/distutils/unixccompiler.py +--- Python-3.1.1/Lib/distutils/unixccompiler.py.rpath 2009-09-04 17:29:34.000000000 -0400 ++++ Python-3.1.1/Lib/distutils/unixccompiler.py 2009-09-04 17:49:54.000000000 -0400 +@@ -141,6 +141,15 @@ class UnixCCompiler(CCompiler): + if sys.platform == "cygwin": + exe_extension = ".exe" + ++ def _fix_lib_args(self, libraries, library_dirs, runtime_library_dirs): ++ """Remove standard library path from rpath""" ++ libraries, library_dirs, runtime_library_dirs = super()._fix_lib_args( ++ libraries, library_dirs, runtime_library_dirs) ++ libdir = sysconfig.get_config_var('LIBDIR') ++ if runtime_library_dirs and (libdir in runtime_library_dirs): ++ runtime_library_dirs.remove(libdir) ++ return libraries, library_dirs, runtime_library_dirs ++ + def preprocess(self, source, output_file=None, macros=None, + include_dirs=None, extra_preargs=None, extra_postargs=None): + fixed_args = self._fix_compile_args(None, macros, include_dirs) diff --git a/Python-3.1.1-rpath.patch b/Python-3.1.1-rpath.patch deleted file mode 100644 index 1493af2..0000000 --- a/Python-3.1.1-rpath.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -up Python-3.1.1/Lib/distutils/unixccompiler.py.rpath Python-3.1.1/Lib/distutils/unixccompiler.py ---- Python-3.1.1/Lib/distutils/unixccompiler.py.rpath 2009-09-04 17:29:34.000000000 -0400 -+++ Python-3.1.1/Lib/distutils/unixccompiler.py 2009-09-04 17:49:54.000000000 -0400 -@@ -141,6 +141,16 @@ class UnixCCompiler(CCompiler): - if sys.platform == "cygwin": - exe_extension = ".exe" - -+ def _fix_lib_args(self, libraries, library_dirs, runtime_library_dirs): -+ """Remove standard library path from rpath""" -+ libraries, library_dirs, runtime_library_dirs = super( -+ self.__class__, self)._fix_lib_args(libraries, library_dirs, -+ runtime_library_dirs) -+ libdir = sysconfig.get_config_var('LIBDIR') -+ if runtime_library_dirs and (libdir in runtime_library_dirs): -+ runtime_library_dirs.remove(libdir) -+ return libraries, library_dirs, runtime_library_dirs -+ - def preprocess(self, source, output_file=None, macros=None, - include_dirs=None, extra_preargs=None, extra_postargs=None): - fixed_args = self._fix_compile_args(None, macros, include_dirs) diff --git a/python34.spec b/python34.spec index c3c84c8..ded3243 100644 --- a/python34.spec +++ b/python34.spec @@ -153,7 +153,7 @@ Summary: Version 3 of the Python programming language aka Python 3000 Name: python%{pyshortver} Version: %{pybasever}.9 -Release: 1%{?dist} +Release: 2%{?dist} License: Python Group: Development/Languages @@ -250,9 +250,10 @@ Source7: pyfuntop.stp # Written by bkabrda Source8: check-pyc-and-pyo-timestamps.py +# 00001 # # Fixup distutils/unixccompiler.py to remove standard library path from rpath: # Was Patch0 in ivazquez' python3000 specfile: -Patch1: Python-3.1.1-rpath.patch +Patch1: 00001-rpath.patch # readline test fails on EL6 readline 6.0 # https://bugs.python.org/issue19884 @@ -1956,6 +1957,10 @@ rm -fr %{buildroot} # ====================================================== %changelog +* Mon Feb 04 2019 Carl George - 3.4.9-2 +- Use python3 style of calling super() without arguments in rpath + patch to prevent recursion in UnixCCompiler subclasses (#1593660) + * Sun Aug 05 2018 Miro HronĨok - 3.4.9-1 - Rebased to 3.4.9