1 |
commit: cae2522da2c82b52c952519dc9886ea59b63827f |
2 |
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Mar 27 03:13:18 2022 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Mar 27 03:26:39 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cae2522d |
7 |
|
8 |
net-fs/nfs-utils: Version bump to 2.6.1 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/764257 |
11 |
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> |
12 |
|
13 |
net-fs/nfs-utils/Manifest | 1 + |
14 |
net-fs/nfs-utils/nfs-utils-2.6.1.ebuild | 218 ++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 219 insertions(+) |
16 |
|
17 |
diff --git a/net-fs/nfs-utils/Manifest b/net-fs/nfs-utils/Manifest |
18 |
index c36c94e4db67..d53d9c7a52c3 100644 |
19 |
--- a/net-fs/nfs-utils/Manifest |
20 |
+++ b/net-fs/nfs-utils/Manifest |
21 |
@@ -1 +1,2 @@ |
22 |
DIST nfs-utils-2.5.4.tar.bz2 943373 BLAKE2B 72ed871613701f5b035941a7aed957771fe3b6a19fefee203130442c292bbbefde35721f2287fef19046d2d837faeda43b06a93a5acdb8ac6240eef90e6dd12c SHA512 b1395c5b06a06246666c48174594b1e08b71cf40b8f94b533497bd92625401a669e2c40e48dbd665891ad2247bc94d7d604d0c5d0f0b66bfe957b03d42e5d305 |
23 |
+DIST nfs-utils-2.6.1.tar.bz2 946432 BLAKE2B fe6ec58b4c0def75a43f40a581a9d67d25ee2e6979f41da87453661b33460b99744e1799d6b1a3ef026027cafb1aae8a954cc6449d3eb77eee494fe72804751d SHA512 5b8949b3d30ccd33c9bc68875ba0993a22e490234d5eeebc189b3da2b1df0c290cd27d58226ffa5f4fe8b9548234fadb1c432b9c7d9b297c10a39fd2887d2f7f |
24 |
|
25 |
diff --git a/net-fs/nfs-utils/nfs-utils-2.6.1.ebuild b/net-fs/nfs-utils/nfs-utils-2.6.1.ebuild |
26 |
new file mode 100644 |
27 |
index 000000000000..74a400f07f63 |
28 |
--- /dev/null |
29 |
+++ b/net-fs/nfs-utils/nfs-utils-2.6.1.ebuild |
30 |
@@ -0,0 +1,218 @@ |
31 |
+# Copyright 1999-2022 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=7 |
35 |
+ |
36 |
+inherit autotools linux-info systemd |
37 |
+ |
38 |
+DESCRIPTION="NFS client and server daemons" |
39 |
+HOMEPAGE="http://linux-nfs.org/" |
40 |
+ |
41 |
+if [[ "${PV}" = *_rc* ]] ; then |
42 |
+ MY_PV="$(ver_rs 1- -)" |
43 |
+ 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" |
44 |
+ S="${WORKDIR}/${PN}-${PN}-${MY_PV}" |
45 |
+else |
46 |
+ SRC_URI="mirror://sourceforge/nfs/${P}.tar.bz2" |
47 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
48 |
+fi |
49 |
+ |
50 |
+LICENSE="GPL-2" |
51 |
+SLOT="0" |
52 |
+IUSE="caps ipv6 junction kerberos ldap +libmount nfsdcld +nfsidmap +nfsv4 nfsv41 sasl selinux tcpd +uuid" |
53 |
+REQUIRED_USE="kerberos? ( nfsv4 )" |
54 |
+RESTRICT="test" #315573 |
55 |
+ |
56 |
+# kth-krb doesn't provide the right include |
57 |
+# files, and nfs-utils doesn't build against heimdal either, |
58 |
+# so don't depend on virtual/krb. |
59 |
+# (04 Feb 2005 agriffis) |
60 |
+COMMON_DEPEND=" |
61 |
+ dev-libs/libxml2 |
62 |
+ net-libs/libtirpc:= |
63 |
+ >=net-nds/rpcbind-0.2.4 |
64 |
+ sys-fs/e2fsprogs |
65 |
+ caps? ( sys-libs/libcap ) |
66 |
+ ldap? ( |
67 |
+ net-nds/openldap:= |
68 |
+ sasl? ( |
69 |
+ app-crypt/mit-krb5 |
70 |
+ dev-libs/cyrus-sasl:2 |
71 |
+ ) |
72 |
+ ) |
73 |
+ libmount? ( sys-apps/util-linux ) |
74 |
+ nfsv4? ( |
75 |
+ dev-db/sqlite:3 |
76 |
+ dev-libs/libevent:= |
77 |
+ >=sys-apps/keyutils-1.5.9:= |
78 |
+ kerberos? ( |
79 |
+ >=net-libs/libtirpc-0.2.4-r1[kerberos] |
80 |
+ app-crypt/mit-krb5 |
81 |
+ ) |
82 |
+ ) |
83 |
+ nfsv41? ( |
84 |
+ sys-fs/lvm2 |
85 |
+ ) |
86 |
+ tcpd? ( sys-apps/tcp-wrappers ) |
87 |
+ uuid? ( sys-apps/util-linux )" |
88 |
+DEPEND="${COMMON_DEPEND} |
89 |
+ elibc_musl? ( sys-libs/queue-standalone ) |
90 |
+" |
91 |
+RDEPEND="${COMMON_DEPEND} |
92 |
+ !net-libs/libnfsidmap |
93 |
+ selinux? ( |
94 |
+ sec-policy/selinux-rpc |
95 |
+ sec-policy/selinux-rpcbind |
96 |
+ ) |
97 |
+" |
98 |
+BDEPEND=" |
99 |
+ net-libs/rpcsvc-proto |
100 |
+ virtual/pkgconfig |
101 |
+" |
102 |
+ |
103 |
+PATCHES=( |
104 |
+ "${FILESDIR}"/${PN}-2.5.2-no-werror.patch |
105 |
+) |
106 |
+ |
107 |
+pkg_setup() { |
108 |
+ linux-info_pkg_setup |
109 |
+ if use nfsv4 && ! use nfsdcld && linux_config_exists && ! linux_chkconfig_present CRYPTO_MD5 ; then |
110 |
+ ewarn "Your NFS server will be unable to track clients across server restarts!" |
111 |
+ ewarn "Please enable the \"${HILITE}nfsdcld${NORMAL}\" USE flag to install the nfsdcltrack usermode" |
112 |
+ ewarn "helper upcall program, or enable ${HILITE}CONFIG_CRYPTO_MD5${NORMAL} in your kernel to" |
113 |
+ ewarn "support the legacy, in-kernel client tracker." |
114 |
+ fi |
115 |
+} |
116 |
+ |
117 |
+src_prepare() { |
118 |
+ default |
119 |
+ |
120 |
+ sed \ |
121 |
+ -e "/^sbindir/s:= := \"${EPREFIX}\":g" \ |
122 |
+ -i utils/*/Makefile.am || die |
123 |
+ |
124 |
+ eautoreconf |
125 |
+} |
126 |
+ |
127 |
+src_configure() { |
128 |
+ export libsqlite3_cv_is_recent=yes # Our DEPEND forces this. |
129 |
+ export ac_cv_header_keyutils_h=$(usex nfsidmap) |
130 |
+ |
131 |
+ # SASL is consumed in a purely automagic way |
132 |
+ export ac_cv_header_sasl_h=no |
133 |
+ export ac_cv_header_sasl_sasl_h=$(usex sasl) |
134 |
+ |
135 |
+ local myeconfargs=( |
136 |
+ --disable-static |
137 |
+ --with-statedir="${EPREFIX}"/var/lib/nfs |
138 |
+ --enable-tirpc |
139 |
+ --with-tirpcinclude="${ESYSROOT}"/usr/include/tirpc/ |
140 |
+ --with-pluginpath="${EPREFIX}"/usr/$(get_libdir)/libnfsidmap |
141 |
+ --with-rpcgen |
142 |
+ --with-systemd="$(systemd_get_systemunitdir)" |
143 |
+ --without-gssglue |
144 |
+ $(use_enable caps) |
145 |
+ $(use_enable ipv6) |
146 |
+ $(use_enable junction) |
147 |
+ $(use_enable kerberos gss) |
148 |
+ $(use_enable kerberos svcgss) |
149 |
+ $(use_enable ldap) |
150 |
+ $(use_enable libmount libmount-mount) |
151 |
+ $(use_enable nfsdcld nfsdcltrack) |
152 |
+ $(use_enable nfsv4) |
153 |
+ $(use_enable nfsv41) |
154 |
+ $(use_enable uuid) |
155 |
+ $(use_with tcpd tcp-wrappers) |
156 |
+ ) |
157 |
+ econf "${myeconfargs[@]}" |
158 |
+} |
159 |
+ |
160 |
+src_compile() { |
161 |
+ # remove compiled files bundled in the tarball |
162 |
+ emake clean |
163 |
+ default |
164 |
+} |
165 |
+ |
166 |
+src_install() { |
167 |
+ default |
168 |
+ rm linux-nfs/Makefile* || die |
169 |
+ dodoc -r linux-nfs README |
170 |
+ |
171 |
+ # Don't overwrite existing xtab/etab, install the original |
172 |
+ # versions somewhere safe... more info in pkg_postinst |
173 |
+ keepdir /var/lib/nfs/{,sm,sm.bak} |
174 |
+ mv "${ED}"/var/lib/nfs "${ED}"/usr/$(get_libdir)/ || die |
175 |
+ |
176 |
+ # Install some client-side binaries in /sbin |
177 |
+ dodir /sbin |
178 |
+ mv "${ED}"/usr/sbin/rpc.statd "${ED}"/sbin/ || die |
179 |
+ |
180 |
+ if use nfsv4 && use nfsidmap ; then |
181 |
+ insinto /etc |
182 |
+ doins support/nfsidmap/idmapd.conf |
183 |
+ |
184 |
+ # Install a config file for idmappers in newer kernels. #415625 |
185 |
+ insinto /etc/request-key.d |
186 |
+ echo 'create id_resolver * * /usr/sbin/nfsidmap -t 600 %k %d' > id_resolver.conf |
187 |
+ doins id_resolver.conf |
188 |
+ fi |
189 |
+ |
190 |
+ insinto /etc |
191 |
+ doins "${FILESDIR}"/exports |
192 |
+ keepdir /etc/exports.d |
193 |
+ |
194 |
+ local f list=() opt_need="" |
195 |
+ if use nfsv4 ; then |
196 |
+ opt_need="rpc.idmapd" |
197 |
+ list+=( rpc.idmapd rpc.pipefs ) |
198 |
+ use kerberos && list+=( rpc.gssd rpc.svcgssd ) |
199 |
+ fi |
200 |
+ for f in nfs nfsclient rpc.statd "${list[@]}" ; do |
201 |
+ newinitd "${FILESDIR}"/${f}.initd ${f} |
202 |
+ done |
203 |
+ newinitd "${FILESDIR}"/nfsmount.initd-1.3.1 nfsmount # Nuke after 2015/08/01 |
204 |
+ for f in nfs nfsclient ; do |
205 |
+ newconfd "${FILESDIR}"/${f}.confd ${f} |
206 |
+ done |
207 |
+ sed -i \ |
208 |
+ -e "/^NFS_NEEDED_SERVICES=/s:=.*:=\"${opt_need}\":" \ |
209 |
+ "${ED}"/etc/conf.d/nfs || die #234132 |
210 |
+ |
211 |
+ local systemd_systemunitdir="$(systemd_get_systemunitdir)" |
212 |
+ sed -i \ |
213 |
+ -e 's:/usr/sbin/rpc.statd:/sbin/rpc.statd:' \ |
214 |
+ "${ED}${systemd_systemunitdir}"/* || die |
215 |
+ |
216 |
+ keepdir /var/lib/nfs #368505 |
217 |
+ keepdir /var/lib/nfs/v4recovery #603628 |
218 |
+ |
219 |
+ # no static archives |
220 |
+ find "${ED}" -name '*.la' -delete || die |
221 |
+} |
222 |
+ |
223 |
+pkg_postinst() { |
224 |
+ # Install default xtab and friends if there's none existing. In |
225 |
+ # src_install we put them in /usr/lib/nfs for safe-keeping, but |
226 |
+ # the daemons actually use the files in /var/lib/nfs. #30486 |
227 |
+ local f |
228 |
+ for f in "${EROOT}"/usr/$(get_libdir)/nfs/*; do |
229 |
+ [[ -e ${EROOT}/var/lib/nfs/${f##*/} ]] && continue |
230 |
+ einfo "Copying default ${f##*/} from ${EPREFIX}/usr/$(get_libdir)/nfs to ${EPREFIX}/var/lib/nfs" |
231 |
+ cp -pPR "${f}" "${EROOT}"/var/lib/nfs/ |
232 |
+ done |
233 |
+ |
234 |
+ if systemd_is_booted; then |
235 |
+ for v in ${REPLACING_VERSIONS}; do |
236 |
+ if ver_test "${v}" -lt 1.3.0; then |
237 |
+ ewarn "We have switched to upstream systemd unit files. Since" |
238 |
+ ewarn "they got renamed, you should probably enable the new ones." |
239 |
+ ewarn "You can run 'equery files nfs-utils | grep systemd'" |
240 |
+ ewarn "to know what services you need to enable now." |
241 |
+ fi |
242 |
+ done |
243 |
+ else |
244 |
+ ewarn "If you use OpenRC, the nfsmount service has been replaced with nfsclient." |
245 |
+ ewarn "If you were using nfsmount, please add nfsclient and netmount to the" |
246 |
+ ewarn "same runlevel as nfsmount." |
247 |
+ fi |
248 |
+} |