From 6f2fda2db6c6d91da8755254029d909f77791da6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radek=20Vok=C3=A1l?= Date: Mon, 27 Mar 2006 08:12:02 +0000 Subject: [PATCH] - upgrade to 2.6.16-060323 - don't hardcode /usr/lib in tc (#186607) --- .cvsignore | 2 +- iproute.spec | 18 ++++++++---- iproute2-2.6.16-libdir.patch | 53 ++++++++++++++++++++++++++++++++++++ sources | 2 +- 4 files changed, 68 insertions(+), 7 deletions(-) create mode 100644 iproute2-2.6.16-libdir.patch diff --git a/.cvsignore b/.cvsignore index 67fc5b0..8422c73 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -iproute2-2.6.15-060110.tar.gz +iproute2-2.6.16-060323.tar.gz diff --git a/iproute.spec b/iproute.spec index 12f7eac..08fec43 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,17 +1,18 @@ -%define date_version 060110 +%define date_version 060323 %define cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools. Name: iproute -Version: 2.6.15 -Release: 2 +Version: 2.6.16 +Release: 1 Group: Applications/System Source: http://developer.osdl.org/dev/iproute2/download/iproute2-%{version}-%{date_version}.tar.gz URL: http://linux-net.osdl.org/index.php/Iproute2 -Patch1: iproute2-2.4.7-rt_config.patch +#Patch1: iproute2-2.4.7-rt_config.patch Patch2: iproute2-2.6.9-kernel.patch Patch5: iproute2-ss050901-opt_flags.patch Patch7: iproute2-051007-add_tunnel.patch +Patch8: iproute2-2.6.16-libdir.patch License: GNU GPL BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -25,12 +26,15 @@ capabilities of the Linux 2.4.x and 2.6.x kernel. %prep %setup -q -n iproute2-%{version}-%{date_version} -%patch1 -p1 +#%patch1 -p1 %patch2 -p1 -b .kernel %patch5 -p1 -b .opt_flags %patch7 -p1 -b .tunnel_add +%patch8 -p1 -b .libdir %build +export LIBDIR=%{_libdir} + make make -C doc @@ -87,6 +91,10 @@ EOF %config(noreplace) /etc/sysconfig/cbq/* %changelog +* Sun Mar 26 2006 Radek Vokál - 2.6.16-1 +- upgrade to 2.6.16-060323 +- don't hardcode /usr/lib in tc (#186607) + * Wed Feb 22 2006 Radek Vokál - 2.6.15-2 - own /usr/lib/tc (#181953) - obsoletes shapecfg (#182284) diff --git a/iproute2-2.6.16-libdir.patch b/iproute2-2.6.16-libdir.patch new file mode 100644 index 0000000..dc7bcf3 --- /dev/null +++ b/iproute2-2.6.16-libdir.patch @@ -0,0 +1,53 @@ +--- iproute2-2.6.16-060323/tc/Makefile.libdir 2005-07-06 00:11:37.000000000 +0200 ++++ iproute2-2.6.16-060323/tc/Makefile 2006-03-27 07:09:28.000000000 +0200 +@@ -42,7 +42,7 @@ + TCLIB += tc_cbq.o + TCLIB += tc_estimator.o + +-CFLAGS += -DCONFIG_GACT -DCONFIG_GACT_PROB ++CFLAGS += -DCONFIG_GACT -DCONFIG_GACT_PROB -DLIBDIR=\"$(LIBDIR)\" + + TCSO := + TCSO += q_netem.so +--- iproute2-2.6.16-060323/tc/q_netem.c.libdir 2005-12-10 01:01:02.000000000 +0100 ++++ iproute2-2.6.16-060323/tc/q_netem.c 2006-03-27 07:09:28.000000000 +0200 +@@ -60,7 +60,11 @@ + char *line = NULL; + char name[128]; + ++ #ifdef LIBDIR ++ snprintf(name, sizeof(name), "%s/tc/%s.dist", LIBDIR, type); ++ #else + snprintf(name, sizeof(name), "/usr/lib/tc/%s.dist", type); ++ #endif + if ((f = fopen(name, "r")) == NULL) { + fprintf(stderr, "No distribution data for %s (%s: %s)\n", + type, name, strerror(errno)); +--- iproute2-2.6.16-060323/tc/tc.c.libdir 2005-10-07 18:33:21.000000000 +0200 ++++ iproute2-2.6.16-060323/tc/tc.c 2006-03-27 07:11:53.000000000 +0200 +@@ -98,8 +98,11 @@ + for (q = qdisc_list; q; q = q->next) + if (strcmp(q->id, str) == 0) + return q; +- ++ #ifdef LIBDIR ++ snprintf(buf, sizeof(buf), "%s/tc/q_%s.so", LIBDIR, str); ++ #else + snprintf(buf, sizeof(buf), "/usr/lib/tc/q_%s.so", str); ++ #endif + dlh = dlopen(buf, RTLD_LAZY); + if (!dlh) { + /* look in current binary, only open once */ +@@ -144,8 +147,11 @@ + for (q = filter_list; q; q = q->next) + if (strcmp(q->id, str) == 0) + return q; +- ++ #ifdef LIBDIR ++ snprintf(buf, sizeof(buf), "%s/tc/f_%s.so", LIBDIR, str); ++ #else + snprintf(buf, sizeof(buf), "/usr/lib/tc/f_%s.so", str); ++ #endif + dlh = dlopen(buf, RTLD_LAZY); + if (dlh == NULL) { + dlh = BODY; diff --git a/sources b/sources index dd97581..0de3717 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -04f57a6d366d36426d276178b600f5c5 iproute2-2.6.15-060110.tar.gz +f31d4516b35bbfeaa72c762f5959e97c iproute2-2.6.16-060323.tar.gz