1 |
ennael |
49039 |
%define name autofs |
2 |
|
|
%define version 5.0.5 |
3 |
|
|
%define release %mkrel 4 |
4 |
|
|
|
5 |
|
|
Name: %{name} |
6 |
|
|
Version: %{version} |
7 |
|
|
Release: %{release} |
8 |
|
|
License: GPL |
9 |
|
|
Summary: A tool for automatically mounting and unmounting filesystems |
10 |
|
|
Group: System/Kernel and hardware |
11 |
|
|
URL: ftp://ftp.kernel.org/pub/linux/daemons/autofs |
12 |
|
|
Source0: ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/autofs-%{version}.tar.bz2 |
13 |
|
|
Source1: %{name}.init |
14 |
|
|
Patch01: autofs-5.0.5-fix-included-map-read-fail-handling.patch |
15 |
|
|
Patch02: autofs-5.0.5-refactor-ldap-sasl-bind.patch |
16 |
|
|
Patch03: autofs-5.0.4-add-mount-wait-parameter.patch |
17 |
|
|
Patch04: autofs-5.0.5-special-case-cifs-escapes.patch |
18 |
|
|
Patch05: autofs-5.0.5-fix-libxml2-workaround-configure.patch |
19 |
|
|
Patch06: autofs-5.0.5-more-code-analysis-corrections.patch |
20 |
|
|
Patch07: autofs-5.0.5-fix-backwards-ifndef-INET6.patch |
21 |
|
|
Patch08: autofs-5.0.5-fix-stale-init-for-file-map-instance.patch |
22 |
|
|
Patch09: autofs-5.0.5-fix-ext4-fsck-at-mount.patch |
23 |
|
|
Patch10: autofs-5.0.5-dont-use-master_lex_destroy-to-clear-parse-buffer.patch |
24 |
|
|
Patch11: autofs-5.0.5-make-documentation-for-set-log-priority-clearer.patch |
25 |
|
|
Patch12: autofs-5.0.5-fix-timeout-in-connect_nb.patch |
26 |
|
|
Patch13: autofs-5.0.5-fix-pidof-init-script-usage.patch |
27 |
|
|
Patch14: autofs-5.0.5-check-for-path-mount-location-in-generic-module.patch |
28 |
|
|
Patch15: autofs-5.0.5-dont-fail-mount-on-access-fail.patch |
29 |
|
|
Patch16: autofs-5.0.5-fix-rpc-large-export-list.patch |
30 |
|
|
Patch17: autofs-5.0.5-fix-memory-leak-on-reload.patch |
31 |
|
|
Patch18: autofs-5.0.5-update-kernel-patches-2.6.18-and-2.6.19.patch |
32 |
|
|
Patch19: autofs-5.0.5-dont-connect-at-ldap-lookup-module-init.patch |
33 |
|
|
Patch20: autofs-5.0.5-fix-random-selection-option.patch |
34 |
|
|
Patch21: autofs-5.0.5-fix-disable-timeout.patch |
35 |
|
|
Patch22: autofs-5.0.5-fix-strdup-return-value-check.patch |
36 |
|
|
Patch23: autofs-5.0.5-fix-reconnect-get-base-dn.patch |
37 |
|
|
Patch24: autofs-5.0.5-add-sasl-mutex-callbacks.patch |
38 |
|
|
Patch25: autofs-5.0.5-fix-get-qdn-fail.patch |
39 |
|
|
Patch26: autofs-5.0.5-fix-ampersand-escape-in-auto-smb.patch |
40 |
|
|
Patch27: autofs-5.0.5-add-locality-as-valid-ldap-master-map-attribute.patch |
41 |
|
|
Patch28: autofs-5.0.5-add-locality-as-valid-ldap-master-map-attribute-fix.patch |
42 |
|
|
Patch29: autofs-5.0.5-make-nfs4-default-for-redhat-replicated-selection.patch |
43 |
|
|
Patch30: autofs-5.0.5-add-simple-bind-auth.patch |
44 |
|
|
Patch31: autofs-5.0.5-fix-master-map-source-server-unavialable-handling.patch |
45 |
|
|
Patch32: autofs-5.0.5-add-autofs_ldap_auth_conf-man-page.patch |
46 |
|
|
Patch33: autofs-5.0.5-fix-random-selection-for-host-on-different-network.patch |
47 |
|
|
Patch34: autofs-5.0.5-make-redhat-init-script-more-lsb-compliant.patch |
48 |
|
|
Patch35: autofs-5.0.5-dont-hold-lock-for-simple-mounts.patch |
49 |
|
|
Patch36: autofs-5.0.5-fix-remount-locking.patch |
50 |
|
|
Patch37: autofs-5.0.5-fix-wildcard-map-entry-match.patch |
51 |
|
|
Patch38: autofs-5.0.5-fix-parse_sun-module-init.patch |
52 |
|
|
Patch39: autofs-5.0.5-dont-check-null-cache-on-expire.patch |
53 |
|
|
Patch40: autofs-5.0.5-fix-null-cache-race.patch |
54 |
|
|
Patch41: autofs-5.0.5-fix-cache_init-on-source-re-read.patch |
55 |
|
|
Patch42: autofs-5.0.5-mapent-becomes-negative-during-lookup.patch |
56 |
|
|
Patch43: autofs-5.0.5-check-each-dc-server.patch |
57 |
|
|
Patch44: autofs-5.0.5-fix-negative-cache-included-map-lookup.patch |
58 |
|
|
Patch45: autofs-5.0.5-remove-state-machine-timed-wait.patch |
59 |
|
|
Patch46: autofs-5.0.5-remove-extra-read-master-map-call.patch |
60 |
|
|
Patch47: autofs-5.0.5-fix-fix-cache_init-on-source-re-read.patch |
61 |
|
|
Patch48: autofs-5.0.5-fix-error-handing-in-do_mount_indirect.patch |
62 |
|
|
Patch49: autofs-5.0.5-expire-thread-use-pending-mutex.patch |
63 |
|
|
Patch50: autofs-5.0.5-include-krb5-library.patch |
64 |
|
|
Patch51: autofs-5.0.5-make-verbose-mode-a-little-less-verbose.patch |
65 |
|
|
Patch52: autofs-5.0.5-remove-ERR_remove_state-openssl-call.patch |
66 |
|
|
Patch53: autofs-5.0.5-fix-restart.patch |
67 |
|
|
Patch54: autofs-5.0.5-fix-status-privilege-error.patch |
68 |
|
|
Patch55: autofs-5.0.4-always-read-file-maps-mount-lookup-map-read-fix.patch |
69 |
|
|
Patch56: autofs-5.0.5-fix-direct-map-not-updating-on-reread.patch |
70 |
|
|
Patch57: autofs-5.0.5-add-external-bind-method.patch |
71 |
|
|
Patch58: autofs-5.0.5-fix-add-simple-bind-auth.patch |
72 |
|
|
Patch59: autofs-5.0.5-add-dump-maps-option.patch |
73 |
|
|
Patch60: autofs-5.0.5-fix-submount-shutdown-wait.patch |
74 |
|
|
Patch102: autofs-5.0.4-separate-config-files.patch |
75 |
|
|
Patch103: autofs-5.0.4-rename-configuration-file.patch |
76 |
|
|
Conflicts: kernel < 2.6.17 |
77 |
|
|
Requires(post): rpm-helper |
78 |
|
|
Requires(preun):rpm-helper |
79 |
|
|
BuildRequires: openldap-devel |
80 |
|
|
BuildRequires: flex |
81 |
|
|
BuildRequires: bison |
82 |
|
|
BuildRequires: libsasl-devel |
83 |
|
|
BuildRequires: krb-devel |
84 |
|
|
BuildRequires: libxml2-devel |
85 |
|
|
Conflicts: autosmb |
86 |
|
|
Buildroot: %{_tmppath}/%{name}-%{version} |
87 |
|
|
|
88 |
|
|
%description |
89 |
|
|
autofs is a daemon which automatically mounts filesystems when you use |
90 |
|
|
them, and unmounts them later when you are not using them. This can |
91 |
|
|
include network filesystems, CD-ROMs, floppies, and so forth. |
92 |
|
|
|
93 |
|
|
%prep |
94 |
|
|
%setup -q -n %{name}-%{version} |
95 |
|
|
%patch01 -p 1 |
96 |
|
|
%patch02 -p 1 |
97 |
|
|
%patch03 -p 1 |
98 |
|
|
%patch04 -p 1 |
99 |
|
|
%patch05 -p 1 |
100 |
|
|
%patch06 -p 1 |
101 |
|
|
%patch07 -p 1 |
102 |
|
|
%patch08 -p 1 |
103 |
|
|
%patch09 -p 1 |
104 |
|
|
%patch10 -p 1 |
105 |
|
|
%patch11 -p 1 |
106 |
|
|
%patch12 -p 1 |
107 |
|
|
%patch13 -p 1 |
108 |
|
|
%patch14 -p 1 |
109 |
|
|
%patch15 -p 1 |
110 |
|
|
%patch16 -p 1 |
111 |
|
|
%patch17 -p 1 |
112 |
|
|
%patch18 -p 1 |
113 |
|
|
%patch19 -p 1 |
114 |
|
|
%patch20 -p 1 |
115 |
|
|
%patch21 -p 1 |
116 |
|
|
%patch22 -p 1 |
117 |
|
|
%patch23 -p 1 |
118 |
|
|
%patch24 -p 1 |
119 |
|
|
%patch25 -p 1 |
120 |
|
|
%patch26 -p 1 |
121 |
|
|
%patch27 -p 1 |
122 |
|
|
%patch28 -p 1 |
123 |
|
|
%patch29 -p 1 |
124 |
|
|
%patch30 -p 1 |
125 |
|
|
%patch31 -p 1 |
126 |
|
|
%patch32 -p 1 |
127 |
|
|
%patch33 -p 1 |
128 |
|
|
%patch34 -p 1 |
129 |
|
|
%patch35 -p 1 |
130 |
|
|
%patch36 -p 1 |
131 |
|
|
%patch37 -p 1 |
132 |
|
|
%patch38 -p 1 |
133 |
|
|
%patch39 -p 1 |
134 |
|
|
%patch40 -p 1 |
135 |
|
|
%patch41 -p 1 |
136 |
|
|
%patch42 -p 1 |
137 |
|
|
%patch43 -p 1 |
138 |
|
|
%patch44 -p 1 |
139 |
|
|
%patch45 -p 1 |
140 |
|
|
%patch46 -p 1 |
141 |
|
|
%patch47 -p 1 |
142 |
|
|
%patch48 -p 1 |
143 |
|
|
%patch49 -p 1 |
144 |
|
|
%patch50 -p 1 |
145 |
|
|
%patch51 -p 1 |
146 |
|
|
%patch52 -p 1 |
147 |
|
|
%patch53 -p 1 |
148 |
|
|
%patch54 -p 1 |
149 |
|
|
%patch55 -p 1 |
150 |
|
|
%patch56 -p 1 |
151 |
|
|
%patch57 -p 1 |
152 |
|
|
%patch58 -p 1 |
153 |
|
|
%patch59 -p 1 |
154 |
|
|
%patch60 -p 1 |
155 |
|
|
%patch102 -p 1 |
156 |
|
|
%patch103 -p 1 |
157 |
|
|
|
158 |
|
|
%build |
159 |
|
|
autoreconf |
160 |
|
|
%serverbuild |
161 |
|
|
%configure2_5x --with-mapdir=%{_sysconfdir}/%{name} \ |
162 |
|
|
--with-confdir=%{_sysconfdir}/%{name} \ |
163 |
|
|
--with-sasl=yes |
164 |
|
|
%make DONTSTRIP=1 |
165 |
|
|
|
166 |
|
|
mkdir examples |
167 |
|
|
cp samples/ldap* examples |
168 |
|
|
cp samples/autofs.schema examples |
169 |
|
|
|
170 |
|
|
rm -f README.gentoo |
171 |
|
|
|
172 |
|
|
%install |
173 |
|
|
rm -rf %{buildroot} |
174 |
|
|
mkdir -p %{buildroot}%{_sbindir} |
175 |
|
|
mkdir -p %{buildroot}%{_libdir}/autofs |
176 |
|
|
mkdir -p %{buildroot}%{_mandir}/{man5,man8} |
177 |
|
|
mkdir -p %{buildroot}%{_sysconfdir} |
178 |
|
|
|
179 |
|
|
%make install INSTALLROOT=%{buildroot} |
180 |
|
|
|
181 |
|
|
install -d -m 755 %{buildroot}%{_initrddir} |
182 |
|
|
install -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/%{name} |
183 |
|
|
|
184 |
|
|
rm -f %{buildroot}%{_sysconfdir}/init.d/%{name} |
185 |
|
|
rm -f %{buildroot}%{_mandir}/man8/autofs* |
186 |
|
|
|
187 |
|
|
cat > README.urpmi <<EOF |
188 |
|
|
Mandriva RPM specific notes |
189 |
|
|
|
190 |
|
|
setup |
191 |
|
|
----- |
192 |
|
|
Configuration handling in Mandriva package differs from upstream one on several points: |
193 |
|
|
- the automounts daemon configuration file is %{_sysconfdir}/autofs/autofs.conf |
194 |
|
|
- the autofs service configuration file is %{_sysconfdir}/sysconfig/autofs |
195 |
|
|
- the configuration directives in %{_sysconfdir}/autofs/autofs.conf don't have |
196 |
|
|
the 'DEFAULT_' prefix (for instance, DEFAULT_TIMEOUT is just TIMEOUT). This |
197 |
|
|
has recently been changed upstream in version 5.0.2 too, but given than |
198 |
|
|
documentation still refers to old names |
199 |
|
|
|
200 |
|
|
Upgrade |
201 |
|
|
------- |
202 |
|
|
Map files have been moved from %{_sysconfdir} to %{_sysconfdir}/autofs. Upgrade |
203 |
|
|
procedure should handle the change automatically. |
204 |
|
|
LDAP usage has changed between autofs 4 and 5. The LDAP schema used has now to |
205 |
|
|
be configured explicitely in autofs configuration, so as to avoid useless |
206 |
|
|
queries. As this can't be handled by package upgrade procedure, you'll have to |
207 |
|
|
edit your configuration manually. See auto.master(5) for details. |
208 |
|
|
|
209 |
|
|
EOF |
210 |
|
|
|
211 |
|
|
# tune default configuration |
212 |
|
|
perl -pi -e 's|^BROWSE_MODE="no"|BROWSE_MODE="yes"|' \ |
213 |
|
|
%{buildroot}%{_sysconfdir}/autofs/autofs.conf |
214 |
|
|
perl -pi \ |
215 |
|
|
-e 's|^/misc\t|#/misc\t|;' \ |
216 |
|
|
-e 's|^/net\t|#/net\t|;' \ |
217 |
|
|
%{buildroot}%{_sysconfdir}/autofs/auto.master |
218 |
|
|
|
219 |
|
|
%pre |
220 |
|
|
if [ $1 != "0" ]; then |
221 |
|
|
# upgrade |
222 |
|
|
if [ ! -d %{_sysconfdir}/autofs ]; then |
223 |
|
|
# 4 -> 5 upgrade |
224 |
|
|
mkdir %{_sysconfdir}/autofs |
225 |
|
|
for file in %{_sysconfdir}/auto.{master,misc,net,smb}; do |
226 |
|
|
if [ -f "$file" ]; then |
227 |
|
|
mv $file* %{_sysconfdir}/autofs |
228 |
|
|
fi |
229 |
|
|
done |
230 |
|
|
fi |
231 |
|
|
fi |
232 |
|
|
|
233 |
|
|
%post |
234 |
|
|
%_post_service autofs |
235 |
|
|
|
236 |
|
|
%preun |
237 |
|
|
%_preun_service autofs |
238 |
|
|
|
239 |
|
|
%clean |
240 |
|
|
rm -rf %{buildroot} |
241 |
|
|
|
242 |
|
|
%files |
243 |
|
|
%defattr(-,root,root) |
244 |
|
|
%doc INSTALL CHANGELOG CREDITS README* examples |
245 |
|
|
%config(noreplace) %{_sysconfdir}/autofs |
246 |
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/autofs |
247 |
|
|
%{_initrddir}/%{name} |
248 |
|
|
%{_libdir}/%{name} |
249 |
|
|
%{_sbindir}/automount |
250 |
|
|
%{_mandir}/*/* |
251 |
|
|
|
252 |
|
|
|