From 8e69ea0d0cda4fa02f99c1f1267ee289e670f7f43563023a24de7c6cd665b830 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 29 Jan 2007 16:01:10 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/iproute2?expand=0&rev=2 --- iproute2-2.6.15-ipt-lib-dir.diff | 46 ++++++++++++++++++++++++++++++++ iproute2.changes | 6 +++++ iproute2.spec | 11 +++++--- 3 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 iproute2-2.6.15-ipt-lib-dir.diff diff --git a/iproute2-2.6.15-ipt-lib-dir.diff b/iproute2-2.6.15-ipt-lib-dir.diff new file mode 100644 index 0000000..f06ad0f --- /dev/null +++ b/iproute2-2.6.15-ipt-lib-dir.diff @@ -0,0 +1,46 @@ +--- tc/m_ipt.c.orig 2007-01-29 10:14:01.000000000 +0100 ++++ tc/m_ipt.c 2007-01-29 10:50:37.000000000 +0100 +@@ -9,7 +9,7 @@ + * + * Authors: J Hadi Salim (hadi@cyberus.ca) + * +- * TODO: bad bad hardcoding IPT_LIB_DIR and PROC_SYS_MODPROBE ++ * TODO: bad bad hardcoding PROC_SYS_MODPROBE + * + */ + +@@ -47,10 +47,6 @@ + #define FALSE 0 + #endif + +-#ifndef IPT_LIB_DIR +-#define IPT_LIB_DIR "/usr/local/lib/iptables" +-#endif +- + #ifndef PROC_SYS_MODPROBE + #define PROC_SYS_MODPROBE "/proc/sys/kernel/modprobe" + #endif +@@ -233,8 +229,13 @@ + char *error; + char *new_name, *lname; + struct iptables_target *m; ++ char ipt_lib_dir[30] = "/usr/lib/iptables"; ++ ++ if (access (ipt_lib_dir,R_OK)) { ++ strcpy (ipt_lib_dir,"/usr/lib64/iptables"); ++ } + +- char path[sizeof (IPT_LIB_DIR) + sizeof ("/libipt_.so") + strlen(name)]; ++ char path[sizeof (ipt_lib_dir) + sizeof ("/libipt_.so") + strlen(name)]; + + new_name = malloc(strlen(name) + 1); + lname = malloc(strlen(name) + 1); +@@ -265,7 +266,7 @@ + } + } + +- sprintf(path, IPT_LIB_DIR "/libipt_%s.so", new_name); ++ sprintf(path, "%s/libipt_%s.so", ipt_lib_dir,new_name); + handle = dlopen(path, RTLD_LAZY); + if (!handle) { + sprintf(path, IPT_LIB_DIR "/libipt_%s.so", lname); diff --git a/iproute2.changes b/iproute2.changes index a63c97b..5c06b21 100644 --- a/iproute2.changes +++ b/iproute2.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jan 29 11:00:08 CET 2007 - ms@suse.de + +- fixed wrong IPT_LIB_DIR value and replaced the code by a + dynamic check for the /usr/%lib/iptables directory (#238886) + ------------------------------------------------------------------- Tue Nov 7 01:06:43 CET 2006 - ro@suse.de diff --git a/iproute2.spec b/iproute2.spec index 2f35d18..e682ee4 100644 --- a/iproute2.spec +++ b/iproute2.spec @@ -1,7 +1,7 @@ # # spec file for package iproute2 (Version 2.6.15) # -# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # @@ -13,12 +13,12 @@ Name: iproute2 BuildRequires: db-devel ghostscript-fonts-std ghostscript-x11 glib libpng-devel libtiff-devel sgmltool te_ams te_latex xorg-x11-devel %define dateversion 060110 -License: GNU General Public License (GPL) - all versions +License: GNU General Public License (GPL) Group: Productivity/Networking/Routing Provides: iproute Autoreqprov: on Version: 2.6.15 -Release: 32 +Release: 50 Summary: Advanced Routing URL: http://developer.osdl.org/dev/iproute2/ Source0: %name-%version-%dateversion.tar.bz2 @@ -30,6 +30,7 @@ Patch3: %name-2.6.14-nostrip.diff Patch4: %name-tc-flex-fixes.patch Patch5: %name-resolve-address.diff Patch6: %name-2.6.15-060110.dif +Patch7: %name-2.6.15-ipt-lib-dir.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %package -n libnlink Summary: A Higher Level Interface to the Netlink Service @@ -64,6 +65,7 @@ Authors: %patch4 %patch5 %patch6 +%patch7 find . -name *.orig -print0 | xargs -r0 rm -v %build @@ -112,6 +114,9 @@ rm -rf $RPM_BUILD_ROOT %_libdir/lib* %changelog -n iproute2 +* Mon Jan 29 2007 - ms@suse.de +- fixed wrong IPT_LIB_DIR value and replaced the code by a + dynamic check for the /usr/%%lib/iptables directory (#238886) * Tue Nov 07 2006 - ro@suse.de - fix permissions for manpage * Thu Jul 20 2006 - ms@suse.de