diff options
author | Peter Volkov <pva@gentoo.org> | 2011-04-03 09:49:15 +0000 |
---|---|---|
committer | Peter Volkov <pva@gentoo.org> | 2011-04-03 09:49:15 +0000 |
commit | 9a738db12ab1c57f21c6df4ba23be9465ed69a8c (patch) | |
tree | e17308ca7544202d9ee070cf45ac88359d2b53cf /net-fs/autofs | |
parent | [sys-apps/gptfdisk] Add missing dep (diff) | |
download | gentoo-2-9a738db12ab1c57f21c6df4ba23be9465ed69a8c.tar.gz gentoo-2-9a738db12ab1c57f21c6df4ba23be9465ed69a8c.tar.bz2 gentoo-2-9a738db12ab1c57f21c6df4ba23be9465ed69a8c.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!
(Portage version: 2.1.9.45/cvs/Linux x86_64)
Diffstat (limited to 'net-fs/autofs')
-rw-r--r-- | net-fs/autofs/ChangeLog | 20 | ||||
-rw-r--r-- | net-fs/autofs/autofs-5.0.5-r1.ebuild | 102 | ||||
-rw-r--r-- | net-fs/autofs/files/autofs-5.0.5-fix-building-without-ldap.patch | 58 | ||||
-rw-r--r-- | net-fs/autofs/files/autofs-5.0.5-fix-install-deadlink.patch | 12 | ||||
-rw-r--r-- | net-fs/autofs/files/autofs-5.0.5-respect-user-flags-and-fix-asneeded-v1.patch | 166 | ||||
-rw-r--r-- | net-fs/autofs/files/autofs5.initd | 68 |
6 files changed, 424 insertions, 2 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/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 +} |