Add patch to explicitly link _ctypes module with -ldl (#1537489)
Add patch to explicitly link _ctypes module with -ldl (#1537489) Refactored patch for libxcrypt Re-enable strict symbol checks in the link editor
This commit is contained in:
parent
221978fced
commit
d3af3ef92c
@ -1,4 +1,4 @@
|
|||||||
From 6811089dbf34a2cef9799e1cb6d63b863b58739f Mon Sep 17 00:00:00 2001
|
From bb9a8332e54fd6d2b0d4767b55c7df9a36ad3022 Mon Sep 17 00:00:00 2001
|
||||||
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
|
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
|
||||||
Date: Sun, 21 Jan 2018 18:55:31 +0100
|
Date: Sun, 21 Jan 2018 18:55:31 +0100
|
||||||
Subject: [PATCH] cryptmodule: Include <crypt.h> for declaration of crypt() if
|
Subject: [PATCH] cryptmodule: Include <crypt.h> for declaration of crypt() if
|
||||||
@ -9,18 +9,18 @@ and may use an external or replacement library, like libxcrypt, for
|
|||||||
providing such functions.
|
providing such functions.
|
||||||
---
|
---
|
||||||
Modules/_cryptmodule.c | 4 ++++
|
Modules/_cryptmodule.c | 4 ++++
|
||||||
configure.ac | 4 ++++
|
configure.ac | 2 +-
|
||||||
2 files changed, 8 insertions(+)
|
2 files changed, 5 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/Modules/_cryptmodule.c b/Modules/_cryptmodule.c
|
diff --git a/Modules/_cryptmodule.c b/Modules/_cryptmodule.c
|
||||||
index 58d179e6a3..bb26d83f55 100644
|
index 58d179e6a3..0031037b64 100644
|
||||||
--- a/Modules/_cryptmodule.c
|
--- a/Modules/_cryptmodule.c
|
||||||
+++ b/Modules/_cryptmodule.c
|
+++ b/Modules/_cryptmodule.c
|
||||||
@@ -5,6 +5,10 @@
|
@@ -5,6 +5,10 @@
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
+#if defined(HAVE_XCRYPT)
|
+#if defined(HAVE_CRYPT_H)
|
||||||
+#include <crypt.h>
|
+#include <crypt.h>
|
||||||
+#endif
|
+#endif
|
||||||
+
|
+
|
||||||
@ -28,20 +28,18 @@ index 58d179e6a3..bb26d83f55 100644
|
|||||||
|
|
||||||
/*[clinic input]
|
/*[clinic input]
|
||||||
diff --git a/configure.ac b/configure.ac
|
diff --git a/configure.ac b/configure.ac
|
||||||
index 39e2e8e769..129c198c15 100644
|
index 39e2e8e769..79397a7a24 100644
|
||||||
--- a/configure.ac
|
--- a/configure.ac
|
||||||
+++ b/configure.ac
|
+++ b/configure.ac
|
||||||
@@ -2816,6 +2816,10 @@ LIBS="$withval $LIBS"
|
@@ -2049,7 +2049,7 @@ AC_CHECK_HEADERS(asm/types.h conio.h direct.h dlfcn.h errno.h \
|
||||||
|
fcntl.h grp.h \
|
||||||
PKG_PROG_PKG_CONFIG
|
ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
|
||||||
|
sched.h shadow.h signal.h stropts.h termios.h \
|
||||||
+# Check for libxcrypt is present.
|
-unistd.h utime.h \
|
||||||
+PKG_CHECK_MODULES([libxcrypt], libxcrypt,
|
+unistd.h crypt.h utime.h \
|
||||||
+ AC_DEFINE([HAVE_XCRYPT], 1, [Define to 1 if libxcrypt is found.]), [])
|
poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
|
||||||
+
|
sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h sys/ioctl.h \
|
||||||
# Check for use of the system expat library
|
sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
|
||||||
AC_MSG_CHECKING(for --with-system-expat)
|
|
||||||
AC_ARG_WITH(system_expat,
|
|
||||||
--
|
--
|
||||||
2.16.0
|
2.16.1
|
||||||
|
|
||||||
|
25
00291-setup-Link-ctypes-against-dl-explicitly.patch
Normal file
25
00291-setup-Link-ctypes-against-dl-explicitly.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From aae2ef0bace0e38f4ee5aaa4642aa32450a84216 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
|
||||||
|
Date: Tue, 23 Jan 2018 14:43:43 +0100
|
||||||
|
Subject: [PATCH] setup: Link ctypes against dl explicitly
|
||||||
|
|
||||||
|
---
|
||||||
|
setup.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/setup.py b/setup.py
|
||||||
|
index c23628a2a9..9e40bb53e6 100644
|
||||||
|
--- a/setup.py
|
||||||
|
+++ b/setup.py
|
||||||
|
@@ -1935,7 +1935,7 @@ class PyBuildExt(build_ext):
|
||||||
|
self.use_system_libffi = False
|
||||||
|
include_dirs = []
|
||||||
|
extra_compile_args = []
|
||||||
|
- extra_link_args = []
|
||||||
|
+ extra_link_args = ['-ldl']
|
||||||
|
sources = ['_ctypes/_ctypes.c',
|
||||||
|
'_ctypes/callbacks.c',
|
||||||
|
'_ctypes/callproc.c',
|
||||||
|
--
|
||||||
|
2.16.1
|
||||||
|
|
@ -167,11 +167,6 @@ License: Python
|
|||||||
# on files that test invalid syntax.
|
# on files that test invalid syntax.
|
||||||
%undefine py_auto_byte_compile
|
%undefine py_auto_byte_compile
|
||||||
|
|
||||||
# Disable strict symbol checks in the link editor.
|
|
||||||
# See: https://src.fedoraproject.org/rpms/redhat-rpm-config/c/078af192613e1beec34824a94dc5f6feeeea1568?branch=master
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1537489
|
|
||||||
%undefine _strict_symbol_defs_build
|
|
||||||
|
|
||||||
# For multilib support, files that are different between 32- and 64-bit arches
|
# For multilib support, files that are different between 32- and 64-bit arches
|
||||||
# need different filenames. Use "64" or "32" according to the word size.
|
# need different filenames. Use "64" or "32" according to the word size.
|
||||||
# Currently, the best way to determine an architecture's word size happens to
|
# Currently, the best way to determine an architecture's word size happens to
|
||||||
@ -386,6 +381,12 @@ Patch289: 00289-fix-nis-compilation.patch
|
|||||||
# Reported upstream: https://bugs.python.org/issue32635
|
# Reported upstream: https://bugs.python.org/issue32635
|
||||||
Patch290: 00290-cryptmodule-Include-crypt.h-for-declaration-of-crypt.patch
|
Patch290: 00290-cryptmodule-Include-crypt.h-for-declaration-of-crypt.patch
|
||||||
|
|
||||||
|
# 00291 #
|
||||||
|
# Build fails with undefined references to dlopen / dlsym otherwise.
|
||||||
|
# See: https://bugzilla.redhat.com/show_bug.cgi?id=1537489
|
||||||
|
# and: https://src.fedoraproject.org/rpms/redhat-rpm-config/c/078af19
|
||||||
|
Patch291: 00291-setup-Link-ctypes-against-dl-explicitly.patch
|
||||||
|
|
||||||
# (New patches go here ^^^)
|
# (New patches go here ^^^)
|
||||||
#
|
#
|
||||||
# When adding new patches to "python" and "python3" in Fedora, EL, etc.,
|
# When adding new patches to "python" and "python3" in Fedora, EL, etc.,
|
||||||
@ -689,6 +690,7 @@ sed -r -i s/'_PIP_VERSION = "[0-9.]+"'/'_PIP_VERSION = "%{pip_version}"'/ Lib/en
|
|||||||
%patch274 -p1
|
%patch274 -p1
|
||||||
%patch289 -p1
|
%patch289 -p1
|
||||||
%patch290 -p1
|
%patch290 -p1
|
||||||
|
%patch291 -p1
|
||||||
|
|
||||||
|
|
||||||
# Remove files that should be generated by the build
|
# Remove files that should be generated by the build
|
||||||
|
Loading…
Reference in New Issue
Block a user