1 |
commit: 647b7cae8f31d5c16c0eb90a81c08576a442dd2f |
2 |
Author: Yixun Lan <dlan <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 28 06:32:53 2021 +0000 |
4 |
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 28 06:45:27 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=647b7cae |
7 |
|
8 |
net-fs/autofs: version bump 5.1.7 |
9 |
|
10 |
Package-Manager: Portage-3.0.13, Repoman-3.0.2 |
11 |
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org> |
12 |
|
13 |
net-fs/autofs/Manifest | 1 + |
14 |
net-fs/autofs/autofs-5.1.7.ebuild | 124 +++++++++++++++++++++++++++ |
15 |
net-fs/autofs/files/autofs-5.1.7-glibc.patch | 97 +++++++++++++++++++++ |
16 |
3 files changed, 222 insertions(+) |
17 |
|
18 |
diff --git a/net-fs/autofs/Manifest b/net-fs/autofs/Manifest |
19 |
index 6f533814338..2dd24948a6b 100644 |
20 |
--- a/net-fs/autofs/Manifest |
21 |
+++ b/net-fs/autofs/Manifest |
22 |
@@ -1 +1,2 @@ |
23 |
DIST autofs-5.1.6.tar.xz 315316 BLAKE2B 0c5e2351462505c6de0b12e510f0c08a625a0235e1ff8eeaff825946c4530c258449d26aaf6a3794aa82a97e8860711226168f434dd31bfb8a4e70287beb3ca4 SHA512 dc8b2bd86c140905dd1bc461bfc469f92363d9c2687fe422e1e751cc7ad64c0733b011c80bf4840e510e5909176cd1a066968b9a5ba835b62c4cf27537863cf2 |
24 |
+DIST autofs-5.1.7.tar.xz 327752 BLAKE2B bff290048fb2849dd4c7099718f6824eac7e4f700909342f82b79a3baa752c4efe7f45be3492578fa15df6d959751be5d7fae5aafe129b52425c0d9ab19eaccc SHA512 cf994d0e68d5f6a5647235000743811a791150ece0a90ed9e1cb9bb131259f52769371c6a06d968b7191b10e709c9c90de611cc3ee310fbbea87f60034b3d4e1 |
25 |
|
26 |
diff --git a/net-fs/autofs/autofs-5.1.7.ebuild b/net-fs/autofs/autofs-5.1.7.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..5dfef5feafa |
29 |
--- /dev/null |
30 |
+++ b/net-fs/autofs/autofs-5.1.7.ebuild |
31 |
@@ -0,0 +1,124 @@ |
32 |
+# Copyright 1999-2021 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=7 |
36 |
+ |
37 |
+inherit linux-info systemd toolchain-funcs |
38 |
+ |
39 |
+DESCRIPTION="Kernel based automounter" |
40 |
+HOMEPAGE="https://web.archive.org/web/*/http://www.linux-consulting.com/Amd_AutoFS/autofs.html" |
41 |
+SRC_URI="https://www.kernel.org/pub/linux/daemons/${PN}/v5/${P}.tar.xz" |
42 |
+ |
43 |
+LICENSE="GPL-2" |
44 |
+SLOT="0" |
45 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" |
46 |
+IUSE="-dmalloc ldap +libtirpc mount-locking sasl systemd" |
47 |
+ |
48 |
+# currently, sasl code assumes the presence of kerberosV |
49 |
+RDEPEND=">=sys-apps/util-linux-2.20 |
50 |
+ dmalloc? ( dev-libs/dmalloc[threads] ) |
51 |
+ ldap? ( >=net-nds/openldap-2.0 |
52 |
+ sasl? ( |
53 |
+ dev-libs/cyrus-sasl |
54 |
+ dev-libs/libxml2 |
55 |
+ virtual/krb5 |
56 |
+ ) |
57 |
+ ) |
58 |
+ systemd? ( sys-apps/systemd ) |
59 |
+ libtirpc? ( net-libs/libtirpc ) |
60 |
+ !libtirpc? ( elibc_glibc? ( sys-libs/glibc[rpc(-)] ) ) |
61 |
+" |
62 |
+DEPEND="${RDEPEND} |
63 |
+ libtirpc? ( net-libs/rpcsvc-proto ) |
64 |
+" |
65 |
+BDEPEND=" |
66 |
+ sys-devel/flex |
67 |
+ virtual/yacc |
68 |
+" |
69 |
+ |
70 |
+PATCHES=( |
71 |
+ "${FILESDIR}/${P}-glibc.patch" |
72 |
+ "${FILESDIR}/${PN}-5.1.6-pid.patch" |
73 |
+) |
74 |
+ |
75 |
+pkg_setup() { |
76 |
+ linux-info_pkg_setup |
77 |
+ |
78 |
+ local CONFIG_CHECK |
79 |
+ |
80 |
+ if kernel_is -ge 4 18; then |
81 |
+ CONFIG_CHECK="~AUTOFS_FS" |
82 |
+ else |
83 |
+ CONFIG_CHECK="~AUTOFS4_FS" |
84 |
+ fi |
85 |
+ |
86 |
+ check_extra_config |
87 |
+} |
88 |
+ |
89 |
+src_prepare() { |
90 |
+ sed -i -e "s:/usr/bin/kill:/bin/kill:" samples/autofs.service.in || die # bug #479492 |
91 |
+ sed -i -e "/^EnvironmentFile/d" samples/autofs.service.in || die # bug #592334 |
92 |
+ |
93 |
+ # Install samples including autofs.service |
94 |
+ sed -i -e "/^SUBDIRS/s/$/ samples/g" Makefile.rules || die |
95 |
+ |
96 |
+ default |
97 |
+} |
98 |
+ |
99 |
+src_configure() { |
100 |
+ # bug #483716 |
101 |
+ tc-export AR |
102 |
+ # --with-confdir is for bug #361481 |
103 |
+ # --with-mapdir is for bug #385113 |
104 |
+ local myeconfargs=( |
105 |
+ --with-confdir=/etc/conf.d |
106 |
+ --with-mapdir=/etc/autofs |
107 |
+ $(use_with dmalloc) |
108 |
+ $(use_with ldap openldap) |
109 |
+ $(use_with libtirpc) |
110 |
+ $(use_with sasl) |
111 |
+ $(use_enable mount-locking) |
112 |
+ $(use_with systemd systemd $(systemd_get_systemunitdir)) # bug #479492 |
113 |
+ --without-hesiod |
114 |
+ --disable-ext-env |
115 |
+ --enable-sloppy-mount # bug #453778 |
116 |
+ --enable-force-shutdown |
117 |
+ --enable-ignore-busy |
118 |
+ RANLIB="$(type -P $(tc-getRANLIB))" # bug #483716 |
119 |
+ ) |
120 |
+ econf "${myeconfargs[@]}" |
121 |
+} |
122 |
+ |
123 |
+src_compile() { |
124 |
+ export DONTSTRIP=1 |
125 |
+ default |
126 |
+} |
127 |
+ |
128 |
+src_install() { |
129 |
+ default |
130 |
+ rmdir "${D}"/run |
131 |
+ |
132 |
+ if kernel_is -lt 2 6 30; then |
133 |
+ # kernel patches |
134 |
+ docinto patches |
135 |
+ dodoc patches/${PN}4-2.6.??{,.?{,?}}-v5-update-????????.patch |
136 |
+ fi |
137 |
+ newinitd "${FILESDIR}"/autofs5.initd autofs |
138 |
+ insinto etc/autofs |
139 |
+ newins "${FILESDIR}"/autofs5-auto.master auto.master |
140 |
+} |
141 |
+ |
142 |
+pkg_postinst() { |
143 |
+ if kernel_is -lt 2 6 30; then |
144 |
+ elog "This version of ${PN} requires a kernel with autofs4 supporting" |
145 |
+ elog "protocol version 5.00. Patches for kernels older than 2.6.30 have" |
146 |
+ elog "been installed into" |
147 |
+ elog "${EROOT}/usr/share/doc/${P}/patches." |
148 |
+ elog "For further instructions how to patch the kernel, please refer to" |
149 |
+ elog "${EROOT}/usr/share/doc/${P}/INSTALL." |
150 |
+ elog |
151 |
+ fi |
152 |
+ elog "If you plan on using autofs for automounting remote NFS mounts," |
153 |
+ elog "please check that both portmap (or rpcbind) and rpc.statd/lockd" |
154 |
+ elog "are running." |
155 |
+} |
156 |
|
157 |
diff --git a/net-fs/autofs/files/autofs-5.1.7-glibc.patch b/net-fs/autofs/files/autofs-5.1.7-glibc.patch |
158 |
new file mode 100644 |
159 |
index 00000000000..2a0f415fbee |
160 |
--- /dev/null |
161 |
+++ b/net-fs/autofs/files/autofs-5.1.7-glibc.patch |
162 |
@@ -0,0 +1,97 @@ |
163 |
+diff --git a/daemon/lookup.c b/daemon/lookup.c |
164 |
+index 2fea0c0..3b3aa3e 100644 |
165 |
+--- a/daemon/lookup.c |
166 |
++++ b/daemon/lookup.c |
167 |
+@@ -397,7 +397,7 @@ static int read_file_source_instance(struct autofs_point *ap, struct map_source |
168 |
+ return NSS_STATUS_NOTFOUND; |
169 |
+ } |
170 |
+ |
171 |
+- if (st.st_mode & __S_IEXEC) |
172 |
++ if (st.st_mode & S_IEXEC) |
173 |
+ type = src_prog; |
174 |
+ else |
175 |
+ type = src_file; |
176 |
+@@ -930,7 +930,7 @@ static int lookup_name_file_source_instance(struct autofs_point *ap, struct map_ |
177 |
+ return NSS_STATUS_NOTFOUND; |
178 |
+ } |
179 |
+ |
180 |
+- if (st.st_mode & __S_IEXEC) |
181 |
++ if (st.st_mode & S_IEXEC) |
182 |
+ type = src_prog; |
183 |
+ else |
184 |
+ type = src_file; |
185 |
+@@ -1077,7 +1077,7 @@ static struct map_source *lookup_get_map_source(struct master_mapent *entry) |
186 |
+ if (!S_ISREG(st.st_mode)) |
187 |
+ return NULL; |
188 |
+ |
189 |
+- if (st.st_mode & __S_IEXEC) |
190 |
++ if (st.st_mode & S_IEXEC) |
191 |
+ type = "program"; |
192 |
+ else |
193 |
+ type = "file"; |
194 |
+diff --git a/include/automount.h b/include/automount.h |
195 |
+index 1ae4078..c2e8dba 100644 |
196 |
+--- a/include/automount.h |
197 |
++++ b/include/automount.h |
198 |
+@@ -13,6 +13,7 @@ |
199 |
+ #include <limits.h> |
200 |
+ #include <time.h> |
201 |
+ #include <syslog.h> |
202 |
++#include <sys/procfs.h> |
203 |
+ #include <sys/types.h> |
204 |
+ #include <pthread.h> |
205 |
+ #include <sched.h> |
206 |
+@@ -42,6 +43,16 @@ |
207 |
+ #include <dmalloc.h> |
208 |
+ #endif |
209 |
+ |
210 |
++#ifndef __SWORD_TYPE |
211 |
++#if __WORDSIZE == 32 |
212 |
++# define __SWORD_TYPE int |
213 |
++#elif __WORDSIZE == 64 |
214 |
++# define __SWORD_TYPE long int |
215 |
++#else |
216 |
++#error |
217 |
++#endif |
218 |
++#endif |
219 |
++ |
220 |
+ #define ENABLE_CORES 1 |
221 |
+ |
222 |
+ /* We MUST have the paths to mount(8) and umount(8) */ |
223 |
+diff --git a/include/nsswitch.h b/include/nsswitch.h |
224 |
+index d3e4027..8376113 100644 |
225 |
+--- a/include/nsswitch.h |
226 |
++++ b/include/nsswitch.h |
227 |
+@@ -24,6 +24,10 @@ |
228 |
+ #include <netdb.h> |
229 |
+ #include "list.h" |
230 |
+ |
231 |
++#ifndef _PATH_NSSWITCH_CONF |
232 |
++#define _PATH_NSSWITCH_CONF "/dev/null" |
233 |
++#endif |
234 |
++ |
235 |
+ #define NSSWITCH_FILE _PATH_NSSWITCH_CONF |
236 |
+ |
237 |
+ enum nsswitch_status { |
238 |
+diff --git a/modules/lookup_multi.c b/modules/lookup_multi.c |
239 |
+index fadd2ea..cf109de 100644 |
240 |
+--- a/modules/lookup_multi.c |
241 |
++++ b/modules/lookup_multi.c |
242 |
+@@ -247,7 +247,7 @@ static struct lookup_mod *nss_open_lookup(const char *format, int argc, const ch |
243 |
+ continue; |
244 |
+ } |
245 |
+ |
246 |
+- if (st.st_mode & __S_IEXEC) |
247 |
++ if (st.st_mode & S_IEXEC) |
248 |
+ type = src_prog; |
249 |
+ else |
250 |
+ type = src_file; |
251 |
+@@ -452,7 +452,7 @@ int lookup_reinit(const char *my_mapfmt, |
252 |
+ continue; |
253 |
+ } |
254 |
+ |
255 |
+- if (st.st_mode & __S_IEXEC) |
256 |
++ if (st.st_mode & S_IEXEC) |
257 |
+ type = src_prog; |
258 |
+ else |
259 |
+ type = src_file; |