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