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