From a8f57f7b85203f8ff606741d48089730559fee84 Mon Sep 17 00:00:00 2001 From: Josef Ridky Date: Fri, 30 Nov 2018 07:07:12 +0100 Subject: [PATCH] Use RPM_LD_FLAGS - add python patch --- net-snmp-5.8-python-ld-flags.patch | 20 ++++++++++++++++++++ net-snmp.spec | 3 +++ 2 files changed, 23 insertions(+) create mode 100644 net-snmp-5.8-python-ld-flags.patch diff --git a/net-snmp-5.8-python-ld-flags.patch b/net-snmp-5.8-python-ld-flags.patch new file mode 100644 index 0000000..2fe7778 --- /dev/null +++ b/net-snmp-5.8-python-ld-flags.patch @@ -0,0 +1,20 @@ +diff -urNp a/python/setup.py b/python/setup.py +--- a/python/setup.py 2018-11-29 16:39:33.959745228 +0100 ++++ b/python/setup.py 2018-11-29 16:40:19.125513424 +0100 +@@ -18,14 +18,14 @@ if intree: + netsnmp_libs = os.popen(basedir+'/net-snmp-config --libs').read() + libdir = os.popen(basedir+'/net-snmp-config --build-lib-dirs '+basedir).read() + incdir = os.popen(basedir+'/net-snmp-config --build-includes '+basedir).read() + " " + os.popen(basedir+'/net-snmp-config --base-cflags '+basedir).read() +- libs = re.findall(r"-l(\S+)", netsnmp_libs) ++ libs = re.findall(r"\s-l(\S+)", netsnmp_libs) + libdirs = re.findall(r"-L(\S+)", libdir) + incdirs = re.findall(r"-I(\S+)", incdir) + else: + netsnmp_libs = os.popen('net-snmp-config --libs').read() + libdirs = re.findall(r"-L(\S+)", netsnmp_libs) + incdirs = [] +- libs = re.findall(r"-l(\S+)", netsnmp_libs) ++ libs = re.findall(r"\s-l(\S+)", netsnmp_libs) + + setup( + name="netsnmp-python", version="1.0a1", diff --git a/net-snmp.spec b/net-snmp.spec index 32c7b51..df85386 100644 --- a/net-snmp.spec +++ b/net-snmp.spec @@ -40,6 +40,7 @@ Patch10: net-snmp-5.8-libnetsnmptrapd-against-MYSQL_LIBS.patch Patch11: net-snmp-5.7.3-iterator-fix.patch Patch12: net-snmp-5.8-autofs-skip.patch Patch13: net-snmp-5.8-key-leak-backport.patch +Patch14: net-snmp-5.8-python-ld-flags.patch # Modern RPM API means at least EL6 Patch101: net-snmp-5.8-modern-rpm-api.patch @@ -207,6 +208,7 @@ cp %{SOURCE10} . %patch11 -p1 -b .iterator-fix %patch12 -p1 -b .autofs-skip %patch13 -p1 -b .leak-backport +%patch14 -p1 -b .python-ld-flags %patch101 -p1 -b .modern-rpm-api %patch102 -p1 @@ -480,6 +482,7 @@ LD_LIBRARY_PATH=%{buildroot}/%{_libdir} make test * Tue Nov 27 2018 Josef Ridky - 1:5.8-3 - backport memory leak fixes from upstream - add fPIE to CFLAGS (#1543853) +- use default LDFLAGS * Mon Jul 23 2018 Josef Ridky - 1:5.8-2 - fix unresoved error with mysql functions