Remove Patch178, merge Patch205 into Patch102

Fixes invalid value of distutils.sysconfig.get_config_var('LIBPL').

Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1710767

GitHub PR: https://github.com/fedora-python/cpython/pull/2
This commit is contained in:
Miro Hrončok 2019-05-17 13:24:33 +02:00
parent 9fbe2eee9d
commit 7aab0ddc87
10 changed files with 54 additions and 107 deletions

View File

@ -1,7 +1,7 @@
From 39b5f58db91eea63fae2883c74f8a3f7fe49bc17 Mon Sep 17 00:00:00 2001
From: David Malcolm <dmalcolm@redhat.com>
Date: Wed, 13 Jan 2010 21:25:18 +0000
Subject: [PATCH 1/9] 00001: Fixup distutils/unixccompiler.py to remove
Subject: [PATCH 1/7] 00001: Fixup distutils/unixccompiler.py to remove
standard library path from rpath Was Patch0 in ivazquez' python3000 specfile
---

View File

@ -1,7 +1,7 @@
From 972d1ce207285b7b29407b95ea6519c289c71d89 Mon Sep 17 00:00:00 2001
From c601ae9643cda53d9e1b898ea941bf9207c9f2f6 Mon Sep 17 00:00:00 2001
From: David Malcolm <dmalcolm@redhat.com>
Date: Wed, 13 Jan 2010 21:25:18 +0000
Subject: [PATCH 2/9] 00102: Change the various install paths to use
Subject: [PATCH 2/7] 00102: Change the various install paths to use
/usr/lib64/ instead or /usr/lib/
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
@ -27,8 +27,10 @@ Co-authored-by: Iryna Shcherbina <shcherbina.iryna@gmail.com>
Lib/test/test_site.py | 4 ++--
Makefile.pre.in | 2 +-
Modules/getpath.c | 6 +++---
configure | 4 ++--
configure.ac | 4 ++--
setup.py | 6 +++---
9 files changed, 28 insertions(+), 19 deletions(-)
11 files changed, 32 insertions(+), 23 deletions(-)
diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
index c625c95bf7..ae4f915669 100644
@ -195,6 +197,38 @@ index 3991ad719c..1baf8a2ff4 100644
if (!calculate->lib_python) {
return DECODE_LOCALE_ERR("EXEC_PREFIX define", len);
}
diff --git a/configure b/configure
index e6e4007351..b01e6fa9b7 100755
--- a/configure
+++ b/configure
@@ -15159,9 +15159,9 @@ fi
if test x$PLATFORM_TRIPLET = x; then
- LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
+ LIBPL='$(prefix)'"/lib64/python${VERSION}/config-${LDVERSION}"
else
- LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
+ LIBPL='$(prefix)'"/lib64/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
fi
diff --git a/configure.ac b/configure.ac
index a02597da2d..7f86f286b6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4653,9 +4653,9 @@ fi
dnl define LIBPL after ABIFLAGS and LDVERSION is defined.
AC_SUBST(PY_ENABLE_SHARED)
if test x$PLATFORM_TRIPLET = x; then
- LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
+ LIBPL='$(prefix)'"/lib64/python${VERSION}/config-${LDVERSION}"
else
- LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
+ LIBPL='$(prefix)'"/lib64/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
fi
AC_SUBST(LIBPL)
diff --git a/setup.py b/setup.py
index 96a49b4e35..64420838af 100644
--- a/setup.py

View File

@ -1,7 +1,7 @@
From 031249155111abf6e971fff6516c4e828c394c05 Mon Sep 17 00:00:00 2001
From 0acdfa7c697ffb1087ded14819c7dcfe4784ca7c Mon Sep 17 00:00:00 2001
From: David Malcolm <dmalcolm@redhat.com>
Date: Mon, 18 Jan 2010 17:59:07 +0000
Subject: [PATCH 3/9] 00111: Don't try to build a libpythonMAJOR.MINOR.a
Subject: [PATCH 3/7] 00111: Don't try to build a libpythonMAJOR.MINOR.a
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

View File

@ -1,48 +0,0 @@
From b9a703e3d37e325defe5baec111e1fbf5d42bede Mon Sep 17 00:00:00 2001
From: Bohuslav Kabrda <bkabrda@redhat.com>
Date: Wed, 10 Apr 2013 14:30:09 +0200
Subject: [PATCH 4/9] 00178: Don't duplicate various FLAGS in sysconfig values
http://bugs.python.org/issue17679
Does not affect python2 AFAICS (different sysconfig values initialization)
---
Lib/distutils/sysconfig.py | 5 ++++-
Lib/sysconfig.py | 5 ++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
index 9a4892a737..ad4cef088b 100644
--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
@@ -373,7 +373,10 @@ def parse_makefile(fn, g=None):
done[n] = item = ""
if found:
after = value[m.end():]
- value = value[:m.start()] + item + after
+ value = value[:m.start()]
+ if item.strip() not in value:
+ value += item
+ value += after
if "$" in after:
notdone[name] = value
else:
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
index cf64d79c4d..fd972d658c 100644
--- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py
@@ -295,7 +295,10 @@ def _parse_makefile(filename, vars=None):
if found:
after = value[m.end():]
- value = value[:m.start()] + item + after
+ value = value[:m.start()]
+ if item.strip() not in value:
+ value += item
+ value += after
if "$" in after:
notdone[name] = value
else:
--
2.21.0

View File

@ -1,7 +1,7 @@
From 0f59810bb72d2092729346c17e96bf0c23120ee1 Mon Sep 17 00:00:00 2001
From 7bb76d766aa5394e845f656b3f68b7910e9ee4e6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Wed, 15 Aug 2018 15:36:29 +0200
Subject: [PATCH 5/9] 00189: Instead of bundled wheels, use our RPM packaged
Subject: [PATCH 4/7] 00189: Instead of bundled wheels, use our RPM packaged
wheels
We keep them in /usr/share/python-wheels

View File

@ -1,30 +0,0 @@
From 5ee8362bd5cc991b956efa9cf06eb6ad2607f57c Mon Sep 17 00:00:00 2001
From: Robert Kuska <rkuska@redhat.com>
Date: Mon, 21 Sep 2015 15:55:00 +0200
Subject: [PATCH 6/9] 00205: Make LIBPL variable respect the libdir macro
LIBPL variable in Makefile takes LIBPL from configure.ac,
but the LIBPL variable defined there doesn't respect the libdir macro.
Co-authored-by: Robert Kuska <rkuska@redhat.com>
Co-authored-by: Charalampos Stratakis <cstratak@redhat.com>
---
Makefile.pre.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 414aa96008..a07bd6718d 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1512,7 +1512,7 @@ inclinstall:
# Install the library and miscellaneous stuff needed for extending/embedding
# This goes into $(exec_prefix)
-LIBPL= @LIBPL@
+LIBPL= $(LIBDEST)/config-$(LDVERSION)-$(MULTIARCH)
# pkgconfig directory
LIBPC= $(LIBDIR)/pkgconfig
--
2.21.0

View File

@ -1,7 +1,7 @@
From e9d8db2d243cf27b66083e0c6a9bb5d28866f937 Mon Sep 17 00:00:00 2001
From 377daf65817790e78ccec966221724f4523693c1 Mon Sep 17 00:00:00 2001
From: Michal Cyprian <m.cyprian@gmail.com>
Date: Mon, 26 Jun 2017 16:32:56 +0200
Subject: [PATCH 7/9] 00251: Change user install location
Subject: [PATCH 5/7] 00251: Change user install location
Set values of prefix and exec_prefix in distutils install command
to /usr/local if executable is /usr/bin/python* and RPM build

View File

@ -1,7 +1,7 @@
From e108d7026aab241d89ff3a90d6421af3e9ee8e12 Mon Sep 17 00:00:00 2001
From e9def22e31801d9d75017e6752d3daf4099bc836 Mon Sep 17 00:00:00 2001
From: Petr Viktorin <pviktori@redhat.com>
Date: Mon, 28 Aug 2017 17:16:46 +0200
Subject: [PATCH 8/9] 00274: Upstream uses Debian-style architecture naming,
Subject: [PATCH 6/7] 00274: Upstream uses Debian-style architecture naming,
change to match Fedora
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
@ -29,7 +29,7 @@ index ba37cf99e2..52a9ec6662 100755
ppc64le | powerpc64little)
basic_machine=powerpc64le-unknown
diff --git a/configure.ac b/configure.ac
index a02597da2d..5742ef4176 100644
index 7f86f286b6..6d7430e014 100644
--- a/configure.ac
+++ b/configure.ac
@@ -740,9 +740,9 @@ cat >> conftest.c <<EOF

View File

@ -1,7 +1,7 @@
From 1ef328c38ad0ef7fad1652edddd3710885b0a778 Mon Sep 17 00:00:00 2001
From a44fa78c34634c580e3f5922aed600d7a777fe93 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Thu, 20 Dec 2018 12:46:25 +0100
Subject: [PATCH 9/9] 00316: Mark bdist_wininst unsupported
Subject: [PATCH 7/7] 00316: Mark bdist_wininst unsupported
We remove the exe files from distutil's bdist_wininst.
So we mark the command as unsupported - and the tests are skipped.

View File

@ -17,7 +17,7 @@ URL: https://www.python.org/
%global prerel a4
%global upstream_version %{general_version}%{?prerel}
Version: %{general_version}%{?prerel:~%{prerel}}
Release: 1%{?dist}
Release: 2%{?dist}
License: Python
@ -243,22 +243,11 @@ Patch102: 00102-lib64.patch
# Downstream only: not appropriate for upstream
Patch111: 00111-no-static-lib.patch
# 00178 #
# Don't duplicate various FLAGS in sysconfig values
# http://bugs.python.org/issue17679
# Does not affect python2 AFAICS (different sysconfig values initialization)
Patch178: 00178-dont-duplicate-flags-in-sysconfig.patch
# 00189 #
# Instead of bundled wheels, use our RPM packaged wheels from
# /usr/share/python-wheels
Patch189: 00189-use-rpm-wheels.patch
# 00205 #
# LIBPL variable in makefile takes LIBPL from configure.ac
# but the LIBPL variable defined there doesn't respect libdir macro
Patch205: 00205-make-libpl-respect-lib64.patch
# 00251
# Set values of prefix and exec_prefix in distutils install command
# to /usr/local if executable is /usr/bin/python* and RPM build
@ -539,14 +528,12 @@ rm -r Modules/expat
%patch102 -p1
%endif
%patch111 -p1
%patch178 -p1
%if %{with rpmwheels}
%patch189 -p1
rm Lib/ensurepip/_bundled/*.whl
%endif
%patch205 -p1
%patch251 -p1
%patch274 -p1
%patch316 -p1
@ -1476,6 +1463,10 @@ CheckPython optimized
# ======================================================
%changelog
* Fri May 17 2019 Miro Hrončok <mhroncok@redhat.com> - 3.8.0~a4-2
- Remove a faulty patch that resulted in invalid value of
distutils.sysconfig.get_config_var('LIBPL') (#1710767)
* Tue May 07 2019 Miro Hrončok <mhroncok@redhat.com> - 3.8.0~a4-1
- Update to 3.8.0a4