* [gentoo-commits] repo/gentoo:master commit in: net-fs/autofs/, net-fs/autofs/files/
@ 2021-10-17 5:24 Sam James
0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2021-10-17 5:24 UTC (permalink / raw
To: gentoo-commits
commit: 64bb0e2110fec0fb3e83fcc85a0802c5a3fdd59b
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 17 05:10:16 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Oct 17 05:24:31 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64bb0e21
net-fs/autofs: add glibc-2.34 patch
Closes: https://bugs.gentoo.org/803938
Signed-off-by: Sam James <sam <AT> gentoo.org>
net-fs/autofs/autofs-5.1.7-r1.ebuild | 4 +-
net-fs/autofs/files/autofs-5.1.7-glibc-2.34.patch | 107 ++++++++++++++++++++++
2 files changed, 110 insertions(+), 1 deletion(-)
diff --git a/net-fs/autofs/autofs-5.1.7-r1.ebuild b/net-fs/autofs/autofs-5.1.7-r1.ebuild
index cb4a9016866..dc05275932e 100644
--- a/net-fs/autofs/autofs-5.1.7-r1.ebuild
+++ b/net-fs/autofs/autofs-5.1.7-r1.ebuild
@@ -43,6 +43,7 @@ PATCHES=(
"${FILESDIR}/${P}-glibc.patch"
"${FILESDIR}/${PN}-5.1.6-musl.patch"
"${FILESDIR}/${PN}-5.1.6-pid.patch"
+ "${FILESDIR}/${PN}-5.1.7-glibc-2.34.patch"
)
pkg_setup() {
@@ -90,7 +91,8 @@ src_configure() {
--enable-ignore-busy
RANLIB="$(type -P $(tc-getRANLIB))" # bug #483716
)
- econf "${myeconfargs[@]}"
+
+ CONFIG_SHELL="${BROOT}/bin/bash" econf "${myeconfargs[@]}"
}
src_compile() {
diff --git a/net-fs/autofs/files/autofs-5.1.7-glibc-2.34.patch b/net-fs/autofs/files/autofs-5.1.7-glibc-2.34.patch
new file mode 100644
index 00000000000..8b0ddd75eb2
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.1.7-glibc-2.34.patch
@@ -0,0 +1,107 @@
+https://src.fedoraproject.org/rpms/autofs/raw/rawhide/f/autofs-5.1.7-use-default-stack-size-for-threads.patch
+https://bugzilla.redhat.com/show_bug.cgi?id=1984813
+https://bugs.gentoo.org/803938
+
+autofs-5.1.7 - use default stack size for threads
+
+From: Ian Kent <raven@themaw.net>
+
+autofs uses PTHREAD_STACK_MIN to set the stack size for threads it
+creates.
+
+In two cases it is used to reduce the stack size for long running
+service threads while it's used to allocate a larger stack for worker
+threads that can have larger memory requirements.
+
+In recent glibc releases PTHREAD_STACK_MIN is no longer a constant
+which can lead to unexpectedly different stack sizes on different
+architectures and the autofs assumption it's a constant causes a
+compile failure.
+
+The need to alter the stack size was due to observed stack overflow
+which was thought to be due the thread stack being too small for autofs
+and glibc alloca(3) usage.
+
+Quite a bit of that alloca(3) usage has been eliminated from autofs now,
+particularly those that might be allocating largish amounts of storage,
+and there has been a lot of change in glibc too so using the thread
+default stack should be ok.
+
+Signed-off-by: Ian Kent <raven@themaw.net>
+--- a/daemon/automount.c
++++ b/daemon/automount.c
+@@ -84,7 +84,6 @@ static size_t kpkt_len;
+ /* Attributes for creating detached and joinable threads */
+ pthread_attr_t th_attr;
+ pthread_attr_t th_attr_detached;
+-size_t detached_thread_stack_size = PTHREAD_STACK_MIN * 144;
+
+ struct master_readmap_cond mrc = {
+ PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER, 0, NULL, 0, 0, 0, 0};
+@@ -2620,34 +2619,6 @@ int main(int argc, char *argv[])
+ exit(1);
+ }
+
+-#ifdef _POSIX_THREAD_ATTR_STACKSIZE
+- if (pthread_attr_setstacksize(
+- &th_attr_detached, detached_thread_stack_size)) {
+- logerr("%s: failed to set stack size thread attribute!",
+- program);
+- if (start_pipefd[1] != -1) {
+- res = write(start_pipefd[1], pst_stat, sizeof(*pst_stat));
+- close(start_pipefd[1]);
+- }
+- release_flag_file();
+- macro_free_global_table();
+- exit(1);
+- }
+-#endif
+-
+- if (pthread_attr_getstacksize(
+- &th_attr_detached, &detached_thread_stack_size)) {
+- logerr("%s: failed to get detached thread stack size!",
+- program);
+- if (start_pipefd[1] != -1) {
+- res = write(start_pipefd[1], pst_stat, sizeof(*pst_stat));
+- close(start_pipefd[1]);
+- }
+- release_flag_file();
+- macro_free_global_table();
+- exit(1);
+- }
+-
+ info(logging, "Starting automounter version %s, master map %s",
+ version, master_list->name);
+ info(logging, "using kernel protocol version %d.%02d",
+--- a/daemon/state.c
++++ b/daemon/state.c
+@@ -1177,12 +1177,8 @@ int st_start_handler(void)
+ status = pthread_attr_init(pattrs);
+ if (status)
+ pattrs = NULL;
+- else {
++ else
+ pthread_attr_setdetachstate(pattrs, PTHREAD_CREATE_DETACHED);
+-#ifdef _POSIX_THREAD_ATTR_STACKSIZE
+- pthread_attr_setstacksize(pattrs, PTHREAD_STACK_MIN*4);
+-#endif
+- }
+
+ status = pthread_create(&thid, pattrs, st_queue_handler, NULL);
+
+--- a/lib/alarm.c
++++ b/lib/alarm.c
+@@ -270,12 +270,8 @@ int alarm_start_handler(void)
+ status = pthread_attr_init(pattrs);
+ if (status)
+ pattrs = NULL;
+- else {
++ else
+ pthread_attr_setdetachstate(pattrs, PTHREAD_CREATE_DETACHED);
+-#ifdef _POSIX_THREAD_ATTR_STACKSIZE
+- pthread_attr_setstacksize(pattrs, PTHREAD_STACK_MIN*4);
+-#endif
+- }
+
+ status = pthread_condattr_init(&condattrs);
+ if (status)
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-fs/autofs/, net-fs/autofs/files/
@ 2024-07-10 14:56 Yixun Lan
0 siblings, 0 replies; 8+ messages in thread
From: Yixun Lan @ 2024-07-10 14:56 UTC (permalink / raw
To: gentoo-commits
commit: 4300e0dc2b19deeb7b2ddbbd98997e65c13142b5
Author: Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 10 14:54:59 2024 +0000
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Wed Jul 10 14:54:59 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4300e0dc
net-fs/autofs: drop 5.1.8-r1, 5.1.9
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
net-fs/autofs/Manifest | 2 -
net-fs/autofs/autofs-5.1.8-r1.ebuild | 132 ---------------------
net-fs/autofs/autofs-5.1.9.ebuild | 124 -------------------
net-fs/autofs/files/autofs-5.1.8-dmalloc.patch | 53 ---------
.../autofs/files/autofs-5.1.8-mount_conflict.patch | 30 -----
net-fs/autofs/files/autofs-5.1.8-nfsv4-mount.patch | 88 --------------
6 files changed, 429 deletions(-)
diff --git a/net-fs/autofs/Manifest b/net-fs/autofs/Manifest
index 4ca9807f25d5..fa7faaca461e 100644
--- a/net-fs/autofs/Manifest
+++ b/net-fs/autofs/Manifest
@@ -1,3 +1 @@
-DIST autofs-5.1.8-patches-0.tar.xz 3476 BLAKE2B a7fb146542f9cb0a8e93240d9c3f68ff7b569f4dc0e829103ae67ced6d04e110331d320ff429f6e6af03b7265a068ee648738691cd637080cf976f441fe10444 SHA512 73023735bf269e3214e38a4841b6b3a1edff30e5d925a62d3ca9e841726835793c1e242804233e696e946e63720f522ceeb82f78449d3597d3d39b727f4b8d24
-DIST autofs-5.1.8.tar.xz 327396 BLAKE2B 22ef626cc867c1ed4f1f859aebe2547c497c35dea712967de70158e85db590f5ffc26165e1479cfc64eb8070a9c43fd06b1570a82bd8bbbac70f2930e1841718 SHA512 6ee6283c0977c82848a654dc24745ee687f6916de441c3688fa91f67ca7295e632ee3808cc2358984a4b9f19841e6e1a91ab48aad6341ac8e63827fe8c32d223
DIST autofs-5.1.9.tar.xz 331872 BLAKE2B baa2fd57fb4ac9f7390cad74d16ef6ef2e484d40061f4f894e5968277747b6852d98e089e904229d5fb08bef7e1810a7b5f14f0ea0adae8e40e317636c8a1f89 SHA512 81eb04270727c3fbf9dfb4b07a8dd39beac9068d6289f2f3bb0eabf723c14bec36860d3b2759c46b597bd77e8f3fa521646445e926c95ab63859a3a6c8588dcc
diff --git a/net-fs/autofs/autofs-5.1.8-r1.ebuild b/net-fs/autofs/autofs-5.1.8-r1.ebuild
deleted file mode 100644
index 490ca32bfe1b..000000000000
--- a/net-fs/autofs/autofs-5.1.8-r1.ebuild
+++ /dev/null
@@ -1,132 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit linux-info systemd toolchain-funcs
-
-DESCRIPTION="Kernel based automounter"
-HOMEPAGE="https://web.archive.org/web/*/http://www.linux-consulting.com/Amd_AutoFS/autofs.html https://git.kernel.org/pub/scm/linux/storage/autofs/autofs.git"
-SRC_URI="https://www.kernel.org/pub/linux/daemons/${PN}/v5/${P}.tar.xz
- https://dev.gentoo.org/~dlan/distfiles/${CATEGORY}/${PN}/${P}-patches-0.tar.xz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv sparc x86"
-IUSE="dmalloc ldap +libtirpc mount-locking sasl selinux systemd"
-
-# currently, sasl code assumes the presence of kerberosV
-RDEPEND="
- net-libs/libnsl:=
- >=sys-apps/util-linux-2.20
- dmalloc? ( dev-libs/dmalloc[threads] )
- ldap? (
- >=net-nds/openldap-2.0:=
- sasl? (
- dev-libs/cyrus-sasl
- dev-libs/libxml2
- virtual/krb5
- )
- )
- systemd? ( sys-apps/systemd )
- libtirpc? ( net-libs/libtirpc:= )
- !libtirpc? ( elibc_glibc? ( sys-libs/glibc[rpc(-)] ) )
-"
-DEPEND="${RDEPEND}
- libtirpc? ( net-libs/rpcsvc-proto )
-"
-BDEPEND="
- app-alternatives/lex
- virtual/pkgconfig
- app-alternatives/yacc
-"
-RDEPEND+=" selinux? ( sec-policy/selinux-automount )"
-
-PATCHES=(
- "${WORKDIR}"/${P}-patches/
- "${FILESDIR}/${P}-dmalloc.patch"
- "${FILESDIR}/${P}-nfsv4-mount.patch"
- "${FILESDIR}/${P}-mount_conflict.patch"
-)
-
-pkg_setup() {
- linux-info_pkg_setup
-
- local CONFIG_CHECK
-
- if kernel_is -ge 4 18; then
- CONFIG_CHECK="~AUTOFS_FS"
- else
- CONFIG_CHECK="~AUTOFS4_FS"
- fi
-
- check_extra_config
-}
-
-src_prepare() {
- sed -i -e "s:/usr/bin/kill:/bin/kill:" samples/autofs.service.in || die # bug #479492
- sed -i -e "/^EnvironmentFile/d" samples/autofs.service.in || die # bug #592334
-
- # Install samples including autofs.service
- sed -i -e "/^SUBDIRS/s/$/ samples/g" Makefile.rules || die
-
- default
-}
-
-src_configure() {
- # bug #483716
- tc-export AR
- # --with-confdir is for bug #361481
- # --with-mapdir is for bug #385113
- local myeconfargs=(
- --with-confdir=/etc/conf.d
- --with-mapdir=/etc/autofs
- $(use_with dmalloc)
- $(use_with ldap openldap)
- $(use_with libtirpc)
- $(use_with sasl)
- $(use_enable mount-locking)
- $(use_with systemd systemd $(systemd_get_systemunitdir)) # bug #479492
- --without-hesiod
- --disable-ext-env
- --enable-sloppy-mount # bug #453778
- --enable-force-shutdown
- --enable-ignore-busy
- RANLIB="$(type -P $(tc-getRANLIB))" # bug #483716
- )
-
- CONFIG_SHELL="${BROOT}/bin/bash" econf "${myeconfargs[@]}"
-}
-
-src_compile() {
- emake STRIP=: DONTSTRIP=1
-}
-
-src_install() {
- default
- rmdir "${D}"/run
-
- if kernel_is -lt 2 6 30; then
- # kernel patches
- docinto patches
- dodoc patches/${PN}4-2.6.??{,.?{,?}}-v5-update-????????.patch
- fi
- newinitd "${FILESDIR}"/autofs5.initd autofs
- insinto etc/autofs
- newins "${FILESDIR}"/autofs5-auto.master auto.master
-}
-
-pkg_postinst() {
- if kernel_is -lt 2 6 30; then
- elog "This version of ${PN} requires a kernel with autofs4 supporting"
- elog "protocol version 5.00. Patches for kernels older than 2.6.30 have"
- elog "been installed into"
- elog "${EROOT}/usr/share/doc/${P}/patches."
- elog "For further instructions how to patch the kernel, please refer to"
- elog "${EROOT}/usr/share/doc/${P}/INSTALL."
- elog
- fi
- elog "If you plan on using autofs for automounting remote NFS mounts,"
- elog "please check that both portmap (or rpcbind) and rpc.statd/lockd"
- elog "are running."
-}
diff --git a/net-fs/autofs/autofs-5.1.9.ebuild b/net-fs/autofs/autofs-5.1.9.ebuild
deleted file mode 100644
index f21b6430b76e..000000000000
--- a/net-fs/autofs/autofs-5.1.9.ebuild
+++ /dev/null
@@ -1,124 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit linux-info systemd toolchain-funcs
-
-DESCRIPTION="Kernel based automounter"
-HOMEPAGE="https://web.archive.org/web/*/http://www.linux-consulting.com/Amd_AutoFS/autofs.html https://git.kernel.org/pub/scm/linux/storage/autofs/autofs.git"
-SRC_URI="https://www.kernel.org/pub/linux/daemons/${PN}/v5/${P}.tar.xz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
-IUSE="dmalloc ldap +libtirpc mount-locking sasl selinux systemd"
-
-# currently, sasl code assumes the presence of kerberosV
-RDEPEND="
- net-libs/libnsl:=
- >=sys-apps/util-linux-2.20
- dmalloc? ( dev-libs/dmalloc[threads] )
- ldap? (
- >=net-nds/openldap-2.0:=
- sasl? (
- dev-libs/cyrus-sasl
- dev-libs/libxml2
- virtual/krb5
- )
- )
- systemd? ( sys-apps/systemd )
- libtirpc? ( net-libs/libtirpc:= )
- !libtirpc? ( elibc_glibc? ( sys-libs/glibc[rpc(-)] ) )
-"
-DEPEND="${RDEPEND}
- libtirpc? ( net-libs/rpcsvc-proto )
-"
-BDEPEND="
- app-alternatives/lex
- virtual/pkgconfig
- app-alternatives/yacc
-"
-RDEPEND+=" selinux? ( sec-policy/selinux-automount )"
-
-pkg_setup() {
- linux-info_pkg_setup
-
- local CONFIG_CHECK
-
- if kernel_is -ge 4 18; then
- CONFIG_CHECK="~AUTOFS_FS"
- else
- CONFIG_CHECK="~AUTOFS4_FS"
- fi
-
- check_extra_config
-}
-
-src_prepare() {
- sed -i -e "s:/usr/bin/kill:/bin/kill:" samples/autofs.service.in || die # bug #479492
- sed -i -e "/^EnvironmentFile/d" samples/autofs.service.in || die # bug #592334
-
- # Install samples including autofs.service
- sed -i -e "/^SUBDIRS/s/$/ samples/g" Makefile.rules || die
-
- default
-}
-
-src_configure() {
- # bug #483716
- tc-export AR
- # --with-confdir is for bug #361481
- # --with-mapdir is for bug #385113
- local myeconfargs=(
- --with-confdir=/etc/conf.d
- --with-mapdir=/etc/autofs
- $(use_with dmalloc)
- $(use_with ldap openldap)
- $(use_with libtirpc)
- $(use_with sasl)
- $(use_enable mount-locking)
- $(use_with systemd systemd $(systemd_get_systemunitdir)) # bug #479492
- --without-hesiod
- --disable-ext-env
- --enable-sloppy-mount # bug #453778
- --enable-force-shutdown
- --enable-ignore-busy
- RANLIB="$(type -P $(tc-getRANLIB))" # bug #483716
- )
-
- CONFIG_SHELL="${BROOT}/bin/bash" econf "${myeconfargs[@]}"
-}
-
-src_compile() {
- emake STRIP=: DONTSTRIP=1
-}
-
-src_install() {
- default
- rmdir "${D}"/run
-
- if kernel_is -lt 2 6 30; then
- # kernel patches
- docinto patches
- dodoc patches/${PN}4-2.6.??{,.?{,?}}-v5-update-????????.patch
- fi
- newinitd "${FILESDIR}"/autofs5.initd autofs
- insinto etc/autofs
- newins "${FILESDIR}"/autofs5-auto.master auto.master
-}
-
-pkg_postinst() {
- if kernel_is -lt 2 6 30; then
- elog "This version of ${PN} requires a kernel with autofs4 supporting"
- elog "protocol version 5.00. Patches for kernels older than 2.6.30 have"
- elog "been installed into"
- elog "${EROOT}/usr/share/doc/${P}/patches."
- elog "For further instructions how to patch the kernel, please refer to"
- elog "${EROOT}/usr/share/doc/${P}/INSTALL."
- elog
- fi
- elog "If you plan on using autofs for automounting remote NFS mounts,"
- elog "please check that both portmap (or rpcbind) and rpc.statd/lockd"
- elog "are running."
-}
diff --git a/net-fs/autofs/files/autofs-5.1.8-dmalloc.patch b/net-fs/autofs/files/autofs-5.1.8-dmalloc.patch
deleted file mode 100644
index e2ed58fb1766..000000000000
--- a/net-fs/autofs/files/autofs-5.1.8-dmalloc.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-diff --git a/include/mounts.h b/include/mounts.h
-index ddb7e4c..854e1fb 100644
---- a/include/mounts.h
-+++ b/include/mounts.h
-@@ -84,7 +84,7 @@ typedef void (*tree_free_t) (struct tree_node *n);
- struct tree_ops {
- tree_new_t new;
- tree_cmp_t cmp;
-- tree_free_t free;
-+ tree_free_t set_free;
- };
-
- typedef int (*tree_work_fn_t) (struct tree_node *n, void *ptr);
-diff --git a/lib/mounts.c b/lib/mounts.c
-index 4c86688..1e54a33 100644
---- a/lib/mounts.c
-+++ b/lib/mounts.c
-@@ -75,7 +75,7 @@ static void tree_mnt_free(struct tree_node *n);
- static struct tree_ops mnt_ops = {
- .new = tree_mnt_new,
- .cmp = tree_mnt_cmp,
-- .free = tree_mnt_free,
-+ .set_free = tree_mnt_free,
- };
- static struct tree_ops *tree_mnt_ops = &mnt_ops;
-
-@@ -86,7 +86,7 @@ static void tree_host_free(struct tree_node *n);
- static struct tree_ops host_ops = {
- .new = tree_host_new,
- .cmp = tree_host_cmp,
-- .free = tree_host_free,
-+ .set_free = tree_host_free,
- };
- static struct tree_ops *tree_host_ops = &host_ops;
-
-@@ -97,7 +97,7 @@ static void tree_mapent_free(struct tree_node *n);
- static struct tree_ops mapent_ops = {
- .new = tree_mapent_new,
- .cmp = tree_mapent_cmp,
-- .free = tree_mapent_free,
-+ .set_free = tree_mapent_free,
- };
- static struct tree_ops *tree_mapent_ops = &mapent_ops;
-
-@@ -1360,7 +1360,7 @@ void tree_free(struct tree_node *root)
- tree_free(root->right);
- if (root->left)
- tree_free(root->left);
-- ops->free(root);
-+ ops->set_free(root);
- }
-
- int tree_traverse_inorder(struct tree_node *n, tree_work_fn_t work, void *ptr)
diff --git a/net-fs/autofs/files/autofs-5.1.8-mount_conflict.patch b/net-fs/autofs/files/autofs-5.1.8-mount_conflict.patch
deleted file mode 100644
index e2a94bf82542..000000000000
--- a/net-fs/autofs/files/autofs-5.1.8-mount_conflict.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Avoid conflicts between sys/mount.h and linux/mount.h
-
-linux/fs.h includes linux/mount.h and this include file is unused so
-do not include it and avoid conflict too with glibc 2.36+ see [1]
-
-[1] https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
---- a/modules/parse_amd.c
-+++ b/modules/parse_amd.c
-@@ -27,7 +27,6 @@
- #include <sys/utsname.h>
- #include <netinet/in.h>
- #include <sys/mount.h>
--#include <linux/fs.h>
-
- #define MODULE_PARSE
- #include "automount.h"
---- a/modules/parse_sun.c
-+++ b/modules/parse_sun.c
-@@ -30,7 +30,6 @@
- #include <sys/utsname.h>
- #include <netinet/in.h>
- #include <sys/mount.h>
--#include <linux/fs.h>
-
- #define MODULE_PARSE
- #include "automount.h"
diff --git a/net-fs/autofs/files/autofs-5.1.8-nfsv4-mount.patch b/net-fs/autofs/files/autofs-5.1.8-nfsv4-mount.patch
deleted file mode 100644
index eb1bc6cb4241..000000000000
--- a/net-fs/autofs/files/autofs-5.1.8-nfsv4-mount.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-autofs-5.1.8 - fix nfsv4 only mounts should not use rpcbind
-
-From: Ian Kent <raven@xxxxxxxxxx>
-
-Commit 606795ecfaa1 ("autofs-5.1.7 - also require TCP_REQUESTED when
-setting NFS port" together with commit 26fb6b5408be) caused NFSv4 only
-mounts to also use rpcbind to probe availability which breaks the
-requirememt that this type of mount not use rpcbind at all.
-
-Fix this by treating fstype=nfs4 mounts as a special case which doesn't
-use rpcbind.
----
- CHANGELOG | 1 +
- include/replicated.h | 2 ++
- modules/mount_nfs.c | 13 +++++++------
- modules/replicated.c | 4 ++--
- 4 files changed, 12 insertions(+), 8 deletions(-)
-
-diff --git a/include/replicated.h b/include/replicated.h
-index 95ff1f0d..f889a56a 100644
---- a/include/replicated.h
-+++ b/include/replicated.h
-@@ -35,6 +35,8 @@
- #define NFS3_REQUESTED NFS3_SUPPORTED
- #define NFS4_REQUESTED NFS4_SUPPORTED
-
-+#define NFS4_ONLY_REQUESTED 0x0800
-+
- #define TCP_SUPPORTED 0x0001
- #define UDP_SUPPORTED 0x0002
- #define TCP_REQUESTED TCP_SUPPORTED
-diff --git a/modules/mount_nfs.c b/modules/mount_nfs.c
-index 0ab87dcf..feb5afcd 100644
---- a/modules/mount_nfs.c
-+++ b/modules/mount_nfs.c
-@@ -92,7 +92,7 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int
- mount_default_proto = defaults_get_mount_nfs_default_proto();
- vers = NFS_VERS_DEFAULT | NFS_PROTO_DEFAULT;
- if (strcmp(fstype, "nfs4") == 0)
-- vers = NFS4_VERS_DEFAULT | TCP_SUPPORTED;
-+ vers = NFS4_VERS_DEFAULT | TCP_SUPPORTED | NFS4_ONLY_REQUESTED;
- else if (mount_default_proto == 4)
- vers = vers | NFS4_VERS_DEFAULT;
-
-@@ -157,15 +157,16 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int
- } else {
- /* Is any version of NFSv4 in the options */
- if (_strncmp("vers=4", cp, 6) == 0 ||
-- _strncmp("nfsvers=4", cp, 9) == 0)
-- vers = NFS4_VERS_MASK | TCP_SUPPORTED;
-- else if (_strncmp("vers=3", cp, o_len) == 0 ||
-+ _strncmp("nfsvers=4", cp, 9) == 0) {
-+ vers &= ~(NFS_VERS_MASK);
-+ vers |= NFS4_VERS_MASK | TCP_SUPPORTED | NFS4_ONLY_REQUESTED;
-+ } else if (_strncmp("vers=3", cp, o_len) == 0 ||
- _strncmp("nfsvers=3", cp, o_len) == 0) {
-- vers &= ~(NFS4_VERS_MASK | NFS_VERS_MASK);
-+ vers &= ~(NFS4_VERS_MASK | NFS_VERS_MASK | NFS4_ONLY_REQUESTED);
- vers |= NFS3_REQUESTED;
- } else if (_strncmp("vers=2", cp, o_len) == 0 ||
- _strncmp("nfsvers=2", cp, o_len) == 0) {
-- vers &= ~(NFS4_VERS_MASK | NFS_VERS_MASK);
-+ vers &= ~(NFS4_VERS_MASK | NFS_VERS_MASK | NFS4_ONLY_REQUESTED);
- vers |= NFS2_REQUESTED;
- } else if (strstr(cp, "port=") == cp &&
- o_len - 5 < 25) {
-diff --git a/modules/replicated.c b/modules/replicated.c
-index 09075dd0..cdb7c617 100644
---- a/modules/replicated.c
-+++ b/modules/replicated.c
-@@ -291,7 +291,7 @@ static unsigned int get_nfs_info(unsigned logopt, struct host *host,
-
- rpc_info->proto = proto;
- if (port < 0) {
-- if ((version & NFS4_REQUESTED) && (version & TCP_REQUESTED))
-+ if (version & NFS4_REQUESTED && (version & NFS4_ONLY_REQUESTED))
- rpc_info->port = NFS_PORT;
- else
- port = 0;
-@@ -525,7 +525,7 @@ static int get_vers_and_cost(unsigned logopt, struct host *host,
- {
- struct conn_info pm_info, rpc_info;
- time_t timeout = RPC_TIMEOUT;
-- unsigned int supported, vers = (NFS_VERS_MASK | NFS4_VERS_MASK);
-+ unsigned int supported, vers = (NFS_VERS_MASK | NFS4_VERS_MASK | NFS4_ONLY_REQUESTED);
- int ret = 0;
-
- if (!check_address_proto(logopt, host, version))
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-fs/autofs/, net-fs/autofs/files/
@ 2022-01-12 1:46 Yixun Lan
0 siblings, 0 replies; 8+ messages in thread
From: Yixun Lan @ 2022-01-12 1:46 UTC (permalink / raw
To: gentoo-commits
commit: f56f52579b14217aecb24c2165cc317ec3b92c04
Author: Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 12 01:45:19 2022 +0000
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Wed Jan 12 01:46:13 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f56f5257
net-fs/autofs: restore 5.1.6 due to musl breakage
5.1.8 break net mount on ppc64-musl,
let's temporarily restore 5.1.6 for now
this effectively revert part of: 30f36210abdf
Bug: https://bugs.gentoo.org/831014
Package-Manager: Portage-3.0.30, Repoman-3.0.3
RepoMan-Options: --force
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
net-fs/autofs/Manifest | 1 +
net-fs/autofs/autofs-5.1.6-r2.ebuild | 128 +++++++++++++++++++++++++++
net-fs/autofs/files/autofs-5.1.6-glibc.patch | 110 +++++++++++++++++++++++
net-fs/autofs/files/autofs-5.1.6-musl.patch | 12 +++
net-fs/autofs/files/autofs-5.1.6-pid.patch | 14 +++
5 files changed, 265 insertions(+)
diff --git a/net-fs/autofs/Manifest b/net-fs/autofs/Manifest
index 364aa0a32804..503d31c38237 100644
--- a/net-fs/autofs/Manifest
+++ b/net-fs/autofs/Manifest
@@ -1,2 +1,3 @@
+DIST autofs-5.1.6.tar.xz 315316 BLAKE2B 0c5e2351462505c6de0b12e510f0c08a625a0235e1ff8eeaff825946c4530c258449d26aaf6a3794aa82a97e8860711226168f434dd31bfb8a4e70287beb3ca4 SHA512 dc8b2bd86c140905dd1bc461bfc469f92363d9c2687fe422e1e751cc7ad64c0733b011c80bf4840e510e5909176cd1a066968b9a5ba835b62c4cf27537863cf2
DIST autofs-5.1.8-patches-0.tar.xz 3476 BLAKE2B a7fb146542f9cb0a8e93240d9c3f68ff7b569f4dc0e829103ae67ced6d04e110331d320ff429f6e6af03b7265a068ee648738691cd637080cf976f441fe10444 SHA512 73023735bf269e3214e38a4841b6b3a1edff30e5d925a62d3ca9e841726835793c1e242804233e696e946e63720f522ceeb82f78449d3597d3d39b727f4b8d24
DIST autofs-5.1.8.tar.xz 327396 BLAKE2B 22ef626cc867c1ed4f1f859aebe2547c497c35dea712967de70158e85db590f5ffc26165e1479cfc64eb8070a9c43fd06b1570a82bd8bbbac70f2930e1841718 SHA512 6ee6283c0977c82848a654dc24745ee687f6916de441c3688fa91f67ca7295e632ee3808cc2358984a4b9f19841e6e1a91ab48aad6341ac8e63827fe8c32d223
diff --git a/net-fs/autofs/autofs-5.1.6-r2.ebuild b/net-fs/autofs/autofs-5.1.6-r2.ebuild
new file mode 100644
index 000000000000..c532b488d526
--- /dev/null
+++ b/net-fs/autofs/autofs-5.1.6-r2.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit linux-info systemd toolchain-funcs
+
+DESCRIPTION="Kernel based automounter"
+HOMEPAGE="https://web.archive.org/web/*/http://www.linux-consulting.com/Amd_AutoFS/autofs.html"
+SRC_URI="https://www.kernel.org/pub/linux/daemons/${PN}/v5/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 sparc x86"
+IUSE="dmalloc ldap +libtirpc mount-locking sasl systemd"
+
+# currently, sasl code assumes the presence of kerberosV
+RDEPEND="
+ net-libs/libnsl:=
+ >=sys-apps/util-linux-2.20
+ dmalloc? ( dev-libs/dmalloc[threads] )
+ ldap? ( >=net-nds/openldap-2.0
+ sasl? (
+ dev-libs/cyrus-sasl
+ dev-libs/libxml2
+ virtual/krb5
+ )
+ )
+ systemd? ( sys-apps/systemd )
+ libtirpc? ( net-libs/libtirpc )
+ !libtirpc? ( elibc_glibc? ( sys-libs/glibc[rpc(-)] ) )
+"
+DEPEND="${RDEPEND}
+ libtirpc? ( net-libs/rpcsvc-proto )
+"
+BDEPEND="
+ sys-devel/flex
+ virtual/pkgconfig
+ virtual/yacc
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}-glibc.patch"
+ "${FILESDIR}/${P}-musl.patch"
+ "${FILESDIR}/${P}-pid.patch"
+)
+
+pkg_setup() {
+ linux-info_pkg_setup
+
+ local CONFIG_CHECK
+
+ if kernel_is -ge 4 18; then
+ CONFIG_CHECK="~AUTOFS_FS"
+ else
+ CONFIG_CHECK="~AUTOFS4_FS"
+ fi
+
+ check_extra_config
+}
+
+src_prepare() {
+ sed -i -e "s:/usr/bin/kill:/bin/kill:" samples/autofs.service.in || die # bug #479492
+ sed -i -e "/^EnvironmentFile/d" samples/autofs.service.in || die # bug #592334
+
+ # Install samples including autofs.service
+ sed -i -e "/^SUBDIRS/s/$/ samples/g" Makefile.rules || die
+
+ default
+}
+
+src_configure() {
+ # bug #483716
+ tc-export AR
+ # --with-confdir is for bug #361481
+ # --with-mapdir is for bug #385113
+ local myeconfargs=(
+ --with-confdir=/etc/conf.d
+ --with-mapdir=/etc/autofs
+ $(use_with dmalloc)
+ $(use_with ldap openldap)
+ $(use_with libtirpc)
+ $(use_with sasl)
+ $(use_enable mount-locking)
+ $(use_with systemd systemd $(systemd_get_systemunitdir)) # bug #479492
+ --without-hesiod
+ --disable-ext-env
+ --enable-sloppy-mount # bug #453778
+ --enable-force-shutdown
+ --enable-ignore-busy
+ RANLIB="$(type -P $(tc-getRANLIB))" # bug #483716
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ export DONTSTRIP=1
+ default
+}
+
+src_install() {
+ default
+ rmdir "${D}"/run
+
+ if kernel_is -lt 2 6 30; then
+ # kernel patches
+ docinto patches
+ dodoc patches/${PN}4-2.6.??{,.?{,?}}-v5-update-????????.patch
+ fi
+ newinitd "${FILESDIR}"/autofs5.initd autofs
+ insinto etc/autofs
+ newins "${FILESDIR}"/autofs5-auto.master auto.master
+}
+
+pkg_postinst() {
+ if kernel_is -lt 2 6 30; then
+ elog "This version of ${PN} requires a kernel with autofs4 supporting"
+ elog "protocol version 5.00. Patches for kernels older than 2.6.30 have"
+ elog "been installed into"
+ elog "${EROOT}/usr/share/doc/${P}/patches."
+ elog "For further instructions how to patch the kernel, please refer to"
+ elog "${EROOT}/usr/share/doc/${P}/INSTALL."
+ elog
+ fi
+ elog "If you plan on using autofs for automounting remote NFS mounts,"
+ elog "please check that both portmap (or rpcbind) and rpc.statd/lockd"
+ elog "are running."
+}
diff --git a/net-fs/autofs/files/autofs-5.1.6-glibc.patch b/net-fs/autofs/files/autofs-5.1.6-glibc.patch
new file mode 100644
index 000000000000..338d885ae1e1
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.1.6-glibc.patch
@@ -0,0 +1,110 @@
+diff --git a/daemon/lookup.c b/daemon/lookup.c
+index 60a48f3..bbd65e0 100644
+--- a/daemon/lookup.c
++++ b/daemon/lookup.c
+@@ -382,7 +382,7 @@ static int read_file_source_instance(struct autofs_point *ap, struct map_source
+ if (!S_ISREG(st.st_mode))
+ return NSS_STATUS_NOTFOUND;
+
+- if (st.st_mode & __S_IEXEC)
++ if (st.st_mode & S_IEXEC)
+ type = src_prog;
+ else
+ type = src_file;
+@@ -937,7 +937,7 @@ static int lookup_name_file_source_instance(struct autofs_point *ap, struct map_
+ if (!S_ISREG(st.st_mode))
+ return NSS_STATUS_NOTFOUND;
+
+- if (st.st_mode & __S_IEXEC)
++ if (st.st_mode & S_IEXEC)
+ type = src_prog;
+ else
+ type = src_file;
+@@ -1113,7 +1113,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 4fd0ba9..7b855a7 100644
+--- a/include/automount.h
++++ b/include/automount.h
+@@ -13,6 +13,7 @@
+ #include <limits.h>
+ #include <time.h>
+ #include <syslog.h>
++#include <sys/procfs.h>
+ #include <sys/types.h>
+ #include <pthread.h>
+ #include <sched.h>
+@@ -142,6 +143,16 @@ struct autofs_point;
+ #define UMOUNT_RETRIES 8
+ #define EXPIRE_RETRIES 3
+
++#ifndef __SWORD_TYPE
++#if __WORDSIZE == 32
++# define __SWORD_TYPE int
++#elif __WORDSIZE == 64
++# define __SWORD_TYPE long int
++#else
++#error
++#endif
++#endif
++
+ static u_int32_t inline hash(const char *key, unsigned int size)
+ {
+ u_int32_t hashval;
+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/include/rpc_subs.h b/include/rpc_subs.h
+index 6e35eed..7ba4b93 100644
+--- a/include/rpc_subs.h
++++ b/include/rpc_subs.h
+@@ -18,7 +18,7 @@
+
+ #include <rpc/rpc.h>
+ #include <rpc/pmap_prot.h>
+-#include <nfs/nfs.h>
++#include <linux/nfs.h>
+ #include <linux/nfs2.h>
+ #include <linux/nfs3.h>
+
+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/net-fs/autofs/files/autofs-5.1.6-musl.patch b/net-fs/autofs/files/autofs-5.1.6-musl.patch
new file mode 100644
index 000000000000..bdcc0db9a9f3
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.1.6-musl.patch
@@ -0,0 +1,12 @@
+--- a/include/automount.h
++++ b/include/automount.h
+@@ -25,6 +25,9 @@
+ #include "list.h"
+
+ #include <linux/auto_fs4.h>
++#ifndef __GLIBC__
++#include <bits/reg.h>
++#endif
+
+ #include "defaults.h"
+ #include "state.h"
diff --git a/net-fs/autofs/files/autofs-5.1.6-pid.patch b/net-fs/autofs/files/autofs-5.1.6-pid.patch
new file mode 100644
index 000000000000..1766c34e989e
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.1.6-pid.patch
@@ -0,0 +1,14 @@
+diff --git a/include/log.h b/include/log.h
+index 69eed96..14051cc 100644
+--- a/include/log.h
++++ b/include/log.h
+@@ -46,6 +46,8 @@ extern void log_crit(unsigned, const char* msg, ...);
+ extern void log_debug(unsigned int, const char* msg, ...);
+ extern void logmsg(const char* msg, ...);
+
++#include <unistd.h> /* Required for pid_t */
++
+ extern pid_t log_pidinfo(struct autofs_point *ap, pid_t pid, char *label);
+
+ #define debug(opt, msg, args...) \
+
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-fs/autofs/, net-fs/autofs/files/
@ 2022-01-10 22:33 Yixun Lan
0 siblings, 0 replies; 8+ messages in thread
From: Yixun Lan @ 2022-01-10 22:33 UTC (permalink / raw
To: gentoo-commits
commit: 30f36210abdf309dbd48f6f4a66da56a9dc328e9
Author: Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 10 21:58:04 2022 +0000
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Mon Jan 10 22:31:21 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=30f36210
net-fs/autofs: cleanup old
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
net-fs/autofs/Manifest | 2 -
net-fs/autofs/autofs-5.1.6-r2.ebuild | 128 ---------------------
net-fs/autofs/autofs-5.1.7-r1.ebuild | 130 ----------------------
net-fs/autofs/files/autofs-5.1.6-glibc.patch | 110 ------------------
net-fs/autofs/files/autofs-5.1.6-musl.patch | 12 --
net-fs/autofs/files/autofs-5.1.6-pid.patch | 14 ---
net-fs/autofs/files/autofs-5.1.7-glibc-2.34.patch | 107 ------------------
net-fs/autofs/files/autofs-5.1.7-glibc.patch | 97 ----------------
8 files changed, 600 deletions(-)
diff --git a/net-fs/autofs/Manifest b/net-fs/autofs/Manifest
index c45ff7bcda9b..364aa0a32804 100644
--- a/net-fs/autofs/Manifest
+++ b/net-fs/autofs/Manifest
@@ -1,4 +1,2 @@
-DIST autofs-5.1.6.tar.xz 315316 BLAKE2B 0c5e2351462505c6de0b12e510f0c08a625a0235e1ff8eeaff825946c4530c258449d26aaf6a3794aa82a97e8860711226168f434dd31bfb8a4e70287beb3ca4 SHA512 dc8b2bd86c140905dd1bc461bfc469f92363d9c2687fe422e1e751cc7ad64c0733b011c80bf4840e510e5909176cd1a066968b9a5ba835b62c4cf27537863cf2
-DIST autofs-5.1.7.tar.xz 327752 BLAKE2B bff290048fb2849dd4c7099718f6824eac7e4f700909342f82b79a3baa752c4efe7f45be3492578fa15df6d959751be5d7fae5aafe129b52425c0d9ab19eaccc SHA512 cf994d0e68d5f6a5647235000743811a791150ece0a90ed9e1cb9bb131259f52769371c6a06d968b7191b10e709c9c90de611cc3ee310fbbea87f60034b3d4e1
DIST autofs-5.1.8-patches-0.tar.xz 3476 BLAKE2B a7fb146542f9cb0a8e93240d9c3f68ff7b569f4dc0e829103ae67ced6d04e110331d320ff429f6e6af03b7265a068ee648738691cd637080cf976f441fe10444 SHA512 73023735bf269e3214e38a4841b6b3a1edff30e5d925a62d3ca9e841726835793c1e242804233e696e946e63720f522ceeb82f78449d3597d3d39b727f4b8d24
DIST autofs-5.1.8.tar.xz 327396 BLAKE2B 22ef626cc867c1ed4f1f859aebe2547c497c35dea712967de70158e85db590f5ffc26165e1479cfc64eb8070a9c43fd06b1570a82bd8bbbac70f2930e1841718 SHA512 6ee6283c0977c82848a654dc24745ee687f6916de441c3688fa91f67ca7295e632ee3808cc2358984a4b9f19841e6e1a91ab48aad6341ac8e63827fe8c32d223
diff --git a/net-fs/autofs/autofs-5.1.6-r2.ebuild b/net-fs/autofs/autofs-5.1.6-r2.ebuild
deleted file mode 100644
index 616efb49c330..000000000000
--- a/net-fs/autofs/autofs-5.1.6-r2.ebuild
+++ /dev/null
@@ -1,128 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit linux-info systemd toolchain-funcs
-
-DESCRIPTION="Kernel based automounter"
-HOMEPAGE="https://web.archive.org/web/*/http://www.linux-consulting.com/Amd_AutoFS/autofs.html"
-SRC_URI="https://www.kernel.org/pub/linux/daemons/${PN}/v5/${P}.tar.xz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 sparc x86"
-IUSE="dmalloc ldap +libtirpc mount-locking sasl systemd"
-
-# currently, sasl code assumes the presence of kerberosV
-RDEPEND="
- net-libs/libnsl:=
- >=sys-apps/util-linux-2.20
- dmalloc? ( dev-libs/dmalloc[threads] )
- ldap? ( >=net-nds/openldap-2.0
- sasl? (
- dev-libs/cyrus-sasl
- dev-libs/libxml2
- virtual/krb5
- )
- )
- systemd? ( sys-apps/systemd )
- libtirpc? ( net-libs/libtirpc )
- !libtirpc? ( elibc_glibc? ( sys-libs/glibc[rpc(-)] ) )
-"
-DEPEND="${RDEPEND}
- libtirpc? ( net-libs/rpcsvc-proto )
-"
-BDEPEND="
- sys-devel/flex
- virtual/pkgconfig
- virtual/yacc
-"
-
-PATCHES=(
- "${FILESDIR}/${P}-glibc.patch"
- "${FILESDIR}/${P}-musl.patch"
- "${FILESDIR}/${P}-pid.patch"
-)
-
-pkg_setup() {
- linux-info_pkg_setup
-
- local CONFIG_CHECK
-
- if kernel_is -ge 4 18; then
- CONFIG_CHECK="~AUTOFS_FS"
- else
- CONFIG_CHECK="~AUTOFS4_FS"
- fi
-
- check_extra_config
-}
-
-src_prepare() {
- sed -i -e "s:/usr/bin/kill:/bin/kill:" samples/autofs.service.in || die # bug #479492
- sed -i -e "/^EnvironmentFile/d" samples/autofs.service.in || die # bug #592334
-
- # Install samples including autofs.service
- sed -i -e "/^SUBDIRS/s/$/ samples/g" Makefile.rules || die
-
- default
-}
-
-src_configure() {
- # bug #483716
- tc-export AR
- # --with-confdir is for bug #361481
- # --with-mapdir is for bug #385113
- local myeconfargs=(
- --with-confdir=/etc/conf.d
- --with-mapdir=/etc/autofs
- $(use_with dmalloc)
- $(use_with ldap openldap)
- $(use_with libtirpc)
- $(use_with sasl)
- $(use_enable mount-locking)
- $(use_with systemd systemd $(systemd_get_systemunitdir)) # bug #479492
- --without-hesiod
- --disable-ext-env
- --enable-sloppy-mount # bug #453778
- --enable-force-shutdown
- --enable-ignore-busy
- RANLIB="$(type -P $(tc-getRANLIB))" # bug #483716
- )
- econf "${myeconfargs[@]}"
-}
-
-src_compile() {
- export DONTSTRIP=1
- default
-}
-
-src_install() {
- default
- rmdir "${D}"/run
-
- if kernel_is -lt 2 6 30; then
- # kernel patches
- docinto patches
- dodoc patches/${PN}4-2.6.??{,.?{,?}}-v5-update-????????.patch
- fi
- newinitd "${FILESDIR}"/autofs5.initd autofs
- insinto etc/autofs
- newins "${FILESDIR}"/autofs5-auto.master auto.master
-}
-
-pkg_postinst() {
- if kernel_is -lt 2 6 30; then
- elog "This version of ${PN} requires a kernel with autofs4 supporting"
- elog "protocol version 5.00. Patches for kernels older than 2.6.30 have"
- elog "been installed into"
- elog "${EROOT}/usr/share/doc/${P}/patches."
- elog "For further instructions how to patch the kernel, please refer to"
- elog "${EROOT}/usr/share/doc/${P}/INSTALL."
- elog
- fi
- elog "If you plan on using autofs for automounting remote NFS mounts,"
- elog "please check that both portmap (or rpcbind) and rpc.statd/lockd"
- elog "are running."
-}
diff --git a/net-fs/autofs/autofs-5.1.7-r1.ebuild b/net-fs/autofs/autofs-5.1.7-r1.ebuild
deleted file mode 100644
index dc05275932e3..000000000000
--- a/net-fs/autofs/autofs-5.1.7-r1.ebuild
+++ /dev/null
@@ -1,130 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit linux-info systemd toolchain-funcs
-
-DESCRIPTION="Kernel based automounter"
-HOMEPAGE="https://web.archive.org/web/*/http://www.linux-consulting.com/Amd_AutoFS/autofs.html"
-SRC_URI="https://www.kernel.org/pub/linux/daemons/${PN}/v5/${P}.tar.xz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
-IUSE="dmalloc ldap +libtirpc mount-locking sasl systemd"
-
-# currently, sasl code assumes the presence of kerberosV
-RDEPEND="
- net-libs/libnsl:=
- >=sys-apps/util-linux-2.20
- dmalloc? ( dev-libs/dmalloc[threads] )
- ldap? ( >=net-nds/openldap-2.0
- sasl? (
- dev-libs/cyrus-sasl
- dev-libs/libxml2
- virtual/krb5
- )
- )
- systemd? ( sys-apps/systemd )
- libtirpc? ( net-libs/libtirpc )
- !libtirpc? ( elibc_glibc? ( sys-libs/glibc[rpc(-)] ) )
-"
-DEPEND="${RDEPEND}
- libtirpc? ( net-libs/rpcsvc-proto )
-"
-BDEPEND="
- sys-devel/flex
- virtual/pkgconfig
- virtual/yacc
-"
-
-PATCHES=(
- "${FILESDIR}/${P}-glibc.patch"
- "${FILESDIR}/${PN}-5.1.6-musl.patch"
- "${FILESDIR}/${PN}-5.1.6-pid.patch"
- "${FILESDIR}/${PN}-5.1.7-glibc-2.34.patch"
-)
-
-pkg_setup() {
- linux-info_pkg_setup
-
- local CONFIG_CHECK
-
- if kernel_is -ge 4 18; then
- CONFIG_CHECK="~AUTOFS_FS"
- else
- CONFIG_CHECK="~AUTOFS4_FS"
- fi
-
- check_extra_config
-}
-
-src_prepare() {
- sed -i -e "s:/usr/bin/kill:/bin/kill:" samples/autofs.service.in || die # bug #479492
- sed -i -e "/^EnvironmentFile/d" samples/autofs.service.in || die # bug #592334
-
- # Install samples including autofs.service
- sed -i -e "/^SUBDIRS/s/$/ samples/g" Makefile.rules || die
-
- default
-}
-
-src_configure() {
- # bug #483716
- tc-export AR
- # --with-confdir is for bug #361481
- # --with-mapdir is for bug #385113
- local myeconfargs=(
- --with-confdir=/etc/conf.d
- --with-mapdir=/etc/autofs
- $(use_with dmalloc)
- $(use_with ldap openldap)
- $(use_with libtirpc)
- $(use_with sasl)
- $(use_enable mount-locking)
- $(use_with systemd systemd $(systemd_get_systemunitdir)) # bug #479492
- --without-hesiod
- --disable-ext-env
- --enable-sloppy-mount # bug #453778
- --enable-force-shutdown
- --enable-ignore-busy
- RANLIB="$(type -P $(tc-getRANLIB))" # bug #483716
- )
-
- CONFIG_SHELL="${BROOT}/bin/bash" econf "${myeconfargs[@]}"
-}
-
-src_compile() {
- export DONTSTRIP=1
- default
-}
-
-src_install() {
- default
- rmdir "${D}"/run
-
- if kernel_is -lt 2 6 30; then
- # kernel patches
- docinto patches
- dodoc patches/${PN}4-2.6.??{,.?{,?}}-v5-update-????????.patch
- fi
- newinitd "${FILESDIR}"/autofs5.initd autofs
- insinto etc/autofs
- newins "${FILESDIR}"/autofs5-auto.master auto.master
-}
-
-pkg_postinst() {
- if kernel_is -lt 2 6 30; then
- elog "This version of ${PN} requires a kernel with autofs4 supporting"
- elog "protocol version 5.00. Patches for kernels older than 2.6.30 have"
- elog "been installed into"
- elog "${EROOT}/usr/share/doc/${P}/patches."
- elog "For further instructions how to patch the kernel, please refer to"
- elog "${EROOT}/usr/share/doc/${P}/INSTALL."
- elog
- fi
- elog "If you plan on using autofs for automounting remote NFS mounts,"
- elog "please check that both portmap (or rpcbind) and rpc.statd/lockd"
- elog "are running."
-}
diff --git a/net-fs/autofs/files/autofs-5.1.6-glibc.patch b/net-fs/autofs/files/autofs-5.1.6-glibc.patch
deleted file mode 100644
index 338d885ae1e1..000000000000
--- a/net-fs/autofs/files/autofs-5.1.6-glibc.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-diff --git a/daemon/lookup.c b/daemon/lookup.c
-index 60a48f3..bbd65e0 100644
---- a/daemon/lookup.c
-+++ b/daemon/lookup.c
-@@ -382,7 +382,7 @@ static int read_file_source_instance(struct autofs_point *ap, struct map_source
- if (!S_ISREG(st.st_mode))
- return NSS_STATUS_NOTFOUND;
-
-- if (st.st_mode & __S_IEXEC)
-+ if (st.st_mode & S_IEXEC)
- type = src_prog;
- else
- type = src_file;
-@@ -937,7 +937,7 @@ static int lookup_name_file_source_instance(struct autofs_point *ap, struct map_
- if (!S_ISREG(st.st_mode))
- return NSS_STATUS_NOTFOUND;
-
-- if (st.st_mode & __S_IEXEC)
-+ if (st.st_mode & S_IEXEC)
- type = src_prog;
- else
- type = src_file;
-@@ -1113,7 +1113,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 4fd0ba9..7b855a7 100644
---- a/include/automount.h
-+++ b/include/automount.h
-@@ -13,6 +13,7 @@
- #include <limits.h>
- #include <time.h>
- #include <syslog.h>
-+#include <sys/procfs.h>
- #include <sys/types.h>
- #include <pthread.h>
- #include <sched.h>
-@@ -142,6 +143,16 @@ struct autofs_point;
- #define UMOUNT_RETRIES 8
- #define EXPIRE_RETRIES 3
-
-+#ifndef __SWORD_TYPE
-+#if __WORDSIZE == 32
-+# define __SWORD_TYPE int
-+#elif __WORDSIZE == 64
-+# define __SWORD_TYPE long int
-+#else
-+#error
-+#endif
-+#endif
-+
- static u_int32_t inline hash(const char *key, unsigned int size)
- {
- u_int32_t hashval;
-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/include/rpc_subs.h b/include/rpc_subs.h
-index 6e35eed..7ba4b93 100644
---- a/include/rpc_subs.h
-+++ b/include/rpc_subs.h
-@@ -18,7 +18,7 @@
-
- #include <rpc/rpc.h>
- #include <rpc/pmap_prot.h>
--#include <nfs/nfs.h>
-+#include <linux/nfs.h>
- #include <linux/nfs2.h>
- #include <linux/nfs3.h>
-
-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/net-fs/autofs/files/autofs-5.1.6-musl.patch b/net-fs/autofs/files/autofs-5.1.6-musl.patch
deleted file mode 100644
index bdcc0db9a9f3..000000000000
--- a/net-fs/autofs/files/autofs-5.1.6-musl.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/include/automount.h
-+++ b/include/automount.h
-@@ -25,6 +25,9 @@
- #include "list.h"
-
- #include <linux/auto_fs4.h>
-+#ifndef __GLIBC__
-+#include <bits/reg.h>
-+#endif
-
- #include "defaults.h"
- #include "state.h"
diff --git a/net-fs/autofs/files/autofs-5.1.6-pid.patch b/net-fs/autofs/files/autofs-5.1.6-pid.patch
deleted file mode 100644
index 1766c34e989e..000000000000
--- a/net-fs/autofs/files/autofs-5.1.6-pid.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/include/log.h b/include/log.h
-index 69eed96..14051cc 100644
---- a/include/log.h
-+++ b/include/log.h
-@@ -46,6 +46,8 @@ extern void log_crit(unsigned, const char* msg, ...);
- extern void log_debug(unsigned int, const char* msg, ...);
- extern void logmsg(const char* msg, ...);
-
-+#include <unistd.h> /* Required for pid_t */
-+
- extern pid_t log_pidinfo(struct autofs_point *ap, pid_t pid, char *label);
-
- #define debug(opt, msg, args...) \
-
diff --git a/net-fs/autofs/files/autofs-5.1.7-glibc-2.34.patch b/net-fs/autofs/files/autofs-5.1.7-glibc-2.34.patch
deleted file mode 100644
index 8b0ddd75eb23..000000000000
--- a/net-fs/autofs/files/autofs-5.1.7-glibc-2.34.patch
+++ /dev/null
@@ -1,107 +0,0 @@
-https://src.fedoraproject.org/rpms/autofs/raw/rawhide/f/autofs-5.1.7-use-default-stack-size-for-threads.patch
-https://bugzilla.redhat.com/show_bug.cgi?id=1984813
-https://bugs.gentoo.org/803938
-
-autofs-5.1.7 - use default stack size for threads
-
-From: Ian Kent <raven@themaw.net>
-
-autofs uses PTHREAD_STACK_MIN to set the stack size for threads it
-creates.
-
-In two cases it is used to reduce the stack size for long running
-service threads while it's used to allocate a larger stack for worker
-threads that can have larger memory requirements.
-
-In recent glibc releases PTHREAD_STACK_MIN is no longer a constant
-which can lead to unexpectedly different stack sizes on different
-architectures and the autofs assumption it's a constant causes a
-compile failure.
-
-The need to alter the stack size was due to observed stack overflow
-which was thought to be due the thread stack being too small for autofs
-and glibc alloca(3) usage.
-
-Quite a bit of that alloca(3) usage has been eliminated from autofs now,
-particularly those that might be allocating largish amounts of storage,
-and there has been a lot of change in glibc too so using the thread
-default stack should be ok.
-
-Signed-off-by: Ian Kent <raven@themaw.net>
---- a/daemon/automount.c
-+++ b/daemon/automount.c
-@@ -84,7 +84,6 @@ static size_t kpkt_len;
- /* Attributes for creating detached and joinable threads */
- pthread_attr_t th_attr;
- pthread_attr_t th_attr_detached;
--size_t detached_thread_stack_size = PTHREAD_STACK_MIN * 144;
-
- struct master_readmap_cond mrc = {
- PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER, 0, NULL, 0, 0, 0, 0};
-@@ -2620,34 +2619,6 @@ int main(int argc, char *argv[])
- exit(1);
- }
-
--#ifdef _POSIX_THREAD_ATTR_STACKSIZE
-- if (pthread_attr_setstacksize(
-- &th_attr_detached, detached_thread_stack_size)) {
-- logerr("%s: failed to set stack size thread attribute!",
-- program);
-- if (start_pipefd[1] != -1) {
-- res = write(start_pipefd[1], pst_stat, sizeof(*pst_stat));
-- close(start_pipefd[1]);
-- }
-- release_flag_file();
-- macro_free_global_table();
-- exit(1);
-- }
--#endif
--
-- if (pthread_attr_getstacksize(
-- &th_attr_detached, &detached_thread_stack_size)) {
-- logerr("%s: failed to get detached thread stack size!",
-- program);
-- if (start_pipefd[1] != -1) {
-- res = write(start_pipefd[1], pst_stat, sizeof(*pst_stat));
-- close(start_pipefd[1]);
-- }
-- release_flag_file();
-- macro_free_global_table();
-- exit(1);
-- }
--
- info(logging, "Starting automounter version %s, master map %s",
- version, master_list->name);
- info(logging, "using kernel protocol version %d.%02d",
---- a/daemon/state.c
-+++ b/daemon/state.c
-@@ -1177,12 +1177,8 @@ int st_start_handler(void)
- status = pthread_attr_init(pattrs);
- if (status)
- pattrs = NULL;
-- else {
-+ else
- pthread_attr_setdetachstate(pattrs, PTHREAD_CREATE_DETACHED);
--#ifdef _POSIX_THREAD_ATTR_STACKSIZE
-- pthread_attr_setstacksize(pattrs, PTHREAD_STACK_MIN*4);
--#endif
-- }
-
- status = pthread_create(&thid, pattrs, st_queue_handler, NULL);
-
---- a/lib/alarm.c
-+++ b/lib/alarm.c
-@@ -270,12 +270,8 @@ int alarm_start_handler(void)
- status = pthread_attr_init(pattrs);
- if (status)
- pattrs = NULL;
-- else {
-+ else
- pthread_attr_setdetachstate(pattrs, PTHREAD_CREATE_DETACHED);
--#ifdef _POSIX_THREAD_ATTR_STACKSIZE
-- pthread_attr_setstacksize(pattrs, PTHREAD_STACK_MIN*4);
--#endif
-- }
-
- status = pthread_condattr_init(&condattrs);
- if (status)
diff --git a/net-fs/autofs/files/autofs-5.1.7-glibc.patch b/net-fs/autofs/files/autofs-5.1.7-glibc.patch
deleted file mode 100644
index 2a0f415fbee7..000000000000
--- a/net-fs/autofs/files/autofs-5.1.7-glibc.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-diff --git a/daemon/lookup.c b/daemon/lookup.c
-index 2fea0c0..3b3aa3e 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 1ae4078..c2e8dba 100644
---- a/include/automount.h
-+++ b/include/automount.h
-@@ -13,6 +13,7 @@
- #include <limits.h>
- #include <time.h>
- #include <syslog.h>
-+#include <sys/procfs.h>
- #include <sys/types.h>
- #include <pthread.h>
- #include <sched.h>
-@@ -42,6 +43,16 @@
- #include <dmalloc.h>
- #endif
-
-+#ifndef __SWORD_TYPE
-+#if __WORDSIZE == 32
-+# define __SWORD_TYPE int
-+#elif __WORDSIZE == 64
-+# define __SWORD_TYPE long int
-+#else
-+#error
-+#endif
-+#endif
-+
- #define ENABLE_CORES 1
-
- /* We MUST have the paths to mount(8) and umount(8) */
-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/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;
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-fs/autofs/, net-fs/autofs/files/
@ 2021-12-22 13:18 Yixun Lan
0 siblings, 0 replies; 8+ messages in thread
From: Yixun Lan @ 2021-12-22 13:18 UTC (permalink / raw
To: gentoo-commits
commit: f7586f437afc004fee03a1fdf586d6dd9b7db480
Author: Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 22 13:15:58 2021 +0000
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Wed Dec 22 13:17:52 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f7586f43
net-fs/autofs: fix nfsv4 mount issue
Closes: https://bugs.gentoo.org/827239
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
...{autofs-5.1.8.ebuild => autofs-5.1.8-r1.ebuild} | 1 +
net-fs/autofs/files/autofs-5.1.8-nfsv4-mount.patch | 88 ++++++++++++++++++++++
2 files changed, 89 insertions(+)
diff --git a/net-fs/autofs/autofs-5.1.8.ebuild b/net-fs/autofs/autofs-5.1.8-r1.ebuild
similarity index 98%
rename from net-fs/autofs/autofs-5.1.8.ebuild
rename to net-fs/autofs/autofs-5.1.8-r1.ebuild
index 3c519f852c70..d8aa892b214a 100644
--- a/net-fs/autofs/autofs-5.1.8.ebuild
+++ b/net-fs/autofs/autofs-5.1.8-r1.ebuild
@@ -45,6 +45,7 @@ PATCHES=(
"${FILESDIR}/${PN}-5.1.6-pid.patch"
"${FILESDIR}/${PN}-5.1.6-pid.patch"
"${FILESDIR}/${P}-dmalloc.patch"
+ "${FILESDIR}/${P}-nfsv4-mount.patch"
)
pkg_setup() {
diff --git a/net-fs/autofs/files/autofs-5.1.8-nfsv4-mount.patch b/net-fs/autofs/files/autofs-5.1.8-nfsv4-mount.patch
new file mode 100644
index 000000000000..eb1bc6cb4241
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.1.8-nfsv4-mount.patch
@@ -0,0 +1,88 @@
+autofs-5.1.8 - fix nfsv4 only mounts should not use rpcbind
+
+From: Ian Kent <raven@xxxxxxxxxx>
+
+Commit 606795ecfaa1 ("autofs-5.1.7 - also require TCP_REQUESTED when
+setting NFS port" together with commit 26fb6b5408be) caused NFSv4 only
+mounts to also use rpcbind to probe availability which breaks the
+requirememt that this type of mount not use rpcbind at all.
+
+Fix this by treating fstype=nfs4 mounts as a special case which doesn't
+use rpcbind.
+---
+ CHANGELOG | 1 +
+ include/replicated.h | 2 ++
+ modules/mount_nfs.c | 13 +++++++------
+ modules/replicated.c | 4 ++--
+ 4 files changed, 12 insertions(+), 8 deletions(-)
+
+diff --git a/include/replicated.h b/include/replicated.h
+index 95ff1f0d..f889a56a 100644
+--- a/include/replicated.h
++++ b/include/replicated.h
+@@ -35,6 +35,8 @@
+ #define NFS3_REQUESTED NFS3_SUPPORTED
+ #define NFS4_REQUESTED NFS4_SUPPORTED
+
++#define NFS4_ONLY_REQUESTED 0x0800
++
+ #define TCP_SUPPORTED 0x0001
+ #define UDP_SUPPORTED 0x0002
+ #define TCP_REQUESTED TCP_SUPPORTED
+diff --git a/modules/mount_nfs.c b/modules/mount_nfs.c
+index 0ab87dcf..feb5afcd 100644
+--- a/modules/mount_nfs.c
++++ b/modules/mount_nfs.c
+@@ -92,7 +92,7 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int
+ mount_default_proto = defaults_get_mount_nfs_default_proto();
+ vers = NFS_VERS_DEFAULT | NFS_PROTO_DEFAULT;
+ if (strcmp(fstype, "nfs4") == 0)
+- vers = NFS4_VERS_DEFAULT | TCP_SUPPORTED;
++ vers = NFS4_VERS_DEFAULT | TCP_SUPPORTED | NFS4_ONLY_REQUESTED;
+ else if (mount_default_proto == 4)
+ vers = vers | NFS4_VERS_DEFAULT;
+
+@@ -157,15 +157,16 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int
+ } else {
+ /* Is any version of NFSv4 in the options */
+ if (_strncmp("vers=4", cp, 6) == 0 ||
+- _strncmp("nfsvers=4", cp, 9) == 0)
+- vers = NFS4_VERS_MASK | TCP_SUPPORTED;
+- else if (_strncmp("vers=3", cp, o_len) == 0 ||
++ _strncmp("nfsvers=4", cp, 9) == 0) {
++ vers &= ~(NFS_VERS_MASK);
++ vers |= NFS4_VERS_MASK | TCP_SUPPORTED | NFS4_ONLY_REQUESTED;
++ } else if (_strncmp("vers=3", cp, o_len) == 0 ||
+ _strncmp("nfsvers=3", cp, o_len) == 0) {
+- vers &= ~(NFS4_VERS_MASK | NFS_VERS_MASK);
++ vers &= ~(NFS4_VERS_MASK | NFS_VERS_MASK | NFS4_ONLY_REQUESTED);
+ vers |= NFS3_REQUESTED;
+ } else if (_strncmp("vers=2", cp, o_len) == 0 ||
+ _strncmp("nfsvers=2", cp, o_len) == 0) {
+- vers &= ~(NFS4_VERS_MASK | NFS_VERS_MASK);
++ vers &= ~(NFS4_VERS_MASK | NFS_VERS_MASK | NFS4_ONLY_REQUESTED);
+ vers |= NFS2_REQUESTED;
+ } else if (strstr(cp, "port=") == cp &&
+ o_len - 5 < 25) {
+diff --git a/modules/replicated.c b/modules/replicated.c
+index 09075dd0..cdb7c617 100644
+--- a/modules/replicated.c
++++ b/modules/replicated.c
+@@ -291,7 +291,7 @@ static unsigned int get_nfs_info(unsigned logopt, struct host *host,
+
+ rpc_info->proto = proto;
+ if (port < 0) {
+- if ((version & NFS4_REQUESTED) && (version & TCP_REQUESTED))
++ if (version & NFS4_REQUESTED && (version & NFS4_ONLY_REQUESTED))
+ rpc_info->port = NFS_PORT;
+ else
+ port = 0;
+@@ -525,7 +525,7 @@ static int get_vers_and_cost(unsigned logopt, struct host *host,
+ {
+ struct conn_info pm_info, rpc_info;
+ time_t timeout = RPC_TIMEOUT;
+- unsigned int supported, vers = (NFS_VERS_MASK | NFS4_VERS_MASK);
++ unsigned int supported, vers = (NFS_VERS_MASK | NFS4_VERS_MASK | NFS4_ONLY_REQUESTED);
+ int ret = 0;
+
+ if (!check_address_proto(logopt, host, version))
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-fs/autofs/, net-fs/autofs/files/
@ 2021-05-21 1:07 Yixun Lan
0 siblings, 0 replies; 8+ messages in thread
From: Yixun Lan @ 2021-05-21 1:07 UTC (permalink / raw
To: gentoo-commits
commit: 0ec73cec03b0a344d2aa4dad638cac47219e3611
Author: Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Fri May 21 01:06:21 2021 +0000
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Fri May 21 01:06:36 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ec73cec
net-fs/autofs: fix musl build error
Closes: https://bugs.gentoo.org/791202
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
net-fs/autofs/autofs-5.1.6-r1.ebuild | 1 +
net-fs/autofs/autofs-5.1.7.ebuild | 1 +
net-fs/autofs/files/autofs-5.1.6-musl.patch | 12 ++++++++++++
3 files changed, 14 insertions(+)
diff --git a/net-fs/autofs/autofs-5.1.6-r1.ebuild b/net-fs/autofs/autofs-5.1.6-r1.ebuild
index 3422926b94d..743ec651949 100644
--- a/net-fs/autofs/autofs-5.1.6-r1.ebuild
+++ b/net-fs/autofs/autofs-5.1.6-r1.ebuild
@@ -38,6 +38,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}/${P}-glibc.patch"
+ "${FILESDIR}/${P}-musl.patch"
"${FILESDIR}/${P}-pid.patch"
)
diff --git a/net-fs/autofs/autofs-5.1.7.ebuild b/net-fs/autofs/autofs-5.1.7.ebuild
index 5dfef5feafa..5387d293f41 100644
--- a/net-fs/autofs/autofs-5.1.7.ebuild
+++ b/net-fs/autofs/autofs-5.1.7.ebuild
@@ -38,6 +38,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}/${P}-glibc.patch"
+ "${FILESDIR}/${PN}-5.1.6-musl.patch"
"${FILESDIR}/${PN}-5.1.6-pid.patch"
)
diff --git a/net-fs/autofs/files/autofs-5.1.6-musl.patch b/net-fs/autofs/files/autofs-5.1.6-musl.patch
new file mode 100644
index 00000000000..bdcc0db9a9f
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.1.6-musl.patch
@@ -0,0 +1,12 @@
+--- a/include/automount.h
++++ b/include/automount.h
+@@ -25,6 +25,9 @@
+ #include "list.h"
+
+ #include <linux/auto_fs4.h>
++#ifndef __GLIBC__
++#include <bits/reg.h>
++#endif
+
+ #include "defaults.h"
+ #include "state.h"
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-fs/autofs/, net-fs/autofs/files/
@ 2019-08-25 4:15 Matt Turner
0 siblings, 0 replies; 8+ messages in thread
From: Matt Turner @ 2019-08-25 4:15 UTC (permalink / raw
To: gentoo-commits
commit: 301a73b29a3dc0bb92055a27590be607eeb2291d
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 25 04:14:36 2019 +0000
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun Aug 25 04:15:26 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=301a73b2
net-fs/autofs: Drop old versions
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
net-fs/autofs/Manifest | 3 -
net-fs/autofs/autofs-5.1.2.ebuild | 121 ---------------------
net-fs/autofs/autofs-5.1.3.ebuild | 109 -------------------
net-fs/autofs/autofs-5.1.4.ebuild | 109 -------------------
net-fs/autofs/autofs-5.1.5-r1.ebuild | 114 -------------------
.../files/autofs-5.1.2-libtirpc-as-need.patch | 28 -----
6 files changed, 484 deletions(-)
diff --git a/net-fs/autofs/Manifest b/net-fs/autofs/Manifest
index 0fcd312e462..4685af6e6ed 100644
--- a/net-fs/autofs/Manifest
+++ b/net-fs/autofs/Manifest
@@ -1,4 +1 @@
-DIST autofs-5.1.2.tar.xz 294792 BLAKE2B eeecac768726a1b2d336908b48222c53b1ffbc9eeff7b7f597ccbf55214d35f0d99eaeaa1c065509fffa31ec86729bdd51be873e003aa1fb7d88a9e2ab04f4c8 SHA512 435bcb41c9d467947c194d879e46692b5976131b8e923793bdeac34f70420ede740c4d70ec393413fff0b1010495ac7fe5fa8b45a59d15a2430ecae9ec3fe7e1
-DIST autofs-5.1.3.tar.xz 300632 BLAKE2B 500325ec790304442e896208e94e25cf862621fc2354fa3c31fbf277dcc570d0b2b27894728d9f881efdcca262b1ef6e2c957cd23e2aea1d5b3cd2cd822c813b SHA512 d5363f4442be5258465140920a32cb63340c5da060ef2e66678f003d6a0c00579880837f0a04f59c7bce57d1cbc0f42bdd26546a2195f87e7bd46334c9e32e35
-DIST autofs-5.1.4.tar.xz 304864 BLAKE2B 7348aa1106554eb765919c765c0585b5d975d7a0ea036dec5b509711bf33cefd0f3e1e857a6865434adabbd1e323cfe8ffb09eb234495672e81101f79b8f4d0f SHA512 1ef48800a1e44d6bf7048923109f3b8299ef266ff0fbaf5f979c32f42c6c5e28620c1876f64b9d913fddb69244ff83226c01c666401ff6271dd6b53d31860589
DIST autofs-5.1.5.tar.xz 313476 BLAKE2B 9822f6eb6294a0ee14b08f7982bf6008eb9ac8a79f89cdf3ffa0ed234b83c932db1646fc5591269000372dbfb95ce1b9ded040f0724a7eb4b3888caf20f56a20 SHA512 c8138929a9e2cfa7e0096c1d490b9d7275d1d43a50f5f87ad457bdd9a49c7dd13a4aa5d86ab1e028d66dae630e1a1342661844e5775625fe585867f0f4778898
diff --git a/net-fs/autofs/autofs-5.1.2.ebuild b/net-fs/autofs/autofs-5.1.2.ebuild
deleted file mode 100644
index 902979caabd..00000000000
--- a/net-fs/autofs/autofs-5.1.2.ebuild
+++ /dev/null
@@ -1,121 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-AUTOTOOLS_AUTORECONF=true
-AUTOTOOLS_IN_SOURCE_BUILD=true
-
-inherit autotools-utils linux-info multilib systemd toolchain-funcs
-
-PATCH_VER=
-[[ -n ${PATCH_VER} ]] && \
- PATCHSET_URI="https://dev.gentoo.org/~jlec/distfiles/${P}-patches-${PATCH_VER}.tar.lzma"
-
-DESCRIPTION="Kernel based automounter"
-HOMEPAGE="http://www.linux-consulting.com/Amd_AutoFS/autofs.html"
-SRC_URI="
- mirror://kernel/linux/daemons/${PN}/v5/${P}.tar.xz
- ${PATCHSET_URI}"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86"
-IUSE="-dmalloc ldap +libtirpc mount-locking sasl"
-
-# USE="sasl" adds SASL support to the LDAP module which will not be build. If
-# SASL support should be available, please add "ldap" to the USE flags.
-REQUIRED_USE="sasl? ( ldap )"
-
-# currently, sasl code assumes the presence of kerberosV
-RDEPEND=">=sys-apps/util-linux-2.20
- dmalloc? ( dev-libs/dmalloc[threads] )
- ldap? ( >=net-nds/openldap-2.0
- sasl? (
- dev-libs/cyrus-sasl
- dev-libs/libxml2
- virtual/krb5
- )
- )
- libtirpc? ( net-libs/libtirpc )
- !libtirpc? ( elibc_glibc? ( sys-libs/glibc[rpc(-)] ) )
-"
-
-DEPEND="${RDEPEND}
- sys-devel/flex
- virtual/yacc
- libtirpc? ( net-libs/rpcsvc-proto )
-"
-
-CONFIG_CHECK="~AUTOFS4_FS"
-
-PATCHES=(
- "${FILESDIR}"/${P}-libtirpc-as-need.patch
-)
-
-src_prepare() {
- # Upstream's patchset
- if [[ -n ${PATCH_VER} ]]; then
- EPATCH_SUFFIX="patch" \
- epatch "${WORKDIR}"/patches
- fi
-
- sed -i -e "s:/usr/bin/kill:/bin/kill:" samples/autofs.service.in || die #bug #479492
- autotools-utils_src_prepare
-}
-
-src_configure() {
- # bug #483716
- tc-export AR
- # --with-confdir is for bug #361481
- # --with-mapdir is for bug #385113
- local myeconfargs=(
- --with-confdir=/etc/conf.d
- --with-mapdir=/etc/autofs
- $(use_with dmalloc)
- $(use_with ldap openldap)
- $(use_with libtirpc)
- $(use_with sasl)
- $(use_enable mount-locking)
- --without-hesiod
- --disable-ext-env
- --enable-sloppy-mount # bug #453778
- --enable-force-shutdown
- --enable-ignore-busy
- --with-systemd="$(systemd_get_unitdir)" #bug #479492
- RANLIB="$(type -P $(tc-getRANLIB))" # bug #483716
- )
- autotools-utils_src_configure
-}
-
-src_compile() {
- autotools-utils_src_compile DONTSTRIP=1
-}
-
-src_install() {
- autotools-utils_src_install
-
- if kernel_is -lt 2 6 30; then
- # kernel patches
- docinto patches
- dodoc patches/${PN}4-2.6.??{,.?{,?}}-v5-update-????????.patch
- fi
- newinitd "${FILESDIR}"/autofs5.initd autofs
- insinto etc/autofs
- newins "${FILESDIR}"/autofs5-auto.master auto.master
-}
-
-pkg_postinst() {
- if kernel_is -lt 2 6 30; then
- elog "This version of ${PN} requires a kernel with autofs4 supporting"
- elog "protocol version 5.00. Patches for kernels older than 2.6.30 have"
- elog "been installed into"
- elog "${EROOT}usr/share/doc/${P}/patches."
- elog "For further instructions how to patch the kernel, please refer to"
- elog "${EROOT}usr/share/doc/${P}/INSTALL."
- elog
- fi
- elog "If you plan on using autofs for automounting remote NFS mounts,"
- elog "please check that both portmap (or rpcbind) and rpc.statd/lockd"
- elog "are running."
-}
diff --git a/net-fs/autofs/autofs-5.1.3.ebuild b/net-fs/autofs/autofs-5.1.3.ebuild
deleted file mode 100644
index c09dd3334e1..00000000000
--- a/net-fs/autofs/autofs-5.1.3.ebuild
+++ /dev/null
@@ -1,109 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit linux-info multilib systemd toolchain-funcs
-
-PATCH_VER=
-[[ -n ${PATCH_VER} ]] && \
- PATCHSET_URI="https://dev.gentoo.org/~jlec/distfiles/${P}-patches-${PATCH_VER}.tar.lzma"
-
-DESCRIPTION="Kernel based automounter"
-HOMEPAGE="http://www.linux-consulting.com/Amd_AutoFS/autofs.html"
-SRC_URI="
- mirror://kernel/linux/daemons/${PN}/v5/${P}.tar.xz
- ${PATCHSET_URI}"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
-IUSE="-dmalloc ldap +libtirpc mount-locking sasl"
-
-# USE="sasl" adds SASL support to the LDAP module which will not be build. If
-# SASL support should be available, please add "ldap" to the USE flags.
-REQUIRED_USE="sasl? ( ldap )"
-
-# currently, sasl code assumes the presence of kerberosV
-RDEPEND=">=sys-apps/util-linux-2.20
- dmalloc? ( dev-libs/dmalloc[threads] )
- ldap? ( >=net-nds/openldap-2.0
- sasl? (
- dev-libs/cyrus-sasl
- dev-libs/libxml2
- virtual/krb5
- )
- )
- libtirpc? ( net-libs/libtirpc )
- !libtirpc? ( elibc_glibc? ( sys-libs/glibc[rpc(-)] ) )
-"
-DEPEND="${RDEPEND}
- sys-devel/flex
- virtual/yacc
- libtirpc? ( net-libs/rpcsvc-proto )
-"
-
-CONFIG_CHECK="~AUTOFS4_FS"
-
-src_prepare() {
- # Upstream's patchset
- if [[ -n ${PATCH_VER} ]]; then
- EPATCH_SUFFIX="patch" \
- epatch "${WORKDIR}"/patches
- fi
-
- sed -i -e "s:/usr/bin/kill:/bin/kill:" samples/autofs.service.in || die #bug #479492
- default
-}
-
-src_configure() {
- # bug #483716
- tc-export AR
- # --with-confdir is for bug #361481
- # --with-mapdir is for bug #385113
- local myeconfargs=(
- --with-confdir=/etc/conf.d
- --with-mapdir=/etc/autofs
- $(use_with dmalloc)
- $(use_with ldap openldap)
- $(use_with libtirpc)
- $(use_with sasl)
- $(use_enable mount-locking)
- --without-hesiod
- --disable-ext-env
- --enable-sloppy-mount # bug #453778
- --enable-force-shutdown
- --enable-ignore-busy
- --with-systemd="$(systemd_get_systemunitdir)" #bug #479492
- RANLIB="$(type -P $(tc-getRANLIB))" # bug #483716
- )
- econf "${myeconfargs[@]}"
-}
-
-src_install() {
- default
-
- if kernel_is -lt 2 6 30; then
- # kernel patches
- docinto patches
- dodoc patches/${PN}4-2.6.??{,.?{,?}}-v5-update-????????.patch
- fi
- newinitd "${FILESDIR}"/autofs5.initd autofs
- insinto etc/autofs
- newins "${FILESDIR}"/autofs5-auto.master auto.master
-}
-
-pkg_postinst() {
- if kernel_is -lt 2 6 30; then
- elog "This version of ${PN} requires a kernel with autofs4 supporting"
- elog "protocol version 5.00. Patches for kernels older than 2.6.30 have"
- elog "been installed into"
- elog "${EROOT}usr/share/doc/${P}/patches."
- elog "For further instructions how to patch the kernel, please refer to"
- elog "${EROOT}usr/share/doc/${P}/INSTALL."
- elog
- fi
- elog "If you plan on using autofs for automounting remote NFS mounts,"
- elog "please check that both portmap (or rpcbind) and rpc.statd/lockd"
- elog "are running."
-}
diff --git a/net-fs/autofs/autofs-5.1.4.ebuild b/net-fs/autofs/autofs-5.1.4.ebuild
deleted file mode 100644
index c09dd3334e1..00000000000
--- a/net-fs/autofs/autofs-5.1.4.ebuild
+++ /dev/null
@@ -1,109 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit linux-info multilib systemd toolchain-funcs
-
-PATCH_VER=
-[[ -n ${PATCH_VER} ]] && \
- PATCHSET_URI="https://dev.gentoo.org/~jlec/distfiles/${P}-patches-${PATCH_VER}.tar.lzma"
-
-DESCRIPTION="Kernel based automounter"
-HOMEPAGE="http://www.linux-consulting.com/Amd_AutoFS/autofs.html"
-SRC_URI="
- mirror://kernel/linux/daemons/${PN}/v5/${P}.tar.xz
- ${PATCHSET_URI}"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
-IUSE="-dmalloc ldap +libtirpc mount-locking sasl"
-
-# USE="sasl" adds SASL support to the LDAP module which will not be build. If
-# SASL support should be available, please add "ldap" to the USE flags.
-REQUIRED_USE="sasl? ( ldap )"
-
-# currently, sasl code assumes the presence of kerberosV
-RDEPEND=">=sys-apps/util-linux-2.20
- dmalloc? ( dev-libs/dmalloc[threads] )
- ldap? ( >=net-nds/openldap-2.0
- sasl? (
- dev-libs/cyrus-sasl
- dev-libs/libxml2
- virtual/krb5
- )
- )
- libtirpc? ( net-libs/libtirpc )
- !libtirpc? ( elibc_glibc? ( sys-libs/glibc[rpc(-)] ) )
-"
-DEPEND="${RDEPEND}
- sys-devel/flex
- virtual/yacc
- libtirpc? ( net-libs/rpcsvc-proto )
-"
-
-CONFIG_CHECK="~AUTOFS4_FS"
-
-src_prepare() {
- # Upstream's patchset
- if [[ -n ${PATCH_VER} ]]; then
- EPATCH_SUFFIX="patch" \
- epatch "${WORKDIR}"/patches
- fi
-
- sed -i -e "s:/usr/bin/kill:/bin/kill:" samples/autofs.service.in || die #bug #479492
- default
-}
-
-src_configure() {
- # bug #483716
- tc-export AR
- # --with-confdir is for bug #361481
- # --with-mapdir is for bug #385113
- local myeconfargs=(
- --with-confdir=/etc/conf.d
- --with-mapdir=/etc/autofs
- $(use_with dmalloc)
- $(use_with ldap openldap)
- $(use_with libtirpc)
- $(use_with sasl)
- $(use_enable mount-locking)
- --without-hesiod
- --disable-ext-env
- --enable-sloppy-mount # bug #453778
- --enable-force-shutdown
- --enable-ignore-busy
- --with-systemd="$(systemd_get_systemunitdir)" #bug #479492
- RANLIB="$(type -P $(tc-getRANLIB))" # bug #483716
- )
- econf "${myeconfargs[@]}"
-}
-
-src_install() {
- default
-
- if kernel_is -lt 2 6 30; then
- # kernel patches
- docinto patches
- dodoc patches/${PN}4-2.6.??{,.?{,?}}-v5-update-????????.patch
- fi
- newinitd "${FILESDIR}"/autofs5.initd autofs
- insinto etc/autofs
- newins "${FILESDIR}"/autofs5-auto.master auto.master
-}
-
-pkg_postinst() {
- if kernel_is -lt 2 6 30; then
- elog "This version of ${PN} requires a kernel with autofs4 supporting"
- elog "protocol version 5.00. Patches for kernels older than 2.6.30 have"
- elog "been installed into"
- elog "${EROOT}usr/share/doc/${P}/patches."
- elog "For further instructions how to patch the kernel, please refer to"
- elog "${EROOT}usr/share/doc/${P}/INSTALL."
- elog
- fi
- elog "If you plan on using autofs for automounting remote NFS mounts,"
- elog "please check that both portmap (or rpcbind) and rpc.statd/lockd"
- elog "are running."
-}
diff --git a/net-fs/autofs/autofs-5.1.5-r1.ebuild b/net-fs/autofs/autofs-5.1.5-r1.ebuild
deleted file mode 100644
index c7f1f39104f..00000000000
--- a/net-fs/autofs/autofs-5.1.5-r1.ebuild
+++ /dev/null
@@ -1,114 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit linux-info multilib systemd toolchain-funcs
-
-PATCH_VER=
-[[ -n ${PATCH_VER} ]] && \
- PATCHSET_URI="https://dev.gentoo.org/~jlec/distfiles/${P}-patches-${PATCH_VER}.tar.lzma"
-
-DESCRIPTION="Kernel based automounter"
-HOMEPAGE="http://www.linux-consulting.com/Amd_AutoFS/autofs.html"
-SRC_URI="
- mirror://kernel/linux/daemons/${PN}/v5/${P}.tar.xz
- ${PATCHSET_URI}"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
-IUSE="-dmalloc ldap +libtirpc mount-locking sasl systemd"
-
-# USE="sasl" adds SASL support to the LDAP module which will not be build. If
-# SASL support should be available, please add "ldap" to the USE flags.
-REQUIRED_USE="sasl? ( ldap )"
-
-# currently, sasl code assumes the presence of kerberosV
-RDEPEND=">=sys-apps/util-linux-2.20
- dmalloc? ( dev-libs/dmalloc[threads] )
- ldap? ( >=net-nds/openldap-2.0
- sasl? (
- dev-libs/cyrus-sasl
- dev-libs/libxml2
- virtual/krb5
- )
- )
- systemd? ( sys-apps/systemd )
- libtirpc? ( net-libs/libtirpc )
- !libtirpc? ( elibc_glibc? ( sys-libs/glibc[rpc(-)] ) )
-"
-DEPEND="${RDEPEND}
- sys-devel/flex
- virtual/yacc
- libtirpc? ( net-libs/rpcsvc-proto )
-"
-
-CONFIG_CHECK="~AUTOFS4_FS"
-
-src_prepare() {
- # Upstream's patchset
- if [[ -n ${PATCH_VER} ]]; then
- EPATCH_SUFFIX="patch" \
- epatch "${WORKDIR}"/patches
- fi
-
- sed -i -e "s:/usr/bin/kill:/bin/kill:" samples/autofs.service.in || die #bug #479492
-
- # need for install autofs.service
- sed -i -e "/^SUBDIRS/s/$/ samples/g" Makefile.rules || die
-
- default
-}
-
-src_configure() {
- # bug #483716
- tc-export AR
- # --with-confdir is for bug #361481
- # --with-mapdir is for bug #385113
- local myeconfargs=(
- --with-confdir=/etc/conf.d
- --with-mapdir=/etc/autofs
- $(use_with dmalloc)
- $(use_with ldap openldap)
- $(use_with libtirpc)
- $(use_with sasl)
- $(use_enable mount-locking)
- $(use_with systemd systemd $(systemd_get_systemunitdir)) #bug #479492
- --without-hesiod
- --disable-ext-env
- --enable-sloppy-mount # bug #453778
- --enable-force-shutdown
- --enable-ignore-busy
- RANLIB="$(type -P $(tc-getRANLIB))" # bug #483716
- )
- econf "${myeconfargs[@]}"
-}
-
-src_install() {
- default
-
- if kernel_is -lt 2 6 30; then
- # kernel patches
- docinto patches
- dodoc patches/${PN}4-2.6.??{,.?{,?}}-v5-update-????????.patch
- fi
- newinitd "${FILESDIR}"/autofs5.initd autofs
- insinto etc/autofs
- newins "${FILESDIR}"/autofs5-auto.master auto.master
-}
-
-pkg_postinst() {
- if kernel_is -lt 2 6 30; then
- elog "This version of ${PN} requires a kernel with autofs4 supporting"
- elog "protocol version 5.00. Patches for kernels older than 2.6.30 have"
- elog "been installed into"
- elog "${EROOT}/usr/share/doc/${P}/patches."
- elog "For further instructions how to patch the kernel, please refer to"
- elog "${EROOT}/usr/share/doc/${P}/INSTALL."
- elog
- fi
- elog "If you plan on using autofs for automounting remote NFS mounts,"
- elog "please check that both portmap (or rpcbind) and rpc.statd/lockd"
- elog "are running."
-}
diff --git a/net-fs/autofs/files/autofs-5.1.2-libtirpc-as-need.patch b/net-fs/autofs/files/autofs-5.1.2-libtirpc-as-need.patch
deleted file mode 100644
index f6e17697816..00000000000
--- a/net-fs/autofs/files/autofs-5.1.2-libtirpc-as-need.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Make configure compatible with -Wl,--as-needed following
-https://wiki.gentoo.org/wiki/Project:Quality_Assurance/As-needed#Failure_in_..2Fconfigure
-
-2016-07-05 Martin von Gagern
-
---- autofs-5.1.2.orig/aclocal.m4
-+++ autofs-5.1.2/aclocal.m4
-@@ -413,9 +413,9 @@ AC_DEFUN([AF_CHECK_LIBTIRPC],
- [
- # save current flags
- af_check_libtirpc_save_cflags="$CFLAGS"
--af_check_libtirpc_save_ldflags="$LDFLAGS"
-+af_check_libtirpc_save_libs="$LIBS"
- CFLAGS="$CFLAGS -I/usr/include/tirpc"
--LDFLAGS="$LDFLAGS -ltirpc"
-+LIBS="$LIBS -ltirpc"
-
- AC_TRY_LINK(
- [ #include <rpc/rpc.h> ],
-@@ -438,7 +438,7 @@ AC_CHECK_FUNCS([getrpcbyname getservbyna
-
- # restore flags
- CFLAGS="$af_check_libtirpc_save_cflags"
--LDFLAGS="$af_check_libtirpc_save_ldflags"
-+LIBS="$af_check_libtirpc_save_libs"
- ])
-
- AC_DEFUN([AF_WITH_LIBTIRPC],
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-fs/autofs/, net-fs/autofs/files/
@ 2016-07-05 23:21 Yixun Lan
0 siblings, 0 replies; 8+ messages in thread
From: Yixun Lan @ 2016-07-05 23:21 UTC (permalink / raw
To: gentoo-commits
commit: 1069c56a8946a005eadfaebc3c75ab6eceee1bed
Author: Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 5 23:19:20 2016 +0000
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Tue Jul 5 23:20:09 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1069c56a
net-fs/autofs: fix --as-need issue USE=libtirpc
thanks Martin von Gagern for reporting & the patch
http://wiki.gentoo.org/wiki/Project:Quality_Assurance/As-needed
Gentoo-Bug: 588106
Package-Manager: portage-2.3.0_rc1
net-fs/autofs/autofs-5.1.2.ebuild | 4 ++++
.../files/autofs-5.1.2-libtirpc-as-need.patch | 28 ++++++++++++++++++++++
2 files changed, 32 insertions(+)
diff --git a/net-fs/autofs/autofs-5.1.2.ebuild b/net-fs/autofs/autofs-5.1.2.ebuild
index 685e0bb..4fb3c61 100644
--- a/net-fs/autofs/autofs-5.1.2.ebuild
+++ b/net-fs/autofs/autofs-5.1.2.ebuild
@@ -47,6 +47,10 @@ DEPEND="${RDEPEND}
CONFIG_CHECK="~AUTOFS4_FS"
+PATCHES=(
+ "${FILESDIR}"/${P}-libtirpc-as-need.patch
+)
+
src_prepare() {
# Upstream's patchset
if [[ -n ${PATCH_VER} ]]; then
diff --git a/net-fs/autofs/files/autofs-5.1.2-libtirpc-as-need.patch b/net-fs/autofs/files/autofs-5.1.2-libtirpc-as-need.patch
new file mode 100644
index 0000000..f6e1769
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.1.2-libtirpc-as-need.patch
@@ -0,0 +1,28 @@
+Make configure compatible with -Wl,--as-needed following
+https://wiki.gentoo.org/wiki/Project:Quality_Assurance/As-needed#Failure_in_..2Fconfigure
+
+2016-07-05 Martin von Gagern
+
+--- autofs-5.1.2.orig/aclocal.m4
++++ autofs-5.1.2/aclocal.m4
+@@ -413,9 +413,9 @@ AC_DEFUN([AF_CHECK_LIBTIRPC],
+ [
+ # save current flags
+ af_check_libtirpc_save_cflags="$CFLAGS"
+-af_check_libtirpc_save_ldflags="$LDFLAGS"
++af_check_libtirpc_save_libs="$LIBS"
+ CFLAGS="$CFLAGS -I/usr/include/tirpc"
+-LDFLAGS="$LDFLAGS -ltirpc"
++LIBS="$LIBS -ltirpc"
+
+ AC_TRY_LINK(
+ [ #include <rpc/rpc.h> ],
+@@ -438,7 +438,7 @@ AC_CHECK_FUNCS([getrpcbyname getservbyna
+
+ # restore flags
+ CFLAGS="$af_check_libtirpc_save_cflags"
+-LDFLAGS="$af_check_libtirpc_save_ldflags"
++LIBS="$af_check_libtirpc_save_libs"
+ ])
+
+ AC_DEFUN([AF_WITH_LIBTIRPC],
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-07-10 14:56 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-17 5:24 [gentoo-commits] repo/gentoo:master commit in: net-fs/autofs/, net-fs/autofs/files/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2024-07-10 14:56 Yixun Lan
2022-01-12 1:46 Yixun Lan
2022-01-10 22:33 Yixun Lan
2021-12-22 13:18 Yixun Lan
2021-05-21 1:07 Yixun Lan
2019-08-25 4:15 Matt Turner
2016-07-05 23:21 Yixun Lan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox