]>
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 |
d0e12873 JB |
15 | Version: 5.1.3 |
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 |
d0e12873 | 21 | # Source0-md5: 57a6791e596b8b8ee2c4c50420881180 |
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 JB |
30 | URL: http://www.autofs.org/ |
31 | BuildRequires: autoconf >= 2.50 | |
c8133e76 | 32 | BuildRequires: automake |
05c95841 | 33 | BuildRequires: bison |
134d98d8 | 34 | BuildRequires: cyrus-sasl-devel >= 2 |
bf9430f2 | 35 | BuildRequires: e2fsprogs |
05c95841 | 36 | BuildRequires: flex |
9943e90e | 37 | BuildRequires: heimdal-devel |
5d362306 | 38 | BuildRequires: hesiod-devel |
15dae982 | 39 | BuildRequires: libtirpc-devel |
05c95841 | 40 | BuildRequires: libxml2-devel |
bf9430f2 | 41 | BuildRequires: mount |
841e1924 | 42 | %{?with_ldap:BuildRequires: openldap-devel >= 2.4.6} |
15dae982 | 43 | BuildRequires: rpmbuild(macros) >= 1.647 |
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 |
20646a9f | 110 | %patch1 -p1 |
bb4de9cd | 111 | %patch2 -p1 |
184af42e | 112 | |
b4cd3ee9 | 113 | %build |
fdf7acdf PS |
114 | %{__autoconf} |
115 | ||
ec0170d1 | 116 | export initdir=/etc/rc.d/init.d |
129e31ee JR |
117 | export piddir=/var/run |
118 | export fifodir=/var/run | |
119 | export flagdir=/var/run | |
134d98d8 JB |
120 | export sssldir=%{_libdir}/sssd/modules |
121 | export HAVE_SSS_AUTOFS=1 | |
ec0170d1 | 122 | %configure \ |
134d98d8 | 123 | --enable-force-shutdown \ |
fdf7acdf | 124 | --with-confdir=%{_sysconfdir} \ |
15dae982 | 125 | --with-libtirpc \ |
134d98d8 JB |
126 | --with-mapdir=%{_sysconfdir} \ |
127 | --with-openldap%{!?with_ldap:=no} \ | |
15dae982 | 128 | --with-systemd=%{systemdunitdir} |
6194200d | 129 | |
599e931a | 130 | %{__make} -j1 \ |
d225ae79 PG |
131 | initdir=/etc/rc.d/init.d \ |
132 | CC="%{__cc}" \ | |
05c95841 | 133 | DAEMON_CFLAGS="-fPIE %{rpmcflags}" |
b4cd3ee9 | 134 | |
135 | %install | |
136 | rm -rf $RPM_BUILD_ROOT | |
603eddcc | 137 | install -d $RPM_BUILD_ROOT{/misc,/net,%{_sbindir},%{_libdir}/autofs,%{_mandir}/man{5,8}} \ |
d2ed1b07 | 138 | $RPM_BUILD_ROOT/etc/{rc.d/init.d,autofs,sysconfig} |
b4cd3ee9 | 139 | |
0ca9e4df | 140 | %{__make} install \ |
9f76dbd1 | 141 | INSTALLROOT=$RPM_BUILD_ROOT |
b4cd3ee9 | 142 | |
9f76dbd1 | 143 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/autofs |
b4cd3ee9 | 144 | |
1704e84b | 145 | install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/auto.master |
d225ae79 | 146 | install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/auto.media |
d32aaea9 JR |
147 | install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/auto.net |
148 | install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/autofs | |
b4cd3ee9 | 149 | |
d225ae79 PG |
150 | touch $RPM_BUILD_ROOT%{_sysconfdir}/auto.{home,var,tmp} |
151 | ||
fdf7acdf | 152 | # replaced in PLD by auto.media |
134d98d8 | 153 | %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/auto.misc |
9f76dbd1 | 154 | |
22d0409c JB |
155 | %clean |
156 | rm -rf $RPM_BUILD_ROOT | |
157 | ||
650117fe | 158 | %post |
b80c013d | 159 | /sbin/chkconfig --add autofs |
c8133e76 | 160 | # triggerpostun would get called after %%post |
9a4c6df9 | 161 | if [ -f /var/lock/subsys/automount ]; then |
c8133e76 | 162 | mv /var/lock/subsys/{automount,autofs} |
b80c013d | 163 | fi |
c8133e76 | 164 | %service autofs restart "autofs daemon" |
15dae982 | 165 | %systemd_post autofs.service |
b80c013d | 166 | |
650117fe | 167 | %preun |
b80c013d | 168 | if [ "$1" = "0" ]; then |
c8133e76 | 169 | %service autofs stop |
b80c013d | 170 | /sbin/chkconfig --del autofs |
b80c013d | 171 | fi |
15dae982 JR |
172 | %systemd_preun autofs.service |
173 | ||
174 | %postun | |
175 | %systemd_reload | |
176 | ||
177 | %triggerpostun -- autofs < 5.0.8-1 | |
178 | %systemd_trigger autofs.service | |
b4cd3ee9 | 179 | |
180 | %files | |
181 | %defattr(644,root,root,755) | |
134d98d8 | 182 | %doc CHANGELOG COPYRIGHT CREDITS README* |
650117fe | 183 | %dir %{_sysconfdir} |
3672267d | 184 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/autofs |
fdf7acdf | 185 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/autofs |
403704c8 | 186 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/autofs.conf |
3672267d SP |
187 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.home |
188 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.master | |
d225ae79 | 189 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.media |
3672267d | 190 | %attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.net |
6d1c466b | 191 | %attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.smb |
3672267d SP |
192 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.tmp |
193 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.var | |
b8f00e5b | 194 | %attr(754,root,root) /etc/rc.d/init.d/autofs |
15dae982 | 195 | %{systemdunitdir}/autofs.service |
8596e52e | 196 | %attr(755,root,root) %{_sbindir}/automount |
9f76dbd1 | 197 | %dir /net |
650117fe | 198 | %dir %{_libdir}/autofs |
15dae982 | 199 | %attr(755,root,root) %{_libdir}/autofs/lookup_dir.so |
bf9430f2 PS |
200 | %attr(755,root,root) %{_libdir}/autofs/lookup_file.so |
201 | %attr(755,root,root) %{_libdir}/autofs/lookup_files.so | |
202 | %attr(755,root,root) %{_libdir}/autofs/lookup_hesiod.so | |
203 | %attr(755,root,root) %{_libdir}/autofs/lookup_hosts.so | |
204 | %attr(755,root,root) %{_libdir}/autofs/lookup_multi.so | |
205 | %attr(755,root,root) %{_libdir}/autofs/lookup_nis.so | |
206 | %attr(755,root,root) %{_libdir}/autofs/lookup_nisplus.so | |
207 | %attr(755,root,root) %{_libdir}/autofs/lookup_program.so | |
134d98d8 | 208 | %attr(755,root,root) %{_libdir}/autofs/lookup_sss.so |
bf9430f2 PS |
209 | %attr(755,root,root) %{_libdir}/autofs/lookup_userhome.so |
210 | %attr(755,root,root) %{_libdir}/autofs/lookup_yp.so | |
211 | %attr(755,root,root) %{_libdir}/autofs/mount_afs.so | |
212 | %attr(755,root,root) %{_libdir}/autofs/mount_autofs.so | |
213 | %attr(755,root,root) %{_libdir}/autofs/mount_bind.so | |
214 | %attr(755,root,root) %{_libdir}/autofs/mount_changer.so | |
215 | %attr(755,root,root) %{_libdir}/autofs/mount_ext2.so | |
216 | %attr(755,root,root) %{_libdir}/autofs/mount_ext3.so | |
15dae982 | 217 | %attr(755,root,root) %{_libdir}/autofs/mount_ext4.so |
bf9430f2 PS |
218 | %attr(755,root,root) %{_libdir}/autofs/mount_generic.so |
219 | %attr(755,root,root) %{_libdir}/autofs/mount_nfs.so | |
220 | %attr(755,root,root) %{_libdir}/autofs/mount_nfs4.so | |
403704c8 | 221 | %attr(755,root,root) %{_libdir}/autofs/parse_amd.so |
bf9430f2 PS |
222 | %attr(755,root,root) %{_libdir}/autofs/parse_hesiod.so |
223 | %attr(755,root,root) %{_libdir}/autofs/parse_sun.so | |
134d98d8 JB |
224 | %{_mandir}/man5/auto.master.5* |
225 | %{_mandir}/man5/autofs.5* | |
226 | %{_mandir}/man5/autofs.conf.5* | |
227 | %{_mandir}/man8/autofs.8* | |
228 | %{_mandir}/man8/automount.8* | |
28322e0b | 229 | |
841e1924 | 230 | %if %{with ldap} |
28322e0b | 231 | %files ldap |
232 | %defattr(644,root,root,755) | |
fdf7acdf | 233 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/autofs_ldap_auth.conf |
28322e0b | 234 | %attr(755,root,root) %{_libdir}/autofs/lookup_ldap.so |
ef3507a1 | 235 | %attr(755,root,root) %{_libdir}/autofs/lookup_ldaps.so |
134d98d8 | 236 | %{_mandir}/man5/autofs_ldap_auth.conf.5* |
841e1924 | 237 | %endif |