1 |
commit: f56f52579b14217aecb24c2165cc317ec3b92c04 |
2 |
Author: Yixun Lan <dlan <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jan 12 01:45:19 2022 +0000 |
4 |
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jan 12 01:46:13 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f56f5257 |
7 |
|
8 |
net-fs/autofs: restore 5.1.6 due to musl breakage |
9 |
|
10 |
5.1.8 break net mount on ppc64-musl, |
11 |
let's temporarily restore 5.1.6 for now |
12 |
|
13 |
this effectively revert part of: 30f36210abdf |
14 |
|
15 |
Bug: https://bugs.gentoo.org/831014 |
16 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
17 |
RepoMan-Options: --force |
18 |
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org> |
19 |
|
20 |
net-fs/autofs/Manifest | 1 + |
21 |
net-fs/autofs/autofs-5.1.6-r2.ebuild | 128 +++++++++++++++++++++++++++ |
22 |
net-fs/autofs/files/autofs-5.1.6-glibc.patch | 110 +++++++++++++++++++++++ |
23 |
net-fs/autofs/files/autofs-5.1.6-musl.patch | 12 +++ |
24 |
net-fs/autofs/files/autofs-5.1.6-pid.patch | 14 +++ |
25 |
5 files changed, 265 insertions(+) |
26 |
|
27 |
diff --git a/net-fs/autofs/Manifest b/net-fs/autofs/Manifest |
28 |
index 364aa0a32804..503d31c38237 100644 |
29 |
--- a/net-fs/autofs/Manifest |
30 |
+++ b/net-fs/autofs/Manifest |
31 |
@@ -1,2 +1,3 @@ |
32 |
+DIST autofs-5.1.6.tar.xz 315316 BLAKE2B 0c5e2351462505c6de0b12e510f0c08a625a0235e1ff8eeaff825946c4530c258449d26aaf6a3794aa82a97e8860711226168f434dd31bfb8a4e70287beb3ca4 SHA512 dc8b2bd86c140905dd1bc461bfc469f92363d9c2687fe422e1e751cc7ad64c0733b011c80bf4840e510e5909176cd1a066968b9a5ba835b62c4cf27537863cf2 |
33 |
DIST autofs-5.1.8-patches-0.tar.xz 3476 BLAKE2B a7fb146542f9cb0a8e93240d9c3f68ff7b569f4dc0e829103ae67ced6d04e110331d320ff429f6e6af03b7265a068ee648738691cd637080cf976f441fe10444 SHA512 73023735bf269e3214e38a4841b6b3a1edff30e5d925a62d3ca9e841726835793c1e242804233e696e946e63720f522ceeb82f78449d3597d3d39b727f4b8d24 |
34 |
DIST autofs-5.1.8.tar.xz 327396 BLAKE2B 22ef626cc867c1ed4f1f859aebe2547c497c35dea712967de70158e85db590f5ffc26165e1479cfc64eb8070a9c43fd06b1570a82bd8bbbac70f2930e1841718 SHA512 6ee6283c0977c82848a654dc24745ee687f6916de441c3688fa91f67ca7295e632ee3808cc2358984a4b9f19841e6e1a91ab48aad6341ac8e63827fe8c32d223 |
35 |
|
36 |
diff --git a/net-fs/autofs/autofs-5.1.6-r2.ebuild b/net-fs/autofs/autofs-5.1.6-r2.ebuild |
37 |
new file mode 100644 |
38 |
index 000000000000..c532b488d526 |
39 |
--- /dev/null |
40 |
+++ b/net-fs/autofs/autofs-5.1.6-r2.ebuild |
41 |
@@ -0,0 +1,128 @@ |
42 |
+# Copyright 1999-2022 Gentoo Authors |
43 |
+# Distributed under the terms of the GNU General Public License v2 |
44 |
+ |
45 |
+EAPI=7 |
46 |
+ |
47 |
+inherit linux-info systemd toolchain-funcs |
48 |
+ |
49 |
+DESCRIPTION="Kernel based automounter" |
50 |
+HOMEPAGE="https://web.archive.org/web/*/http://www.linux-consulting.com/Amd_AutoFS/autofs.html" |
51 |
+SRC_URI="https://www.kernel.org/pub/linux/daemons/${PN}/v5/${P}.tar.xz" |
52 |
+ |
53 |
+LICENSE="GPL-2" |
54 |
+SLOT="0" |
55 |
+KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 sparc x86" |
56 |
+IUSE="dmalloc ldap +libtirpc mount-locking sasl systemd" |
57 |
+ |
58 |
+# currently, sasl code assumes the presence of kerberosV |
59 |
+RDEPEND=" |
60 |
+ net-libs/libnsl:= |
61 |
+ >=sys-apps/util-linux-2.20 |
62 |
+ dmalloc? ( dev-libs/dmalloc[threads] ) |
63 |
+ ldap? ( >=net-nds/openldap-2.0 |
64 |
+ sasl? ( |
65 |
+ dev-libs/cyrus-sasl |
66 |
+ dev-libs/libxml2 |
67 |
+ virtual/krb5 |
68 |
+ ) |
69 |
+ ) |
70 |
+ systemd? ( sys-apps/systemd ) |
71 |
+ libtirpc? ( net-libs/libtirpc ) |
72 |
+ !libtirpc? ( elibc_glibc? ( sys-libs/glibc[rpc(-)] ) ) |
73 |
+" |
74 |
+DEPEND="${RDEPEND} |
75 |
+ libtirpc? ( net-libs/rpcsvc-proto ) |
76 |
+" |
77 |
+BDEPEND=" |
78 |
+ sys-devel/flex |
79 |
+ virtual/pkgconfig |
80 |
+ virtual/yacc |
81 |
+" |
82 |
+ |
83 |
+PATCHES=( |
84 |
+ "${FILESDIR}/${P}-glibc.patch" |
85 |
+ "${FILESDIR}/${P}-musl.patch" |
86 |
+ "${FILESDIR}/${P}-pid.patch" |
87 |
+) |
88 |
+ |
89 |
+pkg_setup() { |
90 |
+ linux-info_pkg_setup |
91 |
+ |
92 |
+ local CONFIG_CHECK |
93 |
+ |
94 |
+ if kernel_is -ge 4 18; then |
95 |
+ CONFIG_CHECK="~AUTOFS_FS" |
96 |
+ else |
97 |
+ CONFIG_CHECK="~AUTOFS4_FS" |
98 |
+ fi |
99 |
+ |
100 |
+ check_extra_config |
101 |
+} |
102 |
+ |
103 |
+src_prepare() { |
104 |
+ sed -i -e "s:/usr/bin/kill:/bin/kill:" samples/autofs.service.in || die # bug #479492 |
105 |
+ sed -i -e "/^EnvironmentFile/d" samples/autofs.service.in || die # bug #592334 |
106 |
+ |
107 |
+ # Install samples including autofs.service |
108 |
+ sed -i -e "/^SUBDIRS/s/$/ samples/g" Makefile.rules || die |
109 |
+ |
110 |
+ default |
111 |
+} |
112 |
+ |
113 |
+src_configure() { |
114 |
+ # bug #483716 |
115 |
+ tc-export AR |
116 |
+ # --with-confdir is for bug #361481 |
117 |
+ # --with-mapdir is for bug #385113 |
118 |
+ local myeconfargs=( |
119 |
+ --with-confdir=/etc/conf.d |
120 |
+ --with-mapdir=/etc/autofs |
121 |
+ $(use_with dmalloc) |
122 |
+ $(use_with ldap openldap) |
123 |
+ $(use_with libtirpc) |
124 |
+ $(use_with sasl) |
125 |
+ $(use_enable mount-locking) |
126 |
+ $(use_with systemd systemd $(systemd_get_systemunitdir)) # bug #479492 |
127 |
+ --without-hesiod |
128 |
+ --disable-ext-env |
129 |
+ --enable-sloppy-mount # bug #453778 |
130 |
+ --enable-force-shutdown |
131 |
+ --enable-ignore-busy |
132 |
+ RANLIB="$(type -P $(tc-getRANLIB))" # bug #483716 |
133 |
+ ) |
134 |
+ econf "${myeconfargs[@]}" |
135 |
+} |
136 |
+ |
137 |
+src_compile() { |
138 |
+ export DONTSTRIP=1 |
139 |
+ default |
140 |
+} |
141 |
+ |
142 |
+src_install() { |
143 |
+ default |
144 |
+ rmdir "${D}"/run |
145 |
+ |
146 |
+ if kernel_is -lt 2 6 30; then |
147 |
+ # kernel patches |
148 |
+ docinto patches |
149 |
+ dodoc patches/${PN}4-2.6.??{,.?{,?}}-v5-update-????????.patch |
150 |
+ fi |
151 |
+ newinitd "${FILESDIR}"/autofs5.initd autofs |
152 |
+ insinto etc/autofs |
153 |
+ newins "${FILESDIR}"/autofs5-auto.master auto.master |
154 |
+} |
155 |
+ |
156 |
+pkg_postinst() { |
157 |
+ if kernel_is -lt 2 6 30; then |
158 |
+ elog "This version of ${PN} requires a kernel with autofs4 supporting" |
159 |
+ elog "protocol version 5.00. Patches for kernels older than 2.6.30 have" |
160 |
+ elog "been installed into" |
161 |
+ elog "${EROOT}/usr/share/doc/${P}/patches." |
162 |
+ elog "For further instructions how to patch the kernel, please refer to" |
163 |
+ elog "${EROOT}/usr/share/doc/${P}/INSTALL." |
164 |
+ elog |
165 |
+ fi |
166 |
+ elog "If you plan on using autofs for automounting remote NFS mounts," |
167 |
+ elog "please check that both portmap (or rpcbind) and rpc.statd/lockd" |
168 |
+ elog "are running." |
169 |
+} |
170 |
|
171 |
diff --git a/net-fs/autofs/files/autofs-5.1.6-glibc.patch b/net-fs/autofs/files/autofs-5.1.6-glibc.patch |
172 |
new file mode 100644 |
173 |
index 000000000000..338d885ae1e1 |
174 |
--- /dev/null |
175 |
+++ b/net-fs/autofs/files/autofs-5.1.6-glibc.patch |
176 |
@@ -0,0 +1,110 @@ |
177 |
+diff --git a/daemon/lookup.c b/daemon/lookup.c |
178 |
+index 60a48f3..bbd65e0 100644 |
179 |
+--- a/daemon/lookup.c |
180 |
++++ b/daemon/lookup.c |
181 |
+@@ -382,7 +382,7 @@ static int read_file_source_instance(struct autofs_point *ap, struct map_source |
182 |
+ if (!S_ISREG(st.st_mode)) |
183 |
+ return NSS_STATUS_NOTFOUND; |
184 |
+ |
185 |
+- if (st.st_mode & __S_IEXEC) |
186 |
++ if (st.st_mode & S_IEXEC) |
187 |
+ type = src_prog; |
188 |
+ else |
189 |
+ type = src_file; |
190 |
+@@ -937,7 +937,7 @@ static int lookup_name_file_source_instance(struct autofs_point *ap, struct map_ |
191 |
+ if (!S_ISREG(st.st_mode)) |
192 |
+ return NSS_STATUS_NOTFOUND; |
193 |
+ |
194 |
+- if (st.st_mode & __S_IEXEC) |
195 |
++ if (st.st_mode & S_IEXEC) |
196 |
+ type = src_prog; |
197 |
+ else |
198 |
+ type = src_file; |
199 |
+@@ -1113,7 +1113,7 @@ static struct map_source *lookup_get_map_source(struct master_mapent *entry) |
200 |
+ if (!S_ISREG(st.st_mode)) |
201 |
+ return NULL; |
202 |
+ |
203 |
+- if (st.st_mode & __S_IEXEC) |
204 |
++ if (st.st_mode & S_IEXEC) |
205 |
+ type = "program"; |
206 |
+ else |
207 |
+ type = "file"; |
208 |
+diff --git a/include/automount.h b/include/automount.h |
209 |
+index 4fd0ba9..7b855a7 100644 |
210 |
+--- a/include/automount.h |
211 |
++++ b/include/automount.h |
212 |
+@@ -13,6 +13,7 @@ |
213 |
+ #include <limits.h> |
214 |
+ #include <time.h> |
215 |
+ #include <syslog.h> |
216 |
++#include <sys/procfs.h> |
217 |
+ #include <sys/types.h> |
218 |
+ #include <pthread.h> |
219 |
+ #include <sched.h> |
220 |
+@@ -142,6 +143,16 @@ struct autofs_point; |
221 |
+ #define UMOUNT_RETRIES 8 |
222 |
+ #define EXPIRE_RETRIES 3 |
223 |
+ |
224 |
++#ifndef __SWORD_TYPE |
225 |
++#if __WORDSIZE == 32 |
226 |
++# define __SWORD_TYPE int |
227 |
++#elif __WORDSIZE == 64 |
228 |
++# define __SWORD_TYPE long int |
229 |
++#else |
230 |
++#error |
231 |
++#endif |
232 |
++#endif |
233 |
++ |
234 |
+ static u_int32_t inline hash(const char *key, unsigned int size) |
235 |
+ { |
236 |
+ u_int32_t hashval; |
237 |
+diff --git a/include/nsswitch.h b/include/nsswitch.h |
238 |
+index d3e4027..8376113 100644 |
239 |
+--- a/include/nsswitch.h |
240 |
++++ b/include/nsswitch.h |
241 |
+@@ -24,6 +24,10 @@ |
242 |
+ #include <netdb.h> |
243 |
+ #include "list.h" |
244 |
+ |
245 |
++#ifndef _PATH_NSSWITCH_CONF |
246 |
++#define _PATH_NSSWITCH_CONF "/dev/null" |
247 |
++#endif |
248 |
++ |
249 |
+ #define NSSWITCH_FILE _PATH_NSSWITCH_CONF |
250 |
+ |
251 |
+ enum nsswitch_status { |
252 |
+diff --git a/include/rpc_subs.h b/include/rpc_subs.h |
253 |
+index 6e35eed..7ba4b93 100644 |
254 |
+--- a/include/rpc_subs.h |
255 |
++++ b/include/rpc_subs.h |
256 |
+@@ -18,7 +18,7 @@ |
257 |
+ |
258 |
+ #include <rpc/rpc.h> |
259 |
+ #include <rpc/pmap_prot.h> |
260 |
+-#include <nfs/nfs.h> |
261 |
++#include <linux/nfs.h> |
262 |
+ #include <linux/nfs2.h> |
263 |
+ #include <linux/nfs3.h> |
264 |
+ |
265 |
+diff --git a/modules/lookup_multi.c b/modules/lookup_multi.c |
266 |
+index fadd2ea..cf109de 100644 |
267 |
+--- a/modules/lookup_multi.c |
268 |
++++ b/modules/lookup_multi.c |
269 |
+@@ -247,7 +247,7 @@ static struct lookup_mod *nss_open_lookup(const char *format, int argc, const ch |
270 |
+ continue; |
271 |
+ } |
272 |
+ |
273 |
+- if (st.st_mode & __S_IEXEC) |
274 |
++ if (st.st_mode & S_IEXEC) |
275 |
+ type = src_prog; |
276 |
+ else |
277 |
+ type = src_file; |
278 |
+@@ -452,7 +452,7 @@ int lookup_reinit(const char *my_mapfmt, |
279 |
+ continue; |
280 |
+ } |
281 |
+ |
282 |
+- if (st.st_mode & __S_IEXEC) |
283 |
++ if (st.st_mode & S_IEXEC) |
284 |
+ type = src_prog; |
285 |
+ else |
286 |
+ type = src_file; |
287 |
|
288 |
diff --git a/net-fs/autofs/files/autofs-5.1.6-musl.patch b/net-fs/autofs/files/autofs-5.1.6-musl.patch |
289 |
new file mode 100644 |
290 |
index 000000000000..bdcc0db9a9f3 |
291 |
--- /dev/null |
292 |
+++ b/net-fs/autofs/files/autofs-5.1.6-musl.patch |
293 |
@@ -0,0 +1,12 @@ |
294 |
+--- a/include/automount.h |
295 |
++++ b/include/automount.h |
296 |
+@@ -25,6 +25,9 @@ |
297 |
+ #include "list.h" |
298 |
+ |
299 |
+ #include <linux/auto_fs4.h> |
300 |
++#ifndef __GLIBC__ |
301 |
++#include <bits/reg.h> |
302 |
++#endif |
303 |
+ |
304 |
+ #include "defaults.h" |
305 |
+ #include "state.h" |
306 |
|
307 |
diff --git a/net-fs/autofs/files/autofs-5.1.6-pid.patch b/net-fs/autofs/files/autofs-5.1.6-pid.patch |
308 |
new file mode 100644 |
309 |
index 000000000000..1766c34e989e |
310 |
--- /dev/null |
311 |
+++ b/net-fs/autofs/files/autofs-5.1.6-pid.patch |
312 |
@@ -0,0 +1,14 @@ |
313 |
+diff --git a/include/log.h b/include/log.h |
314 |
+index 69eed96..14051cc 100644 |
315 |
+--- a/include/log.h |
316 |
++++ b/include/log.h |
317 |
+@@ -46,6 +46,8 @@ extern void log_crit(unsigned, const char* msg, ...); |
318 |
+ extern void log_debug(unsigned int, const char* msg, ...); |
319 |
+ extern void logmsg(const char* msg, ...); |
320 |
+ |
321 |
++#include <unistd.h> /* Required for pid_t */ |
322 |
++ |
323 |
+ extern pid_t log_pidinfo(struct autofs_point *ap, pid_t pid, char *label); |
324 |
+ |
325 |
+ #define debug(opt, msg, args...) \ |
326 |
+ |