From 5abeb8acadfc36b38e95212bedc719c2a71f5835 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= Date: Mon, 15 Jan 2024 12:42:50 +0100 Subject: [PATCH] Stop adding PYTHON_CFGDIR to LD_RUN_PATH and PYTHON_LDFLAGS The patch is simplified unconditional version of the upstream patch https://github.com/GrahamDumpleton/mod_wsgi/pull/873 --- python3.12-mod_wsgi.spec | 5 +++++ ...IR-to-LD_RUN_PATH-and-PYTHON_LDFLAGS.patch | 22 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 stop-adding-PYTHON_CFGDIR-to-LD_RUN_PATH-and-PYTHON_LDFLAGS.patch diff --git a/python3.12-mod_wsgi.spec b/python3.12-mod_wsgi.spec index 5fc983b..8a8c5da 100644 --- a/python3.12-mod_wsgi.spec +++ b/python3.12-mod_wsgi.spec @@ -27,6 +27,11 @@ Source0: https://github.com/GrahamDumpleton/mod_wsgi/archive/%{version}.t Source1: wsgi.conf Source2: wsgi-python3.conf Patch1: mod_wsgi-4.5.20-exports.patch +# Stop adding PYTHON_CFGDIR to LD_RUN_PATH and PYTHON_LDFLAGS +# rpminspect reports invalid DT_RUNPATH: /usr/lib64/python3.12/config +# Following patch is a simplified unconditional version of our upstream PR: +# https://github.com/GrahamDumpleton/mod_wsgi/pull/873 +Patch2: stop-adding-PYTHON_CFGDIR-to-LD_RUN_PATH-and-PYTHON_LDFLAGS.patch BuildRequires: httpd-devel BuildRequires: gcc diff --git a/stop-adding-PYTHON_CFGDIR-to-LD_RUN_PATH-and-PYTHON_LDFLAGS.patch b/stop-adding-PYTHON_CFGDIR-to-LD_RUN_PATH-and-PYTHON_LDFLAGS.patch new file mode 100644 index 0000000..ea19701 --- /dev/null +++ b/stop-adding-PYTHON_CFGDIR-to-LD_RUN_PATH-and-PYTHON_LDFLAGS.patch @@ -0,0 +1,22 @@ +diff --git a/setup.py b/setup.py +index e0c8c84..f315b01 100644 +--- a/setup.py ++++ b/setup.py +@@ -300,7 +300,7 @@ else: + if not os.path.exists(PYTHON_CFGDIR): + PYTHON_CFGDIR = '%s-%s' % (PYTHON_CFGDIR, sys.platform) + +- PYTHON_LDFLAGS = ['-L%s' % PYTHON_CFGDIR] ++ PYTHON_LDFLAGS = [] + if PYTHON_LIBDIR != APXS_LIBDIR: + PYTHON_LDFLAGS.insert(0, '-L%s' % PYTHON_LIBDIR) + +@@ -326,7 +326,7 @@ EXTRA_LINK_ARGS = PYTHON_LDFLAGS + PYTHON_LDLIBS + LD_RUN_PATHS = [] + if os.name != 'nt': + LD_RUN_PATH = os.environ.get('LD_RUN_PATH', '') +- LD_RUN_PATHS = [PYTHON_CFGDIR] ++ LD_RUN_PATHS = [] + if PYTHON_LIBDIR != APXS_LIBDIR: + LD_RUN_PATHS.insert(0, PYTHON_LIBDIR) + LD_RUN_PATH += ':' + ':'.join(LD_RUN_PATHS)