source: patches/iproute2-2.6.18-061002-libdir-1.patch@ 3719d82

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 3719d82 was ad01a6a, checked in by Jim Gifford <clfs@…>, 18 years ago

Updated book patches

  • Property mode set to 100644
File size: 3.7 KB
RevLine 
[dc580237]1Submitted By: Joe Ciccone <jciccone@linuxfromscratch.org>
[ad01a6a]2Date: 2006-09-28
[dc580237]3Upstream Status: Unknown
4Origin: Joe Ciccone
5Description: Changes the path of /usr/lib/tc to one defined in the Makefile.
6
7diff -Naur iproute2-2.6.16-060323.orig/Makefile iproute2-2.6.16-060323/Makefile
[ad01a6a]8--- iproute2-2.6.16-060323.orig/Makefile 2005-07-08 15:08:47.000000000 -0700
9+++ iproute2-2.6.16-060323/Makefile 2006-09-28 22:07:52.059261910 -0700
[dc580237]10@@ -1,5 +1,6 @@
11 DESTDIR=
12 SBINDIR=/usr/sbin
13+LIBDIR=/usr/lib
14 CONFDIR=/etc/iproute2
15 DOCDIR=/usr/share/doc/iproute2
16 MANDIR=/usr/share/man
17@@ -22,7 +23,7 @@
18 CC = gcc
19 HOSTCC = gcc
20 CCOPTS = -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall
21-CFLAGS = $(CCOPTS) -I../include $(DEFINES)
22+CFLAGS = -DLIBDIR=\"$(LIBDIR)\" $(CCOPTS) -I../include $(DEFINES)
23 YACCFLAGS = -d -t -v
24
25 LDLIBS += -L../lib -lnetlink -lutil
26diff -Naur iproute2-2.6.16-060323.orig/netem/Makefile iproute2-2.6.16-060323/netem/Makefile
[ad01a6a]27--- iproute2-2.6.16-060323.orig/netem/Makefile 2006-03-14 11:43:59.000000000 -0800
28+++ iproute2-2.6.16-060323/netem/Makefile 2006-09-28 22:07:52.059261910 -0700
[dc580237]29@@ -4,6 +4,8 @@
30 HOSTCC ?= $(CC)
31 LDLIBS += -lm
32
33+LIBDIR = /usr/lib
34+
35 all: $(DISTGEN) $(DISTDATA)
36
37 $(DISTGEN):
38@@ -16,9 +18,9 @@
39 ./maketable experimental.dat > experimental.dist
40
41 install: all
42- mkdir -p $(DESTDIR)/usr/lib/tc
43+ mkdir -p $(DESTDIR)/$(LIBDIR)/tc
44 for i in $(DISTDATA); \
45- do install -m 755 $$i $(DESTDIR)/usr/lib/tc; \
46+ do install -m 755 $$i $(DESTDIR)/$(LIBDIR)/tc; \
47 done
48
49 clean:
50diff -Naur iproute2-2.6.16-060323.orig/tc/Makefile iproute2-2.6.16-060323/tc/Makefile
[ad01a6a]51--- iproute2-2.6.16-060323.orig/tc/Makefile 2005-07-05 15:11:37.000000000 -0700
52+++ iproute2-2.6.16-060323/tc/Makefile 2006-09-28 22:07:52.059261910 -0700
[dc580237]53@@ -69,10 +69,10 @@
54 $(AR) rcs $@ $(TCLIB)
55
56 install: all
57- mkdir -p $(DESTDIR)/usr/lib/tc
58+ mkdir -p $(DESTDIR)/$(LIBDIR)/tc
59 install -m 0755 -s tc $(DESTDIR)$(SBINDIR)
60 for i in $(TCSO); \
61- do install -m 755 -s $$i $(DESTDIR)/usr/lib/tc; \
62+ do install -m 755 -s $$i $(DESTDIR)/$(LIBDIR)/tc; \
63 done
64
65 clean:
[ad01a6a]66diff -Naur iproute2-2.6.16-060323.orig/tc/m_ipt.c iproute2-2.6.16-060323/tc/m_ipt.c
67--- iproute2-2.6.16-060323.orig/tc/m_ipt.c 2005-06-23 10:36:38.000000000 -0700
68+++ iproute2-2.6.16-060323/tc/m_ipt.c 2006-09-28 22:08:49.337332801 -0700
69@@ -48,7 +48,7 @@
70 #endif
71
72 #ifndef IPT_LIB_DIR
73-#define IPT_LIB_DIR "/usr/local/lib/iptables"
74+#define IPT_LIB_DIR LIBDIR
75 #endif
76
77 #ifndef PROC_SYS_MODPROBE
[dc580237]78diff -Naur iproute2-2.6.16-060323.orig/tc/q_netem.c iproute2-2.6.16-060323/tc/q_netem.c
[ad01a6a]79--- iproute2-2.6.16-060323.orig/tc/q_netem.c 2005-12-09 16:01:02.000000000 -0800
80+++ iproute2-2.6.16-060323/tc/q_netem.c 2006-09-28 22:07:52.059261910 -0700
[dc580237]81@@ -60,7 +60,7 @@
82 char *line = NULL;
83 char name[128];
84
85- snprintf(name, sizeof(name), "/usr/lib/tc/%s.dist", type);
86+ snprintf(name, sizeof(name), LIBDIR "/tc/%s.dist", type);
87 if ((f = fopen(name, "r")) == NULL) {
88 fprintf(stderr, "No distribution data for %s (%s: %s)\n",
89 type, name, strerror(errno));
90diff -Naur iproute2-2.6.16-060323.orig/tc/tc.c iproute2-2.6.16-060323/tc/tc.c
[ad01a6a]91--- iproute2-2.6.16-060323.orig/tc/tc.c 2005-10-07 09:33:21.000000000 -0700
92+++ iproute2-2.6.16-060323/tc/tc.c 2006-09-28 22:07:52.059261910 -0700
[dc580237]93@@ -99,7 +99,7 @@
94 if (strcmp(q->id, str) == 0)
95 return q;
96
97- snprintf(buf, sizeof(buf), "/usr/lib/tc/q_%s.so", str);
98+ snprintf(buf, sizeof(buf), LIBDIR "/tc/q_%s.so", str);
99 dlh = dlopen(buf, RTLD_LAZY);
100 if (!dlh) {
101 /* look in current binary, only open once */
102@@ -145,7 +145,7 @@
103 if (strcmp(q->id, str) == 0)
104 return q;
105
106- snprintf(buf, sizeof(buf), "/usr/lib/tc/f_%s.so", str);
107+ snprintf(buf, sizeof(buf), LIBDIR "/tc/f_%s.so", str);
108 dlh = dlopen(buf, RTLD_LAZY);
109 if (dlh == NULL) {
110 dlh = BODY;
Note: See TracBrowser for help on using the repository browser.