]>
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 PG |
115 | export initdir=/etc/rc.d/init.d |
116 | %configure \ | |
841e1924 | 117 | --with-openldap=%{?with_ldap:yes}%{!?with_ldap:no} \ |
bf9430f2 | 118 | --enable-force-shutdown=yes \ |
fdf7acdf | 119 | --with-confdir=%{_sysconfdir} \ |
15dae982 JR |
120 | --with-mapdir=%{_sysconfdir} \ |
121 | --with-libtirpc \ | |
122 | --with-systemd=%{systemdunitdir} | |
6194200d | 123 | |
599e931a | 124 | %{__make} -j1 \ |
d225ae79 PG |
125 | initdir=/etc/rc.d/init.d \ |
126 | CC="%{__cc}" \ | |
05c95841 | 127 | DAEMON_CFLAGS="-fPIE %{rpmcflags}" |
b4cd3ee9 | 128 | |
129 | %install | |
130 | rm -rf $RPM_BUILD_ROOT | |
603eddcc | 131 | install -d $RPM_BUILD_ROOT{/misc,/net,%{_sbindir},%{_libdir}/autofs,%{_mandir}/man{5,8}} \ |
d2ed1b07 | 132 | $RPM_BUILD_ROOT/etc/{rc.d/init.d,autofs,sysconfig} |
b4cd3ee9 | 133 | |
0ca9e4df | 134 | %{__make} install \ |
9f76dbd1 | 135 | INSTALLROOT=$RPM_BUILD_ROOT |
b4cd3ee9 | 136 | |
9f76dbd1 | 137 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/autofs |
b4cd3ee9 | 138 | |
1704e84b | 139 | install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/auto.master |
d225ae79 PG |
140 | install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/auto.media |
141 | install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/auto.net | |
142 | install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/autofs | |
b4cd3ee9 | 143 | |
d225ae79 PG |
144 | touch $RPM_BUILD_ROOT%{_sysconfdir}/auto.{home,var,tmp} |
145 | ||
fdf7acdf PS |
146 | # replaced in PLD by auto.media |
147 | rm $RPM_BUILD_ROOT%{_sysconfdir}/auto.misc | |
9f76dbd1 | 148 | |
22d0409c JB |
149 | %clean |
150 | rm -rf $RPM_BUILD_ROOT | |
151 | ||
650117fe | 152 | %post |
b80c013d | 153 | /sbin/chkconfig --add autofs |
c8133e76 | 154 | # triggerpostun would get called after %%post |
9a4c6df9 | 155 | if [ -f /var/lock/subsys/automount ]; then |
c8133e76 | 156 | mv /var/lock/subsys/{automount,autofs} |
b80c013d | 157 | fi |
c8133e76 | 158 | %service autofs restart "autofs daemon" |
15dae982 | 159 | %systemd_post autofs.service |
b80c013d | 160 | |
650117fe | 161 | %preun |
b80c013d | 162 | if [ "$1" = "0" ]; then |
c8133e76 | 163 | %service autofs stop |
b80c013d | 164 | /sbin/chkconfig --del autofs |
b80c013d | 165 | fi |
15dae982 JR |
166 | %systemd_preun autofs.service |
167 | ||
168 | %postun | |
169 | %systemd_reload | |
170 | ||
171 | %triggerpostun -- autofs < 5.0.8-1 | |
172 | %systemd_trigger autofs.service | |
b4cd3ee9 | 173 | |
174 | %files | |
175 | %defattr(644,root,root,755) | |
d225ae79 | 176 | %doc CHANGELOG CREDITS README* |
650117fe | 177 | %dir %{_sysconfdir} |
3672267d | 178 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/autofs |
fdf7acdf | 179 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/autofs |
403704c8 | 180 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/autofs.conf |
3672267d SP |
181 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.home |
182 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.master | |
d225ae79 | 183 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.media |
3672267d | 184 | %attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.net |
6d1c466b | 185 | %attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.smb |
3672267d SP |
186 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.tmp |
187 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.var | |
b8f00e5b | 188 | %attr(754,root,root) /etc/rc.d/init.d/autofs |
15dae982 | 189 | %{systemdunitdir}/autofs.service |
8596e52e | 190 | %attr(755,root,root) %{_sbindir}/automount |
9f76dbd1 | 191 | %dir /net |
650117fe | 192 | %dir %{_libdir}/autofs |
15dae982 | 193 | %attr(755,root,root) %{_libdir}/autofs/lookup_dir.so |
bf9430f2 PS |
194 | %attr(755,root,root) %{_libdir}/autofs/lookup_file.so |
195 | %attr(755,root,root) %{_libdir}/autofs/lookup_files.so | |
196 | %attr(755,root,root) %{_libdir}/autofs/lookup_hesiod.so | |
197 | %attr(755,root,root) %{_libdir}/autofs/lookup_hosts.so | |
198 | %attr(755,root,root) %{_libdir}/autofs/lookup_multi.so | |
199 | %attr(755,root,root) %{_libdir}/autofs/lookup_nis.so | |
200 | %attr(755,root,root) %{_libdir}/autofs/lookup_nisplus.so | |
201 | %attr(755,root,root) %{_libdir}/autofs/lookup_program.so | |
202 | %attr(755,root,root) %{_libdir}/autofs/lookup_userhome.so | |
203 | %attr(755,root,root) %{_libdir}/autofs/lookup_yp.so | |
204 | %attr(755,root,root) %{_libdir}/autofs/mount_afs.so | |
205 | %attr(755,root,root) %{_libdir}/autofs/mount_autofs.so | |
206 | %attr(755,root,root) %{_libdir}/autofs/mount_bind.so | |
207 | %attr(755,root,root) %{_libdir}/autofs/mount_changer.so | |
208 | %attr(755,root,root) %{_libdir}/autofs/mount_ext2.so | |
209 | %attr(755,root,root) %{_libdir}/autofs/mount_ext3.so | |
15dae982 | 210 | %attr(755,root,root) %{_libdir}/autofs/mount_ext4.so |
bf9430f2 PS |
211 | %attr(755,root,root) %{_libdir}/autofs/mount_generic.so |
212 | %attr(755,root,root) %{_libdir}/autofs/mount_nfs.so | |
213 | %attr(755,root,root) %{_libdir}/autofs/mount_nfs4.so | |
403704c8 | 214 | %attr(755,root,root) %{_libdir}/autofs/parse_amd.so |
bf9430f2 PS |
215 | %attr(755,root,root) %{_libdir}/autofs/parse_hesiod.so |
216 | %attr(755,root,root) %{_libdir}/autofs/parse_sun.so | |
1fb67f63 | 217 | %{_mandir}/man[58]/* |
28322e0b | 218 | |
841e1924 | 219 | %if %{with ldap} |
28322e0b | 220 | %files ldap |
221 | %defattr(644,root,root,755) | |
fdf7acdf | 222 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/autofs_ldap_auth.conf |
28322e0b | 223 | %attr(755,root,root) %{_libdir}/autofs/lookup_ldap.so |
ef3507a1 | 224 | %attr(755,root,root) %{_libdir}/autofs/lookup_ldaps.so |
841e1924 | 225 | %endif |