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