]>
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.4 | |
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: 5d35e3282e7a47ec1a5acaeebcc51db2 | |
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: pkgconfig | |
44 | BuildRequires: rpmbuild(macros) >= 1.647 | |
45 | Requires(post,preun): /sbin/chkconfig | |
46 | Requires(post,preun,postun): systemd-units >= 38 | |
47 | Requires: mktemp | |
48 | Requires: rc-scripts | |
49 | Requires: systemd-units >= 0.38 | |
50 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
51 | ||
52 | %define _sysconfdir /etc/autofs | |
53 | %define filterout_ld -Wl,--as-needed | |
54 | ||
55 | %description | |
56 | autofs is a daemon which automatically mounts filesystems when you use | |
57 | them, and unmounts them later when you are not using them. This can | |
58 | include network filesystems, CD-ROMs, floppies, and so forth. | |
59 | ||
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. | |
65 | ||
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. | |
69 | Incluyendo sistemas de archivo en red, CD-ROMS, disquetes, etc. | |
70 | ||
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 | |
75 | disquettes, etc. | |
76 | ||
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. | |
81 | ||
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 | |
85 | estiverem mais em uso. Incluindo sistemas de arquivo em rede, CD-ROMS, | |
86 | disquetes, etc. | |
87 | ||
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. | |
92 | ||
93 | %package ldap | |
94 | Summary: LDAP lookup module for autofs | |
95 | Summary(pl.UTF-8): Moduł LDAP dla autofs | |
96 | Summary(pt_BR.UTF-8): Suporte a mapas LDAP para o pacote autofs | |
97 | Group: Daemons | |
98 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
99 | ||
100 | %description ldap | |
101 | This package contains the autofs module necessary to use automount | |
102 | maps stored on an LDAP server. | |
103 | ||
104 | %description ldap -l pl.UTF-8 | |
105 | Ten pakiet zawiera moduł autofs potrzebny do używania map automounta | |
106 | przechowywanych na serwerze LDAP. | |
107 | ||
108 | %prep | |
109 | %setup -q | |
110 | %patch0 -p1 | |
111 | %patch1 -p1 | |
112 | %patch2 -p1 | |
113 | ||
114 | %build | |
115 | %{__autoconf} | |
116 | ||
117 | export initdir=/etc/rc.d/init.d | |
118 | export piddir=/var/run | |
119 | export fifodir=/var/run | |
120 | export flagdir=/var/run | |
121 | export sssldir=%{_libdir}/sssd/modules | |
122 | export HAVE_SSS_AUTOFS=1 | |
123 | %configure \ | |
124 | --enable-force-shutdown \ | |
125 | --with-confdir=%{_sysconfdir} \ | |
126 | --with-libtirpc \ | |
127 | --with-mapdir=%{_sysconfdir} \ | |
128 | --with-openldap%{!?with_ldap:=no} \ | |
129 | --with-systemd=%{systemdunitdir} | |
130 | ||
131 | %{__make} -j1 \ | |
132 | initdir=/etc/rc.d/init.d \ | |
133 | CC="%{__cc}" \ | |
134 | DAEMON_CFLAGS="-fPIE %{rpmcflags}" | |
135 | ||
136 | %install | |
137 | rm -rf $RPM_BUILD_ROOT | |
138 | install -d $RPM_BUILD_ROOT{/misc,/net,%{_sbindir},%{_libdir}/autofs,%{_mandir}/man{5,8}} \ | |
139 | $RPM_BUILD_ROOT/etc/{rc.d/init.d,autofs,sysconfig} | |
140 | ||
141 | %{__make} install \ | |
142 | INSTALLROOT=$RPM_BUILD_ROOT | |
143 | ||
144 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/autofs | |
145 | ||
146 | install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/auto.master | |
147 | install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/auto.media | |
148 | install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/auto.net | |
149 | install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/autofs | |
150 | ||
151 | touch $RPM_BUILD_ROOT%{_sysconfdir}/auto.{home,var,tmp} | |
152 | ||
153 | # replaced in PLD by auto.media | |
154 | %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/auto.misc | |
155 | ||
156 | %clean | |
157 | rm -rf $RPM_BUILD_ROOT | |
158 | ||
159 | %post | |
160 | /sbin/chkconfig --add autofs | |
161 | # triggerpostun would get called after %%post | |
162 | if [ -f /var/lock/subsys/automount ]; then | |
163 | mv /var/lock/subsys/{automount,autofs} | |
164 | fi | |
165 | %service autofs restart "autofs daemon" | |
166 | %systemd_post autofs.service | |
167 | ||
168 | %preun | |
169 | if [ "$1" = "0" ]; then | |
170 | %service autofs stop | |
171 | /sbin/chkconfig --del autofs | |
172 | fi | |
173 | %systemd_preun autofs.service | |
174 | ||
175 | %postun | |
176 | %systemd_reload | |
177 | ||
178 | %triggerpostun -- autofs < 5.0.8-1 | |
179 | %systemd_trigger autofs.service | |
180 | ||
181 | %files | |
182 | %defattr(644,root,root,755) | |
183 | %doc CHANGELOG COPYRIGHT CREDITS README* | |
184 | %dir %{_sysconfdir} | |
185 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/autofs | |
186 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/autofs | |
187 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/autofs.conf | |
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 | |
190 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.media | |
191 | %attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.net | |
192 | %attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.smb | |
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 | |
195 | %attr(754,root,root) /etc/rc.d/init.d/autofs | |
196 | %{systemdunitdir}/autofs.service | |
197 | %attr(755,root,root) %{_sbindir}/automount | |
198 | %dir /net | |
199 | %dir %{_libdir}/autofs | |
200 | %attr(755,root,root) %{_libdir}/autofs/lookup_dir.so | |
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 | |
209 | %attr(755,root,root) %{_libdir}/autofs/lookup_sss.so | |
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 | |
218 | %attr(755,root,root) %{_libdir}/autofs/mount_ext4.so | |
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 | |
222 | %attr(755,root,root) %{_libdir}/autofs/parse_amd.so | |
223 | %attr(755,root,root) %{_libdir}/autofs/parse_hesiod.so | |
224 | %attr(755,root,root) %{_libdir}/autofs/parse_sun.so | |
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* | |
230 | ||
231 | %if %{with ldap} | |
232 | %files ldap | |
233 | %defattr(644,root,root,755) | |
234 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/autofs_ldap_auth.conf | |
235 | %attr(755,root,root) %{_libdir}/autofs/lookup_ldap.so | |
236 | %attr(755,root,root) %{_libdir}/autofs/lookup_ldaps.so | |
237 | %{_mandir}/man5/autofs_ldap_auth.conf.5* | |
238 | %endif |