Submitted By: Joe Ciccone Date: 2006-09-28 Upstream Status: Unknown Origin: Joe Ciccone Description: Changes the path of /usr/lib/tc to one defined in the Makefile. diff -Naur iproute2-2.6.16-060323.orig/Makefile iproute2-2.6.16-060323/Makefile --- iproute2-2.6.16-060323.orig/Makefile 2005-07-08 15:08:47.000000000 -0700 +++ iproute2-2.6.16-060323/Makefile 2006-09-28 22:07:52.059261910 -0700 @@ -1,5 +1,6 @@ DESTDIR= SBINDIR=/usr/sbin +LIBDIR=/usr/lib CONFDIR=/etc/iproute2 DOCDIR=/usr/share/doc/iproute2 MANDIR=/usr/share/man @@ -22,7 +23,7 @@ CC = gcc HOSTCC = gcc CCOPTS = -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -CFLAGS = $(CCOPTS) -I../include $(DEFINES) +CFLAGS = -DLIBDIR=\"$(LIBDIR)\" $(CCOPTS) -I../include $(DEFINES) YACCFLAGS = -d -t -v LDLIBS += -L../lib -lnetlink -lutil diff -Naur iproute2-2.6.16-060323.orig/netem/Makefile iproute2-2.6.16-060323/netem/Makefile --- iproute2-2.6.16-060323.orig/netem/Makefile 2006-03-14 11:43:59.000000000 -0800 +++ iproute2-2.6.16-060323/netem/Makefile 2006-09-28 22:07:52.059261910 -0700 @@ -4,6 +4,8 @@ HOSTCC ?= $(CC) LDLIBS += -lm +LIBDIR = /usr/lib + all: $(DISTGEN) $(DISTDATA) $(DISTGEN): @@ -16,9 +18,9 @@ ./maketable experimental.dat > experimental.dist install: all - mkdir -p $(DESTDIR)/usr/lib/tc + mkdir -p $(DESTDIR)/$(LIBDIR)/tc for i in $(DISTDATA); \ - do install -m 755 $$i $(DESTDIR)/usr/lib/tc; \ + do install -m 755 $$i $(DESTDIR)/$(LIBDIR)/tc; \ done clean: diff -Naur iproute2-2.6.16-060323.orig/tc/Makefile iproute2-2.6.16-060323/tc/Makefile --- iproute2-2.6.16-060323.orig/tc/Makefile 2005-07-05 15:11:37.000000000 -0700 +++ iproute2-2.6.16-060323/tc/Makefile 2006-09-28 22:07:52.059261910 -0700 @@ -69,10 +69,10 @@ $(AR) rcs $@ $(TCLIB) install: all - mkdir -p $(DESTDIR)/usr/lib/tc + mkdir -p $(DESTDIR)/$(LIBDIR)/tc install -m 0755 -s tc $(DESTDIR)$(SBINDIR) for i in $(TCSO); \ - do install -m 755 -s $$i $(DESTDIR)/usr/lib/tc; \ + do install -m 755 -s $$i $(DESTDIR)/$(LIBDIR)/tc; \ done clean: diff -Naur iproute2-2.6.16-060323.orig/tc/m_ipt.c iproute2-2.6.16-060323/tc/m_ipt.c --- iproute2-2.6.16-060323.orig/tc/m_ipt.c 2005-06-23 10:36:38.000000000 -0700 +++ iproute2-2.6.16-060323/tc/m_ipt.c 2006-09-28 22:08:49.337332801 -0700 @@ -48,7 +48,7 @@ #endif #ifndef IPT_LIB_DIR -#define IPT_LIB_DIR "/usr/local/lib/iptables" +#define IPT_LIB_DIR LIBDIR #endif #ifndef PROC_SYS_MODPROBE diff -Naur iproute2-2.6.16-060323.orig/tc/q_netem.c iproute2-2.6.16-060323/tc/q_netem.c --- iproute2-2.6.16-060323.orig/tc/q_netem.c 2005-12-09 16:01:02.000000000 -0800 +++ iproute2-2.6.16-060323/tc/q_netem.c 2006-09-28 22:07:52.059261910 -0700 @@ -60,7 +60,7 @@ char *line = NULL; char name[128]; - snprintf(name, sizeof(name), "/usr/lib/tc/%s.dist", type); + snprintf(name, sizeof(name), LIBDIR "/tc/%s.dist", type); if ((f = fopen(name, "r")) == NULL) { fprintf(stderr, "No distribution data for %s (%s: %s)\n", type, name, strerror(errno)); diff -Naur iproute2-2.6.16-060323.orig/tc/tc.c iproute2-2.6.16-060323/tc/tc.c --- iproute2-2.6.16-060323.orig/tc/tc.c 2005-10-07 09:33:21.000000000 -0700 +++ iproute2-2.6.16-060323/tc/tc.c 2006-09-28 22:07:52.059261910 -0700 @@ -99,7 +99,7 @@ if (strcmp(q->id, str) == 0) return q; - snprintf(buf, sizeof(buf), "/usr/lib/tc/q_%s.so", str); + snprintf(buf, sizeof(buf), LIBDIR "/tc/q_%s.so", str); dlh = dlopen(buf, RTLD_LAZY); if (!dlh) { /* look in current binary, only open once */ @@ -145,7 +145,7 @@ if (strcmp(q->id, str) == 0) return q; - snprintf(buf, sizeof(buf), "/usr/lib/tc/f_%s.so", str); + snprintf(buf, sizeof(buf), LIBDIR "/tc/f_%s.so", str); dlh = dlopen(buf, RTLD_LAZY); if (dlh == NULL) { dlh = BODY;