]>
Commit | Line | Data |
---|---|---|
6d1c466b | 1 | # TODO: |
d225ae79 | 2 | # - change /net to something FHS-compliant ? |
f09b02b8 | 3 | # |
841e1924 | 4 | # Conditional build: |
15dae982 | 5 | %bcond_without ldap # don't build LDAP extension module |
841e1924 | 6 | # |
b4cd3ee9 | 7 | Summary: autofs daemon |
46d8cf7b ER |
8 | Summary(de.UTF-8): autofs daemon |
9 | Summary(es.UTF-8): Servidor autofs | |
10 | Summary(fr.UTF-8): démon autofs | |
11 | Summary(pl.UTF-8): Demon autofs | |
12 | Summary(pt_BR.UTF-8): Servidor autofs | |
13 | Summary(tr.UTF-8): autofs sunucu süreci | |
b4cd3ee9 | 14 | Name: autofs |
16513562 | 15 | Version: 5.1.6 |
d5d00813 | 16 | Release: 2 |
315eeda0 | 17 | Epoch: 1 |
d225ae79 | 18 | License: GPL v2+ |
b4cd3ee9 | 19 | Group: Daemons |
134d98d8 | 20 | Source0: https://www.kernel.org/pub/linux/daemons/autofs/v5/%{name}-%{version}.tar.xz |
16513562 | 21 | # Source0-md5: b27ee7a1674ae1779aaf75c5e90b0f1e |
9ab321b6 | 22 | Source1: %{name}.init |
23 | Source2: %{name}-auto.master | |
d225ae79 PG |
24 | Source3: %{name}-auto.media |
25 | Source4: %{name}-auto.net | |
26 | Source5: %{name}.sysconfig | |
242d8844 | 27 | Patch0: %{name}-open_max.patch |
20646a9f | 28 | Patch1: %{name}-makefile.patch |
bb4de9cd | 29 | Patch2: %{name}-systemd-service.patch |
134d98d8 | 30 | BuildRequires: autoconf >= 2.50 |
c8133e76 | 31 | BuildRequires: automake |
05c95841 | 32 | BuildRequires: bison |
134d98d8 | 33 | BuildRequires: cyrus-sasl-devel >= 2 |
bf9430f2 | 34 | BuildRequires: e2fsprogs |
05c95841 | 35 | BuildRequires: flex |
9943e90e | 36 | BuildRequires: heimdal-devel |
5d362306 | 37 | BuildRequires: hesiod-devel |
d5d00813 | 38 | BuildRequires: libnsl-devel |
15dae982 | 39 | BuildRequires: libtirpc-devel |
b06ddc8e | 40 | BuildRequires: libxml2-devel >= 2 |
bf9430f2 | 41 | BuildRequires: mount |
841e1924 | 42 | %{?with_ldap:BuildRequires: openldap-devel >= 2.4.6} |
6ba35e06 | 43 | BuildRequires: pkgconfig |
15dae982 | 44 | BuildRequires: rpmbuild(macros) >= 1.647 |
b06ddc8e | 45 | BuildRequires: systemd-devel >= 1:209 |
657df5c3 | 46 | Requires(post,preun): /sbin/chkconfig |
15dae982 | 47 | Requires(post,preun,postun): systemd-units >= 38 |
b4cd3ee9 | 48 | Requires: mktemp |
c8133e76 | 49 | Requires: rc-scripts |
15dae982 | 50 | Requires: systemd-units >= 0.38 |
0a4dccd8 | 51 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
b4cd3ee9 | 52 | |
650117fe | 53 | %define _sysconfdir /etc/autofs |
05c95841 | 54 | %define filterout_ld -Wl,--as-needed |
650117fe | 55 | |
b4cd3ee9 | 56 | %description |
57 | autofs is a daemon which automatically mounts filesystems when you use | |
0ef7a180 | 58 | them, and unmounts them later when you are not using them. This can |
b4cd3ee9 | 59 | include network filesystems, CD-ROMs, floppies, and so forth. |
60 | ||
e8296acd JR |
61 | %description -l de.UTF-8 |
62 | autofs ist ein Dämon, der Dateisysteme automatisch montiert, wenn sie | |
63 | benutzt werden, und sie später bei Nichtbenutzung wieder demontiert. | |
64 | Dies kann Netz-Dateisysteme, CD-ROMs, Disketten und ähnliches | |
65 | einschließen. | |
b4cd3ee9 | 66 | |
e8296acd JR |
67 | %description -l es.UTF-8 |
68 | Autofs es un servidor que monta automáticamente sistemas de archivos | |
69 | cuando los usa, y los desmonta, más tarde, al terminar de usarlos. | |
0a4dccd8 | 70 | Incluyendo sistemas de archivo en red, CD-ROMS, disquetes, etc. |
71 | ||
e8296acd JR |
72 | %description -l fr.UTF-8 |
73 | autofs est un démon qui monte automatiquement les systèmes de fichiers | |
74 | lorsqu'on les utilise et les démonte lorsqu'on ne les utilise plus. | |
75 | Cela inclus les systèmes de fichiers réseau, les CD-ROMs, les | |
0ef7a180 | 76 | disquettes, etc. |
b4cd3ee9 | 77 | |
e8296acd JR |
78 | %description -l pl.UTF-8 |
79 | Autofs jest demonem, który montuje automatycznie systemy plików jeżeli | |
80 | je używasz i odmontowuje później, jeżeli ich nie używasz. Może | |
81 | montować sieciowy system plików, CD-romy, stacje dyskietek i inne. | |
650117fe | 82 | |
e8296acd JR |
83 | %description -l pt_BR.UTF-8 |
84 | O autofs é um servidor que monta automaticamente sistemas de arquivos | |
85 | quando estes forem usados, desmontando-os mais tarde quando não | |
0a4dccd8 | 86 | estiverem mais em uso. Incluindo sistemas de arquivo em rede, CD-ROMS, |
87 | disquetes, etc. | |
88 | ||
e8296acd JR |
89 | %description -l tr.UTF-8 |
90 | autofs, kullanılan dosya sistemlerini gerek olunca kendiliğinden | |
91 | bağlar ve kullanımları sona erince yine kendiliğinden çözer. Bu işlem, | |
92 | ağ dosya sistemleri, CD-ROM'lar ve disketler üzerinde yapılabilir. | |
b4cd3ee9 | 93 | |
28322e0b | 94 | %package ldap |
95 | Summary: LDAP lookup module for autofs | |
46d8cf7b ER |
96 | Summary(pl.UTF-8): Moduł LDAP dla autofs |
97 | Summary(pt_BR.UTF-8): Suporte a mapas LDAP para o pacote autofs | |
28322e0b | 98 | Group: Daemons |
603eddcc | 99 | Requires: %{name} = %{epoch}:%{version}-%{release} |
28322e0b | 100 | |
101 | %description ldap | |
102 | This package contains the autofs module necessary to use automount | |
103 | maps stored on an LDAP server. | |
104 | ||
e8296acd JR |
105 | %description ldap -l pl.UTF-8 |
106 | Ten pakiet zawiera moduł autofs potrzebny do używania map automounta | |
134d98d8 | 107 | przechowywanych na serwerze LDAP. |
22d0409c | 108 | |
b4cd3ee9 | 109 | %prep |
110 | %setup -q | |
9ab321b6 | 111 | %patch0 -p1 |
20646a9f | 112 | %patch1 -p1 |
bb4de9cd | 113 | %patch2 -p1 |
184af42e | 114 | |
b4cd3ee9 | 115 | %build |
fdf7acdf PS |
116 | %{__autoconf} |
117 | ||
ec0170d1 | 118 | export initdir=/etc/rc.d/init.d |
129e31ee JR |
119 | export piddir=/var/run |
120 | export fifodir=/var/run | |
121 | export flagdir=/var/run | |
134d98d8 JB |
122 | export sssldir=%{_libdir}/sssd/modules |
123 | export HAVE_SSS_AUTOFS=1 | |
ec0170d1 | 124 | %configure \ |
134d98d8 | 125 | --enable-force-shutdown \ |
fdf7acdf | 126 | --with-confdir=%{_sysconfdir} \ |
15dae982 | 127 | --with-libtirpc \ |
134d98d8 JB |
128 | --with-mapdir=%{_sysconfdir} \ |
129 | --with-openldap%{!?with_ldap:=no} \ | |
15dae982 | 130 | --with-systemd=%{systemdunitdir} |
6194200d | 131 | |
599e931a | 132 | %{__make} -j1 \ |
d225ae79 PG |
133 | initdir=/etc/rc.d/init.d \ |
134 | CC="%{__cc}" \ | |
05c95841 | 135 | DAEMON_CFLAGS="-fPIE %{rpmcflags}" |
b4cd3ee9 | 136 | |
137 | %install | |
138 | rm -rf $RPM_BUILD_ROOT | |
b06ddc8e JB |
139 | install -d $RPM_BUILD_ROOT{/misc,/net,%{_sysconfdir},%{_sbindir},%{_libdir}/autofs,%{_mandir}/man{5,8}} \ |
140 | $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} | |
b4cd3ee9 | 141 | |
b06ddc8e | 142 | %{__make} install install_samples \ |
9f76dbd1 | 143 | INSTALLROOT=$RPM_BUILD_ROOT |
b4cd3ee9 | 144 | |
9f76dbd1 | 145 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/autofs |
b4cd3ee9 | 146 | |
b06ddc8e JB |
147 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/auto.master |
148 | cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/auto.media | |
149 | cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/auto.net | |
150 | cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/autofs | |
b4cd3ee9 | 151 | |
d225ae79 PG |
152 | touch $RPM_BUILD_ROOT%{_sysconfdir}/auto.{home,var,tmp} |
153 | ||
fdf7acdf | 154 | # replaced in PLD by auto.media |
134d98d8 | 155 | %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/auto.misc |
9f76dbd1 | 156 | |
22d0409c JB |
157 | %clean |
158 | rm -rf $RPM_BUILD_ROOT | |
159 | ||
650117fe | 160 | %post |
b80c013d | 161 | /sbin/chkconfig --add autofs |
c8133e76 | 162 | # triggerpostun would get called after %%post |
9a4c6df9 | 163 | if [ -f /var/lock/subsys/automount ]; then |
c8133e76 | 164 | mv /var/lock/subsys/{automount,autofs} |
b80c013d | 165 | fi |
c8133e76 | 166 | %service autofs restart "autofs daemon" |
15dae982 | 167 | %systemd_post autofs.service |
b80c013d | 168 | |
650117fe | 169 | %preun |
b80c013d | 170 | if [ "$1" = "0" ]; then |
c8133e76 | 171 | %service autofs stop |
b80c013d | 172 | /sbin/chkconfig --del autofs |
b80c013d | 173 | fi |
15dae982 JR |
174 | %systemd_preun autofs.service |
175 | ||
176 | %postun | |
177 | %systemd_reload | |
178 | ||
179 | %triggerpostun -- autofs < 5.0.8-1 | |
180 | %systemd_trigger autofs.service | |
b4cd3ee9 | 181 | |
182 | %files | |
183 | %defattr(644,root,root,755) | |
134d98d8 | 184 | %doc CHANGELOG COPYRIGHT CREDITS README* |
650117fe | 185 | %dir %{_sysconfdir} |
3672267d | 186 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/autofs |
fdf7acdf | 187 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/autofs |
403704c8 | 188 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/autofs.conf |
3672267d SP |
189 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.home |
190 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.master | |
d225ae79 | 191 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.media |
3672267d | 192 | %attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.net |
6d1c466b | 193 | %attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.smb |
3672267d SP |
194 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.tmp |
195 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.var | |
b8f00e5b | 196 | %attr(754,root,root) /etc/rc.d/init.d/autofs |
15dae982 | 197 | %{systemdunitdir}/autofs.service |
8596e52e | 198 | %attr(755,root,root) %{_sbindir}/automount |
9f76dbd1 | 199 | %dir /net |
650117fe | 200 | %dir %{_libdir}/autofs |
15dae982 | 201 | %attr(755,root,root) %{_libdir}/autofs/lookup_dir.so |
bf9430f2 PS |
202 | %attr(755,root,root) %{_libdir}/autofs/lookup_file.so |
203 | %attr(755,root,root) %{_libdir}/autofs/lookup_files.so | |
204 | %attr(755,root,root) %{_libdir}/autofs/lookup_hesiod.so | |
205 | %attr(755,root,root) %{_libdir}/autofs/lookup_hosts.so | |
206 | %attr(755,root,root) %{_libdir}/autofs/lookup_multi.so | |
207 | %attr(755,root,root) %{_libdir}/autofs/lookup_nis.so | |
208 | %attr(755,root,root) %{_libdir}/autofs/lookup_nisplus.so | |
209 | %attr(755,root,root) %{_libdir}/autofs/lookup_program.so | |
134d98d8 | 210 | %attr(755,root,root) %{_libdir}/autofs/lookup_sss.so |
bf9430f2 PS |
211 | %attr(755,root,root) %{_libdir}/autofs/lookup_userhome.so |
212 | %attr(755,root,root) %{_libdir}/autofs/lookup_yp.so | |
213 | %attr(755,root,root) %{_libdir}/autofs/mount_afs.so | |
214 | %attr(755,root,root) %{_libdir}/autofs/mount_autofs.so | |
215 | %attr(755,root,root) %{_libdir}/autofs/mount_bind.so | |
216 | %attr(755,root,root) %{_libdir}/autofs/mount_changer.so | |
217 | %attr(755,root,root) %{_libdir}/autofs/mount_ext2.so | |
218 | %attr(755,root,root) %{_libdir}/autofs/mount_ext3.so | |
15dae982 | 219 | %attr(755,root,root) %{_libdir}/autofs/mount_ext4.so |
bf9430f2 PS |
220 | %attr(755,root,root) %{_libdir}/autofs/mount_generic.so |
221 | %attr(755,root,root) %{_libdir}/autofs/mount_nfs.so | |
222 | %attr(755,root,root) %{_libdir}/autofs/mount_nfs4.so | |
403704c8 | 223 | %attr(755,root,root) %{_libdir}/autofs/parse_amd.so |
bf9430f2 PS |
224 | %attr(755,root,root) %{_libdir}/autofs/parse_hesiod.so |
225 | %attr(755,root,root) %{_libdir}/autofs/parse_sun.so | |
134d98d8 JB |
226 | %{_mandir}/man5/auto.master.5* |
227 | %{_mandir}/man5/autofs.5* | |
228 | %{_mandir}/man5/autofs.conf.5* | |
229 | %{_mandir}/man8/autofs.8* | |
230 | %{_mandir}/man8/automount.8* | |
28322e0b | 231 | |
841e1924 | 232 | %if %{with ldap} |
28322e0b | 233 | %files ldap |
234 | %defattr(644,root,root,755) | |
fdf7acdf | 235 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/autofs_ldap_auth.conf |
28322e0b | 236 | %attr(755,root,root) %{_libdir}/autofs/lookup_ldap.so |
ef3507a1 | 237 | %attr(755,root,root) %{_libdir}/autofs/lookup_ldaps.so |
134d98d8 | 238 | %{_mandir}/man5/autofs_ldap_auth.conf.5* |
841e1924 | 239 | %endif |