summaryrefslogtreecommitdiff
path: root/net-fs
diff options
context:
space:
mode:
authorPeter Volkov <pva@gentoo.org>2011-04-03 09:49:15 +0000
committerPeter Volkov <pva@gentoo.org>2011-04-03 09:49:15 +0000
commit4914fa4d34d59f84e6d3d5ff6a8da60ddb6623eb (patch)
treed2dabbb28165f68a59c649fbda1db8680c8e231d /net-fs
parent[sys-apps/gptfdisk] Add missing dep (diff)
downloadhistorical-4914fa4d34d59f84e6d3d5ff6a8da60ddb6623eb.tar.gz
historical-4914fa4d34d59f84e6d3d5ff6a8da60ddb6623eb.tar.bz2
historical-4914fa4d34d59f84e6d3d5ff6a8da60ddb6623eb.zip
Rev bump, bug #346537. Mention nfs-utils in elog for NFS mounts, bug 163210 reported by Kai Krakow. Fixed ldap module linkage with krb5, bug 285216 reported by Jonas Jonsson and bug 302377 reported by Duncan Exon Smith. Finally respect LDFLAGS, bug 333971 wrt Cyprien Nicolas (fulax). Incoporate upstream fix to fix ghost entries upon SIGHUP, bug 340761 reported by Faustus. Avoid /etc/mtab access violation, bug 355975 thank Sean McGovern for report. Install /etc/conf.d/autofs on systems with /etc/sysconfig dir, bug 361481 thank Juergen Rose for report. And of course thank Dustin Polke - autofs maintainer!
Package-Manager: portage-2.1.9.45/cvs/Linux x86_64
Diffstat (limited to 'net-fs')
-rw-r--r--net-fs/autofs/ChangeLog20
-rw-r--r--net-fs/autofs/Manifest8
-rw-r--r--net-fs/autofs/autofs-5.0.5-r1.ebuild102
-rw-r--r--net-fs/autofs/files/autofs-5.0.5-fix-building-without-ldap.patch58
-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.5-respect-user-flags-and-fix-asneeded-v1.patch166
-rw-r--r--net-fs/autofs/files/autofs5.initd68
7 files changed, 431 insertions, 3 deletions
diff --git a/net-fs/autofs/ChangeLog b/net-fs/autofs/ChangeLog
index bbd014a7338b..447c0eee03c2 100644
--- a/net-fs/autofs/ChangeLog
+++ b/net-fs/autofs/ChangeLog
@@ -1,6 +1,22 @@
# ChangeLog for net-fs/autofs
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-fs/autofs/ChangeLog,v 1.98 2010/09/29 16:54:27 jer Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/autofs/ChangeLog,v 1.99 2011/04/03 09:49:15 pva Exp $
+
+*autofs-5.0.5-r1 (03 Apr 2011)
+
+ 03 Apr 2011; Peter Volkov <pva@gentoo.org> +autofs-5.0.5-r1.ebuild,
+ +files/autofs5.initd, +files/autofs-5.0.5-fix-building-without-ldap.patch,
+ +files/autofs-5.0.5-fix-install-deadlink.patch,
+ +files/autofs-5.0.5-respect-user-flags-and-fix-asneeded-v1.patch:
+ Rev bump, bug #346537. Mention nfs-utils in elog for NFS mounts, bug 163210
+ reported by Kai Krakow. Fixed ldap module linkage with krb5, bug 285216
+ reported by Jonas Jonsson and bug 302377 reported by Duncan Exon Smith.
+ Finally respect LDFLAGS, bug 333971 wrt Cyprien Nicolas (fulax). Incoporate
+ upstream fix to fix ghost entries upon SIGHUP, bug 340761 reported by
+ Faustus. Avoid /etc/mtab access violation, bug 355975 thank Sean McGovern for
+ report. Install /etc/conf.d/autofs on systems with /etc/sysconfig dir, bug
+ 361481 thank Juergen Rose for report. And of course thank Dustin Polke -
+ autofs maintainer!
29 Sep 2010; Jeroen Roovers <jer@gentoo.org> autofs-5.0.4-r5.ebuild:
Stable for HPPA (bug #292147).
diff --git a/net-fs/autofs/Manifest b/net-fs/autofs/Manifest
index 4e1ac352abbc..9230af8d424f 100644
--- a/net-fs/autofs/Manifest
+++ b/net-fs/autofs/Manifest
@@ -6,7 +6,10 @@ AUX autofs-5.0.3-heimdal.patch 1380 RMD160 ed40e452a7648aec1b25e1002c99929be97b8
AUX autofs-5.0.3-map-patch-fix.patch 2543 RMD160 3be39a53ddc5125b9ca09f636f3099c02b15de20 SHA1 4d0613ba4c9f51b1bdfdc2f854f02b0acc2681fa SHA256 7a905f5784b9ecddb757cc998033827b58c2c3f4ea514fd746d1d99d8f0f1d5b
AUX autofs-5.0.4-user-ldflags-and-as-needed-v2.patch 1520 RMD160 ab22c45f92eca01abeaaba9546263340de8e5c9b SHA1 c91af03a8b61458127a9a37c8bab3941fff3942c SHA256 6a772377a5e37e1056ca337d22dcbdeb3fd5667947d5e728288eaa8fed86912f
AUX autofs-5.0.4-user-ldflags-and-as-needed.patch 1692 RMD160 7309a7461484b9fb1fc9791d7fae75e415853964 SHA1 96ccf835dfb966180dd472b320bce5ecf72eb823 SHA256 dd2f8e449e99d3445c4c7ddb6b68938bbdc982dfbbcbcd6dfbd1ef1a680af6dd
+AUX autofs-5.0.5-fix-building-without-ldap.patch 1047 RMD160 c0e01afebea8dbc6e6672db4ac442a2620de5284 SHA1 e197ddccc2da488a7a3a65696ad7f1e4c4912bcf SHA256 039a77646a753d29572d2c63b54c2ac0f49b34ce73fc70297144d670cc6e802e
AUX autofs-5.0.5-fix-building-without-sasl.patch 469 RMD160 63727a0f759f57291fb05b534ddc797f597706db SHA1 4f37776eece0cc620d7e21cf8a901c29b2a292e0 SHA256 eba6fd9e03506833401096a744303b843960cd7e40bab2582daa29cd9c80efa0
+AUX autofs-5.0.5-fix-install-deadlink.patch 544 RMD160 1fc3e01015a0b18e90a41754654ca6b7b1f3f30c SHA1 6170d1f7cd2ba88063967154b92d2ef67d760160 SHA256 48393e00ddb51c5b0588ea45711abb16bf256c487c584062bc3de59b30bae053
+AUX autofs-5.0.5-respect-user-flags-and-fix-asneeded-v1.patch 4400 RMD160 441f8c5488267036da65f69234f11fd82015f809 SHA1 94016e5fde7286e54f8ca0c465dc3f1fe3bbd3ba SHA256 ab5cbc585fb3f6f753d08345beffbb4a188d8f957fad3ee9c81487baca6e69ec
AUX autofs-5.0.5-respect-user-flags-and-fix-asneeded.patch 3851 RMD160 df4fec7045a4dea512745f91fbbb3c7d00d2cf9f SHA1 b9e175dffcb65cb83fc34a15dce3c91f279278f3 SHA256 f69b3fcc717e96826fa6f6b2766423bc6d12cee06b739b0f10b99ffa3e4589ad
AUX autofs.confd 186 RMD160 812709be1af1cfc35fa313907496bfb4e9490386 SHA1 51cfe6ffa36ee5bc02f61a3d500469d73e3aa266 SHA256 d32c102ae6bab4958d230366cd42c1a67fab4f38e0d6abdf0c4a94cd71dffa45
AUX autofs.confd9 799 RMD160 ef61372f9f804dc5b9f662d3810b8a8c80b635de SHA1 80612d8fa46c2b9b7ffdd8d3e711e6d14f0af19f SHA256 c19db9095a5b21bcc0da40adad7141800ddb43db09548adf4c91fd813d9b5e1f
@@ -20,6 +23,7 @@ AUX autofs.rc7 3624 RMD160 898c771eedbf52cbf856449370640873db7c4fd2 SHA1 f72e598
AUX autofs.rc8 5186 RMD160 7a97786ecbca979a1b3aa754b6a638b580a9836d SHA1 f1f5b9837d176085c5e81bfe2321bdec15f90e74 SHA256 e9c094b03fec0a184800f750d79bf73ee6daf614c312b5c927110d8f2b0d1511
AUX autofs.rc9 5617 RMD160 2822212b6717504aecc29cab029e5247bddecca9 SHA1 2b159ab25f390cdc230b20046ce8b4adcc8e99fb SHA256 6534a2c96f915132d7834478bf8913a8f00bf97ae91c5df55bf5e612f403735b
AUX autofs1.confd 137 RMD160 35c5171eb57db792830e94f28058b1b50534c236 SHA1 d5e415b4bb74b1fd91f9ad4ce863cd70ca5460d1 SHA256 d4be4500623e3ba986ad124b273c9119da78b12eb94c6d39e358ed9d623a1a8a
+AUX autofs5.initd 1646 RMD160 1a50fdf84bee8a44e38555a4a788d80a79d6411a SHA1 97495945082aa52744d1308b4c94ce4c96a8c0e8 SHA256 1e814580d1455bd36737ec71c025d218bbea370977ac8cd067166451c8741117
AUX autofs5.rc1 920 RMD160 9adb413578fba86eeabefb2c25b4bf6e27bd8efe SHA1 44db5523bc7d07c949e71bf0fda6499b0c6578d1 SHA256 94c956da80446f391df3a8f89794754c0e42ea9d1fca47f2abe57eecadbc3ffa
AUX automount.diff 322 RMD160 7fdfa7bd519451b47cbb9795e2ae482ddd45ff59 SHA1 c6bf3d6b2433cafe122d821142f44eee1a8b6ad7 SHA256 eef2d99787fc8967f10c5c308e3a271532013225bdfe28578d0ecb5e3c0c16c1
AUX ldap_config.patch 785 RMD160 47b296b3dcb005fd65a8b707dbc0ace319d3ace7 SHA1 b81701d25b583d0382b41059be11e2e9ef6a523b SHA256 5f0eb87ea8e20fc4fac46afde8d50fe9307a1835979c279855d36d323e8ff57d
@@ -143,6 +147,7 @@ DIST autofs-5.0.4-use-srv-query-for-domain-dn.patch 27460 RMD160 0d83fd046590431
DIST autofs-5.0.4-zero-s_magic-is-valid.patch 1320 RMD160 17b727128f589c744ece5cc6c8b3fccf0926fefb SHA1 4cc9d2213aa83b5e829c563c055cf6782782c4d1 SHA256 dc126f69203c6c486fecf42508b2c995ee4a8e0a26b01b97112dc5c2dfe9f547
DIST autofs-5.0.4.tar.bz2 303863 RMD160 00708143c56b440fa0c7589c2d0d9170334e7c3e SHA1 0a50408ba2c1f6d27f3a448edc70f2395b6566b5 SHA256 631fe1a3cdc11c66aaf356fc6c0b8e41dff45897c43bb536a29b432e89d8da1b
DIST autofs-5.0.5-patches-1.tar.lzma 59744 RMD160 4f253dfb04e5f09d16b6101e5121377c3399e399 SHA1 74364fdd40c1b96e788701c5816762e83eb8fb17 SHA256 e94e59fe9c88df727fd7d623be1002250141ea519467bf179dd74ffe797ce2a5
+DIST autofs-5.0.5-patches-3.tar.lzma 77343 RMD160 fc60a2605b65f9926dfd334c86c96ff617e845e4 SHA1 62d528a70b828c26496cd1de003fa15097114464 SHA256 161a397230cf767e1f15c50aeeac7974e407935f81939de29ff9029ae88f96a6
DIST autofs-5.0.5.tar.bz2 301327 RMD160 4d105cce439544193b4abcb0ca4763f8c1d3cf54 SHA1 7f8a320cc126cb233be23749669735320fe6933c SHA256 68c73e01bc3c14c7d3613a861bbde4ab601c13f3127fcb837d49e435e5986002
EBUILD autofs-3.1.7-r5.ebuild 1739 RMD160 2aba32bed55900477131d080beb301b1271be1aa SHA1 8a6b81324f6f893dac00324432b1bcfbb321856a SHA256 4e5c9f0981fb87311e452be843f6426a694c03a613f7eb05c7360c6e43f147ae
EBUILD autofs-3.1.7-r6.ebuild 1774 RMD160 9054304132c27b09695f97457d257d0099b018a3 SHA1 394c17d7905c79dc37a6abc0cb9801854e82c067 SHA256 c3f954cba4d42f40b3a4d40dc81d3d74976c4bb5b16cf0be7da0c3e11e4cdccb
@@ -154,6 +159,7 @@ EBUILD autofs-5.0.4-r3.ebuild 4193 RMD160 820198e5016743bc58993274a8eb6216391391
EBUILD autofs-5.0.4-r4.ebuild 4467 RMD160 fd8b8bf519bd585154c0216e387e2ffdef5c6e58 SHA1 de127e4e8946b9636ff0a51fab4c71a2fc940b92 SHA256 a3ebf1697a3bd3271f4c3186748d35b12389a94519418fdd310ae225c82e29b7
EBUILD autofs-5.0.4-r5.ebuild 4856 RMD160 f976f8a74c6c4d3aeb9d70066409c53de99baee8 SHA1 14829c8353c82928d902247891cbbae0b3b6e099 SHA256 3e175bde315b472c7f83c94a847f0c40666b345c9486bf143c7a39db0cb71ccc
EBUILD autofs-5.0.4.ebuild 2520 RMD160 101142f25740c5c9c07178615834abdb9c0d36db SHA1 d965e8186c3d6d4075afab86cfb5500ca5295a0c SHA256 ae46e201d50517bbbbe3cf45dd6555a09d3c18a94ff041a89b5bd5d75a749826
+EBUILD autofs-5.0.5-r1.ebuild 3301 RMD160 14bceeaba4a0cf75ef52890b8f427c309a7d6ccd SHA1 64d45908756cb44e59a8128ceb9e0fb443a97488 SHA256 15864305a8b4ab20faeab43ca7a8fb17574d7041ca8696dd5c0bba6f30d276b9
EBUILD autofs-5.0.5.ebuild 2835 RMD160 5c5ca0c11ae8205f85bc8fbec7e2b95f206bbb91 SHA1 0d342ceed013e86f9c7f3a97706bde018843b301 SHA256 5107794cdebe88a072bb8ea82e42b0e17de242da17e032d515fb19a650dab8fe
-MISC ChangeLog 15470 RMD160 e7c75c591cd6d2a05212ce1c507c6ff23005bf50 SHA1 85721b0d8363e63a06a949b8b61e9d8fb4d4f084 SHA256 307d0dd35036b620305cbc928ae29a58ca34636cf33f7ea0d1a9891b805c6262
+MISC ChangeLog 16397 RMD160 0e7abb00ed4604f85f750d7f019528722615f082 SHA1 585857b2600aaa37b64a840346173cd3e95cebce SHA256 c27236c41db67d3ceb50f53ad646b1a84e57812a855c2633413ec647d3d90cbf
MISC metadata.xml 629 RMD160 e54d3bf18dc419c0e900d81ed9aca1432e555d65 SHA1 64893b5cd342d35c9278df1b63fa106629b5ccf4 SHA256 2f9dffb787ccf5f094c9f839c60f32cc78f12546b56da94fec2c1fbb23e07e2b
diff --git a/net-fs/autofs/autofs-5.0.5-r1.ebuild b/net-fs/autofs/autofs-5.0.5-r1.ebuild
new file mode 100644
index 000000000000..0e3836576bac
--- /dev/null
+++ b/net-fs/autofs/autofs-5.0.5-r1.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/autofs/autofs-5.0.5-r1.ebuild,v 1.1 2011/04/03 09:49: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="3"
+SRC_URI="mirror://kernel/linux/daemons/${PN}/v5/${P}.tar.bz2
+ mirror://gentoo/${P}-patches-${PATCH_VER}.tar.lzma"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="hesiod ldap 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}"
+
+src_prepare() {
+ # Upstream's patchset
+ EPATCH_SUFFIX="patch" \
+ epatch "${WORKDIR}"/patches
+
+ # 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-v1.patch
+
+ # do not include <nfs/nfs.h>, rather <linux/nfs.h>,
+ # as the former is a lame header for the latter (bug #157968)
+ sed 's@nfs/nfs.h@linux/nfs.h@' -i include/rpc_subs.h || die
+
+ # Upstream reference: http://thread.gmane.org/gmane.linux.kernel.autofs/5591
+ epatch "${FILESDIR}"/${P}-fix-building-without-sasl.patch
+
+ # Upstream reference: http://thread.gmane.org/gmane.linux.kernel.autofs/5371
+ epatch "${FILESDIR}"/${P}-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}"/${P}-fix-building-without-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
+ econf \
+ --with-confdir=/etc/conf.d \
+ $(use_with ldap openldap) \
+ $(use_with sasl) \
+ $(use_with hesiod) \
+ --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
+}
+
+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.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 000000000000..d90ef94fcc55
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.5-fix-building-without-ldap.patch
@@ -0,0 +1,58 @@
+--- lib/defaults.c.orig
++++ lib/defaults.c
+@@ -19,7 +19,9 @@
+
+ #include "list.h"
+ #include "defaults.h"
++#ifdef HAVE_LDAP
+ #include "lookup_ldap.h"
++#endif
+ #include "log.h"
+ #include "automount.h"
+
+@@ -197,6 +199,7 @@ static int parse_line(char *line, char *
+ return 1;
+ }
+
++#ifdef HAVE_LDAP
+ void defaults_free_uris(struct list_head *list)
+ {
+ struct list_head *next;
+@@ -252,9 +255,11 @@ static unsigned int add_uris(char *value
+
+ return 1;
+ }
++#endif
+
+ struct list_head *defaults_get_uris(void)
+ {
++#ifdef HAVE_LDAP
+ FILE *f;
+ char buf[MAX_LINE_LEN];
+ char *res;
+@@ -288,6 +292,9 @@ struct list_head *defaults_get_uris(void
+
+ fclose(f);
+ return list;
++#else
++ return NULL;
++#endif
+ }
+
+ /*
+@@ -450,6 +457,7 @@ unsigned int defaults_get_ldap_network_t
+ return res;
+ }
+
++#ifdef HAVE_LDAP
+ struct ldap_schema *defaults_get_default_schema(void)
+ {
+ struct ldap_schema *schema;
+@@ -645,6 +653,7 @@ struct ldap_schema *defaults_get_schema(
+
+ 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 000000000000..8ab10fcf7471
--- /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.5-respect-user-flags-and-fix-asneeded-v1.patch b/net-fs/autofs/files/autofs-5.0.5-respect-user-flags-and-fix-asneeded-v1.patch
new file mode 100644
index 000000000000..f49b4aa80305
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.5-respect-user-flags-and-fix-asneeded-v1.patch
@@ -0,0 +1,166 @@
+=== modified file 'Makefile.conf.in'
+--- Makefile.conf.in 2011-04-02 14:53:02 +0000
++++ Makefile.conf.in 2011-04-02 14:53:26 +0000
+@@ -95,3 +95,5 @@
+ # Location for init.d files
+ initdir = @initdir@
+
++# Use the compiler determined by configure
++CC := @CC@
+
+=== modified file 'Makefile.rules'
+--- Makefile.rules 2011-04-02 14:53:02 +0000
++++ Makefile.rules 2011-04-02 14:54:11 +0000
+@@ -16,44 +16,30 @@
+ 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
++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
+
+ # Standard rules
+@@ -67,5 +53,4 @@
+ $(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)
+
+=== modified file 'configure.in'
+--- configure.in 2011-04-02 14:53:02 +0000
++++ configure.in 2011-04-02 14:53:26 +0000
+@@ -174,7 +174,7 @@
+ : 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
+
+=== modified file 'daemon/Makefile'
+--- daemon/Makefile 2011-04-02 14:53:02 +0000
++++ daemon/Makefile 2011-04-02 14:53:26 +0000
+@@ -2,8 +2,8 @@
+ # Makefile for autofs
+ #
+
++include ../Makefile.rules
+ -include ../Makefile.conf
+-include ../Makefile.rules
+
+ 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_FLAG_DIR=\"$(autofsflagdir)\"
+ CFLAGS += -DVERSION_STRING=\"$(version)\"
+ LDFLAGS += -rdynamic
+-LIBS = -ldl
++LIBS = -ldl -lpthread
+
+ ifeq ($(LDAP), 1)
+ CFLAGS += $(XML_FLAGS)
+@@ -30,8 +30,7 @@
+ 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
+
+=== modified file 'lib/Makefile'
+--- lib/Makefile 2011-04-02 14:53:02 +0000
++++ lib/Makefile 2011-04-02 14:53:26 +0000
+@@ -41,14 +41,12 @@
+
+ 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_ $?
+
+=== modified file 'modules/Makefile'
+--- modules/Makefile 2011-04-02 14:53:02 +0000
++++ modules/Makefile 2011-04-02 14:55:06 +0000
+@@ -85,9 +85,8 @@
+ # 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 $<
+@@ -96,13 +95,10 @@
+ $(CC) $(CFLAGS) $(LDAP_FLAGS) -c $<
+
+ lookup_ldap.so: lookup_ldap.c dclist.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 $(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/autofs5.initd b/net-fs/autofs/files/autofs5.initd
new file mode 100644
index 000000000000..27e15cf654db
--- /dev/null
+++ b/net-fs/autofs/files/autofs5.initd
@@ -0,0 +1,68 @@
+#!/sbin/runscript
+# Copyright 1999-2011 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.1 2011/04/03 09:49:15 pva Exp $
+
+DAEMON=/usr/sbin/automount
+PIDFILE=/var/run/autofs.pid
+DEVICE=autofs
+
+depend() {
+ need localmount
+ use ypbind nfs slapd portmap net
+}
+
+opts="start stop restart status 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)
+ [ -n "${MINOR}" -a ! -c "/dev/${DEVICE}" ] && \
+ mknod -m 0600 "/dev/${DEVICE}" c 10 ${MINOR}
+ if [ $? -ne 0 ]; then
+ eend 1 "Could not create '/dev/${DEVICE}'"
+ return 1
+ fi
+ fi
+ [ -x /sbin/restorecon -a -c "/dev/${DEVICE}" ] && \
+ /sbin/restorecon "/dev/${DEVICE}"
+ if [ $? -ne 0 ]; then
+ eend 1 "Failed to execute '/sbin/restorecon \"/dev/${DEVICE}\"'"
+ return 1
+ 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
+}