diff --git a/community/autofs/0002-add-include-for-basename.patch b/community/autofs/0002-add-include-for-basename.patch new file mode 100644 index 0000000000000000000000000000000000000000..80116b6b63df02086752b181a3e5b8073103fb75 --- /dev/null +++ b/community/autofs/0002-add-include-for-basename.patch @@ -0,0 +1,51 @@ +From 10122e6da6f4c5482e0666707210a29fface2a64 Mon Sep 17 00:00:00 2001 +From: John Vogel <jvogel4@stny.rr.com> +Date: Sat, 12 Oct 2024 12:31:08 -0400 +Subject: [PATCH 2/2] add include for basename + +--- + daemon/automount.c | 2 +- + daemon/master.c | 1 + + modules/lookup_file.c | 1 + + 3 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/daemon/automount.c b/daemon/automount.c +index 6cb3b1b..7a67d4b 100644 +--- a/daemon/automount.c ++++ b/daemon/automount.c +@@ -33,7 +33,7 @@ + #include <sys/time.h> + #include <sys/resource.h> + #include <sys/poll.h> +-#include <dirent.h> ++#include <libgen.h> + #include <sys/vfs.h> + #include <sys/utsname.h> + #ifdef WITH_SYSTEMD +diff --git a/daemon/master.c b/daemon/master.c +index f2c11e9..34102b5 100644 +--- a/daemon/master.c ++++ b/daemon/master.c +@@ -25,6 +25,7 @@ + #include <sys/types.h> + #include <sys/stat.h> + #include <ctype.h> ++#include <libgen.h> + #include "automount.h" + + /* The root of the map entry tree */ +diff --git a/modules/lookup_file.c b/modules/lookup_file.c +index 99f2e21..0a39a7f 100644 +--- a/modules/lookup_file.c ++++ b/modules/lookup_file.c +@@ -20,6 +20,7 @@ + #include <time.h> + #include <ctype.h> + #include <signal.h> ++#include <libgen.h> + #include <sys/param.h> + #include <sys/types.h> + #include <sys/stat.h> +-- +2.46.2 + diff --git a/community/autofs/0002-musl-backport-fixes.patch b/community/autofs/0002-musl-backport-fixes.patch deleted file mode 100644 index e15678c162209a85bd8b2fff63dd48594235812b..0000000000000000000000000000000000000000 --- a/community/autofs/0002-musl-backport-fixes.patch +++ /dev/null @@ -1,393 +0,0 @@ -From f5f4eae173cfa61b3665e327d828f203fa6d72f3 Mon Sep 17 00:00:00 2001 -From: Sam James <sam@gentoo.org> -Date: Fri, 24 Dec 2021 22:02:20 +0800 -Subject: [PATCH 2/2] autofs-5.1.8 - fix bashism in configure - -configure scripts need to work with a POSIX-compliant shell, -so let's not use a bashism here. - -``` -checking for res_query in -lresolv... yes -checking for libhesiod... no -./configure: 4880: test: 0: unexpected operator -checking how to run the C preprocessor... gcc -E -``` - -Tested-by: Yixun Lan <dlan@gentoo.org> -Signed-off-by: Sam James <sam@gentoo.org> - -autofs-5.1.8 - fix missing include in hash.h - -Fixes a build failure with the musl libc: -``` -../include/hash.h:74:8: error: unknown type name '__always_inline' - 74 | static __always_inline uint32_t hash_64(uint64_t val, unsigned int bits) - | ^~~~~~~~~~~~~~~ -``` - -We need to include stddef.h from linux-headers to ensure _always_inline -is always defined. - -Bug: https://bugs.gentoo.org/828918 -Tested-by: Yixun Lan <dlan@gentoo.org> -Signed-off-by: Sam James <sam@gentoo.org> - -autofs-5.1.8 - define fallback dummy NSS config path - -On musl, _PATH_NSSWITCH_CONF won't be defined (it doesn't support NSS), -so let's give it a dummy path when it's not defined by glibc. - -Fixes build failures like: -``` -../include/nsswitch.h:27:23: error: '_PATH_NSSWITCH_CONF' undeclared (first use in this function) - 27 | #define NSSWITCH_FILE _PATH_NSSWITCH_CONF - | ^~~~~~~~~~~~~~~~~~~ -``` - -Tested-by: Yixun Lan <dlan@gentoo.org> -Signed-off-by: Sam James <sam@gentoo.org> - -autofs-5.1.8 - avoid internal stat.h definitions - -Tested-by: Yixun Lan <dlan@gentoo.org> -Signed-off-by: Sam James <sam@gentoo.org> - -autofs-5.1.8 - add missing include to hash.h for _WORDSIZE - -Fixes build failure on musl like: -``` -../include/hash.h:22:2: error: #error Wordsize not 32 or 64 - 22 | #error Wordsize not 32 or 64 - | ^~~~~ -``` - -Tested-by: Yixun Lan <dlan@gentoo.org> -Signed-off-by: Sam James <sam@gentoo.org> - -autofs-5.1.8 - add missing include to log.h for pid_t - -Fixes build failures on musl like: -``` -../include/log.h:49:8: error: unknown type name 'pid_t' - 49 | extern pid_t log_pidinfo(struct autofs_point *ap, pid_t pid, char *label); - | ^~~~~ -../include/log.h:49:51: error: unknown type name 'pid_t'; did you mean 'gid_t'? - 49 | extern pid_t log_pidinfo(struct autofs_point *ap, pid_t pid, char *label); - | ^~~~~ - | gid_t -``` - -Tested-by: Yixun Lan <dlan@gentoo.org> -Signed-off-by: Sam James <sam@gentoo.org> - -autofs-5.1.8 - define _SWORD_TYPE for musl - -Copy the definition from glibc. Fixes build failures like: -``` -automount.c:280:35: error: '__SWORD_TYPE' undeclared (first use in this function) - 280 | if (fs.f_type != (__SWORD_TYPE) AUTOFS_SUPER_MAGIC) { - | ^~~~~~~~~~~~ -automount.c:280:35: note: each undeclared identifier is reported only once for each function it appears in -automount.c:280:48: error: expected ')' before numeric constant - 280 | if (fs.f_type != (__SWORD_TYPE) AUTOFS_SUPER_MAGIC) { - | ~ ^ - | ) -``` - -Tested-by: Yixun Lan <dlan@gentoo.org> -Signed-off-by: Sam James <sam@gentoo.org> - -autofs-5.1.8 - add autofs_strerror_r() helper for musl - -If using musl libc the XSI-compliant variant strerror_r() which returns -an integer instead of a pointer so add a helper function to handle this -case. - -Signed-off-by: Fabian Groffen <grobian@gentoo.org> -Signed-off-by: Ian Kent <raven@themaw.net> - -autofs-5.1.8 - handle innetgr() not present in musl - -The function innetgr(3) may not be present in musl libc, add a check -for this. - -Originally contributed by Fabian, modified by me. - -Signed-off-by: Fabian Groffen <grobian@gentoo.org> -Signed-off-by: Ian Kent <raven@themaw.net> ---- - configure | 9 +++++---- - configure.in | 8 ++++---- - daemon/automount.c | 10 ++++++++++ - daemon/lookup.c | 6 +++--- - include/automount.h | 5 +++++ - include/config.h.in | 3 +++ - include/hash.h | 6 ++++++ - include/log.h | 2 ++ - include/nsswitch.h | 4 ++++ - lib/log.c | 10 ++++++++++ - modules/lookup_multi.c | 4 ++-- - modules/parse_amd.c | 7 +++++++ - 12 files changed, 61 insertions(+), 13 deletions(-) - -diff --git a/configure b/configure -index 394a8d5..33446b0 100755 ---- a/configure -+++ b/configure -@@ -4227,12 +4227,13 @@ fi - - - --for ac_func in pipe2 -+for ac_func in pipe2 innetgr - do : -- ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" --if test "x$ac_cv_func_pipe2" = xyes; then : -+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -+if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF --#define HAVE_PIPE2 1 -+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 - _ACEOF - - fi -diff --git a/configure.in b/configure.in -index 750ffb4..68cbd44 100644 ---- a/configure.in -+++ b/configure.in -@@ -169,7 +169,7 @@ AF_CHECK_SSS_LIB(SSS_AUTOFS, libsss_autofs.so) - AC_SUBST(HAVE_SSS_AUTOFS) - AC_SUBST(sssldir) - --AC_CHECK_FUNCS(pipe2) -+AC_CHECK_FUNCS(pipe2 innetgr) - - # - # Newer mounts have the -s (sloppy) option to ignore unknown options, -@@ -262,7 +262,7 @@ if test -z "$HAVE_HESIOD" -o "$HAVE_HESIOD" != "0" - then - HAVE_HESIOD=0 - AF_CHECK_LIBHESIOD() -- if test "$HAVE_HESIOD" == "1"; then -+ if test "$HAVE_HESIOD" = "1"; then - AC_DEFINE(WITH_HESIOD,1, - [Define if using Hesiod as a source of automount maps]) - fi -@@ -337,11 +337,11 @@ AC_ARG_WITH(sasl, - SASL_FLAGS="-I${withval}/include" - fi - ) --if test -z "$HAVE_SASL" -o "$HAVE_SASL" != "0" -a "$HAVE_LIBXML" == "1" -+if test -z "$HAVE_SASL" -o "$HAVE_SASL" != "0" -a "$HAVE_LIBXML" = "1" - then - HAVE_SASL=0 - AC_CHECK_LIB(sasl2, sasl_client_start, HAVE_SASL=1 LIBSASL="$LIBSASL -lsasl2", , -lsasl2 $LIBS) -- if test "$HAVE_SASL" == "1"; then -+ if test "$HAVE_SASL" = "1"; then - AC_DEFINE(WITH_SASL,1, - [Define if using SASL authentication with the LDAP module]) - fi -diff --git a/daemon/automount.c b/daemon/automount.c -index cc28689..5dffce0 100644 ---- a/daemon/automount.c -+++ b/daemon/automount.c -@@ -48,6 +48,16 @@ - #endif - #endif - -+#ifndef __SWORD_TYPE -+#if __WORDSIZE == 32 -+# define __SWORD_TYPE int -+#elif __WORDSIZE == 64 -+# define __SWORD_TYPE long int -+#else -+#error -+#endif -+#endif -+ - const char *program; /* Initialized with argv[0] */ - const char *version = VERSION_STRING; /* Program version */ - const char *libdir = AUTOFS_LIB_DIR; /* Location of library modules */ -diff --git a/daemon/lookup.c b/daemon/lookup.c -index 0b281f8..4a286d6 100644 ---- a/daemon/lookup.c -+++ b/daemon/lookup.c -@@ -397,7 +397,7 @@ static int read_file_source_instance(struct autofs_point *ap, struct map_source - return NSS_STATUS_NOTFOUND; - } - -- if (st.st_mode & __S_IEXEC) -+ if (st.st_mode & S_IEXEC) - type = src_prog; - else - type = src_file; -@@ -930,7 +930,7 @@ static int lookup_name_file_source_instance(struct autofs_point *ap, struct map_ - return NSS_STATUS_NOTFOUND; - } - -- if (st.st_mode & __S_IEXEC) -+ if (st.st_mode & S_IEXEC) - type = src_prog; - else - type = src_file; -@@ -1077,7 +1077,7 @@ static struct map_source *lookup_get_map_source(struct master_mapent *entry) - if (!S_ISREG(st.st_mode)) - return NULL; - -- if (st.st_mode & __S_IEXEC) -+ if (st.st_mode & S_IEXEC) - type = "program"; - else - type = "file"; -diff --git a/include/automount.h b/include/automount.h -index 947ed16..d2d05d8 100644 ---- a/include/automount.h -+++ b/include/automount.h -@@ -43,6 +43,11 @@ - - #define ENABLE_CORES 1 - -+#ifndef __GLIBC__ -+# define strerror_r(N,B,S) autofs_strerror_r(N,B,S) -+char *autofs_strerror_r(int errnum, char *buf, size_t buflen); /* GNU */ -+#endif -+ - /* We MUST have the paths to mount(8) and umount(8) */ - #ifndef HAVE_MOUNT - #error Failed to locate mount(8)! -diff --git a/include/config.h.in b/include/config.h.in -index 4e36b39..4f8daa8 100644 ---- a/include/config.h.in -+++ b/include/config.h.in -@@ -30,6 +30,9 @@ - /* Define to 1 if you have the `getservbyname' function. */ - #undef HAVE_GETSERVBYNAME - -+/* Define to 1 if you have the `innetgr' function. */ -+#undef HAVE_INNETGR -+ - /* Define to 1 if you have the <inttypes.h> header file. */ - #undef HAVE_INTTYPES_H - -diff --git a/include/hash.h b/include/hash.h -index 2447f29..0f1d7b5 100644 ---- a/include/hash.h -+++ b/include/hash.h -@@ -3,6 +3,12 @@ - /* Fast hashing routine for ints, longs and pointers. - (C) 2002 Nadia Yvette Chambers, IBM */ - -+#ifdef __GLIBC__ -+#include <bits/wordsize.h> -+#else -+#include <bits/reg.h> -+#endif -+#include <linux/stddef.h> - #include <sys/types.h> - #include <stdint.h> - -diff --git a/include/log.h b/include/log.h -index 69eed96..a7b09f9 100644 ---- a/include/log.h -+++ b/include/log.h -@@ -17,6 +17,8 @@ - #ifndef LOG_H - #define LOG_H - -+#include <unistd.h> -+ - /* Define logging functions */ - - #define LOGOPT_NONE 0x0000 -diff --git a/include/nsswitch.h b/include/nsswitch.h -index d3e4027..8376113 100644 ---- a/include/nsswitch.h -+++ b/include/nsswitch.h -@@ -24,6 +24,10 @@ - #include <netdb.h> - #include "list.h" - -+#ifndef _PATH_NSSWITCH_CONF -+#define _PATH_NSSWITCH_CONF "/dev/null" -+#endif -+ - #define NSSWITCH_FILE _PATH_NSSWITCH_CONF - - enum nsswitch_status { -diff --git a/lib/log.c b/lib/log.c -index 0cb47d7..aa4a180 100644 ---- a/lib/log.c -+++ b/lib/log.c -@@ -364,3 +364,13 @@ pid_t log_pidinfo(struct autofs_point *ap, pid_t pid, char *label) { - - return ppid; - } -+ -+#ifndef __GLIBC__ -+# undef strerror_r -+char *autofs_strerror_r(int errnum, char *buf, size_t buflen) { -+ int s = strerror_r(errnum, buf, buflen); -+ if (s) -+ return NULL; -+ return buf; -+} -+#endif -diff --git a/modules/lookup_multi.c b/modules/lookup_multi.c -index fadd2ea..cf109de 100644 ---- a/modules/lookup_multi.c -+++ b/modules/lookup_multi.c -@@ -247,7 +247,7 @@ static struct lookup_mod *nss_open_lookup(const char *format, int argc, const ch - continue; - } - -- if (st.st_mode & __S_IEXEC) -+ if (st.st_mode & S_IEXEC) - type = src_prog; - else - type = src_file; -@@ -452,7 +452,7 @@ int lookup_reinit(const char *my_mapfmt, - continue; - } - -- if (st.st_mode & __S_IEXEC) -+ if (st.st_mode & S_IEXEC) - type = src_prog; - else - type = src_file; -diff --git a/modules/parse_amd.c b/modules/parse_amd.c -index 163174c..5090060 100644 ---- a/modules/parse_amd.c -+++ b/modules/parse_amd.c -@@ -425,6 +425,7 @@ static int sel_in_network(struct autofs_point *ap, - return ret; - } - -+#ifdef HAVE_INNETGR - static int sel_netgrp(struct autofs_point *ap, - struct selector *s, struct substvar *sv) - { -@@ -489,6 +490,7 @@ out: - - return ret; - } -+#endif - - static int eval_selector(struct autofs_point *ap, - struct amd_entry *this, struct substvar *sv) -@@ -628,7 +630,12 @@ static int eval_selector(struct autofs_point *ap, - switch (s->sel->selector) { - case SEL_NETGRP: - case SEL_NETGRPD: -+#ifndef HAVE_INNETGR -+ error(logopt, MODPREFIX -+ "netgroups not available, function innetgr(3) not available"); -+#else - ret = sel_netgrp(ap, s, sv); -+#endif - break; - - default: --- -2.36.1 - diff --git a/community/autofs/APKBUILD b/community/autofs/APKBUILD index af2f28ece96936535d8e7ed98fae0700021a361d..e8012efe2f633830adf177f8a44ed01bb3905267 100644 --- a/community/autofs/APKBUILD +++ b/community/autofs/APKBUILD @@ -1,8 +1,8 @@ # Contributor: Alex Laskin <alex@lask.in> -# Maintainer: Alex Laskin <alex@lask.in> +# Maintainer: John Vogel <jvogel@stygian.me> pkgname=autofs -pkgver=5.1.8 -pkgrel=5 +pkgver=5.1.9 +pkgrel=0 pkgdesc="A kernel-based automounter for Linux" url="https://www.kernel.org/pub/linux/daemons/autofs/" arch="all" @@ -19,32 +19,38 @@ makedepends=" " subpackages="$pkgname-dbg $pkgname-doc $pkgname-openrc" options="!check" # no test suite provided +# autofs-5.1.9-c99.patch was retrieved from gentoo autofs ebuild +# musl.patch was retrieved from void autofs recipe source=" https://www.kernel.org/pub/linux/daemons/autofs/v5/autofs-$pkgver.tar.xz + 0001-auto.master-change-paths-in-etc.patch + 0002-add-include-for-basename.patch + autofs-5.1.9-c99.patch + musl.patch autofs.initd autofs.confd - 0001-auto.master-change-paths-in-etc.patch - 0002-musl-backport-fixes.patch - fix-segfault.patch - basename.patch " build() { ./configure \ --prefix=/usr \ - --sysconfdir=/etc/autofs \ + --sysconfdir=/etc \ --with-mapdir=/etc/autofs \ - --with-confdir=/etc/conf.d \ + --with-confdir=/etc/autofs \ --without-hesiod \ --with-libtirpc \ - --enable-ignore-busy + --enable-ignore-busy \ + --enable-force-shutdown make STRIP=: } package() { make DESTDIR="$pkgdir" install - mkdir -p "$pkgdir"/etc/autofs/ + # auto.master.d/ is referenced in auto.master + install -m755 -d "$pkgdir"/etc/autofs/auto.master.d/ + install -m644 samples/autofs.conf.default.in \ + "$pkgdir"/etc/autofs/autofs.conf install -m644 samples/auto.master \ samples/auto.misc \ samples/auto.net \ @@ -56,16 +62,14 @@ package() { install -m644 -D "$srcdir"/$pkgname.confd \ "$pkgdir"/etc/conf.d/$pkgname - - rm -f "$pkgdir"/usr/share/man/man5/autofs.5 } sha512sums=" -6ee6283c0977c82848a654dc24745ee687f6916de441c3688fa91f67ca7295e632ee3808cc2358984a4b9f19841e6e1a91ab48aad6341ac8e63827fe8c32d223 autofs-5.1.8.tar.xz -e7ffe40cf5f302f7de7cc59752699adad4be89fa78fa1a79c32ce4059ec2f563c0f107ca2cec850cabfb1cdebca5ff1f369167479423ab6cfe509225a799a00e autofs.initd -74884b94d8c5dc72579c9c0c9f13c8918ee0babe6fc1e6352bb79cfaf6f5ce3daa87a9b2ea2f34a4600c93a971b329aa0892785fe2efd42829fb7953a6130dd7 autofs.confd +81eb04270727c3fbf9dfb4b07a8dd39beac9068d6289f2f3bb0eabf723c14bec36860d3b2759c46b597bd77e8f3fa521646445e926c95ab63859a3a6c8588dcc autofs-5.1.9.tar.xz 562607fb77347680740a73242390cd199595779acd96033b7b9b4579ef57e8fc887bbcee227964ffeda1710798becd58e957e28c4dd875f2402c9d3989a04aef 0001-auto.master-change-paths-in-etc.patch -e928f89147d29374b1daa97331a2aca858a2ac6de3f91e041806ebbc12ddc861d801921e20d3da3968f154bfbf916456c0cb98ac430b9dd515159436eb135f39 0002-musl-backport-fixes.patch -c705d6cb7be2701bfbbafc01b476e32bc61e26a164002395271dc9bd4175dc6a3d580ad99dbed8d5037ef2fd603aa2530955899258386693905d8e33f7d036c7 fix-segfault.patch -bfdd01c24afbcb8a9c8d10c3b7b18bd729e4fe93e4f650cdbc55cc9b0f74446cb5f8b373b6d84ae2595b7302b4491591aaae2ae9492d8b126bfdbfaf8794deda basename.patch +5b7ccd5880dedc000a5468bd04e2ca8ab32cf0dd7d3f7234644818b90a6b15428d3f2361bef4a9877bb9cea87e0b5a647ad66213e938168cca5330348acdd5df 0002-add-include-for-basename.patch +4476c5a1ff41931d9852cd16dc98c040845ac193ef22cca64d86c14eb52064e40a2042101602cc4ae8bac6eaaf71783f2157bd58882434df70ad10e10742f862 autofs-5.1.9-c99.patch +67c03241ec1daea0855b225c12638860c17cfbc87b7a547cf79426f889e40cc5c8c3516f55c5e5ee0c25a7221eb750941dd4fe6690b36a050518384276279c93 musl.patch +762af446c0643dd97a64894a6c221e5dbf8e504df87831865db13f27047b224a2e37457ddf2197ae5a92761a7535428f37447a92d1e2e8c46e65405f187c633f autofs.initd +95947629b91a77cfe5de6205de38d8c0f14699627549f2a7a89d961b6bce3bc2ae8453886765d6c342f2a3cca34d1c66f7c475a548a4ac6e902d2ab96fb69343 autofs.confd " diff --git a/community/autofs/autofs-5.1.9-c99.patch b/community/autofs/autofs-5.1.9-c99.patch new file mode 100644 index 0000000000000000000000000000000000000000..e218f52a96f175588c0c4e201a8530160a5ea3d5 --- /dev/null +++ b/community/autofs/autofs-5.1.9-c99.patch @@ -0,0 +1,57 @@ +https://src.fedoraproject.org/rpms/autofs/c/787a553722ec9aecf0c5108065bef9ef110d7639?branch=rawhide +https://lore.kernel.org/autofs/874jgf4qwu.fsf@oldenburg.str.redhat.com/ +https://lore.kernel.org/autofs/878r5r4qy5.fsf@oldenburg.str.redhat.com/ + +Fix argument type for ldap_parse_page_control in configure probe, +to suppress an incompatible-pointer-types error. + +Submitted upstream: + + <https://lore.kernel.org/autofs/874jgf4qwu.fsf@oldenburg.str.redhat.com/> + +--- a/aclocal.m4 ++++ b/aclocal.m4 +@@ -427,7 +427,7 @@ AC_LINK_IFELSE( + struct berval *c; + int ret; + LDAPControl **clp; +- ret = ldap_parse_page_control(ld,clp,ct,c); ]])], ++ ret = ldap_parse_page_control(ld,clp,ct,&c); ]])], + [ af_have_ldap_parse_page_control=yes + AC_MSG_RESULT(yes) ], + [ AC_MSG_RESULT(no) ]) + +Add casts to SASL callbacks to avoid incompatible-pointer-types +errors. + +Submitted upstream: + + <https://lore.kernel.org/autofs/878r5r4qy5.fsf@oldenburg.str.redhat.com/> + +--- a/modules/cyrus-sasl.c ++++ b/modules/cyrus-sasl.c +@@ -109,17 +109,17 @@ static int getpass_func(sasl_conn_t *, void *, int, sasl_secret_t **); + static int getuser_func(void *, int, const char **, unsigned *); + + static sasl_callback_t callbacks[] = { +- { SASL_CB_USER, &getuser_func, NULL }, +- { SASL_CB_AUTHNAME, &getuser_func, NULL }, +- { SASL_CB_PASS, &getpass_func, NULL }, ++ { SASL_CB_USER, (int(*)(void)) &getuser_func, NULL }, ++ { SASL_CB_AUTHNAME, (int(*)(void)) &getuser_func, NULL }, ++ { SASL_CB_PASS, (int(*)(void)) &getpass_func, NULL }, + { SASL_CB_LIST_END, NULL, NULL }, + }; + + static sasl_callback_t debug_callbacks[] = { +- { SASL_CB_LOG, &sasl_log_func, NULL }, +- { SASL_CB_USER, &getuser_func, NULL }, +- { SASL_CB_AUTHNAME, &getuser_func, NULL }, +- { SASL_CB_PASS, &getpass_func, NULL }, ++ { SASL_CB_LOG, (int(*)(void)) &sasl_log_func, NULL }, ++ { SASL_CB_USER, (int(*)(void)) &getuser_func, NULL }, ++ { SASL_CB_AUTHNAME, (int(*)(void)) &getuser_func, NULL }, ++ { SASL_CB_PASS, (int(*)(void)) &getpass_func, NULL }, + { SASL_CB_LIST_END, NULL, NULL }, + }; + diff --git a/community/autofs/autofs.confd b/community/autofs/autofs.confd index 86ac0e2cd52cd26a7e242d4c4de140fead7ee17a..0ceb7ed231c050be3b75b57a2992f24365310b0f 100644 --- a/community/autofs/autofs.confd +++ b/community/autofs/autofs.confd @@ -5,3 +5,4 @@ # automount_opts="" +automount_logpath="/var/log/automount.log" diff --git a/community/autofs/autofs.initd b/community/autofs/autofs.initd index 1614fe1fe6e63984398689e06fc933375568c921..f2386ff62889649a78882471312061d270dcf01a 100644 --- a/community/autofs/autofs.initd +++ b/community/autofs/autofs.initd @@ -1,5 +1,6 @@ #!/sbin/openrc-run supervisor=supervise-daemon +supervise_daemon_args="--stderr ${automount_logpath:-/var/log/automount.log}" name="${RC_SVCNAME}" description="Kernel-based automounter" diff --git a/community/autofs/basename.patch b/community/autofs/basename.patch deleted file mode 100644 index ae1b56d500f8e93173fb78b3a8411526bd6cbdcf..0000000000000000000000000000000000000000 --- a/community/autofs/basename.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff -Naur a/daemon/automount.c b/daemon/automount.c ---- a/daemon/automount.c 2024-09-03 06:37:51.526857521 -0400 -+++ b/daemon/automount.c 2024-09-03 06:39:19.908662819 -0400 -@@ -33,7 +33,7 @@ - #include <sys/time.h> - #include <sys/resource.h> - #include <sys/poll.h> --#include <dirent.h> -+#include <libgen.h> - #include <sys/vfs.h> - #include <sys/utsname.h> - #ifdef WITH_SYSTEMD -diff -Naur a/daemon/master.c b/daemon/master.c ---- a/daemon/master.c 2024-09-03 06:37:51.526857521 -0400 -+++ b/daemon/master.c 2024-09-03 06:39:43.965820873 -0400 -@@ -25,6 +25,7 @@ - #include <sys/types.h> - #include <sys/stat.h> - #include <ctype.h> -+#include <libgen.h> - #include "automount.h" - - /* The root of the map entry tree */ -diff -Naur a/modules/lookup_file.c b/modules/lookup_file.c ---- a/modules/lookup_file.c 2024-09-03 06:37:51.540191127 -0400 -+++ b/modules/lookup_file.c 2024-09-03 06:40:24.059961561 -0400 -@@ -20,6 +20,7 @@ - #include <time.h> - #include <ctype.h> - #include <signal.h> -+#include <libgen.h> - #include <sys/param.h> - #include <sys/types.h> - #include <sys/stat.h> diff --git a/community/autofs/fix-segfault.patch b/community/autofs/fix-segfault.patch deleted file mode 100644 index 40439e586bbaa5e44c2b5d999aa9a076a92b2693..0000000000000000000000000000000000000000 --- a/community/autofs/fix-segfault.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/lib/log.c b/lib/log.c -index aa4a180..7601cad 100644 ---- a/lib/log.c -+++ b/lib/log.c -@@ -38,6 +38,9 @@ static char *prepare_attempt_prefix(const char *msg) - char buffer[ATTEMPT_ID_SIZE + 1]; - char *prefixed_msg = NULL; - -+ if (key_thread_attempt_id == 0) -+ return NULL; -+ - attempt_id = pthread_getspecific(key_thread_attempt_id); - if (attempt_id) { - int len = sizeof(buffer) + 1 + strlen(msg) + 1; diff --git a/community/autofs/musl.patch b/community/autofs/musl.patch new file mode 100644 index 0000000000000000000000000000000000000000..d3ac72c0ea36e2acacd97f1efd9b574fba19c819 --- /dev/null +++ b/community/autofs/musl.patch @@ -0,0 +1,61 @@ +Patch-Source: https://raw.githubusercontent.com/void-linux/void-packages/refs/heads/master/srcpkgs/autofs/patches/musl.patch + +--- a/lib/nss_parse.y 2016-01-10 10:07:26.854512310 +0100 ++++ b/lib/nss_parse.y 2016-01-10 10:07:53.134783321 +0100 +@@ -28,6 +28,10 @@ + #include "nsswitch.h" + #include "nss_parse.tab.h" + ++#ifndef _PATH_NSSWITCH_CONF ++#define _PATH_NSSWITCH_CONF "/etc/nsswitch.conf" ++#endif ++ + static pthread_mutex_t parse_mutex = PTHREAD_MUTEX_INITIALIZER; + + static struct list_head *nss_list; +--- a/daemon/automount.c 2016-01-10 10:10:23.680333952 +0100 ++++ b/daemon/automount.c 2016-01-10 10:10:35.599456586 +0100 +@@ -37,6 +37,14 @@ + #include <sys/vfs.h> + #include <sys/utsname.h> + ++#ifndef __SWORD_TYPE ++# if __WORDSIZE == 32 /* System word size */ ++# define __SWORD_TYPE int ++# else /* __WORDSIZE == 64 */ ++# define __SWORD_TYPE long int ++# endif ++#endif ++ + #include "automount.h" + #if defined(LIBXML2_WORKAROUND) || defined(TIRPC_WORKAROUND) + #include <dlfcn.h> +--- a/lib/log.c.orig 2019-03-30 10:49:52.965336128 +0100 ++++ b/lib/log.c 2019-03-30 10:50:43.232710045 +0100 +@@ -38,7 +38,11 @@ + char buffer[ATTEMPT_ID_SIZE + 1]; + char *prefixed_msg = NULL; + +- attempt_id = pthread_getspecific(key_thread_attempt_id); ++ if (key_thread_attempt_id) { ++ attempt_id = pthread_getspecific(key_thread_attempt_id); ++ } else { ++ attempt_id = 0; ++ } + if (attempt_id) { + int len = sizeof(buffer) + 1 + strlen(msg) + 1; + +--- a/include/hash.h 2021-01-31 09:22:19.668222263 +0100 ++++ b/include/hash.h 2021-01-31 09:22:41.390327622 +0100 +@@ -5,6 +5,11 @@ + + #include <sys/types.h> + #include <stdint.h> ++#include <linux/stddef.h> ++ ++#ifndef __GLIBC__ ++#include <sys/reg.h> ++#endif + + /* + * The "GOLDEN_RATIO_PRIME" is used in ifs/btrfs/brtfs_inode.h and