Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-fs/nfs-utils/
Date: Mon, 10 Sep 2018 13:11:59
Message-Id: 1536583358.733e710c6ca4cd654de98f47a46417d1c261a233.polynomial-c@gentoo
1 commit: 733e710c6ca4cd654de98f47a46417d1c261a233
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 10 12:42:38 2018 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 10 12:42:38 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=733e710c
7
8 net-fs/nfs-utils: Bump to version 2.3.3
9
10 Package-Manager: Portage-2.3.49, Repoman-2.3.10
11
12 net-fs/nfs-utils/Manifest | 1 +
13 net-fs/nfs-utils/nfs-utils-2.3.3.ebuild | 191 ++++++++++++++++++++++++++++++++
14 2 files changed, 192 insertions(+)
15
16 diff --git a/net-fs/nfs-utils/Manifest b/net-fs/nfs-utils/Manifest
17 index ff956e9b618..3ea779b3bc5 100644
18 --- a/net-fs/nfs-utils/Manifest
19 +++ b/net-fs/nfs-utils/Manifest
20 @@ -1,2 +1,3 @@
21 DIST nfs-utils-2.3.1.tar.bz2 854899 BLAKE2B f9541b9dc103d978f21d57d8ba0c14a3b30f6ba874b112239d014076c1c72b6654e8e02b4bfea686e658dac84d1e896b872bc2054591275ef1713ae4e7b7d005 SHA512 de3e70f8656bc5b5aa98262685a9e80929c6314234d9bbb74d4c7efcb7a8b2640d48d2100850b403157ebefc8f0eb48598b48238fae795f64c7a0e9a8bff93e3
22 DIST nfs-utils-2.3.2.tar.bz2 884068 BLAKE2B c4133cc12c5c1cd33346408e2d1286cf50880a89ec97cb8ce4453266ba5b145eb1ca7a4362ac1a91ea5c1ebddd4fcd1d6a4cd12f45637cd5d845cc6d8d5f139d SHA512 4b948d92f515e9340163f53ab26dd7189fa8b13909f5c668b7c66ae13f181ed778967edc0a20753763540b5a3f93a41a2de38a7276ffbfadfd866c5ed422520c
23 +DIST nfs-utils-2.3.3.tar.bz2 888947 BLAKE2B 7c913f0c5061807d4af162fb392c8f466abb97c88960853b52298f61056bcad08f67a16e577036dec9afa737d88268d5a766b67c4b30a014b666dfbf3db81031 SHA512 266b86ef5041a7ecd144c6f2570e8a6eb00ebb4e547fa4b8c8c3e60a4af117c2690ff9effb0d4113a7b7ef57164583c8a6ada9cb1bb8f7b748524c826eaf1cba
24
25 diff --git a/net-fs/nfs-utils/nfs-utils-2.3.3.ebuild b/net-fs/nfs-utils/nfs-utils-2.3.3.ebuild
26 new file mode 100644
27 index 00000000000..553fb8c8b2d
28 --- /dev/null
29 +++ b/net-fs/nfs-utils/nfs-utils-2.3.3.ebuild
30 @@ -0,0 +1,191 @@
31 +# Copyright 1999-2018 Gentoo Foundation
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=6
35 +
36 +inherit autotools flag-o-matic multilib systemd
37 +
38 +DESCRIPTION="NFS client and server daemons"
39 +HOMEPAGE="http://linux-nfs.org/"
40 +
41 +if [[ "${PV}" = *_rc* ]] ; then
42 + inherit versionator
43 + MY_PV="$(replace_all_version_separators -)"
44 + SRC_URI="http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=snapshot;h=refs/tags/${PN}-${MY_PV};sf=tgz -> ${P}.tar.gz"
45 + S="${WORKDIR}/${PN}-${PN}-${MY_PV}"
46 +else
47 + SRC_URI="mirror://sourceforge/nfs/${P}.tar.bz2"
48 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
49 +fi
50 +
51 +LICENSE="GPL-2"
52 +SLOT="0"
53 +IUSE="caps ipv6 junction kerberos ldap +libmount nfsdcld +nfsidmap +nfsv4 nfsv41 selinux tcpd +uuid"
54 +REQUIRED_USE="kerberos? ( nfsv4 )"
55 +RESTRICT="test" #315573
56 +
57 +# kth-krb doesn't provide the right include
58 +# files, and nfs-utils doesn't build against heimdal either,
59 +# so don't depend on virtual/krb.
60 +# (04 Feb 2005 agriffis)
61 +DEPEND_COMMON="
62 + net-libs/libtirpc:=
63 + >=net-nds/rpcbind-0.2.4
64 + sys-libs/e2fsprogs-libs
65 + caps? ( sys-libs/libcap )
66 + ldap? ( net-nds/openldap )
67 + libmount? ( sys-apps/util-linux )
68 + nfsdcld? ( >=dev-db/sqlite-3.3 )
69 + nfsv4? (
70 + dev-libs/libevent:=
71 + >=sys-apps/keyutils-1.5.9
72 + kerberos? (
73 + >=net-libs/libtirpc-0.2.4-r1[kerberos]
74 + app-crypt/mit-krb5
75 + )
76 + )
77 + nfsv41? (
78 + sys-fs/lvm2
79 + )
80 + tcpd? ( sys-apps/tcp-wrappers )
81 + uuid? ( sys-apps/util-linux )"
82 +RDEPEND="${DEPEND_COMMON}
83 + !net-libs/libnfsidmap
84 + !net-nds/portmap
85 + !<sys-apps/openrc-0.13.9
86 + selinux? (
87 + sec-policy/selinux-rpc
88 + sec-policy/selinux-rpcbind
89 + )
90 +"
91 +DEPEND="${DEPEND_COMMON}
92 + dev-libs/libxml2
93 + net-libs/rpcsvc-proto
94 + virtual/pkgconfig"
95 +
96 +PATCHES=(
97 + "${FILESDIR}"/${PN}-1.1.4-mtab-sym.patch
98 + "${FILESDIR}"/${PN}-1.2.8-cross-build.patch
99 + "${FILESDIR}"/${PN}-2.3.2-junction_libs.patch
100 + "${FILESDIR}"/${PN}-2.3.2-no-werror.patch
101 +)
102 +
103 +src_prepare() {
104 + default
105 +
106 + sed \
107 + -e "/^sbindir/s:= := \"${EPREFIX}\":g" \
108 + -i utils/*/Makefile.am || die
109 +
110 + eautoreconf
111 +}
112 +
113 +src_configure() {
114 + export libsqlite3_cv_is_recent=yes # Our DEPEND forces this.
115 + export ac_cv_header_keyutils_h=$(usex nfsidmap)
116 + local myeconfargs=(
117 + --with-statedir="${EPREFIX%/}"/var/lib/nfs
118 + --enable-tirpc
119 + --with-tirpcinclude="${EPREFIX%/}"/usr/include/tirpc/
120 + --with-pluginpath="${EPREFIX%/}"/usr/$(get_libdir)/libnfsidmap
121 + --with-rpcgen
122 + --with-systemd="$(systemd_get_systemunitdir)"
123 + --without-gssglue
124 + $(use_enable caps)
125 + $(use_enable ipv6)
126 + $(use_enable junction)
127 + $(use_enable kerberos gss)
128 + $(use_enable kerberos svcgss)
129 + $(use_enable ldap)
130 + $(use_enable libmount libmount-mount)
131 + $(use_enable nfsdcld nfsdcltrack)
132 + $(use_enable nfsv4)
133 + $(use_enable nfsv41)
134 + $(use_enable uuid)
135 + $(use_with tcpd tcp-wrappers)
136 + )
137 + econf "${myeconfargs[@]}"
138 +}
139 +
140 +src_compile(){
141 + # remove compiled files bundled in the tarball
142 + emake clean
143 + default
144 +}
145 +
146 +src_install() {
147 + default
148 + rm linux-nfs/Makefile* || die
149 + dodoc -r linux-nfs README
150 +
151 + # Don't overwrite existing xtab/etab, install the original
152 + # versions somewhere safe... more info in pkg_postinst
153 + keepdir /var/lib/nfs/{,sm,sm.bak}
154 + mv "${ED%/}"/var/lib/nfs "${ED%/}"/usr/$(get_libdir)/ || die
155 +
156 + # Install some client-side binaries in /sbin
157 + dodir /sbin
158 + mv "${ED%/}"/usr/sbin/rpc.statd "${ED%/}"/sbin/ || die
159 +
160 + if use nfsv4 && use nfsidmap ; then
161 + # Install a config file for idmappers in newer kernels. #415625
162 + insinto /etc/request-key.d
163 + echo 'create id_resolver * * /usr/sbin/nfsidmap -t 600 %k %d' > id_resolver.conf
164 + doins id_resolver.conf
165 + fi
166 +
167 + insinto /etc
168 + doins "${FILESDIR}"/exports
169 + keepdir /etc/exports.d
170 +
171 + local f list=() opt_need=""
172 + if use nfsv4 ; then
173 + opt_need="rpc.idmapd"
174 + list+=( rpc.idmapd rpc.pipefs )
175 + use kerberos && list+=( rpc.gssd rpc.svcgssd )
176 + fi
177 + for f in nfs nfsclient rpc.statd "${list[@]}" ; do
178 + newinitd "${FILESDIR}"/${f}.initd ${f}
179 + done
180 + newinitd "${FILESDIR}"/nfsmount.initd-1.3.1 nfsmount # Nuke after 2015/08/01
181 + for f in nfs nfsclient ; do
182 + newconfd "${FILESDIR}"/${f}.confd ${f}
183 + done
184 + sed -i \
185 + -e "/^NFS_NEEDED_SERVICES=/s:=.*:=\"${opt_need}\":" \
186 + "${ED%/}"/etc/conf.d/nfs || die #234132
187 +
188 + local systemd_systemunitdir="$(systemd_get_systemunitdir)"
189 + sed -i \
190 + -e 's:/usr/sbin/rpc.statd:/sbin/rpc.statd:' \
191 + "${ED%/}${systemd_systemunitdir}"/* || die
192 +
193 + keepdir /var/lib/nfs #368505
194 + keepdir /var/lib/nfs/v4recovery #603628
195 +
196 +}
197 +
198 +pkg_postinst() {
199 + # Install default xtab and friends if there's none existing. In
200 + # src_install we put them in /usr/lib/nfs for safe-keeping, but
201 + # the daemons actually use the files in /var/lib/nfs. #30486
202 + local f
203 + for f in "${EROOT%/}"/usr/$(get_libdir)/nfs/*; do
204 + [[ -e ${EROOT%/}/var/lib/nfs/${f##*/} ]] && continue
205 + einfo "Copying default ${f##*/} from ${EPREFIX}/usr/$(get_libdir)/nfs to ${EPREFIX}/var/lib/nfs"
206 + cp -pPR "${f}" "${EROOT%/}"/var/lib/nfs/
207 + done
208 +
209 + if systemd_is_booted; then
210 + if [[ ${REPLACING_VERSIONS} < 1.3.0 ]]; then
211 + ewarn "We have switched to upstream systemd unit files. Since"
212 + ewarn "they got renamed, you should probably enable the new ones."
213 + ewarn "You can run 'equery files nfs-utils | grep systemd'"
214 + ewarn "to know what services you need to enable now."
215 + fi
216 + else
217 + ewarn "If you use OpenRC, the nfsmount service has been replaced with nfsclient."
218 + ewarn "If you were using nfsmount, please add nfsclient and netmount to the"
219 + ewarn "same runlevel as nfsmount."
220 + fi
221 +}