]>
Commit | Line | Data |
---|---|---|
1 | # TODO: | |
2 | # - change /net to something FHS-compliant ? | |
3 | # | |
4 | # Conditional build: | |
5 | %bcond_without ldap # don't build LDAP extension module | |
6 | # | |
7 | Summary: autofs daemon | |
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 | |
14 | Name: autofs | |
15 | Version: 5.1.2 | |
16 | Release: 1 | |
17 | Epoch: 1 | |
18 | License: GPL v2+ | |
19 | Group: Daemons | |
20 | Source0: https://www.kernel.org/pub/linux/daemons/autofs/v5/%{name}-%{version}.tar.xz | |
21 | # Source0-md5: 130dadb63efd5cc585d19c9bf7f00268 | |
22 | Source1: %{name}.init | |
23 | Source2: %{name}-auto.master | |
24 | Source3: %{name}-auto.media | |
25 | Source4: %{name}-auto.net | |
26 | Source5: %{name}.sysconfig | |
27 | Patch0: %{name}-open_max.patch | |
28 | Patch1: %{name}-makefile.patch | |
29 | Patch2: %{name}-systemd-service.patch | |
30 | URL: http://www.autofs.org/ | |
31 | BuildRequires: autoconf >= 2.50 | |
32 | BuildRequires: automake | |
33 | BuildRequires: bison | |
34 | BuildRequires: cyrus-sasl-devel >= 2 | |
35 | BuildRequires: e2fsprogs | |
36 | BuildRequires: flex | |
37 | BuildRequires: heimdal-devel | |
38 | BuildRequires: hesiod-devel | |
39 | BuildRequires: libtirpc-devel | |
40 | BuildRequires: libxml2-devel | |
41 | BuildRequires: mount | |
42 | %{?with_ldap:BuildRequires: openldap-devel >= 2.4.6} | |
43 | BuildRequires: rpmbuild(macros) >= 1.647 | |
44 | Requires(post,preun): /sbin/chkconfig | |
45 | Requires(post,preun,postun): systemd-units >= 38 | |
46 | Requires: mktemp | |
47 | Requires: rc-scripts | |
48 | Requires: systemd-units >= 0.38 | |
49 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
50 | ||
51 | %define _sysconfdir /etc/autofs | |
52 | %define filterout_ld -Wl,--as-needed | |
53 | ||
54 | %description | |
55 | autofs is a daemon which automatically mounts filesystems when you use | |
56 | them, and unmounts them later when you are not using them. This can | |
57 | include network filesystems, CD-ROMs, floppies, and so forth. | |
58 | ||
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. | |
64 | ||
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. | |
68 | Incluyendo sistemas de archivo en red, CD-ROMS, disquetes, etc. | |
69 | ||
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 | |
74 | disquettes, etc. | |
75 | ||
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. | |
80 | ||
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 | |
84 | estiverem mais em uso. Incluindo sistemas de arquivo em rede, CD-ROMS, | |
85 | disquetes, etc. | |
86 | ||
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. | |
91 | ||
92 | %package ldap | |
93 | Summary: LDAP lookup module for autofs | |
94 | Summary(pl.UTF-8): Moduł LDAP dla autofs | |
95 | Summary(pt_BR.UTF-8): Suporte a mapas LDAP para o pacote autofs | |
96 | Group: Daemons | |
97 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
98 | ||
99 | %description ldap | |
100 | This package contains the autofs module necessary to use automount | |
101 | maps stored on an LDAP server. | |
102 | ||
103 | %description ldap -l pl.UTF-8 | |
104 | Ten pakiet zawiera moduł autofs potrzebny do używania map automounta | |
105 | przechowywanych na serwerze LDAP. | |
106 | ||
107 | %prep | |
108 | %setup -q | |
109 | %patch0 -p1 | |
110 | %patch1 -p1 | |
111 | %patch2 -p1 | |
112 | ||
113 | %build | |
114 | %{__autoconf} | |
115 | ||
116 | export initdir=/etc/rc.d/init.d | |
117 | export piddir=/var/run | |
118 | export fifodir=/var/run | |
119 | export flagdir=/var/run | |
120 | export sssldir=%{_libdir}/sssd/modules | |
121 | export HAVE_SSS_AUTOFS=1 | |
122 | %configure \ | |
123 | --enable-force-shutdown \ | |
124 | --with-confdir=%{_sysconfdir} \ | |
125 | --with-libtirpc \ | |
126 | --with-mapdir=%{_sysconfdir} \ | |
127 | --with-openldap%{!?with_ldap:=no} \ | |
128 | --with-systemd=%{systemdunitdir} | |
129 | ||
130 | %{__make} -j1 \ | |
131 | initdir=/etc/rc.d/init.d \ | |
132 | CC="%{__cc}" \ | |
133 | DAEMON_CFLAGS="-fPIE %{rpmcflags}" | |
134 | ||
135 | %install | |
136 | rm -rf $RPM_BUILD_ROOT | |
137 | install -d $RPM_BUILD_ROOT{/misc,/net,%{_sbindir},%{_libdir}/autofs,%{_mandir}/man{5,8}} \ | |
138 | $RPM_BUILD_ROOT/etc/{rc.d/init.d,autofs,sysconfig} | |
139 | ||
140 | %{__make} install \ | |
141 | INSTALLROOT=$RPM_BUILD_ROOT | |
142 | ||
143 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/autofs | |
144 | ||
145 | install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/auto.master | |
146 | install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/auto.media | |
147 | install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/auto.net | |
148 | install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/autofs | |
149 | ||
150 | touch $RPM_BUILD_ROOT%{_sysconfdir}/auto.{home,var,tmp} | |
151 | ||
152 | # replaced in PLD by auto.media | |
153 | %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/auto.misc | |
154 | ||
155 | %clean | |
156 | rm -rf $RPM_BUILD_ROOT | |
157 | ||
158 | %post | |
159 | /sbin/chkconfig --add autofs | |
160 | # triggerpostun would get called after %%post | |
161 | if [ -f /var/lock/subsys/automount ]; then | |
162 | mv /var/lock/subsys/{automount,autofs} | |
163 | fi | |
164 | %service autofs restart "autofs daemon" | |
165 | %systemd_post autofs.service | |
166 | ||
167 | %preun | |
168 | if [ "$1" = "0" ]; then | |
169 | %service autofs stop | |
170 | /sbin/chkconfig --del autofs | |
171 | fi | |
172 | %systemd_preun autofs.service | |
173 | ||
174 | %postun | |
175 | %systemd_reload | |
176 | ||
177 | %triggerpostun -- autofs < 5.0.8-1 | |
178 | %systemd_trigger autofs.service | |
179 | ||
180 | %files | |
181 | %defattr(644,root,root,755) | |
182 | %doc CHANGELOG COPYRIGHT CREDITS README* | |
183 | %dir %{_sysconfdir} | |
184 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/autofs | |
185 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/autofs | |
186 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/autofs.conf | |
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 | |
189 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.media | |
190 | %attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.net | |
191 | %attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.smb | |
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 | |
194 | %attr(754,root,root) /etc/rc.d/init.d/autofs | |
195 | %{systemdunitdir}/autofs.service | |
196 | %attr(755,root,root) %{_sbindir}/automount | |
197 | %dir /net | |
198 | %dir %{_libdir}/autofs | |
199 | %attr(755,root,root) %{_libdir}/autofs/lookup_dir.so | |
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 | |
208 | %attr(755,root,root) %{_libdir}/autofs/lookup_sss.so | |
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 | |
217 | %attr(755,root,root) %{_libdir}/autofs/mount_ext4.so | |
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 | |
221 | %attr(755,root,root) %{_libdir}/autofs/parse_amd.so | |
222 | %attr(755,root,root) %{_libdir}/autofs/parse_hesiod.so | |
223 | %attr(755,root,root) %{_libdir}/autofs/parse_sun.so | |
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* | |
229 | ||
230 | %if %{with ldap} | |
231 | %files ldap | |
232 | %defattr(644,root,root,755) | |
233 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/autofs_ldap_auth.conf | |
234 | %attr(755,root,root) %{_libdir}/autofs/lookup_ldap.so | |
235 | %attr(755,root,root) %{_libdir}/autofs/lookup_ldaps.so | |
236 | %{_mandir}/man5/autofs_ldap_auth.conf.5* | |
237 | %endif |