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