/[packages]/updates/2/autofs/current/SPECS/autofs.spec
ViewVC logotype

Contents of /updates/2/autofs/current/SPECS/autofs.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 314441 - (show annotations) (download)
Mon Nov 5 17:11:35 2012 UTC (11 years, 4 months ago) by bersuit
File size: 4863 byte(s)
SILENT: add subrel
1 %define subrel 1
2 Name: autofs
3 Version: 5.0.6
4 Release: %mkrel 6
5 License: GPLv2+
6 Summary: A tool for automatically mounting and unmounting filesystems
7 Group: System/Kernel and hardware
8 URL: ftp://ftp.kernel.org/pub/linux/daemons/autofs
9 Source0: ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/autofs-%{version}.tar.bz2
10 Source1: %{name}.init
11 Patch1: autofs-5.0.6-fix-ipv6-name-for-lookup-fix.patch
12 Patch2: autofs-5.0.6-improve-mount-location-error-reporting.patch
13 Patch3: autofs-5.0.6-fix-paged-query-more-results-check.patch
14 Patch4: autofs-5.0.6-fix-dumpmaps-not-reading-maps.patch
15 Patch5: autofs-5.0.6-fix-result-null-check-in-read_one_map.patch
16 Patch6: autofs-5.0.6-fix-LDAP-result-leaks-on-error-paths.patch
17 Patch7: autofs-5.0.6-code-analysis-fixes-1.patch
18 Patch8: autofs-5.0.6-fix-not-bind-mounting-local-filesystem.patch
19 Patch9: autofs-5.0.6-add-dir-map-type.patch
20 Patch10: autofs-5.0.6-fix-wait-for-master-source-mutex.patch
21 Patch11: autofs-5.0.6-fix-submount-shutdown-race.patch
22 Patch12: autofs-5.0.6-fix-fix-map-source-check-in-file-lookup.patch
23 Patch13: autofs-5.0.6-add-disable-move-mount-configure-option.patch
24 Patch14: autofs-5.0.6-fix-lsb-service-name-in-init-script-2.patch
25 Patch15: autofs-5.0.6-fix-ipv6-name-lookup-check.patch
26 Patch16: autofs-5.0.6-fix-ipv6-rpc-calls.patch
27 Patch17: autofs-5.0.6-fix-ipv6-configure-check.patch
28 Patch18: autofs-5.0.6-add-piddir-to-configure.patch
29 Patch19: autofs-5.0.6-add-systemd-unit-support.patch
30 Patch20: autofs-5.0.6-fix-MNT_DETACH-define.patch
31 Patch21: autofs-5.0.6-remove-empty-command-line-arguments.patch
32 Patch102: autofs-5.0.6-separate-config-files.patch
33 Patch103: autofs-5.0.4-rename-configuration-file.patch
34 BuildRequires: openldap-devel
35 BuildRequires: flex
36 BuildRequires: bison
37 BuildRequires: libsasl-devel
38 BuildRequires: krb-devel
39 BuildRequires: libxml2-devel
40 BuildRequires: tirpc-devel
41 Conflicts: autosmb
42 Requires(post): rpm-helper >= 0.24.8-1
43 Requires(preun): rpm-helper >= 0.24.8-1
44
45 %description
46 autofs is a daemon which automatically mounts filesystems when you use
47 them, and unmounts them later when you are not using them. This can
48 include network filesystems, CD-ROMs, floppies, and so forth.
49
50 %prep
51 %setup -q -n %{name}-%{version}
52 %patch1 -p1
53 %patch2 -p1
54 %patch3 -p1
55 %patch4 -p1
56 %patch5 -p1
57 %patch6 -p1
58 %patch7 -p1
59 %patch8 -p1
60 %patch9 -p1
61 %patch10 -p1
62 %patch11 -p1
63 %patch12 -p1
64 %patch13 -p1
65 %patch14 -p1
66 %patch15 -p1
67 %patch16 -p1
68 %patch17 -p1
69 %patch18 -p1
70 %patch19 -p1
71 %patch20 -p1
72 %patch21 -p1
73 %patch102 -p 1
74 %patch103 -p 1
75
76 %build
77 autoreconf -f -i
78 %serverbuild
79 %configure2_5x \
80 --with-mapdir=%{_sysconfdir}/%{name} \
81 --with-confdir=%{_sysconfdir}/%{name} \
82 --with-sasl=yes \
83 --disable-mount-locking \
84 --enable-ignore-busy \
85 --with-libtirpc \
86 --disable-mount-move \
87 --with-systemd
88 %make DONTSTRIP=1
89
90 mkdir examples
91 cp samples/ldap* examples
92 cp samples/autofs.schema examples
93
94 rm -f README.gentoo
95
96 %install
97 rm -rf %{buildroot}
98 mkdir -p %{buildroot}%{_sbindir}
99 mkdir -p %{buildroot}%{_libdir}/autofs
100 mkdir -p %{buildroot}%{_mandir}/{man5,man8}
101 mkdir -p %{buildroot}%{_sysconfdir}
102
103 %make install INSTALLROOT=%{buildroot}
104
105 install -d -m 755 %{buildroot}%{_initrddir}
106 install -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/%{name}
107
108 install -d -m 755 %{buildroot}%{_unitdir}
109 install -m 644 samples/autofs.service %{buildroot}%{_unitdir}/autofs.service
110
111 rm -f %{buildroot}%{_sysconfdir}/init.d/%{name}
112 rm -f %{buildroot}%{_mandir}/man8/autofs*
113
114 cat > README.urpmi <<EOF
115 Mageia RPM specific notes
116
117 setup
118 -----
119 Configuration handling in Mageia package differs from upstream one on several
120 points:
121 - the automounts daemon configuration file is %{_sysconfdir}/autofs/autofs.conf
122 - the autofs service configuration file is %{_sysconfdir}/sysconfig/autofs
123
124 Upgrade
125 -------
126 Map files have been moved from %{_sysconfdir} to %{_sysconfdir}/autofs. Upgrade
127 procedure should handle the change automatically.
128 LDAP usage has changed between autofs 4 and 5. The LDAP schema used has now to
129 be configured explicitely in autofs configuration, so as to avoid useless
130 queries. As this can't be handled by package upgrade procedure, you'll have to
131 edit your configuration manually. See auto.master(5) for details.
132
133 EOF
134
135 # tune default configuration
136 perl -pi -e 's|^BROWSE_MODE="no"|BROWSE_MODE="yes"|' \
137 %{buildroot}%{_sysconfdir}/autofs/autofs.conf
138 perl -pi \
139 -e 's|^/misc\t|#/misc\t|;' \
140 -e 's|^/net\t|#/net\t|;' \
141 %{buildroot}%{_sysconfdir}/autofs/auto.master
142
143 %post
144 %_post_service autofs
145
146 %preun
147 %_preun_service autofs
148
149 %files
150 %doc INSTALL CHANGELOG CREDITS README* examples
151 %config(noreplace) %{_sysconfdir}/autofs
152 %config(noreplace) %{_sysconfdir}/sysconfig/autofs
153 %{_unitdir}/autofs.service
154 %{_initrddir}/%{name}
155 %{_libdir}/%{name}
156 %{_sbindir}/automount
157 %{_mandir}/*/*

  ViewVC Help
Powered by ViewVC 1.1.30