summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDustin Polke <DuPol@gmx.de>2012-06-12 23:00:59 +0200
committerDustin Polke <DuPol@gmx.de>2012-06-12 23:00:59 +0200
commitbcb47605e148ae367b9735608d060ac8cf86c830 (patch)
tree810f916ded214a391bbacea59e4e5c19df493110
parent[net-fs/autofs] Crop ChangeLog to only contain overlay work and update email ... (diff)
downloadDuPol-bcb47605e148ae367b9735608d060ac8cf86c830.tar.gz
DuPol-bcb47605e148ae367b9735608d060ac8cf86c830.tar.bz2
DuPol-bcb47605e148ae367b9735608d060ac8cf86c830.zip
[net-fs/autofs] Bump upstream patchset, see bug #411509 for main tree inclusion.
-rw-r--r--net-fs/autofs/ChangeLog14
-rw-r--r--net-fs/autofs/Manifest16
-rw-r--r--net-fs/autofs/autofs-5.0.6-r6.ebuild115
-rw-r--r--net-fs/autofs/files/autofs-5.0.3-heimdal.patch35
-rw-r--r--net-fs/autofs/files/autofs-5.0.5-add-missing-endif-HAVE_SASL-in-modules-lookup_ldap.c.patch28
-rw-r--r--net-fs/autofs/files/autofs-5.0.5-fix-building-without-ldap.patch61
-rw-r--r--net-fs/autofs/files/autofs-5.0.5-fix-install-deadlink.patch12
-rw-r--r--net-fs/autofs/files/autofs-5.0.6-make-piddir-specifiable-by-user.patch42
-rw-r--r--net-fs/autofs/files/autofs-5.0.6-respect-user-flags-and-fix-asneeded-r2.patch158
-rw-r--r--net-fs/autofs/files/autofs-5.0.6-revert-ldap.patch18
-rw-r--r--net-fs/autofs/files/autofs5-auto.master24
-rw-r--r--net-fs/autofs/files/autofs5.initd70
-rw-r--r--net-fs/autofs/metadata.xml12
13 files changed, 598 insertions, 7 deletions
diff --git a/net-fs/autofs/ChangeLog b/net-fs/autofs/ChangeLog
index 30be774..f96b308 100644
--- a/net-fs/autofs/ChangeLog
+++ b/net-fs/autofs/ChangeLog
@@ -1,7 +1,19 @@
# ChangeLog for net-fs/autofs
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/net-fs/autofs/ChangeLog,v 1.90 2009/09/23 18:35:30 patrick Exp $
+*autofs-5.0.6-r6 (12 Jun 2012)
+
+ 12 Jun 2012; Dustin Polke <DuPol@gmx.de> +files/autofs-5.0.3-heimdal.patch,
+ +files/autofs-5.0.5-add-missing-endif-HAVE_SASL-in-modules-lookup_ldap.c.patc
+ h, +files/autofs-5.0.5-fix-building-without-ldap.patch,
+ +files/autofs-5.0.5-fix-install-deadlink.patch, +autofs-5.0.6-r6.ebuild,
+ +files/autofs-5.0.6-make-piddir-specifiable-by-user.patch,
+ +files/autofs-5.0.6-respect-user-flags-and-fix-asneeded-r2.patch,
+ +files/autofs5-auto.master, +files/autofs-5.0.6-revert-ldap.patch,
+ +files/autofs5.initd, metadata.xml:
+ Bump upstream patchset, see bug #411509 for main tree inclusion.
+
06 Apr 2011; Dustin Polke <DuPol@gmx.de>
-files/autofs-4.1.3-signal-race-fix.patch,
-files/autofs-4.1.4-clean-up-maps.patch,
diff --git a/net-fs/autofs/Manifest b/net-fs/autofs/Manifest
index 28b71a3..e345c11 100644
--- a/net-fs/autofs/Manifest
+++ b/net-fs/autofs/Manifest
@@ -1,2 +1,14 @@
-MISC ChangeLog 4611 RMD160 8b8be7ab3e127e139008029dac2b6cc7b3583fac SHA1 06a77cdd6b6a194a8181fcc2a7bc523b098005d7 SHA256 b5d357d1929c0fe3e3b19c3d392e377954530ee80b848e2bc062df0fb2fc3cb4
-MISC metadata.xml 564 RMD160 b3a128fb8fe09f533953f16368c359e5249c5a00 SHA1 467c052136663adcd740b2c0368325a8429b8b9d SHA256 1fd6d7e83849c9817e2b9e49b29805eaf1d22c5f8cace024f9229978e137d2ba
+AUX autofs-5.0.3-heimdal.patch 1380 RMD160 ed40e452a7648aec1b25e1002c99929be97b8bf9 SHA1 3f7d05c14e52a9a8160a43a38a7b736bb81bb68b SHA256 ca62546abf6b6ae2ed95f53d439d25770f20e70651fdaf5a0edf9d69920b108a
+AUX autofs-5.0.5-add-missing-endif-HAVE_SASL-in-modules-lookup_ldap.c.patch 756 RMD160 d63b92f33cc9d1725211c3450de603ba6b55c63b SHA1 1a8c07f429734378d0d55bc180ec014363d8a5a9 SHA256 0917780bf6f9be61d523535e42bcdcc460810d6f06b5b505230801f7a549efb4
+AUX autofs-5.0.5-fix-building-without-ldap.patch 947 RMD160 ac52bd81ec96baa16926e2667dae233d853e0cfc SHA1 008af3a5206e6db116163fed2871e738897161ef SHA256 621f308606de8435be6e3c3eff2f599d5b166ae6404626376a86dfcc1f72b6eb
+AUX autofs-5.0.5-fix-install-deadlink.patch 544 RMD160 1fc3e01015a0b18e90a41754654ca6b7b1f3f30c SHA1 6170d1f7cd2ba88063967154b92d2ef67d760160 SHA256 48393e00ddb51c5b0588ea45711abb16bf256c487c584062bc3de59b30bae053
+AUX autofs-5.0.6-make-piddir-specifiable-by-user.patch 1014 RMD160 55747c2a65237b5653f90bd788875f9b82438b22 SHA1 5a4b9ffcee4c7b57a7f294d504c96d7becee3ce8 SHA256 225aeb0f26509029c41fac959417e60eb415a646dfb00626b64b5fc446aeae95
+AUX autofs-5.0.6-respect-user-flags-and-fix-asneeded-r2.patch 4154 RMD160 477cb9e39852e523a3e2f57e8435980b466ad216 SHA1 2823999eacee903188106527bc92ae5138ba73e0 SHA256 32d1f9fc9b2488df5f7692cf307016d84ea179a8629eb47f3fe7e1f1c1240f2c
+AUX autofs-5.0.6-revert-ldap.patch 512 RMD160 00c5e2daac4a8b2ef0a8797158e7b38d1fe6b7a1 SHA1 34044dfdc91ea16a323fe0641dba3d1999d052a4 SHA256 67e4f23d0c1ef771f861ec295a2780d9c09b37d26718c21e3f20d3b4936738e9
+AUX autofs5-auto.master 756 RMD160 ef587371fbaab6fb119128acfe17e66b37bcb434 SHA1 543c21a7e54bcf00e35c1a8c981a908ea3403a9e SHA256 8651b42b338ffdb8be24ed88893ca90f95d0221f2684274957de154fd89df5cb
+AUX autofs5.initd 1665 RMD160 0e31984cc5721f92a981887c58e06539f193b38b SHA1 0b9be96783798d474ebf35408d221e7af34ffa35 SHA256 52ce5649ead901659b51409f583276e53f5221b1eceb8d39a98e0c07df5271da
+DIST autofs-5.0.6-patches-2.tar.lzma 56640 RMD160 82d05b57c2545e18320dd67653eda8154d016360 SHA1 2200bae43ff6be548e20db11b0a1ce67a3562da3 SHA256 1dbbba450842c62a81c9ee9ca58e84b057f9b31eb7a29440e51e000dffc8ffff
+DIST autofs-5.0.6.tar.bz2 311857 RMD160 1bbd94f887df4a90f379d98795fd009ef08840c3 SHA1 8c323e4327e98cbbcefc40883763e30814df9b44 SHA256 125b439a311939f247936ad697bc53b11a8e694aaff8ddf44a9fd7fa850e692c
+EBUILD autofs-5.0.6-r6.ebuild 3689 RMD160 c0b7ef04c297d978d9ed9d37bc98c9374576ddc3 SHA1 ae44b7d9564508bbd2615aff0e84ce8d0de722ce SHA256 92ee3ef1b9b68e0bb3f94b5e3fdee3ee4f09fa1109789786d9454ffcc94bf2cd
+MISC ChangeLog 5238 RMD160 bb578dd515882f79df649828d5a0861555434dcf SHA1 53b4a24615274f52bcbb16b485ff20343c774abc SHA256 596a3d2d30da45769d88caae6172916cafbdbfceebb041cd175417c6c6a70148
+MISC metadata.xml 808 RMD160 5ee0fff9d2693b647f10ad4a5bd9962289ca1429 SHA1 e68e035572b559489fadacc0fc1df4749d88de4e SHA256 27f971446823d8ca65276ccc736268e2f5a0cfde4b3083e4420829ef73b0117e
diff --git a/net-fs/autofs/autofs-5.0.6-r6.ebuild b/net-fs/autofs/autofs-5.0.6-r6.ebuild
new file mode 100644
index 0000000..7b9c133
--- /dev/null
+++ b/net-fs/autofs/autofs-5.0.6-r6.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/autofs/autofs-5.0.6-r5.ebuild,v 1.1 2011/12/17 03:45:15 pva Exp $
+
+EAPI="4"
+inherit eutils multilib autotools linux-info
+
+DESCRIPTION="Kernel based automounter"
+HOMEPAGE="http://www.linux-consulting.com/Amd_AutoFS/autofs.html"
+PATCH_VER="2"
+[[ -n ${PATCH_VER} ]] && \
+ PATCHSET_URI="http://home.arcor.de/dpolke/distfiles/${P}-patches-${PATCH_VER}.tar.lzma"
+SRC_URI="mirror://kernel/linux/daemons/${PN}/v5/${P}.tar.bz2
+ ${PATCHSET_URI}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="hesiod ldap 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="
+ hesiod? ( net-dns/hesiod )
+ ldap? ( >=net-nds/openldap-2.0
+ sasl? ( dev-libs/cyrus-sasl
+ dev-libs/libxml2
+ virtual/krb5 ) )"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ virtual/yacc"
+
+src_prepare() {
+ # Upstream's patchset
+ if [[ -n ${PATCH_VER} ]]; then
+ EPATCH_SUFFIX="patch" \
+ epatch "${WORKDIR}"/patches
+ fi
+
+ # Fix for bug #210762
+ # Upstream reference: http://thread.gmane.org/gmane.linux.kernel.autofs/4203
+ epatch "${FILESDIR}"/${PN}-5.0.3-heimdal.patch
+
+ # Accumulated fixes for bugs
+ # #154797: Respect CC and CFLAGS
+ # #253412: Respect LDFLAGS
+ # #247969: Link order for --as-needed
+ epatch "${FILESDIR}"/${P}-respect-user-flags-and-fix-asneeded-r2.patch
+
+ # Upstream reference: http://thread.gmane.org/gmane.linux.kernel.autofs/5371
+ epatch "${FILESDIR}"/${PN}-5.0.5-fix-install-deadlink.patch
+
+ # Upstream reference: http://thread.gmane.org/gmane.linux.kernel.autofs/6039
+ # Disable LDAP specific code if USE="-ldap", let's see what upstream says...
+ epatch "${FILESDIR}"/${PN}-5.0.5-fix-building-without-ldap.patch
+
+ # https://bugs.gentoo.org/show_bug.cgi?id=361899
+ epatch "${FILESDIR}"/${PN}-5.0.5-add-missing-endif-HAVE_SASL-in-modules-lookup_ldap.c.patch
+
+ # https://bugs.gentoo.org/show_bug.cgi?id=381315
+ epatch "${FILESDIR}"/${P}-revert-ldap.patch
+ eautoreconf
+}
+
+src_configure() {
+ # work around bug #355975 (mount modifies timestamp of /etc/mtab)
+ # with >=sys-apps/util-linux-2.19,
+ addpredict "/etc/mtab"
+
+ # --with-confdir is for bug #361481
+ # --with-mapdir is for bug #385113
+ # for systemd support (not enabled yet):
+ # --with-systemd
+ # --disable-move-mount: requires kernel >=2.6.39
+ econf \
+ --with-confdir=/etc/conf.d \
+ --with-mapdir=/etc/autofs \
+ $(use_with ldap openldap) \
+ $(use_with sasl) \
+ $(use_with hesiod) \
+ $(use_enable mount-locking) \
+ --enable-ignore-busy
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc README* CHANGELOG CREDITS COPYRIGHT INSTALL
+
+ # kernel patches
+ docinto patches
+ dodoc patches/${PN}4-2.6.??{,.?{,?}}-v5-update-????????.patch
+
+ 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.0.3-heimdal.patch b/net-fs/autofs/files/autofs-5.0.3-heimdal.patch
new file mode 100644
index 0000000..707364d
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.3-heimdal.patch
@@ -0,0 +1,35 @@
+--- autofs-5.0.3.orig/modules/cyrus-sasl.c 2008-04-28 16:17:03.000000000 +0200
++++ autofs-5.0.3/modules/cyrus-sasl.c 2008-04-28 16:41:58.000000000 +0200
+@@ -66,6 +66,15 @@
+ #endif
+ #endif
+
++/**
++ * The type of a principal is different for MIT Krb5 and Heimdal.
++ * These macros are provided by Heimdal, and introduced here for MIT.
++ */
++#ifndef krb5_realm_length
++#define krb5_realm_length(r) ((r).length)
++#define krb5_realm_data(r) ((r).data)
++#endif
++
+ /*
+ * Once a krb5 credentials cache is setup, we need to set the KRB5CCNAME
+ * environment variable so that the library knows where to find it.
+@@ -452,11 +461,11 @@
+
+ /* setup a principal for the ticket granting service */
+ ret = krb5_build_principal_ext(ctxt->krb5ctxt, &tgs_princ,
+- krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)->length,
+- krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)->data,
++ krb5_realm_length(*krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)),
++ krb5_realm_data(*krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)),
+ strlen(KRB5_TGS_NAME), KRB5_TGS_NAME,
+- krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)->length,
+- krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)->data,
++ krb5_realm_length(*krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)),
++ krb5_realm_data(*krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)),
+ 0);
+ if (ret) {
+ error(logopt,
+
diff --git a/net-fs/autofs/files/autofs-5.0.5-add-missing-endif-HAVE_SASL-in-modules-lookup_ldap.c.patch b/net-fs/autofs/files/autofs-5.0.5-add-missing-endif-HAVE_SASL-in-modules-lookup_ldap.c.patch
new file mode 100644
index 0000000..4d70d2a
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.5-add-missing-endif-HAVE_SASL-in-modules-lookup_ldap.c.patch
@@ -0,0 +1,28 @@
+--- ./modules/lookup_ldap.c
++++ ./modules/lookup_ldap.c
+@@ -591,10 +591,12 @@ static LDAP *do_connect(unsigned logopt, const char *uri, struct lookup_context
+ {
+ LDAP *ldap;
+
++#ifdef HAVE_SASL
+ if (ctxt->extern_cert && ctxt->extern_key) {
+ set_env(logopt, ENV_LDAPTLS_CERT, ctxt->extern_cert);
+ set_env(logopt, ENV_LDAPTLS_KEY, ctxt->extern_key);
+ }
++#endif
+
+ ldap = init_ldap_connection(logopt, uri, ctxt);
+ if (ldap) {
+@@ -1372,10 +1374,12 @@ static void free_context(struct lookup_context *ctxt)
+ defaults_free_searchdns(ctxt->sdns);
+ if (ctxt->dclist)
+ free_dclist(ctxt->dclist);
++#ifdef HAVE_SASL
+ if (ctxt->extern_cert)
+ free(ctxt->extern_cert);
+ if (ctxt->extern_key)
+ free(ctxt->extern_key);
++#endif
+ free(ctxt);
+
+ return;
diff --git a/net-fs/autofs/files/autofs-5.0.5-fix-building-without-ldap.patch b/net-fs/autofs/files/autofs-5.0.5-fix-building-without-ldap.patch
new file mode 100644
index 0000000..8086961
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.5-fix-building-without-ldap.patch
@@ -0,0 +1,61 @@
+=== modified file 'lib/defaults.c'
+--- lib/defaults.c 2011-04-30 18:13:36 +0000
++++ lib/defaults.c 2011-04-30 18:12:37 +0000
+@@ -19,7 +19,10 @@
+
+ #include "list.h"
+ #include "defaults.h"
++#include "config.h"
++#ifdef WITH_LDAP
+ #include "lookup_ldap.h"
++#endif
+ #include "log.h"
+ #include "automount.h"
+
+@@ -197,6 +200,7 @@
+ return 1;
+ }
+
++#ifdef WITH_LDAP
+ void defaults_free_uris(struct list_head *list)
+ {
+ struct list_head *next;
+@@ -252,9 +256,11 @@
+
+ return 1;
+ }
++#endif
+
+ struct list_head *defaults_get_uris(void)
+ {
++#ifdef WITH_LDAP
+ FILE *f;
+ char buf[MAX_LINE_LEN];
+ char *res;
+@@ -288,6 +294,9 @@
+
+ fclose(f);
+ return list;
++#else
++ return NULL;
++#endif
+ }
+
+ /*
+@@ -450,6 +459,7 @@
+ return res;
+ }
+
++#ifdef WITH_LDAP
+ struct ldap_schema *defaults_get_default_schema(void)
+ {
+ struct ldap_schema *schema;
+@@ -645,6 +655,7 @@
+
+ return schema;
+ }
++#endif
+
+ unsigned int defaults_get_mount_nfs_default_proto(void)
+ {
+
diff --git a/net-fs/autofs/files/autofs-5.0.5-fix-install-deadlink.patch b/net-fs/autofs/files/autofs-5.0.5-fix-install-deadlink.patch
new file mode 100644
index 0000000..8ab10fc
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.5-fix-install-deadlink.patch
@@ -0,0 +1,12 @@
+--- modules/Makefile.old 2010-06-19 20:43:45.373371321 +0200
++++ modules/Makefile 2010-06-19 20:45:26.062417092 +0200
+@@ -63,7 +63,9 @@ install: all
+ -rm -f $(INSTALLROOT)$(autofslibdir)/mount_smbfs.so
+ ln -fs lookup_file.so $(INSTALLROOT)$(autofslibdir)/lookup_files.so
+ ln -fs lookup_yp.so $(INSTALLROOT)$(autofslibdir)/lookup_nis.so
++ifeq ($(SASL), 1)
+ ln -fs lookup_ldap.so $(INSTALLROOT)$(autofslibdir)/lookup_ldaps.so
++endif
+ ln -fs mount_nfs.so $(INSTALLROOT)$(autofslibdir)/mount_nfs4.so
+ ifeq ($(EXT2FS), 1)
+ ifeq ($(EXT3FS), 1)
diff --git a/net-fs/autofs/files/autofs-5.0.6-make-piddir-specifiable-by-user.patch b/net-fs/autofs/files/autofs-5.0.6-make-piddir-specifiable-by-user.patch
new file mode 100644
index 0000000..32b5b79
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.6-make-piddir-specifiable-by-user.patch
@@ -0,0 +1,42 @@
+From 584468f3c8eb5574811b67cd4a3f0b8736a3d99c Mon Sep 17 00:00:00 2001
+From: Dustin Polke <dustin.polke@uni-siegen.de>
+Date: Thu, 15 Dec 2011 21:35:21 +0100
+Subject: [PATCH] autofs-5.0.6 - make piddir specifiable by user
+
+Let the user specify where to put pid files. This is helpful if /var/run
+and /run exist and the user wants to supersede the use of /run by
+/var/run.
+---
+ configure.in | 15 +++++++++++++++
+ 1 files changed, 15 insertions(+), 0 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 05ee67f..d2cd73a 100644
+--- a/configure.in
++++ b/configure.in
+@@ -43,7 +43,22 @@ AF_LINUX_PROCFS()
+ #
+ AF_INIT_D()
+ AC_SUBST(initdir)
++
++#
++# Location of pid file directory?
++#
+ AF_PID_D()
++AC_ARG_WITH(piddir,
++[ --with-piddir=DIR use DIR for autofs pid file directory],
++ if test -z "$withval" -o "$withval" = "yes" -o "$withval" = "no"
++ then
++ :
++ else
++ piddir="${withval}"
++ fi
++)
++AC_MSG_CHECKING([for autofs pid file directory])
++AC_MSG_RESULT([$piddir])
+ AC_SUBST(piddir)
+
+ #
+--
+1.7.3.4
+
diff --git a/net-fs/autofs/files/autofs-5.0.6-respect-user-flags-and-fix-asneeded-r2.patch b/net-fs/autofs/files/autofs-5.0.6-respect-user-flags-and-fix-asneeded-r2.patch
new file mode 100644
index 0000000..21d74be
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.6-respect-user-flags-and-fix-asneeded-r2.patch
@@ -0,0 +1,158 @@
+--- a/Makefile.conf.in
++++ b/Makefile.conf.in
+@@ -100,3 +100,6 @@ initdir = @initdir@
+
+ # Location of systemd unit files
+ systemddir = @systemddir@
++
++# Use the compiler determined by configure
++CC := @CC@
+--- a/Makefile.rules
++++ b/Makefile.rules
+@@ -16,44 +16,34 @@ INSTALLROOT = $(DESTDIR)
+ AUTOFS_LIB = ../lib/autofs.a
+
+ # Compilers, linkers and flags
+-# The STRIP defined here *must not* remove any dynamic-loading symbols
+-
+ ifdef DMALLOCLIB
+ DEBUG=1
+ endif
+
+ ifdef DEBUG
+ CFLAGS ?= -g -Wall -DDEBUG
+-LDFLAGS = -g
+-STRIP = :
+ else
+-ifdef DONTSTRIP
+ CFLAGS ?= -O2 -g
+-LDFLAGS = -g
+-STRIP = :
+-else
+-CFLAGS ?= -O2 -Wall
+-LDFLAGS = -s
+-STRIP = strip --strip-debug
+-endif
+ endif
++AUTOFS_LDFLAGS = -g
+
+-CC = gcc
+-CXX = g++
+ CXXFLAGS = $(CFLAGS)
+ LD = ld
+ SOLDFLAGS = -shared
+
+ CFLAGS += -D_REENTRANT -D_FILE_OFFSET_BITS=64
+-LDFLAGS += -lpthread
+
+ ifdef TIRPCLIB
+ CFLAGS += -I/usr/include/tirpc
+-LDFLAGS += $(TIRPCLIB)
++AUTOFS_LDFLAGS += $(TIRPCLIB)
+ endif
+
+ ifdef DMALLOCLIB
+-LDFLAGS += $(DMALLOCLIB)
++AUTOFS_LDFLAGS += $(DMALLOCLIB)
++endif
++
++ifdef SASL
++CFLAGS += $(XML_FLAGS)
+ endif
+
+ # Standard rules
+@@ -67,5 +57,4 @@ endif
+ $(CC) $(CFLAGS) -S $<
+
+ .c.so:
+- $(CC) $(SOLDFLAGS) $(CFLAGS) -o $*.so $< $(AUTOFS_LIB) $(DMALLOCLIB) $(LIBNSL)
+- $(STRIP) $*.so
++ $(CC) $(LDFLAGS) $(SOLDFLAGS) $(CFLAGS) -o $*.so $< $(AUTOFS_LIB) $(DMALLOCLIB) $(LIBNSL)
+--- a/configure.in
++++ b/configure.in
+@@ -183,7 +183,7 @@ AC_ARG_WITH(hesiod,
+ : Search for Hesiod in normal directory path
+ else
+ : Search for Hesiod in specific directory
+- LDFLAGS="$LDFLAGS -L${withval}/lib"
++ LDFLAGS="$LDFLAGS -Wl,--no-as-needed -L${withval}/lib"
+ LIBHESIOD="-L${withval}/lib"
+ HESIOD_FLAGS="-I${withval}/include"
+ fi
+--- a/daemon/Makefile
++++ b/daemon/Makefile
+@@ -2,8 +2,8 @@
+ # Makefile for autofs
+ #
+
+--include ../Makefile.conf
+ include ../Makefile.rules
++-include ../Makefile.conf
+
+ SRCS = automount.c indirect.c direct.c spawn.c module.c mount.c \
+ lookup.c state.c flag.c
+@@ -20,7 +20,7 @@ CFLAGS += -DAUTOFS_FIFO_DIR=\"$(autofsfi
+ CFLAGS += -DAUTOFS_FLAG_DIR=\"$(autofsflagdir)\"
+ CFLAGS += -DVERSION_STRING=\"$(version)\"
+ LDFLAGS += -rdynamic
+-LIBS = -ldl
++LIBS = -ldl -lpthread
+
+ ifeq ($(LDAP), 1)
+ CFLAGS += $(XML_FLAGS)
+@@ -30,8 +30,7 @@ endif
+ all: automount
+
+ automount: $(OBJS) $(AUTOFS_LIB)
+- $(CC) $(LDFLAGS) $(DAEMON_LDFLAGS) -o automount $(OBJS) $(AUTOFS_LIB) $(LIBS)
+- $(STRIP) automount
++ $(CC) $(AUTOFS_LDFLAGS) $(DAEMON_LDFLAGS) $(LDFLAGS) -o automount $(OBJS) $(AUTOFS_LIB) $(LIBS)
+
+ clean:
+ rm -f *.o *.s *~ automount
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -41,14 +41,12 @@ mount_clnt.c: mount.h
+
+ mount_clnt.o: mount_clnt.c
+ $(CC) $(CFLAGS) -o mount_clnt.o -c mount_clnt.c
+- $(STRIP) mount_clnt.o
+
+ mount_xdr.c: mount.h
+ $(RPCGEN) -c -o mount_xdr.c mount.x
+
+ mount_xdr.o: mount_xdr.c
+ $(CC) $(CFLAGS) -Wno-unused-variable -o mount_xdr.o -c mount_xdr.c
+- $(STRIP) mount_xdr.o
+
+ master_tok.c: master_tok.l
+ $(LEX) -o$@ -Pmaster_ $?
+--- a/modules/Makefile
++++ b/modules/Makefile
+@@ -87,9 +87,8 @@ endif
+ # Ad hoc compilation rules for modules which need auxilliary libraries
+ #
+ lookup_hesiod.so: lookup_hesiod.c
+- $(CC) $(SOLDFLAGS) $(CFLAGS) $(HESIOD_FLAGS) -o lookup_hesiod.so \
++ $(CC) $(LDFLAGS) $(SOLDFLAGS) $(CFLAGS) $(HESIOD_FLAGS) -o lookup_hesiod.so \
+ lookup_hesiod.c $(AUTOFS_LIB) $(LIBHESIOD) $(LIBRESOLV)
+- $(STRIP) lookup_hesiod.so
+
+ cyrus-sasl.o: cyrus-sasl.c
+ $(CC) $(CFLAGS) $(LDAP_FLAGS) -c $<
+@@ -98,13 +97,10 @@ cyrus-sasl-extern.o: cyrus-sasl-extern.c
+ $(CC) $(CFLAGS) $(LDAP_FLAGS) -c $<
+
+ lookup_ldap.so: lookup_ldap.c dclist.o base64.o $(SASL_OBJ)
+- $(CC) $(SOLDFLAGS) $(CFLAGS) $(LDAP_FLAGS) -o lookup_ldap.so \
++ $(CC) $(LDFLAGS) $(SOLDFLAGS) $(CFLAGS) $(LDAP_FLAGS) -o lookup_ldap.so \
+ lookup_ldap.c dclist.o base64.o $(SASL_OBJ) \
+ $(AUTOFS_LIB) $(LIBLDAP) $(LIBRESOLV)
+- $(STRIP) lookup_ldap.so
+
+ mount_nfs.so: mount_nfs.c replicated.o
+- $(CC) $(SOLDFLAGS) $(CFLAGS) -o mount_nfs.so \
++ $(CC) $(LDFLAGS) $(SOLDFLAGS) $(CFLAGS) -o mount_nfs.so \
+ mount_nfs.c replicated.o $(AUTOFS_LIB) $(LIBNSL)
+- $(STRIP) mount_nfs.so
+-
diff --git a/net-fs/autofs/files/autofs-5.0.6-revert-ldap.patch b/net-fs/autofs/files/autofs-5.0.6-revert-ldap.patch
new file mode 100644
index 0000000..49901dd
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.6-revert-ldap.patch
@@ -0,0 +1,18 @@
+--- modules/lookup_ldap.c
++++ modules/lookup_ldap.c
+@@ -1488,6 +1488,7 @@ int lookup_init(const char *mapfmt, int
+ }
+ }
+
++#ifdef WITH_SASL
+ /*
+ * First, check to see if a preferred authentication method was
+ * specified by the user. parse_ldap_config will return error
+@@ -1500,7 +1501,6 @@ int lookup_init(const char *mapfmt, int
+ return 1;
+ }
+
+-#ifdef WITH_SASL
+ /* Init the sasl callbacks */
+ if (!autofs_sasl_client_init(LOGOPT_NONE)) {
+ error(LOGOPT_ANY, "failed to init sasl client");
diff --git a/net-fs/autofs/files/autofs5-auto.master b/net-fs/autofs/files/autofs5-auto.master
new file mode 100644
index 0000000..4b10001
--- /dev/null
+++ b/net-fs/autofs/files/autofs5-auto.master
@@ -0,0 +1,24 @@
+# $Id: autofs5-auto.master,v 1.1 2011/05/23 08:29:05 pva Exp $
+# Sample auto.master file
+# This is an automounter map and it has the following format
+# key [ -mount-options-separated-by-comma ] location
+# For details of the format look at autofs(5).
+#
+#/misc /etc/autofs/auto.misc
+#/net /etc/autofs/auto.net
+#
+# NOTE: mounts done from a hosts map will be mounted with the
+# "nosuid" and "nodev" options unless the "suid" and "dev"
+# options are explicitly given.
+#
+#/net -hosts
+#
+# Include central master map if it can be found using
+# nsswitch sources.
+#
+# Note that if there are entries for /net or /misc (as
+# above) in the included master map any keys that are the
+# same will not be seen as the first read key seen takes
+# precedence.
+#
+#+auto.master
diff --git a/net-fs/autofs/files/autofs5.initd b/net-fs/autofs/files/autofs5.initd
new file mode 100644
index 0000000..47939f0
--- /dev/null
+++ b/net-fs/autofs/files/autofs5.initd
@@ -0,0 +1,70 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/autofs/files/autofs5.initd,v 1.3 2011/10/05 14:27:26 pva Exp $
+
+DAEMON=/usr/sbin/automount
+PIDFILE=/var/run/autofs.pid
+DEVICE=autofs
+
+depend() {
+ need localmount
+ use ypbind nfs slapd portmap net
+}
+
+extra_started_commands="reload"
+
+start() {
+ ebegin "Starting automounter"
+
+ # Ensure autofs support is loaded
+ grep -q autofs /proc/filesystems || modprobe -q autofs4
+ if [ $? -ne 0 ]; then
+ eend 1 "No autofs support available in kernel"
+ return 1
+ fi
+
+ # Check misc device
+ if [ -n "${USE_MISC_DEVICE}" -a "${USE_MISC_DEVICE}" = "yes" ]; then
+ sleep 1
+ if [ -e "/proc/misc" ]; then
+ MINOR=$(awk "/${DEVICE}/ {print \$1}" /proc/misc)
+ if [ -n "${MINOR}" -a ! -c "/dev/${DEVICE}" ]; then
+ mknod -m 0600 "/dev/${DEVICE}" c 10 ${MINOR}
+ if [ $? -ne 0 ]; then
+ eend 1 "Could not create '/dev/${DEVICE}'"
+ return 1
+ fi
+ fi
+ fi
+ if [ -x /sbin/restorecon -a -c "/dev/${DEVICE}" ]; then
+ /sbin/restorecon "/dev/${DEVICE}"
+ if [ $? -ne 0 ]; then
+ eend 1 "Failed to execute '/sbin/restorecon \"/dev/${DEVICE}\"'"
+ return 1
+ fi
+ fi
+ else
+ [ -c "/dev/${DEVICE}" ] && rm -rf "/dev/${DEVICE}"
+ fi
+
+ start-stop-daemon --start --exec ${DAEMON} -- -p ${PIDFILE} ${OPTIONS}
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping automounter"
+ start-stop-daemon --stop --quiet -R TERM/45 -p ${PIDFILE}
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading automounter"
+ if [ ! -r "${PIDFILE}" ]; then
+ eend 1 "automount not running"
+ else
+ kill -HUP $(cat "${PIDFILE}") 2> /dev/null
+ eend $?
+ fi
+}
diff --git a/net-fs/autofs/metadata.xml b/net-fs/autofs/metadata.xml
index 9349471..6f708da 100644
--- a/net-fs/autofs/metadata.xml
+++ b/net-fs/autofs/metadata.xml
@@ -3,10 +3,6 @@
<pkgmetadata>
<herd>net-fs</herd>
<maintainer>
- <email>stefaan@gentoo.org</email>
- <name>Stefaan De Roeck</name>
-</maintainer>
-<maintainer>
<email>pva@gentoo.org</email>
<name>Peter Volkov</name>
</maintainer>
@@ -17,5 +13,13 @@
<use>
<flag name="hesiod">Install hesiod module</flag>
<flag name="ldap">Install LDAP module</flag>
+ <flag name="mount-locking">
+ Enable locking to prevent corruption of /etc/mtab in the presence of
+ concurrent auto-mounting. If enabled, recursive auto-mounting (eg. using
+ autofs to bind or loop mount a filesystem which is itself auto-mounted)
+ is not possible.
+ </flag>
+ <flag name="sasl">Enable SASL support in the LDAP module</flag>
</use>
</pkgmetadata>
+