1 |
robbat2 08/06/20 23:57:19 |
2 |
|
3 |
Added: multipath-tools-0.4.8-build.patch multipath-stop.sh |
4 |
multipath-start.sh init.d-multipath |
5 |
Log: |
6 |
Make multipath-tools work for early boot environments for both baselayout1 and baselayout2. Please read the postinst output if multipath is critical to your environment! |
7 |
(Portage version: 2.2_pre8/cvs/Linux 2.6.26-rc4-00103-g1beee8d x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 sys-fs/multipath-tools/files/multipath-tools-0.4.8-build.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/multipath-tools/files/multipath-tools-0.4.8-build.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/multipath-tools/files/multipath-tools-0.4.8-build.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: multipath-tools-0.4.8-build.patch |
16 |
=================================================================== |
17 |
diff -Nuar multipath-tools-0.4.8.orig/devmap_name/Makefile multipath-tools-0.4.8/devmap_name/Makefile |
18 |
--- multipath-tools-0.4.8.orig/devmap_name/Makefile 2007-08-02 14:05:37.000000000 -0700 |
19 |
+++ multipath-tools-0.4.8/devmap_name/Makefile 2008-06-20 16:20:19.342920167 -0700 |
20 |
@@ -10,7 +10,7 @@ |
21 |
ifeq ($(strip $(BUILD)),klibc) |
22 |
OBJS += $(libdm) |
23 |
else |
24 |
- LDFLAGS = -ldevmapper |
25 |
+ LDFLAGS += -ldevmapper |
26 |
endif |
27 |
|
28 |
EXEC = devmap_name |
29 |
@@ -32,11 +32,11 @@ |
30 |
install -d $(DESTDIR)$(bindir) |
31 |
install -m 755 $(EXEC) $(DESTDIR)$(bindir)/ |
32 |
install -d $(DESTDIR)$(mandir) |
33 |
- install -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir) |
34 |
+ install -m 644 $(EXEC).8 $(DESTDIR)$(mandir) |
35 |
|
36 |
uninstall: |
37 |
- rm $(DESTDIR)$(bindir)/$(EXEC) |
38 |
- rm $(DESTDIR)$(mandir)/$(EXEC).8.gz |
39 |
+ rm -f $(DESTDIR)$(bindir)/$(EXEC) |
40 |
+ rm -f $(DESTDIR)$(mandir)/$(EXEC).8 |
41 |
|
42 |
clean: |
43 |
rm -f core *.o $(EXEC) *.gz |
44 |
diff -Nuar multipath-tools-0.4.8.orig/kpartx/Makefile multipath-tools-0.4.8/kpartx/Makefile |
45 |
--- multipath-tools-0.4.8.orig/kpartx/Makefile 2007-08-02 14:05:37.000000000 -0700 |
46 |
+++ multipath-tools-0.4.8/kpartx/Makefile 2008-06-20 16:30:07.571748249 -0700 |
47 |
@@ -13,7 +13,7 @@ |
48 |
lopart.o xstrncpy.o devmapper.o dasd.o mac.o sun.o \ |
49 |
$(MULTIPATHLIB)-$(BUILD).a $(libdm) |
50 |
else |
51 |
- LDFLAGS = -ldevmapper |
52 |
+ LDFLAGS += -ldevmapper |
53 |
OBJS = bsd.o dos.o kpartx.o solaris.o unixware.o dasd.o sun.o \ |
54 |
gpt.o mac.o crc32.o lopart.o xstrncpy.o devmapper.o |
55 |
endif |
56 |
@@ -44,11 +44,12 @@ |
57 |
install -d $(DESTDIR)/etc/udev/rules.d |
58 |
- install -m 644 kpartx.rules $(DESTDIR)/etc/udev/rules.d/ |
59 |
+ install -m 644 kpartx.rules $(DESTDIR)/etc/udev/rules.d/66-kpartx.rules |
60 |
install -d $(DESTDIR)$(mandir) |
61 |
- install -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir) |
62 |
+ install -m 644 $(EXEC).8 $(DESTDIR)$(mandir) |
63 |
|
64 |
uninstall: |
65 |
rm -f $(DESTDIR)$(bindir)/$(EXEC) |
66 |
- rm -f $(DESTDIR)$(mandir)/$(EXEC).8.gz |
67 |
+ rm -f $(DESTDIR)$(mandir)/$(EXEC).8 |
68 |
+ rm -f $(DESTDIR)/etc/udev/rules.d/66-kpartx.rules |
69 |
|
70 |
clean: |
71 |
rm -f core *.o $(EXEC) *.gz |
72 |
diff -Nuar multipath-tools-0.4.8.orig/Makefile.inc multipath-tools-0.4.8/Makefile.inc |
73 |
--- multipath-tools-0.4.8.orig/Makefile.inc 2007-08-02 14:05:37.000000000 -0700 |
74 |
+++ multipath-tools-0.4.8/Makefile.inc 2008-06-20 16:18:41.008583279 -0700 |
75 |
@@ -34,10 +34,10 @@ |
76 |
CHECKERSLIB = $(checkersdir)/libcheckers |
77 |
MULTIPATHLIB = $(multipathdir)/libmultipath |
78 |
|
79 |
-INSTALL_PROGRAM = install -s |
80 |
+INSTALL_PROGRAM = install |
81 |
|
82 |
-OPTFLAGS = -pipe -g -Wall -Wunused -Wstrict-prototypes |
83 |
-CFLAGS = $(OPTFLAGS) |
84 |
+OPTFLAGS = -Wall -Wunused -Wstrict-prototypes |
85 |
+CFLAGS += $(OPTFLAGS) |
86 |
|
87 |
%.o: %.c |
88 |
$(CC) $(CFLAGS) -c -o $@ $< |
89 |
diff -Nuar multipath-tools-0.4.8.orig/multipath/Makefile multipath-tools-0.4.8/multipath/Makefile |
90 |
--- multipath-tools-0.4.8.orig/multipath/Makefile 2007-08-02 14:05:37.000000000 -0700 |
91 |
+++ multipath-tools-0.4.8/multipath/Makefile 2008-06-20 16:21:17.572126979 -0700 |
92 |
@@ -42,17 +42,17 @@ |
93 |
install -d $(DESTDIR)$(bindir) |
94 |
$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/ |
95 |
install -d $(DESTDIR)/etc/udev/rules.d |
96 |
- install -m 644 multipath.rules $(DESTDIR)/etc/udev/rules.d/ |
97 |
+ install -m 644 multipath.rules $(DESTDIR)/etc/udev/rules.d/65-multipath.rules |
98 |
install -d $(DESTDIR)$(mandir) |
99 |
- install -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir) |
100 |
+ install -m 644 $(EXEC).8 $(DESTDIR)$(mandir) |
101 |
install -d $(DESTDIR)$(man5dir) |
102 |
- install -m 644 $(EXEC).conf.5.gz $(DESTDIR)$(man5dir) |
103 |
+ install -m 644 $(EXEC).conf.5 $(DESTDIR)$(man5dir) |
104 |
|
105 |
uninstall: |
106 |
- rm $(DESTDIR)/etc/udev/rules.d/multipath.rules |
107 |
- rm $(DESTDIR)$(bindir)/$(EXEC) |
108 |
- rm $(DESTDIR)$(mandir)/$(EXEC).8.gz |
109 |
- rm $(DESTDIR)$(man5dir)/$(EXEC).conf.5.gz |
110 |
+ rm -f $(DESTDIR)/etc/udev/rules.d/65-multipath.rules |
111 |
+ rm -f $(DESTDIR)$(bindir)/$(EXEC) |
112 |
+ rm -f $(DESTDIR)$(mandir)/$(EXEC).8 |
113 |
+ rm -f $(DESTDIR)$(man5dir)/$(EXEC).conf.5 |
114 |
|
115 |
clean: |
116 |
rm -f core *.o $(EXEC) *.gz |
117 |
diff -Nuar multipath-tools-0.4.8.orig/multipathd/Makefile multipath-tools-0.4.8/multipathd/Makefile |
118 |
--- multipath-tools-0.4.8.orig/multipathd/Makefile 2007-08-02 14:05:37.000000000 -0700 |
119 |
+++ multipath-tools-0.4.8/multipathd/Makefile 2008-06-20 16:21:51.421988986 -0700 |
120 |
@@ -7,7 +7,7 @@ |
121 |
# basic flags setting |
122 |
# |
123 |
CFLAGS += -DDAEMON -I$(multipathdir) -I$(checkersdir) |
124 |
-LDFLAGS = -lpthread -ldevmapper -lreadline -lncurses -laio |
125 |
+LDFLAGS += -lpthread -ldevmapper -lreadline -lncurses -laio |
126 |
|
127 |
# |
128 |
# debuging stuff |
129 |
@@ -48,12 +48,12 @@ |
130 |
$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir) |
131 |
install -d $(DESTDIR)$(rcdir) |
132 |
install -d $(DESTDIR)$(mandir) |
133 |
- install -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir) |
134 |
+ install -m 644 $(EXEC).8 $(DESTDIR)$(mandir) |
135 |
|
136 |
uninstall: |
137 |
rm -f $(DESTDIR)$(bindir)/$(EXEC) |
138 |
rm -f $(DESTDIR)$(rcdir)/$(EXEC) |
139 |
- rm -f $(DESTDIR)$(mandir)/$(EXEC).8.gz |
140 |
+ rm -f $(DESTDIR)$(mandir)/$(EXEC).8 |
141 |
|
142 |
clean: |
143 |
$(MAKE) -C $(multipathdir) prepare DAEMON=1 |
144 |
diff -Nuar multipath-tools-0.4.8.orig/path_priority/pp_alua/Makefile multipath-tools-0.4.8/path_priority/pp_alua/Makefile |
145 |
--- multipath-tools-0.4.8.orig/path_priority/pp_alua/Makefile 2007-08-02 14:05:37.000000000 -0700 |
146 |
+++ multipath-tools-0.4.8/path_priority/pp_alua/Makefile 2008-06-20 16:24:53.596722793 -0700 |
147 |
@@ -35,13 +35,13 @@ |
148 |
klibc: $(OBJS) |
149 |
$(CC) -static -o $(EXEC) $(OBJS) |
150 |
|
151 |
-install: $(EXEC) $(EXEC).8.gz |
152 |
- $(INSTALL) -s -m 755 $(EXEC) $(DESTDIR)$(bindir)/$(EXEC) |
153 |
- $(INSTALL) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir)/$(EXEC).8.gz |
154 |
+install: $(EXEC) $(EXEC).8 |
155 |
+ $(INSTALL) -m 755 $(EXEC) $(DESTDIR)$(bindir)/$(EXEC) |
156 |
+ $(INSTALL) -m 644 $(EXEC).8 $(DESTDIR)$(mandir)/$(EXEC).8 |
157 |
|
158 |
uninstall: |
159 |
- rm $(DESTDIR)$(bindir)/$(EXEC) |
160 |
- rm $(DESTDIR)$(mandir)/$(EXEC).8.gz |
161 |
+ rm -f $(DESTDIR)$(bindir)/$(EXEC) |
162 |
+ rm -f $(DESTDIR)$(mandir)/$(EXEC).8 |
163 |
|
164 |
clean: |
165 |
rm -f *.o *.gz $(EXEC) |
166 |
diff -Nuar multipath-tools-0.4.8.orig/path_priority/pp_balance_units/Makefile multipath-tools-0.4.8/path_priority/pp_balance_units/Makefile |
167 |
--- multipath-tools-0.4.8.orig/path_priority/pp_balance_units/Makefile 2007-08-02 14:05:37.000000000 -0700 |
168 |
+++ multipath-tools-0.4.8/path_priority/pp_balance_units/Makefile 2008-06-20 16:29:13.181754556 -0700 |
169 |
@@ -13,7 +13,7 @@ |
170 |
OBJS = pp_balance_units.o $(MULTIPATHLIB)-$(BUILD).a |
171 |
else |
172 |
CFLAGS += -I$(multipathdir) -DDEBUG=$(DEBUG) |
173 |
- LDFLAGS = -ldevmapper |
174 |
+ LDFLAGS += -ldevmapper |
175 |
OBJS = pp_balance_units.o $(MULTIPATHLIB)-$(BUILD).a |
176 |
endif |
177 |
|
178 |
@@ -38,7 +38,7 @@ |
179 |
$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/ |
180 |
|
181 |
uninstall: |
182 |
- rm $(DESTDIR)$(bindir)/$(EXEC) |
183 |
+ rm -f $(DESTDIR)$(bindir)/$(EXEC) |
184 |
|
185 |
clean: |
186 |
rm -f core *.o $(EXEC) *.gz |
187 |
diff -Nuar multipath-tools-0.4.8.orig/path_priority/pp_emc/Makefile multipath-tools-0.4.8/path_priority/pp_emc/Makefile |
188 |
--- multipath-tools-0.4.8.orig/path_priority/pp_emc/Makefile 2007-08-02 14:05:37.000000000 -0700 |
189 |
+++ multipath-tools-0.4.8/path_priority/pp_emc/Makefile 2008-06-20 16:28:57.664254512 -0700 |
190 |
@@ -17,7 +17,8 @@ |
191 |
$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/$(EXEC) |
192 |
|
193 |
uninstall: |
194 |
- rm $(DESTDIR)$(bindir)/$(EXEC) |
195 |
+ rm -f $(DESTDIR)$(bindir)/$(EXEC) |
196 |
+ |
197 |
clean: |
198 |
rm -f *.o $(EXEC) |
199 |
|
200 |
diff -Nuar multipath-tools-0.4.8.orig/path_priority/pp_hds_modular/Makefile multipath-tools-0.4.8/path_priority/pp_hds_modular/Makefile |
201 |
--- multipath-tools-0.4.8.orig/path_priority/pp_hds_modular/Makefile 2007-08-02 14:05:37.000000000 -0700 |
202 |
+++ multipath-tools-0.4.8/path_priority/pp_hds_modular/Makefile 2008-06-20 16:28:52.897167373 -0700 |
203 |
@@ -17,6 +17,7 @@ |
204 |
$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/$(EXEC) |
205 |
|
206 |
uninstall: |
207 |
- rm $(DESTDIR)$(bindir)/$(EXEC) |
208 |
+ rm -f $(DESTDIR)$(bindir)/$(EXEC) |
209 |
+ |
210 |
clean: |
211 |
rm -f *.o $(EXEC) |
212 |
diff -Nuar multipath-tools-0.4.8.orig/path_priority/pp_hp_sw/Makefile multipath-tools-0.4.8/path_priority/pp_hp_sw/Makefile |
213 |
--- multipath-tools-0.4.8.orig/path_priority/pp_hp_sw/Makefile 2007-08-02 14:05:37.000000000 -0700 |
214 |
+++ multipath-tools-0.4.8/path_priority/pp_hp_sw/Makefile 2008-06-20 16:28:48.881865361 -0700 |
215 |
@@ -17,7 +17,7 @@ |
216 |
install -m 755 $(EXEC) $(DESTDIR)$(bindir)/$(EXEC) |
217 |
|
218 |
uninstall: |
219 |
- rm $(DESTDIR)$(bindir)/$(EXEC) |
220 |
+ rm -f $(DESTDIR)$(bindir)/$(EXEC) |
221 |
clean: |
222 |
rm -f *.o $(EXEC) |
223 |
|
224 |
diff -Nuar multipath-tools-0.4.8.orig/path_priority/pp_netapp/Makefile multipath-tools-0.4.8/path_priority/pp_netapp/Makefile |
225 |
--- multipath-tools-0.4.8.orig/path_priority/pp_netapp/Makefile 2007-08-02 14:05:37.000000000 -0700 |
226 |
+++ multipath-tools-0.4.8/path_priority/pp_netapp/Makefile 2008-06-20 16:28:45.411765821 -0700 |
227 |
@@ -17,6 +17,7 @@ |
228 |
$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/$(EXEC) |
229 |
|
230 |
uninstall: |
231 |
- rm $(DESTDIR)$(bindir)/$(EXEC) |
232 |
+ rm -f $(DESTDIR)$(bindir)/$(EXEC) |
233 |
+ |
234 |
clean: |
235 |
rm -f *.o $(EXEC) |
236 |
diff -Nuar multipath-tools-0.4.8.orig/path_priority/pp_random/Makefile multipath-tools-0.4.8/path_priority/pp_random/Makefile |
237 |
--- multipath-tools-0.4.8.orig/path_priority/pp_random/Makefile 2007-08-02 14:05:37.000000000 -0700 |
238 |
+++ multipath-tools-0.4.8/path_priority/pp_random/Makefile 2008-06-20 16:28:37.139873269 -0700 |
239 |
@@ -17,6 +17,7 @@ |
240 |
$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/$(EXEC) |
241 |
|
242 |
uninstall: |
243 |
- rm $(DESTDIR)$(bindir)/$(EXEC) |
244 |
+ rm -f $(DESTDIR)$(bindir)/$(EXEC) |
245 |
+ |
246 |
clean: |
247 |
rm -f *.o $(EXEC) |
248 |
diff -Nuar multipath-tools-0.4.8.orig/path_priority/pp_rdac/Makefile multipath-tools-0.4.8/path_priority/pp_rdac/Makefile |
249 |
--- multipath-tools-0.4.8.orig/path_priority/pp_rdac/Makefile 2007-08-02 14:05:37.000000000 -0700 |
250 |
+++ multipath-tools-0.4.8/path_priority/pp_rdac/Makefile 2008-06-20 16:28:32.708817275 -0700 |
251 |
@@ -17,6 +17,7 @@ |
252 |
$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/$(EXEC) |
253 |
|
254 |
uninstall: |
255 |
- rm $(DESTDIR)$(bindir)/$(EXEC) |
256 |
+ rm -f $(DESTDIR)$(bindir)/$(EXEC) |
257 |
+ |
258 |
clean: |
259 |
rm -f *.o $(EXEC) |
260 |
|
261 |
|
262 |
|
263 |
1.1 sys-fs/multipath-tools/files/multipath-stop.sh |
264 |
|
265 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/multipath-tools/files/multipath-stop.sh?rev=1.1&view=markup |
266 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/multipath-tools/files/multipath-stop.sh?rev=1.1&content-type=text/plain |
267 |
|
268 |
Index: multipath-stop.sh |
269 |
=================================================================== |
270 |
# /lib/rcscripts/addons/lvm-stop.sh |
271 |
# $Header: /var/cvsroot/gentoo-x86/sys-fs/multipath-tools/files/multipath-stop.sh,v 1.1 2008/06/20 23:57:19 robbat2 Exp $ |
272 |
|
273 |
dm_in_proc() { |
274 |
local retval=0 |
275 |
for x in devices misc ; do |
276 |
grep -qs 'device-mapper' /proc/${x} |
277 |
retval=$((${retval} + $?)) |
278 |
done |
279 |
return ${retval} |
280 |
} |
281 |
|
282 |
# Stop LVM2 |
283 |
if [ -x /sbin/multipath -a dm_in_proc ]; then |
284 |
ebegin "Shutting down Multipath devices" |
285 |
/sbin/multipath -v0 -F >/dev/null |
286 |
retval=$? |
287 |
eend $retval "Failed to shut down Multipath devices" |
288 |
fi |
289 |
|
290 |
# vim:ts=4 |
291 |
|
292 |
|
293 |
|
294 |
1.1 sys-fs/multipath-tools/files/multipath-start.sh |
295 |
|
296 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/multipath-tools/files/multipath-start.sh?rev=1.1&view=markup |
297 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/multipath-tools/files/multipath-start.sh?rev=1.1&content-type=text/plain |
298 |
|
299 |
Index: multipath-start.sh |
300 |
=================================================================== |
301 |
# /lib/rcscripts/addons/multipath-start.sh: Setup multipath devices at boot |
302 |
# $Header: /var/cvsroot/gentoo-x86/sys-fs/multipath-tools/files/multipath-start.sh,v 1.1 2008/06/20 23:57:19 robbat2 Exp $ |
303 |
|
304 |
dm_in_proc() { |
305 |
local retval=0 |
306 |
for x in devices misc ; do |
307 |
grep -qs 'device-mapper' /proc/${x} |
308 |
retval=$((${retval} + $?)) |
309 |
done |
310 |
return ${retval} |
311 |
} |
312 |
|
313 |
# NOTE: Add needed modules for RAID, Multipath etc |
314 |
# to /etc/modules.autoload if needed |
315 |
if [ -z "${CDBOOT}" -a -x /sbin/multipath ] ; then |
316 |
if [ -e /proc/modules ] && ! dm_in_proc ; then |
317 |
modprobe dm-mod 2>/dev/null |
318 |
fi |
319 |
|
320 |
if dm_in_proc ; then |
321 |
ebegin "Activating Multipath devices" |
322 |
/sbin/multipath -v0 >/dev/null |
323 |
retval=$? |
324 |
eend ${retval} "Failed to activate multipath devices" |
325 |
fi |
326 |
fi |
327 |
|
328 |
# vim:ts=4 |
329 |
|
330 |
|
331 |
|
332 |
1.1 sys-fs/multipath-tools/files/init.d-multipath |
333 |
|
334 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/multipath-tools/files/init.d-multipath?rev=1.1&view=markup |
335 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/multipath-tools/files/init.d-multipath?rev=1.1&content-type=text/plain |
336 |
|
337 |
Index: init.d-multipath |
338 |
=================================================================== |
339 |
#!/sbin/runscript |
340 |
# Copyright 1999-2007 Gentoo Foundation |
341 |
# Distributed under the terms of the GNU General Public License v2 |
342 |
# $Header: /var/cvsroot/gentoo-x86/sys-fs/multipath-tools/files/init.d-multipath,v 1.1 2008/06/20 23:57:19 robbat2 Exp $ |
343 |
|
344 |
depend() { |
345 |
if [ -e /lib/librc.so ]; then |
346 |
# on baselayout-1 this causes |
347 |
# dependency-cycles with checkroot (before *) |
348 |
before checkfs fsck multipathd lvm |
349 |
after modules |
350 |
fi |
351 |
} |
352 |
|
353 |
start() { |
354 |
if [ ! -e /lib/librc.so ]; then |
355 |
eerror "The $SVCNAME init-script is written for baselayout-2!" |
356 |
eerror "Please do not use it with baselayout-1!". |
357 |
return 1 |
358 |
fi |
359 |
|
360 |
start_addon multipath |
361 |
} |
362 |
|
363 |
stop() { |
364 |
stop_addon multipath |
365 |
} |
366 |
|
367 |
# vim:ts=4 |
368 |
|
369 |
|
370 |
|
371 |
-- |
372 |
gentoo-commits@l.g.o mailing list |