summaryrefslogtreecommitdiff
path: root/net-fs/autofs
diff options
context:
space:
mode:
Diffstat (limited to 'net-fs/autofs')
-rw-r--r--net-fs/autofs/Manifest28
-rw-r--r--net-fs/autofs/autofs-5.0.10.ebuild114
-rw-r--r--net-fs/autofs/autofs-5.0.7-r4.ebuild132
-rw-r--r--net-fs/autofs/autofs-5.0.7-r5.ebuild133
-rw-r--r--net-fs/autofs/autofs-5.1.1-r1.ebuild114
-rw-r--r--net-fs/autofs/autofs-5.1.2.ebuild118
-rw-r--r--net-fs/autofs/autofs-5.1.3.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-fix-install-deadlink.patch12
-rw-r--r--net-fs/autofs/files/autofs-5.0.6-revert-ldap.patch18
-rw-r--r--net-fs/autofs/files/autofs-5.0.7-add-missing-endif-HAVE_SASL-in-modules-lookup_ldap.c.patch45
-rw-r--r--net-fs/autofs/files/autofs-5.0.7-libtirpc-link.patch10
-rw-r--r--net-fs/autofs/files/autofs-5.0.7-parallel-make.patch48
-rw-r--r--net-fs/autofs/files/autofs-5.0.7-respect-user-flags-and-fix-asneeded-r3.patch144
-rw-r--r--net-fs/autofs/files/autofs-5.0.7-sasl-def.patch43
-rw-r--r--net-fs/autofs/files/autofs-5.0.7-sloppy-mount.patch99
-rw-r--r--net-fs/autofs/files/autofs-5.1.2-libtirpc-as-need.patch28
-rw-r--r--net-fs/autofs/files/autofs5-auto.master23
-rw-r--r--net-fs/autofs/files/autofs5.initd69
-rw-r--r--net-fs/autofs/metadata.xml21
20 files changed, 1349 insertions, 0 deletions
diff --git a/net-fs/autofs/Manifest b/net-fs/autofs/Manifest
new file mode 100644
index 000000000000..bb31c7f02a30
--- /dev/null
+++ b/net-fs/autofs/Manifest
@@ -0,0 +1,28 @@
+AUX autofs-5.0.3-heimdal.patch 1380 SHA256 ca62546abf6b6ae2ed95f53d439d25770f20e70651fdaf5a0edf9d69920b108a SHA512 f8f0528988085691899c3f4c1b3f13c6b189b4fe7fa160e713a819f25cb1c860ed896e096c4226e9e6449526037b263e832d27a5e5ce9b13bc5416ee28cb7317 WHIRLPOOL b6060d5074eb3a523724d85bcf1fef24f8af70372f6806be18a0e4fecff6f6e26638192490935ccf99bb90f140b9dedfc195fb42cc582512acdf4a2616dfb8d3
+AUX autofs-5.0.5-fix-install-deadlink.patch 544 SHA256 48393e00ddb51c5b0588ea45711abb16bf256c487c584062bc3de59b30bae053 SHA512 03f4f8fa6721e5ddd16560b9d7385a3734c7614f2903bd142869b2f2b099317ae2f73f6aa59f6e62b166f00d90baba3345d5fd5c3af3344b2348984d09ba3020 WHIRLPOOL c8c202220584c8cedcf0d90f066cad3311f60c90e5b36a8a52847f1b0723babb8b97a95264cd64fb1fd2164e64f3f314df1ef357c822cb0028cd9ff498d7d13f
+AUX autofs-5.0.6-revert-ldap.patch 512 SHA256 67e4f23d0c1ef771f861ec295a2780d9c09b37d26718c21e3f20d3b4936738e9 SHA512 e929bbe145c19ac5180094205a9095387e90126e8360ede99ab972cca864c40c1caf779503454784804e925e0efc0b4c459accb734f63482c758989bb17d7313 WHIRLPOOL 70c541931415e7d35955196c683bef2bf08c16b920f7398a679eaa8abeda5364cd3f0afec674e02e126447ca5c29d8c2934eb33d3f09aeb48fa0ae7a798cc56f
+AUX autofs-5.0.7-add-missing-endif-HAVE_SASL-in-modules-lookup_ldap.c.patch 1151 SHA256 e2ea51d649d9c40ccea45828570e7b9b43cb598a703990d59933e79ab38669f1 SHA512 d92b0fcafdf6bb5df1b1d79f628bd049e07a51318e7b487f350816b1ff54d73c24b0fb44d8558b068bf27f128cf9edbc611a5e67e5d33f96b91c47bede1ebbfd WHIRLPOOL 3bfe2633f81069ca0d491f591b87368a9251eecf7af53ad888a5b2bf86a8754473575f1dd1e081ba91ed03823c13c2fd94aaf2ace5e0f060f3ba90e9f123af56
+AUX autofs-5.0.7-libtirpc-link.patch 423 SHA256 8093e021c4bdb3f876f57f5496a4ed3ac4526d09797422f60e1abfb73b4ef75d SHA512 2a66e7ad011571ad49c9c9c98a880a663f6ec3c2d31e792f727e8d2c38fa5ae00a8f48222f3b215caab5ef7db64dbc6eb9a794f556efccea5a941ff5fe4f5bc5 WHIRLPOOL a3211cb59dafaca258b18067baabb24feb88bc451ba7b847d406d66e4401997caf220179d468e2704ab0388ea13cefb0119a15d09bc38423dfe87e5fb09bc023
+AUX autofs-5.0.7-parallel-make.patch 1424 SHA256 359f57bc828edfdaca8c66edd3c821e4b7a9d355ebccadbd20390aed928b822c SHA512 8489a71e22c5711bc76d3756b4c3a375984392f821a58c5f28db82c0134a8dcb009905a64fdef56ca3553eaff8be883e653a36d6acf72a724b90a946408aa8cf WHIRLPOOL 4fa8e26f46c6fb3bdf233c2213578d827e0025ea0e19df0bfa1a2ae1802dce5df4628977f503b1ed94142388381c60c0af896d5b549736088f892fb810dace4d
+AUX autofs-5.0.7-respect-user-flags-and-fix-asneeded-r3.patch 3883 SHA256 e2c15afb788421c4231eacb7830ff4694c306acddb95f8258dc2a34845aed8c2 SHA512 7332d440b583cdf88be95a4f01d0832a5807e5e807564d135fd47c08886d3abb90bc9df0c88bfa5b2a910ebf1ca3ee37ade78afb02ce6e57a4468c03b6ddbc84 WHIRLPOOL b96cbfc284c0caab12c4ac6c53ccd57a9247f25d1b0f22b45899181cf3e72a9c419472dc26252f3dfcf029a59d02aae3f713826268f62cd7300587c8315e05c0
+AUX autofs-5.0.7-sasl-def.patch 1114 SHA256 bcaa9a826d7a936d1510f4ddb914a314bf37eeab9edc24dcf9b73cdbc6cfa79a SHA512 a6b1b75079f4651ef9886d8315c8fb6894c5800eb6a4f614fdcb205365e805ba6e4f95146ed95b283e361339eb5b0b723956b3344e50856223ae79aec7c6ca09 WHIRLPOOL fcea83e33989315a87a983972d7c6cc155346c7d901f63e9aa8a18f300cc5b109fa247b617acc9f97aa20100e4d4e95b901f24fd9ac3af6ef8530dee2b1e2b11
+AUX autofs-5.0.7-sloppy-mount.patch 3375 SHA256 e5901ee729202d6b6ac9cea99dc0457986875c546a3b0d684133b25bed22ba8f SHA512 2c5cf35c9ea4258c406be629b99fabe953fca63209dfa93a74b1b8441ae92b58677bb52e408556a05be0492871ac98849baf6c8aba7429efc97e38b4a9b1fb45 WHIRLPOOL b13e2c494f224e0e244ec7b3a030835d3c830660203e691117f355a078b719cd64ec312c3809f1ff1410b5b9e9b34914a4ce0dedc3c4db609ba5cd4ddaec9248
+AUX autofs-5.1.2-libtirpc-as-need.patch 808 SHA256 06257ab8ffd07188a5d16473662fea0b9ca44cdae523e21f33ae0dee15b11b4c SHA512 96441e4a040ceafd4bf323003d13170f419ea09c7d9cfdaeaf8675c945d28afde9b9ccf0ae3b0180d2038f5120e6d651c6657115658591093b778ed8f21b1bb3 WHIRLPOOL ede59bbc7473e34fbbd65f44409fd3312005b7049353ecf1b780f889f9852afeb5a40b4bef3dcb560cdef5b1dcee42498f617fdceb928978d05a0be3c7ffe393
+AUX autofs5-auto.master 693 SHA256 32b4e7b113bf6cef42d827887abd135e81623a959ee6993b8877cc9a0d95e867 SHA512 3be4e92250cb678a6d8454b5703c48f6fac14653e1e89028917a627787e8785bfae1cac5a76b2d8a030fd2ec6e491e22488c19a2034cfeedf02e98c400a228dd WHIRLPOOL 5dc1736c64cef4bd9c6af7698ec3c1f81481a2f4a4cf46d7178d1b9645a5f1ba9153588d1a375b16c4352a8967b643f49e010baf6522bd88de6bc807a8893842
+AUX autofs5.initd 1563 SHA256 5ee23ee05da536fb67456c034e757841b27bc8528d93d2bc835e7427fe77d05e SHA512 f8e1d38917b9c7048a4f6498fb987984306e15458eaf8cb73990a99d355d7f7ce3f1aa5450725283cbbc6f5c0e2f31048f1cd26eca7f136f1fe30a6dd8d31c43 WHIRLPOOL b57a6ab92d8dfe21be2348ec8e86ae91a63ad4452547335896c066148e57fc4adae3197d684614934b1b7d24611440e98060ce0b4541608adcdbfd69cfd6b81c
+DIST autofs-5.0.10.tar.xz 258480 SHA256 98150c09639112a125a6d0ddc6aa1920ae4e6c41736e65d8a004c3171fcca70b SHA512 899d3b7040d1162312f9d595df0fd6c40489e4aefb7086893b51993446da78f10707d7e8caf8440ff24000d54794faca869aaf8564e5622caf8bb046af6fcf3b WHIRLPOOL 32c964a58f5125dfbfe589345e1fdf3da357fdadead790e3adbc840f0fc1b7093a0191224ac8d07ac792184914f6630ba08d572ffdcca0423e2a41bb2892ceaf
+DIST autofs-5.0.7-patches-3.tar.lzma 37967 SHA256 16de3486573a94d476f70f2c422656d6fddd79b3581ce05faeb5dd55748ba1cb SHA512 8cbb683a82d2cdc5e3c97921ba3a5bc5af5ab9fb45e4802de021a6161eaeaebb192790a351d281d48b68ed0f8ea6e3a0c0514a4f4a1c546191d8acca9e856ca7 WHIRLPOOL a42f6d609ee4160dfb2d84d94516667f41b8dbe9bf6bdef923f424f82ec00f6115f211dc2985170c45be53bdc45ea47026cc3750c61c7e14aa02ce3384bb9908
+DIST autofs-5.0.7.tar.bz2 319117 SHA256 08c4304d8076dc80c14df559bc5fd821b67ef3457b245f61068bd053d8f94ccc SHA512 672c53e0a5477097779088d8654edaad4cb01ab68ade2ee175d963c7d4895d1bdeeeabc87057ecca2f4f3a0f08014298dae40e5e8e862c20c0b1477d72431f84 WHIRLPOOL 220cbd618ee4f34c82eaad823312284cc787aa28a0a8b9638a4b495cf38a3a6f9da194e74722febe04ee2b5ac4e1e9eccccde1f562d0d554f1e8a5ff4b5faec8
+DIST autofs-5.1.1-patches-0.tar.lzma 41178 SHA256 ef9f94aacff845d29d3118c73ca7d08199d40a7de5edae1025d341530e7dc2b4 SHA512 5c3ba26711401b3f9dc8cd36d3a85b1a8efce409621efedfc4f1caf2a15536646f6f89a79b8e12c703d3b3a4627ecda8c800386ebff34e20fdfad39041d91aa4 WHIRLPOOL d3d91c432e643911a4d8b5463e056aa50c717c08287e6ccf75bf1d6ca071460cc709aa32387f53cbe763de27b86eef1e26ab75a2fd334c783fd024b9f1d47ba3
+DIST autofs-5.1.1.tar.xz 290300 SHA256 e08ff0ef9ff365d87b6c33dca136d20e4e07675197a324f2816894cb437021c3 SHA512 37c0f10ee06bbfc76059ff9ae54d9b462f1c2bc39e8779e96dd5bfc2b07055606c0710f1c3de95e6f099edd2c5bb5a6f8a341be989d7554bf80011bfbe90c905 WHIRLPOOL 063e7bcabb3e93a17e8e7da75e6b42af59769e794e3b31240762a4617cc2ac626b4b4985a38455bdca56753fb897fed1a3173c633f1f9a594e79f891dc41f523
+DIST autofs-5.1.2.tar.xz 294792 SHA256 88b7de39088aead983e02072a7b753d5ee52ce419c8913f7a3d4ff5521313f0c SHA512 435bcb41c9d467947c194d879e46692b5976131b8e923793bdeac34f70420ede740c4d70ec393413fff0b1010495ac7fe5fa8b45a59d15a2430ecae9ec3fe7e1 WHIRLPOOL d0e53d1d41bf31c8bf6358053b1a0668dcc0a84ee92ff69ade86a6731bfb0945f41cab5b2dd62d7c086219095c20db43c91a074ce321fd5db870a5f16af7bce0
+DIST autofs-5.1.3.tar.xz 300632 SHA256 e96eebfe3ed5fb1a30f4510f538198affde223e370c6dc2bed9780309272b1bf SHA512 d5363f4442be5258465140920a32cb63340c5da060ef2e66678f003d6a0c00579880837f0a04f59c7bce57d1cbc0f42bdd26546a2195f87e7bd46334c9e32e35 WHIRLPOOL f3fd7ae400a858ddc888970d1435d0b408b8d11534e22db765782cede3a31604456beed27024066fa9afc1d124602ce07589bd4fd3d8fa89c9becbc676d26fa9
+EBUILD autofs-5.0.10.ebuild 3051 SHA256 51fd84712524bbfa2502b0fc6808821bbc548a51e52a9f7a6c664dc4229cdc0a SHA512 9d920430aea147beca0808c18bae3e697c8d28674756c073ebaf08257c390cbde5f4f35a6c116cbc2e7a6ce9ae2bf3945d27336e29469869470ba82ef79898b3 WHIRLPOOL c2dc04e819bd2bf36924371a16689113acb3fbc8577bdc742562039d6f0d873d405fc8725cff2c6ed3071fe55a8b188beee15157a460bcd1dcd3f884c7772541
+EBUILD autofs-5.0.7-r4.ebuild 3800 SHA256 60a7fab10f88217d7fd95b2091f4d063fe7d87754cfc2e97d86f6e0f68b68905 SHA512 6b397ac969f16d35e907590643112596698e1da71bf48091f05b01d3c40f613329472c6fb9c43c50b43fff3e9d234ae2141ae741a78db9aa213a6b45dfe6d577 WHIRLPOOL 0270a7819e105178c0d71c29eac3e07173fc762ad72dabfc61d11abba0d8329755bccc36fd6fb7fd0792191bdd2dafa4515956b1d77f4e8ff2ffc3230f1c3713
+EBUILD autofs-5.0.7-r5.ebuild 3862 SHA256 7d48c0682098326a5dd4a72dd421305ab1bf3ce550e00581f30cf1ba724ab31f SHA512 36d61ce719c07ed99b77ec1cfcad99c4917b2c5d84eed44571f5cb814c0dda5af31bf5c23573275ffb3472245930e3adfcb03bf85adf8cd718716ce18c17ed79 WHIRLPOOL 55cab84a80fa301cd8a694cb93726f93fad453af92754a82abe2c3bcd4e72d9e4b68609dc0b1b271a16beeb37e2bbfac03d6152058a704595f08cbe801e23ec4
+EBUILD autofs-5.1.1-r1.ebuild 3049 SHA256 2052f836d4a55ea195a024a74396116ceeb354d674c771d7bd28a155fe64d71e SHA512 396dff732065faa92f220aab9c01b352aa39d797cbe15bebc9499d1591cd3d5d5cbd74c036aa3ba5f89cfd7b30177fdcf281b0b3451b092634acb0236649530a WHIRLPOOL 30b50d053134608e80c0884677fadf628e77f4ef893a8efcb28600e59fb95ebd42a784b9f30f5bf035d3f0a2dbc7871fde89dfe605533d7df832bc2aa562ca32
+EBUILD autofs-5.1.2.ebuild 3098 SHA256 4943cc0cad9923c46055bf413d5f6a38f0fcd0c8b37ad9f1dd5a752463abe148 SHA512 cc2ae2b4284ca354e9d3f7314e04c7ac40e06638d57303c493b2ef8ffeb0666fa55031a31b791322b5eb2edc515f6bac893f2c2edf6807c7f55c0aaca98c60c2 WHIRLPOOL efb65c476ad52175786173f991881099f4095adca075909a69236ff2ae1079c55a8b3d496d7fdcd140ee65f74689971a58cc10f53b26bcc9c97c84c8d093e69c
+EBUILD autofs-5.1.3.ebuild 3090 SHA256 b2574fe8c2a6a65c567968ec3e21e49091f5ed03196f355828cefebffbffec61 SHA512 ecd06248b831aa736e5b30a9b16bce46babfe0b8f1fa710e178ec845000768a430269219736b20ff5faa66834578156d4a709b35be02820d4be336ade5d7774b WHIRLPOOL 223e23355c442e41fc114f5443e2168fd3d7f38ab1d765f01d56474527199f16401301079bb70510f933870a77cb3f09f6029bf2959802ac1b2b3065c2c7a1d9
+MISC ChangeLog 6434 SHA256 63b80d8479610aa5f88dd0a7b41fc850b11ec497daa404ae576ff2b5245f4b9d SHA512 d20ec60005f18e6357e6e5be370634d101c3197c8fd87650fc40199ae9d97e81837d19b194b5424393c3dc46d159c1ebaadcf60daec4af84ff763583705206e3 WHIRLPOOL 116419ae49f9421592f9a18f514e3e7537ed461bad2b2493b4e2d179bfac368021744b2822ed3218ae137fc4f8d1e93dea6783be6313772f9907900ec1213298
+MISC ChangeLog-2015 30660 SHA256 6c4db77e17bcf966502dfb7d61b3857d157aaf00b4871ea96ba5febf5e6e7b09 SHA512 2cd070f669c1891699e5b92e9dfe134d87d8bb31371738bcc228a653d39b852d4ba5b300aedbfd041aecb508eb62b3aa65cb4af43b8ecac7cb251de8739d3a17 WHIRLPOOL 495b89da795092fe7f03d69ac8d5cd3d90baeb488ab648bd5541f744fdc0fc10592c4b3d4596517b9de621d0d6b8c8946828c9c680fbd5885677f5f49fef985c
+MISC metadata.xml 856 SHA256 e97455c4fd91a9ac1f3e97e1d03b99e5fadf4092a6f7c30e7fdcfcac3228ea00 SHA512 b84635dd58c8ab0cc085faf540a76844365c7479429ae48672c9b8ff3f3b2250c40b91e753fa5f9702c2bc12cb7ed5f52384db0f36bb3abb8d2f020fbd12e63b WHIRLPOOL 39d67637b44ade776d472922f41840674ab60d170bda40fef244a4908dfc26d59d6e51d2e5b2f88b0191494dabaf42dbd027cf91428daea33289b3d7aca356ea
diff --git a/net-fs/autofs/autofs-5.0.10.ebuild b/net-fs/autofs/autofs-5.0.10.ebuild
new file mode 100644
index 000000000000..c7881fa3b00f
--- /dev/null
+++ b/net-fs/autofs/autofs-5.0.10.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2015 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 hesiod 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] )
+ hesiod? ( net-dns/hesiod )
+ ldap? ( >=net-nds/openldap-2.0
+ sasl? (
+ dev-libs/cyrus-sasl
+ dev-libs/libxml2
+ virtual/krb5
+ )
+ )
+ libtirpc? ( net-libs/libtirpc )"
+
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ virtual/yacc"
+
+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
+ 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_with hesiod)
+ $(use_enable mount-locking)
+ --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.0.7-r4.ebuild b/net-fs/autofs/autofs-5.0.7-r4.ebuild
new file mode 100644
index 000000000000..82f75d9de136
--- /dev/null
+++ b/net-fs/autofs/autofs-5.0.7-r4.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=true
+
+inherit autotools-utils linux-info multilib systemd toolchain-funcs
+
+PATCH_VER=3
+[[ -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.bz2
+ ${PATCHSET_URI}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ~ppc64 sparc x86"
+IUSE="-dmalloc hesiod 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] )
+ hesiod? ( net-dns/hesiod )
+ ldap? ( >=net-nds/openldap-2.0
+ sasl? (
+ dev-libs/cyrus-sasl
+ dev-libs/libxml2
+ virtual/krb5
+ )
+ )
+ libtirpc? ( net-libs/libtirpc )"
+
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ virtual/yacc"
+
+CONFIG_CHECK="~AUTOFS4_FS"
+
+PATCHES=(
+ # Fix for bug #210762
+ # Upstream reference: http://thread.gmane.org/gmane.linux.kernel.autofs/4203
+ "${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
+ "${FILESDIR}"/${PN}-5.0.7-respect-user-flags-and-fix-asneeded-r3.patch
+
+ # Upstream reference: http://thread.gmane.org/gmane.linux.kernel.autofs/5371
+ "${FILESDIR}"/${PN}-5.0.5-fix-install-deadlink.patch
+
+ "${FILESDIR}"/${P}-add-missing-endif-HAVE_SASL-in-modules-lookup_ldap.c.patch #361899, #468606
+ "${FILESDIR}"/${PN}-5.0.6-revert-ldap.patch #381315
+ "${FILESDIR}"/${PN}-5.0.7-sasl-def.patch #469324
+ "${FILESDIR}"/${PN}-5.0.7-libtirpc-link.patch #464120
+ "${FILESDIR}"/${PN}-5.0.7-parallel-make.patch
+ )
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+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_with hesiod)
+ $(use_enable mount-locking)
+ --disable-ext-env
+ --enable-sloppy-mount # bug #453778
+ --enable-forced-shutdown
+ --enable-ignore-busy
+ --with-systemd
+ systemddir="$(systemd_get_unitdir)" #bug #479492
+ RANLIB="$(type -P $(tc-getRANLIB))" # bug #483716
+ )
+ autotools-utils_src_configure
+}
+
+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.0.7-r5.ebuild b/net-fs/autofs/autofs-5.0.7-r5.ebuild
new file mode 100644
index 000000000000..e85bd049f50d
--- /dev/null
+++ b/net-fs/autofs/autofs-5.0.7-r5.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=true
+
+inherit autotools-utils linux-info multilib systemd toolchain-funcs
+
+PATCH_VER=3
+[[ -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.bz2
+ ${PATCHSET_URI}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="-dmalloc hesiod 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] )
+ hesiod? ( net-dns/hesiod )
+ ldap? ( >=net-nds/openldap-2.0
+ sasl? (
+ dev-libs/cyrus-sasl
+ dev-libs/libxml2
+ virtual/krb5
+ )
+ )
+ libtirpc? ( net-libs/libtirpc )"
+
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ virtual/yacc"
+
+CONFIG_CHECK="~AUTOFS4_FS"
+
+PATCHES=(
+ # Fix for bug #210762
+ # Upstream reference: http://thread.gmane.org/gmane.linux.kernel.autofs/4203
+ "${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
+ "${FILESDIR}"/${PN}-5.0.7-respect-user-flags-and-fix-asneeded-r3.patch
+
+ # Upstream reference: http://thread.gmane.org/gmane.linux.kernel.autofs/5371
+ "${FILESDIR}"/${PN}-5.0.5-fix-install-deadlink.patch
+
+ "${FILESDIR}"/${P}-add-missing-endif-HAVE_SASL-in-modules-lookup_ldap.c.patch #361899, #468606
+ "${FILESDIR}"/${PN}-5.0.6-revert-ldap.patch #381315
+ "${FILESDIR}"/${PN}-5.0.7-sasl-def.patch #469324
+ "${FILESDIR}"/${PN}-5.0.7-libtirpc-link.patch #464120
+ "${FILESDIR}"/${PN}-5.0.7-parallel-make.patch
+ "${FILESDIR}"/${PN}-5.0.7-sloppy-mount.patch #545258
+ )
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+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_with hesiod)
+ $(use_enable mount-locking)
+ --disable-ext-env
+ --enable-sloppy-mount # bug #453778
+ --enable-forced-shutdown
+ --enable-ignore-busy
+ --with-systemd
+ systemddir="$(systemd_get_unitdir)" #bug #479492
+ RANLIB="$(type -P $(tc-getRANLIB))" # bug #483716
+ )
+ autotools-utils_src_configure
+}
+
+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.1-r1.ebuild b/net-fs/autofs/autofs-5.1.1-r1.ebuild
new file mode 100644
index 000000000000..8db4727c131b
--- /dev/null
+++ b/net-fs/autofs/autofs-5.1.1-r1.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2016 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=0
+[[ -n ${PATCH_VER} ]] && \
+ PATCHSET_URI="https://dev.gentoo.org/~dlan/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 hesiod 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] )
+ hesiod? ( net-dns/hesiod )
+ ldap? ( >=net-nds/openldap-2.0
+ sasl? (
+ dev-libs/cyrus-sasl
+ dev-libs/libxml2
+ virtual/krb5
+ )
+ )
+ libtirpc? ( net-libs/libtirpc )"
+
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ virtual/yacc"
+
+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
+ 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_with hesiod)
+ $(use_enable mount-locking)
+ --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.2.ebuild b/net-fs/autofs/autofs-5.1.2.ebuild
new file mode 100644
index 000000000000..3a398fa77007
--- /dev/null
+++ b/net-fs/autofs/autofs-5.1.2.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2017 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 hesiod 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] )
+ hesiod? ( net-dns/hesiod )
+ ldap? ( >=net-nds/openldap-2.0
+ sasl? (
+ dev-libs/cyrus-sasl
+ dev-libs/libxml2
+ virtual/krb5
+ )
+ )
+ libtirpc? ( net-libs/libtirpc )"
+
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ virtual/yacc"
+
+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_with hesiod)
+ $(use_enable mount-locking)
+ --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
new file mode 100644
index 000000000000..861d5ec5231a
--- /dev/null
+++ b/net-fs/autofs/autofs-5.1.3.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2017 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 hesiod 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] )
+ hesiod? ( net-dns/hesiod )
+ ldap? ( >=net-nds/openldap-2.0
+ sasl? (
+ dev-libs/cyrus-sasl
+ dev-libs/libxml2
+ virtual/krb5
+ )
+ )
+ libtirpc? ( net-libs/libtirpc )
+ !libtirpc? ( sys-libs/glibc[rpc(-)] )
+"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ virtual/yacc"
+
+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
+ 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_with hesiod)
+ $(use_enable mount-locking)
+ --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/files/autofs-5.0.3-heimdal.patch b/net-fs/autofs/files/autofs-5.0.3-heimdal.patch
new file mode 100644
index 000000000000..707364df2f97
--- /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-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.6-revert-ldap.patch b/net-fs/autofs/files/autofs-5.0.6-revert-ldap.patch
new file mode 100644
index 000000000000..49901ddfc69b
--- /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/autofs-5.0.7-add-missing-endif-HAVE_SASL-in-modules-lookup_ldap.c.patch b/net-fs/autofs/files/autofs-5.0.7-add-missing-endif-HAVE_SASL-in-modules-lookup_ldap.c.patch
new file mode 100644
index 000000000000..366b1eaaba3b
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.7-add-missing-endif-HAVE_SASL-in-modules-lookup_ldap.c.patch
@@ -0,0 +1,45 @@
+--- ./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;
+ modules/lookup_ldap.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/modules/lookup_ldap.c b/modules/lookup_ldap.c
+index dbec753..ce1e2e5 100644
+--- a/modules/lookup_ldap.c
++++ b/modules/lookup_ldap.c
+@@ -28,7 +28,9 @@
+ #include <arpa/nameser.h>
+ #include <resolv.h>
+ #include <lber.h>
++#ifdef HAVE_SASL
+ #include <libxml/tree.h>
++#endif
+
+ #define MODULE_LOOKUP
+ #include "automount.h"
diff --git a/net-fs/autofs/files/autofs-5.0.7-libtirpc-link.patch b/net-fs/autofs/files/autofs-5.0.7-libtirpc-link.patch
new file mode 100644
index 000000000000..92143f1d3066
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.7-libtirpc-link.patch
@@ -0,0 +1,10 @@
+diff --git a/modules/Makefile b/modules/Makefile
+index 4ecbd6a..6a17540 100644
+--- a/modules/Makefile
++++ b/modules/Makefile
+@@ -114,4 +114,4 @@ lookup_ldap.so: lookup_ldap.c dclist.o base64.o $(SASL_OBJ)
+
+ mount_nfs.so: mount_nfs.c replicated.o
+ $(CC) $(LDFLAGS) $(SOLDFLAGS) $(CFLAGS) -o mount_nfs.so \
+- mount_nfs.c replicated.o $(AUTOFS_LIB) $(LIBNSL)
++ mount_nfs.c replicated.o $(AUTOFS_LIB) $(LIBNSL) $(TIRPCLIB)
diff --git a/net-fs/autofs/files/autofs-5.0.7-parallel-make.patch b/net-fs/autofs/files/autofs-5.0.7-parallel-make.patch
new file mode 100644
index 000000000000..f510f8fa2015
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.7-parallel-make.patch
@@ -0,0 +1,48 @@
+From ed85b855e1bcdb814b3dca7f6c768b86e6353fe7 Mon Sep 17 00:00:00 2001
+From: "Lan Yixun (dlan)" <dennis.yxun@gmail.com>
+Date: Thu, 25 Jul 2013 10:04:23 +0800
+Subject: [PATCH] fix occasional build error when enable parallel compiling
+
+the problem here we pass "-jX" ( X> 1) to "make", and "rpc_subs.c"
+occasionally fail to compile due to it can't find "mount.h",
+the root cause it that "mount.h" haven't generated by that time,
+add this patch should fix this problem.
+to make rpc_subs.o explicitly depend on "mount.h".
+
+---
+error message:
+
+x86_64-pc-linux-gnu-gcc -O2 -pipe -march=core2 -D_REENTRANT
+-D_FILE_OFFSET_BITS=64 -I/usr/include/tirp c -D_REENTRANT
+-D_FILE_OFFSET_BITS=64 -I/usr/include/tirpc -I../include -fPIC
+-D_GNU_SOURCE -DAUTOFS_MA P_DIR=\"/etc/autofs\"
+-DAUTOFS_CONF_DIR=\"/etc/conf.d\" -c rpc_subs.c
+rpc_subs.c:46:19: fatal error: mount.h: No such file or directory
+ #include "mount.h"
+ ^
+compilation terminated.
+make[1]: *** [rpc_subs.o] Error 1
+make[1]: *** Waiting for unfinished
+jobs....
+
+Signed-off-by: Lan Yixun (dlan) <dennis.yxun@gmail.com>
+---
+ lib/Makefile | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/lib/Makefile b/lib/Makefile
+index 5418009..314779b 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -70,6 +70,8 @@ nss_tok.o: nss_tok.c nss_parse.tab.h
+
+ nss_parse.tab.o: nss_parse.tab.c nss_parse.tab.h
+
++rpc_subs.o: mount.h
++
+ install: all
+
+ clean:
+--
+1.8.3.2
+
diff --git a/net-fs/autofs/files/autofs-5.0.7-respect-user-flags-and-fix-asneeded-r3.patch b/net-fs/autofs/files/autofs-5.0.7-respect-user-flags-and-fix-asneeded-r3.patch
new file mode 100644
index 000000000000..c12d4bbe2b17
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.7-respect-user-flags-and-fix-asneeded-r3.patch
@@ -0,0 +1,144 @@
+--- 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,30 @@ 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
+@@ -71,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
+@@ -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.7-sasl-def.patch b/net-fs/autofs/files/autofs-5.0.7-sasl-def.patch
new file mode 100644
index 000000000000..a12d3798bdf0
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.7-sasl-def.patch
@@ -0,0 +1,43 @@
+diff --git a/modules/lookup_ldap.c b/modules/lookup_ldap.c
+index ce1e2e5..35a2106 100644
+--- a/modules/lookup_ldap.c
++++ b/modules/lookup_ldap.c
+@@ -28,9 +28,6 @@
+ #include <arpa/nameser.h>
+ #include <resolv.h>
+ #include <lber.h>
+-#ifdef HAVE_SASL
+-#include <libxml/tree.h>
+-#endif
+
+ #define MODULE_LOOKUP
+ #include "automount.h"
+@@ -38,6 +35,10 @@
+ #include "lookup_ldap.h"
+ #include "base64.h"
+
++#ifdef WITH_SASL
++#include <libxml/tree.h>
++#endif
++
+ #define MAPFMT_DEFAULT "sun"
+
+ #define MODPREFIX "lookup(ldap): "
+@@ -587,7 +588,7 @@ static LDAP *do_connect(unsigned logopt, const char *uri, struct lookup_context
+ {
+ LDAP *ldap;
+
+-#ifdef HAVE_SASL
++#ifdef WITH_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);
+@@ -1389,7 +1390,7 @@ static void free_context(struct lookup_context *ctxt)
+ defaults_free_searchdns(ctxt->sdns);
+ if (ctxt->dclist)
+ free_dclist(ctxt->dclist);
+-#ifdef HAVE_SASL
++#ifdef WITH_SASL
+ if (ctxt->extern_cert)
+ free(ctxt->extern_cert);
+ if (ctxt->extern_key)
diff --git a/net-fs/autofs/files/autofs-5.0.7-sloppy-mount.patch b/net-fs/autofs/files/autofs-5.0.7-sloppy-mount.patch
new file mode 100644
index 000000000000..86e02bce5558
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.7-sloppy-mount.patch
@@ -0,0 +1,99 @@
+From: Ian Kent <ikent@redhat.com>
+
+Historically autofs added an option to mounts, called the sloppy
+option, meant to allow mount(8) to ignore invalid mount options.
+This was done so that mount map entries for sites that needed to
+use different mount options for some machines would still work.
+It was needed for nfs mounts in particular.
+
+Recent changes to mount(8) cause the sloppy option to be passed on
+for all mounts when it is given.
+
+Previously mount(8) only passed on the option to nfs mounts so now,
+for other than nfs mounts, the mount will fail if the file system
+doesn't understand the sloppy option.
+
+Since the option was not passed on to other than nfs mounts before
+it seems sensible for autofs to not add it for other than nfs mounts
+now.
+
+Signed-off-by: Ian Kent <ikent@redhat.com>
+---
+ modules/mount_bind.c | 9 ++++-----
+ modules/mount_changer.c | 6 +++---
+ modules/mount_ext2.c | 6 +++---
+ modules/mount_generic.c | 4 ++--
+ 4 files changed, 12 insertions(+), 13 deletions(-)
+
+--- a/modules/mount_bind.c
++++ b/modules/mount_bind.c
+@@ -158,13 +158,12 @@ int mount_mount(struct autofs_point *ap,
+ if (!status)
+ existed = 0;
+
+- debug(ap->logopt,
+- MODPREFIX
+- "calling mount --bind " SLOPPY " -o %s %s %s",
++ debug(ap->logopt, MODPREFIX
++ "calling mount --bind -o %s %s %s",
+ options, what, fullpath);
+
+- err = spawn_bind_mount(ap->logopt,
+- SLOPPYOPT "-o", options, what, fullpath, NULL);
++ err = spawn_bind_mount(ap->logopt, "-o",
++ options, what, fullpath, NULL);
+
+ if (err) {
+ if (ap->type != LKP_INDIRECT)
+--- a/modules/mount_changer.c
++++ b/modules/mount_changer.c
+@@ -103,12 +103,12 @@ int mount_mount(struct autofs_point *ap,
+ }
+
+ if (options && options[0]) {
+- debug(ap->logopt,
+- MODPREFIX "calling mount -t %s " SLOPPY "-o %s %s %s",
++ debug(ap->logopt, MODPREFIX
++ "calling mount -t %s -o %s %s %s",
+ fstype, options, what, fullpath);
+
+ err = spawn_mount(ap->logopt, "-t", fstype,
+- SLOPPYOPT "-o", options, what, fullpath, NULL);
++ "-o", options, what, fullpath, NULL);
+ } else {
+ debug(ap->logopt,
+ MODPREFIX "calling mount -t %s %s %s",
+--- a/modules/mount_ext2.c
++++ b/modules/mount_ext2.c
+@@ -116,11 +116,11 @@ int mount_mount(struct autofs_point *ap,
+ }
+
+ if (options) {
+- debug(ap->logopt,
+- MODPREFIX "calling mount -t %s " SLOPPY "-o %s %s %s",
++ debug(ap->logopt, MODPREFIX
++ "calling mount -t %s -o %s %s %s",
+ fstype, options, what, fullpath);
+ err = spawn_mount(ap->logopt, "-t", fstype,
+- SLOPPYOPT "-o", options, what, fullpath, NULL);
++ "-o", options, what, fullpath, NULL);
+ } else {
+ debug(ap->logopt,
+ MODPREFIX "calling mount -t %s %s %s",
+--- a/modules/mount_generic.c
++++ b/modules/mount_generic.c
+@@ -97,11 +97,11 @@ int mount_mount(struct autofs_point *ap,
+
+ if (options && options[0]) {
+ debug(ap->logopt,
+- MODPREFIX "calling mount -t %s " SLOPPY "-o %s %s %s",
++ MODPREFIX "calling mount -t %s -o %s %s %s",
+ fstype, options, loc, fullpath);
+
+ err = spawn_mount(ap->logopt, "-t", fstype,
+- SLOPPYOPT "-o", options, loc, fullpath, NULL);
++ "-o", options, loc, fullpath, NULL);
+ } else {
+ debug(ap->logopt, MODPREFIX "calling mount -t %s %s %s",
+ fstype, loc, fullpath);
+
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 000000000000..f6e176978164
--- /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],
diff --git a/net-fs/autofs/files/autofs5-auto.master b/net-fs/autofs/files/autofs5-auto.master
new file mode 100644
index 000000000000..8ad09274584b
--- /dev/null
+++ b/net-fs/autofs/files/autofs5-auto.master
@@ -0,0 +1,23 @@
+# 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 000000000000..119585c995e0
--- /dev/null
+++ b/net-fs/autofs/files/autofs5.initd
@@ -0,0 +1,69 @@
+#!/sbin/openrc-run
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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 -s HUP $(cat "${PIDFILE}") 2> /dev/null
+ eend $?
+ fi
+}
diff --git a/net-fs/autofs/metadata.xml b/net-fs/autofs/metadata.xml
new file mode 100644
index 000000000000..9e93cdcfb23a
--- /dev/null
+++ b/net-fs/autofs/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>dlan@gentoo.org</email>
+ <name>Yixun Lan</name>
+ </maintainer>
+ <use>
+ <flag name="dmalloc">Enable debugging with the dmalloc library</flag>
+ <flag name="hesiod">Install hesiod module</flag>
+ <flag name="ldap">Install LDAP module</flag>
+ <flag name="libtirpc">Use TiRPC library instead of SunRPC</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>