--- autofs-5.0.6-r5.ebuild 2011-12-17 04:45:15.000000000 +0100 +++ autofs-5.0.6_p2.ebuild 2012-04-10 21:27:14.000000000 +0200 @@ -1,22 +1,29 @@ -# Copyright 1999-2011 Gentoo Foundation +# 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 +inherit eutils multilib autotools linux-info versionator DESCRIPTION="Kernel based automounter" HOMEPAGE="http://www.linux-consulting.com/Amd_AutoFS/autofs.html" -PATCH_VER="1" -[[ -n ${PATCH_VER} ]] && \ - PATCHSET_URI="mirror://gentoo/${P}-patches-${PATCH_VER}.tar.lzma" -SRC_URI="mirror://kernel/linux/daemons/${PN}/v5/${P}.tar.bz2 + +if [[ $(get_version_component_count) == 3 ]]; then + MY_P="${P}" +else + MY_P="${PN}-$(get_version_component_range 1-3)" + PATCH_VER="$(get_version_component_range 4)" + PATCH_VER="${PATCH_VER//p}" + PATCHSET_URI="mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.lzma" + S="${WORKDIR}/${MY_P}" +fi +SRC_URI="mirror://kernel/linux/daemons/${PN}/v5/${MY_P}.tar.bz2 ${PATCHSET_URI}" LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" -IUSE="hesiod ldap sasl" +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. @@ -48,9 +55,9 @@ src_prepare() { # #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 + epatch "${FILESDIR}"/${MY_P}-respect-user-flags-and-fix-asneeded-r2.patch - # Upstream reference: http://thread.gmane.org/gmane.linux.kernel.autofs/5371 + # Upstream reference: htpp://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 @@ -61,7 +68,7 @@ src_prepare() { 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 + epatch "${FILESDIR}"/${MY_P}-revert-ldap.patch eautoreconf } @@ -81,6 +88,7 @@ src_configure() { $(use_with ldap openldap) \ $(use_with sasl) \ $(use_with hesiod) \ + $(use_enable mount-locking) \ --enable-ignore-busy } @@ -111,4 +119,9 @@ pkg_postinst() { 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." + elog "Since autofs-5.0.6_p2, the behavior of autofs has changed to" + elog "follow upstream's suggestion to allow concurrent automounting." + elog "This might cause a corrupted /etc/mtab in rare cases." + elog "Please report any problems arising from this. To restore the old" + elog "behavior, enable the 'mount-locking' USE flag." }