1 |
pva 11/04/03 09:49:15 |
2 |
|
3 |
Added: autofs-5.0.5-fix-building-without-ldap.patch |
4 |
autofs5.initd |
5 |
autofs-5.0.5-fix-install-deadlink.patch |
6 |
autofs-5.0.5-respect-user-flags-and-fix-asneeded-v1.patch |
7 |
Log: |
8 |
Rev bump, bug #346537. Mention nfs-utils in elog for NFS mounts, bug 163210 reported by Kai Krakow. Fixed ldap module linkage with krb5, bug 285216 reported by Jonas Jonsson and bug 302377 reported by Duncan Exon Smith. Finally respect LDFLAGS, bug 333971 wrt Cyprien Nicolas (fulax). Incoporate upstream fix to fix ghost entries upon SIGHUP, bug 340761 reported by Faustus. Avoid /etc/mtab access violation, bug 355975 thank Sean McGovern for report. Install /etc/conf.d/autofs on systems with /etc/sysconfig dir, bug 361481 thank Juergen Rose for report. And of course thank Dustin Polke - autofs maintainer! |
9 |
|
10 |
(Portage version: 2.1.9.45/cvs/Linux x86_64) |
11 |
|
12 |
Revision Changes Path |
13 |
1.1 net-fs/autofs/files/autofs-5.0.5-fix-building-without-ldap.patch |
14 |
|
15 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/autofs/files/autofs-5.0.5-fix-building-without-ldap.patch?rev=1.1&view=markup |
16 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/autofs/files/autofs-5.0.5-fix-building-without-ldap.patch?rev=1.1&content-type=text/plain |
17 |
|
18 |
Index: autofs-5.0.5-fix-building-without-ldap.patch |
19 |
=================================================================== |
20 |
--- lib/defaults.c.orig |
21 |
+++ lib/defaults.c |
22 |
@@ -19,7 +19,9 @@ |
23 |
|
24 |
#include "list.h" |
25 |
#include "defaults.h" |
26 |
+#ifdef HAVE_LDAP |
27 |
#include "lookup_ldap.h" |
28 |
+#endif |
29 |
#include "log.h" |
30 |
#include "automount.h" |
31 |
|
32 |
@@ -197,6 +199,7 @@ static int parse_line(char *line, char * |
33 |
return 1; |
34 |
} |
35 |
|
36 |
+#ifdef HAVE_LDAP |
37 |
void defaults_free_uris(struct list_head *list) |
38 |
{ |
39 |
struct list_head *next; |
40 |
@@ -252,9 +255,11 @@ static unsigned int add_uris(char *value |
41 |
|
42 |
return 1; |
43 |
} |
44 |
+#endif |
45 |
|
46 |
struct list_head *defaults_get_uris(void) |
47 |
{ |
48 |
+#ifdef HAVE_LDAP |
49 |
FILE *f; |
50 |
char buf[MAX_LINE_LEN]; |
51 |
char *res; |
52 |
@@ -288,6 +292,9 @@ struct list_head *defaults_get_uris(void |
53 |
|
54 |
fclose(f); |
55 |
return list; |
56 |
+#else |
57 |
+ return NULL; |
58 |
+#endif |
59 |
} |
60 |
|
61 |
/* |
62 |
@@ -450,6 +457,7 @@ unsigned int defaults_get_ldap_network_t |
63 |
return res; |
64 |
} |
65 |
|
66 |
+#ifdef HAVE_LDAP |
67 |
struct ldap_schema *defaults_get_default_schema(void) |
68 |
{ |
69 |
struct ldap_schema *schema; |
70 |
@@ -645,6 +653,7 @@ struct ldap_schema *defaults_get_schema( |
71 |
|
72 |
return schema; |
73 |
} |
74 |
+#endif |
75 |
|
76 |
unsigned int defaults_get_mount_nfs_default_proto(void) |
77 |
{ |
78 |
|
79 |
|
80 |
|
81 |
1.1 net-fs/autofs/files/autofs5.initd |
82 |
|
83 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/autofs/files/autofs5.initd?rev=1.1&view=markup |
84 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/autofs/files/autofs5.initd?rev=1.1&content-type=text/plain |
85 |
|
86 |
Index: autofs5.initd |
87 |
=================================================================== |
88 |
#!/sbin/runscript |
89 |
# Copyright 1999-2011 Gentoo Foundation |
90 |
# Distributed under the terms of the GNU General Public License v2 |
91 |
# $Header: /var/cvsroot/gentoo-x86/net-fs/autofs/files/autofs5.initd,v 1.1 2011/04/03 09:49:15 pva Exp $ |
92 |
|
93 |
DAEMON=/usr/sbin/automount |
94 |
PIDFILE=/var/run/autofs.pid |
95 |
DEVICE=autofs |
96 |
|
97 |
depend() { |
98 |
need localmount |
99 |
use ypbind nfs slapd portmap net |
100 |
} |
101 |
|
102 |
opts="start stop restart status reload" |
103 |
|
104 |
start() { |
105 |
ebegin "Starting automounter" |
106 |
|
107 |
# Ensure autofs support is loaded |
108 |
grep -q autofs /proc/filesystems || modprobe -q autofs4 |
109 |
if [ $? -ne 0 ]; then |
110 |
eend 1 "No autofs support available in kernel" |
111 |
return 1 |
112 |
fi |
113 |
|
114 |
# Check misc device |
115 |
if [ -n "${USE_MISC_DEVICE}" -a "${USE_MISC_DEVICE}" = "yes" ]; then |
116 |
sleep 1 |
117 |
if [ -e "/proc/misc" ]; then |
118 |
MINOR=$(awk "/${DEVICE}/ {print \$1}" /proc/misc) |
119 |
[ -n "${MINOR}" -a ! -c "/dev/${DEVICE}" ] && \ |
120 |
mknod -m 0600 "/dev/${DEVICE}" c 10 ${MINOR} |
121 |
if [ $? -ne 0 ]; then |
122 |
eend 1 "Could not create '/dev/${DEVICE}'" |
123 |
return 1 |
124 |
fi |
125 |
fi |
126 |
[ -x /sbin/restorecon -a -c "/dev/${DEVICE}" ] && \ |
127 |
/sbin/restorecon "/dev/${DEVICE}" |
128 |
if [ $? -ne 0 ]; then |
129 |
eend 1 "Failed to execute '/sbin/restorecon \"/dev/${DEVICE}\"'" |
130 |
return 1 |
131 |
fi |
132 |
else |
133 |
[ -c "/dev/${DEVICE}" ] && rm -rf "/dev/${DEVICE}" |
134 |
fi |
135 |
|
136 |
start-stop-daemon --start --exec ${DAEMON} -- -p ${PIDFILE} ${OPTIONS} |
137 |
|
138 |
eend $? |
139 |
} |
140 |
|
141 |
stop() { |
142 |
ebegin "Stopping automounter" |
143 |
start-stop-daemon --stop --quiet -R TERM/45 -p ${PIDFILE} |
144 |
eend $? |
145 |
} |
146 |
|
147 |
reload() { |
148 |
ebegin "Reloading automounter" |
149 |
if [ ! -r "${PIDFILE}" ]; then |
150 |
eend 1 "automount not running" |
151 |
else |
152 |
kill -HUP $(cat "${PIDFILE}") 2> /dev/null |
153 |
eend $? |
154 |
fi |
155 |
} |
156 |
|
157 |
|
158 |
|
159 |
1.1 net-fs/autofs/files/autofs-5.0.5-fix-install-deadlink.patch |
160 |
|
161 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/autofs/files/autofs-5.0.5-fix-install-deadlink.patch?rev=1.1&view=markup |
162 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/autofs/files/autofs-5.0.5-fix-install-deadlink.patch?rev=1.1&content-type=text/plain |
163 |
|
164 |
Index: autofs-5.0.5-fix-install-deadlink.patch |
165 |
=================================================================== |
166 |
--- modules/Makefile.old 2010-06-19 20:43:45.373371321 +0200 |
167 |
+++ modules/Makefile 2010-06-19 20:45:26.062417092 +0200 |
168 |
@@ -63,7 +63,9 @@ install: all |
169 |
-rm -f $(INSTALLROOT)$(autofslibdir)/mount_smbfs.so |
170 |
ln -fs lookup_file.so $(INSTALLROOT)$(autofslibdir)/lookup_files.so |
171 |
ln -fs lookup_yp.so $(INSTALLROOT)$(autofslibdir)/lookup_nis.so |
172 |
+ifeq ($(SASL), 1) |
173 |
ln -fs lookup_ldap.so $(INSTALLROOT)$(autofslibdir)/lookup_ldaps.so |
174 |
+endif |
175 |
ln -fs mount_nfs.so $(INSTALLROOT)$(autofslibdir)/mount_nfs4.so |
176 |
ifeq ($(EXT2FS), 1) |
177 |
ifeq ($(EXT3FS), 1) |
178 |
|
179 |
|
180 |
|
181 |
1.1 net-fs/autofs/files/autofs-5.0.5-respect-user-flags-and-fix-asneeded-v1.patch |
182 |
|
183 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/autofs/files/autofs-5.0.5-respect-user-flags-and-fix-asneeded-v1.patch?rev=1.1&view=markup |
184 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/autofs/files/autofs-5.0.5-respect-user-flags-and-fix-asneeded-v1.patch?rev=1.1&content-type=text/plain |
185 |
|
186 |
Index: autofs-5.0.5-respect-user-flags-and-fix-asneeded-v1.patch |
187 |
=================================================================== |
188 |
=== modified file 'Makefile.conf.in' |
189 |
--- Makefile.conf.in 2011-04-02 14:53:02 +0000 |
190 |
+++ Makefile.conf.in 2011-04-02 14:53:26 +0000 |
191 |
@@ -95,3 +95,5 @@ |
192 |
# Location for init.d files |
193 |
initdir = @initdir@ |
194 |
|
195 |
+# Use the compiler determined by configure |
196 |
+CC := @CC@ |
197 |
|
198 |
=== modified file 'Makefile.rules' |
199 |
--- Makefile.rules 2011-04-02 14:53:02 +0000 |
200 |
+++ Makefile.rules 2011-04-02 14:54:11 +0000 |
201 |
@@ -16,44 +16,30 @@ |
202 |
AUTOFS_LIB = ../lib/autofs.a |
203 |
|
204 |
# Compilers, linkers and flags |
205 |
-# The STRIP defined here *must not* remove any dynamic-loading symbols |
206 |
- |
207 |
ifdef DMALLOCLIB |
208 |
DEBUG=1 |
209 |
endif |
210 |
|
211 |
ifdef DEBUG |
212 |
CFLAGS ?= -g -Wall -DDEBUG |
213 |
-LDFLAGS = -g |
214 |
-STRIP = : |
215 |
else |
216 |
-ifdef DONTSTRIP |
217 |
CFLAGS ?= -O2 -g |
218 |
-LDFLAGS = -g |
219 |
-STRIP = : |
220 |
-else |
221 |
-CFLAGS ?= -O2 -Wall |
222 |
-LDFLAGS = -s |
223 |
-STRIP = strip --strip-debug |
224 |
-endif |
225 |
-endif |
226 |
+endif |
227 |
+AUTOFS_LDFLAGS = -g |
228 |
|
229 |
-CC = gcc |
230 |
-CXX = g++ |
231 |
CXXFLAGS = $(CFLAGS) |
232 |
LD = ld |
233 |
SOLDFLAGS = -shared |
234 |
|
235 |
CFLAGS += -D_REENTRANT -D_FILE_OFFSET_BITS=64 |
236 |
-LDFLAGS += -lpthread |
237 |
|
238 |
ifdef TIRPCLIB |
239 |
CFLAGS += -I/usr/include/tirpc |
240 |
-LDFLAGS += $(TIRPCLIB) |
241 |
+AUTOFS_LDFLAGS += $(TIRPCLIB) |
242 |
endif |
243 |
|
244 |
ifdef DMALLOCLIB |
245 |
-LDFLAGS += $(DMALLOCLIB) |
246 |
+AUTOFS_LDFLAGS += $(DMALLOCLIB) |
247 |
endif |
248 |
|
249 |
# Standard rules |
250 |
@@ -67,5 +53,4 @@ |
251 |
$(CC) $(CFLAGS) -S $< |
252 |
|
253 |
.c.so: |
254 |
- $(CC) $(SOLDFLAGS) $(CFLAGS) -o $*.so $< $(AUTOFS_LIB) $(DMALLOCLIB) $(LIBNSL) |
255 |
- $(STRIP) $*.so |
256 |
+ $(CC) $(LDFLAGS) $(SOLDFLAGS) $(CFLAGS) -o $*.so $< $(AUTOFS_LIB) $(DMALLOCLIB) $(LIBNSL) |
257 |
|
258 |
=== modified file 'configure.in' |
259 |
--- configure.in 2011-04-02 14:53:02 +0000 |
260 |
+++ configure.in 2011-04-02 14:53:26 +0000 |
261 |
@@ -174,7 +174,7 @@ |
262 |
: Search for Hesiod in normal directory path |
263 |
else |
264 |
: Search for Hesiod in specific directory |
265 |
- LDFLAGS="$LDFLAGS -L${withval}/lib" |
266 |
+ LDFLAGS="$LDFLAGS -Wl,--no-as-needed -L${withval}/lib" |
267 |
LIBHESIOD="-L${withval}/lib" |
268 |
HESIOD_FLAGS="-I${withval}/include" |
269 |
fi |
270 |
|
271 |
=== modified file 'daemon/Makefile' |
272 |
--- daemon/Makefile 2011-04-02 14:53:02 +0000 |
273 |
+++ daemon/Makefile 2011-04-02 14:53:26 +0000 |
274 |
@@ -2,8 +2,8 @@ |
275 |
# Makefile for autofs |
276 |
# |
277 |
|
278 |
+include ../Makefile.rules |
279 |
-include ../Makefile.conf |
280 |
-include ../Makefile.rules |
281 |
|
282 |
SRCS = automount.c indirect.c direct.c spawn.c module.c mount.c \ |
283 |
lookup.c state.c flag.c |
284 |
@@ -20,7 +20,7 @@ |
285 |
CFLAGS += -DAUTOFS_FLAG_DIR=\"$(autofsflagdir)\" |
286 |
CFLAGS += -DVERSION_STRING=\"$(version)\" |
287 |
LDFLAGS += -rdynamic |
288 |
-LIBS = -ldl |
289 |
+LIBS = -ldl -lpthread |
290 |
|
291 |
ifeq ($(LDAP), 1) |
292 |
CFLAGS += $(XML_FLAGS) |
293 |
@@ -30,8 +30,7 @@ |
294 |
all: automount |
295 |
|
296 |
automount: $(OBJS) $(AUTOFS_LIB) |
297 |
- $(CC) $(LDFLAGS) $(DAEMON_LDFLAGS) -o automount $(OBJS) $(AUTOFS_LIB) $(LIBS) |
298 |
- $(STRIP) automount |
299 |
+ $(CC) $(AUTOFS_LDFLAGS) $(DAEMON_LDFLAGS) $(LDFLAGS) -o automount $(OBJS) $(AUTOFS_LIB) $(LIBS) |
300 |
|
301 |
clean: |
302 |
rm -f *.o *.s *~ automount |
303 |
|
304 |
=== modified file 'lib/Makefile' |
305 |
--- lib/Makefile 2011-04-02 14:53:02 +0000 |
306 |
+++ lib/Makefile 2011-04-02 14:53:26 +0000 |
307 |
@@ -41,14 +41,12 @@ |
308 |
|
309 |
mount_clnt.o: mount_clnt.c |
310 |
$(CC) $(CFLAGS) -o mount_clnt.o -c mount_clnt.c |
311 |
- $(STRIP) mount_clnt.o |
312 |
|
313 |
mount_xdr.c: mount.h |
314 |
$(RPCGEN) -c -o mount_xdr.c mount.x |
315 |
|
316 |
mount_xdr.o: mount_xdr.c |
317 |
$(CC) $(CFLAGS) -Wno-unused-variable -o mount_xdr.o -c mount_xdr.c |
318 |
- $(STRIP) mount_xdr.o |
319 |
|
320 |
master_tok.c: master_tok.l |
321 |
$(LEX) -o$@ -Pmaster_ $? |
322 |
|
323 |
=== modified file 'modules/Makefile' |
324 |
--- modules/Makefile 2011-04-02 14:53:02 +0000 |
325 |
+++ modules/Makefile 2011-04-02 14:55:06 +0000 |
326 |
@@ -85,9 +85,8 @@ |
327 |
# Ad hoc compilation rules for modules which need auxilliary libraries |
328 |
# |
329 |
lookup_hesiod.so: lookup_hesiod.c |
330 |
- $(CC) $(SOLDFLAGS) $(CFLAGS) $(HESIOD_FLAGS) -o lookup_hesiod.so \ |
331 |
+ $(CC) $(LDFLAGS) $(SOLDFLAGS) $(CFLAGS) $(HESIOD_FLAGS) -o lookup_hesiod.so \ |
332 |
lookup_hesiod.c $(AUTOFS_LIB) $(LIBHESIOD) $(LIBRESOLV) |
333 |
- $(STRIP) lookup_hesiod.so |
334 |
|
335 |
cyrus-sasl.o: cyrus-sasl.c |
336 |
$(CC) $(CFLAGS) $(LDAP_FLAGS) -c $< |
337 |
@@ -96,13 +95,10 @@ |
338 |
$(CC) $(CFLAGS) $(LDAP_FLAGS) -c $< |
339 |
|
340 |
lookup_ldap.so: lookup_ldap.c dclist.o $(SASL_OBJ) |
341 |
- $(CC) $(SOLDFLAGS) $(CFLAGS) $(LDAP_FLAGS) -o lookup_ldap.so \ |
342 |
+ $(CC) $(LDFLAGS) $(SOLDFLAGS) $(CFLAGS) $(LDAP_FLAGS) -o lookup_ldap.so \ |
343 |
lookup_ldap.c dclist.o $(SASL_OBJ) \ |
344 |
$(AUTOFS_LIB) $(LIBLDAP) $(LIBRESOLV) |
345 |
- $(STRIP) lookup_ldap.so |
346 |
|
347 |
mount_nfs.so: mount_nfs.c replicated.o |
348 |
- $(CC) $(SOLDFLAGS) $(CFLAGS) -o mount_nfs.so \ |
349 |
+ $(CC) $(LDFLAGS) $(SOLDFLAGS) $(CFLAGS) -o mount_nfs.so \ |
350 |
mount_nfs.c replicated.o $(AUTOFS_LIB) $(LIBNSL) |
351 |
- $(STRIP) mount_nfs.so |
352 |
- |