Gentoo Archives: gentoo-commits

From: Matt Turner <mattst88@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-fs/autofs/
Date: Mon, 12 Aug 2019 21:52:24
Message-Id: 1565646722.8daeb9ab8ee5b3d5331d204710d860425e4a261a.mattst88@gentoo
1 commit: 8daeb9ab8ee5b3d5331d204710d860425e4a261a
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Mon Aug 12 20:39:13 2019 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Mon Aug 12 21:52:02 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8daeb9ab
7
8 net-fs/autofs: Clean up ebuild
9
10 - Use BDEPEND
11 - Remove unnecessary REQUIRED_USE
12 - Remove long dead patch set handling
13 - Check for new AUTOFS_FS
14 - Use archive.org for dead homepage
15 - Remove unnecessary multilib inherit
16 - Don't install empty /run
17 - Strip EnvironmentFile= line from .service file (592334)
18 - It only provided $OPTIONS (unset, can be set by user easily)
19 and USE_MISC_DEVICE which is not used by the .service file
20
21 Closes: https://bugs.gentoo.org/592334
22 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
23
24 net-fs/autofs/autofs-5.1.5-r2.ebuild | 114 +++++++++++++++++++++++++++++++++++
25 1 file changed, 114 insertions(+)
26
27 diff --git a/net-fs/autofs/autofs-5.1.5-r2.ebuild b/net-fs/autofs/autofs-5.1.5-r2.ebuild
28 new file mode 100644
29 index 00000000000..d838ad213e1
30 --- /dev/null
31 +++ b/net-fs/autofs/autofs-5.1.5-r2.ebuild
32 @@ -0,0 +1,114 @@
33 +# Copyright 1999-2019 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +inherit linux-info systemd toolchain-funcs
39 +
40 +DESCRIPTION="Kernel based automounter"
41 +HOMEPAGE="https://web.archive.org/web/*/http://www.linux-consulting.com/Amd_AutoFS/autofs.html"
42 +SRC_URI="mirror://kernel/linux/daemons/${PN}/v5/${P}.tar.xz"
43 +
44 +LICENSE="GPL-2"
45 +SLOT="0"
46 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
47 +IUSE="-dmalloc ldap +libtirpc mount-locking sasl systemd"
48 +
49 +# currently, sasl code assumes the presence of kerberosV
50 +RDEPEND=">=sys-apps/util-linux-2.20
51 + dmalloc? ( dev-libs/dmalloc[threads] )
52 + ldap? ( >=net-nds/openldap-2.0
53 + sasl? (
54 + dev-libs/cyrus-sasl
55 + dev-libs/libxml2
56 + virtual/krb5
57 + )
58 + )
59 + systemd? ( sys-apps/systemd )
60 + libtirpc? ( net-libs/libtirpc )
61 + !libtirpc? ( elibc_glibc? ( sys-libs/glibc[rpc(-)] ) )
62 +"
63 +DEPEND="${RDEPEND}
64 + libtirpc? ( net-libs/rpcsvc-proto )
65 +"
66 +BDEPEND="
67 + sys-devel/flex
68 + virtual/yacc
69 +"
70 +
71 +pkg_setup() {
72 + linux-info_pkg_setup
73 +
74 + local CONFIG_CHECK
75 +
76 + if kernel_is -ge 4 18; then
77 + CONFIG_CHECK="~AUTOFS_FS"
78 + else
79 + CONFIG_CHECK="~AUTOFS4_FS"
80 + fi
81 +
82 + check_extra_config
83 +}
84 +
85 +src_prepare() {
86 + sed -i -e "s:/usr/bin/kill:/bin/kill:" samples/autofs.service.in || die # bug #479492
87 + sed -i -e "/^EnvironmentFile/d" samples/autofs.service.in || die # bug #592334
88 +
89 + # Install samples including autofs.service
90 + sed -i -e "/^SUBDIRS/s/$/ samples/g" Makefile.rules || die
91 +
92 + default
93 +}
94 +
95 +src_configure() {
96 + # bug #483716
97 + tc-export AR
98 + # --with-confdir is for bug #361481
99 + # --with-mapdir is for bug #385113
100 + local myeconfargs=(
101 + --with-confdir=/etc/conf.d
102 + --with-mapdir=/etc/autofs
103 + $(use_with dmalloc)
104 + $(use_with ldap openldap)
105 + $(use_with libtirpc)
106 + $(use_with sasl)
107 + $(use_enable mount-locking)
108 + $(use_with systemd systemd $(systemd_get_systemunitdir)) # bug #479492
109 + --without-hesiod
110 + --disable-ext-env
111 + --enable-sloppy-mount # bug #453778
112 + --enable-force-shutdown
113 + --enable-ignore-busy
114 + RANLIB="$(type -P $(tc-getRANLIB))" # bug #483716
115 + )
116 + econf "${myeconfargs[@]}"
117 +}
118 +
119 +src_install() {
120 + default
121 + rmdir "${D}"/run
122 +
123 + if kernel_is -lt 2 6 30; then
124 + # kernel patches
125 + docinto patches
126 + dodoc patches/${PN}4-2.6.??{,.?{,?}}-v5-update-????????.patch
127 + fi
128 + newinitd "${FILESDIR}"/autofs5.initd autofs
129 + insinto etc/autofs
130 + newins "${FILESDIR}"/autofs5-auto.master auto.master
131 +}
132 +
133 +pkg_postinst() {
134 + if kernel_is -lt 2 6 30; then
135 + elog "This version of ${PN} requires a kernel with autofs4 supporting"
136 + elog "protocol version 5.00. Patches for kernels older than 2.6.30 have"
137 + elog "been installed into"
138 + elog "${EROOT}/usr/share/doc/${P}/patches."
139 + elog "For further instructions how to patch the kernel, please refer to"
140 + elog "${EROOT}/usr/share/doc/${P}/INSTALL."
141 + elog
142 + fi
143 + elog "If you plan on using autofs for automounting remote NFS mounts,"
144 + elog "please check that both portmap (or rpcbind) and rpc.statd/lockd"
145 + elog "are running."
146 +}