Gentoo Archives: gentoo-commits

From: "Tim Harder (radhermit)" <radhermit@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-fs/nfs-utils: nfs-utils-1.3.2-r2.ebuild ChangeLog nfs-utils-1.3.2-r1.ebuild
Date: Mon, 02 Feb 2015 13:47:45
Message-Id: 20150202134741.BC7CF10E5D@oystercatcher.gentoo.org
1 radhermit 15/02/02 13:47:41
2
3 Modified: ChangeLog
4 Added: nfs-utils-1.3.2-r2.ebuild
5 Removed: nfs-utils-1.3.2-r1.ebuild
6 Log:
7 Use upstream fix for backgrounding statd so it works for systemd as well.
8
9 (Portage version: 2.2.15/cvs/Linux x86_64, signed Manifest commit with key 4AB3E85B4F064CA3)
10
11 Revision Changes Path
12 1.270 net-fs/nfs-utils/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/nfs-utils/ChangeLog?rev=1.270&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/nfs-utils/ChangeLog?rev=1.270&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/nfs-utils/ChangeLog?r1=1.269&r2=1.270
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/ChangeLog,v
21 retrieving revision 1.269
22 retrieving revision 1.270
23 diff -u -r1.269 -r1.270
24 --- ChangeLog 31 Jan 2015 22:59:37 -0000 1.269
25 +++ ChangeLog 2 Feb 2015 13:47:41 -0000 1.270
26 @@ -1,6 +1,13 @@
27 # ChangeLog for net-fs/nfs-utils
28 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/ChangeLog,v 1.269 2015/01/31 22:59:37 radhermit Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/ChangeLog,v 1.270 2015/02/02 13:47:41 radhermit Exp $
31 +
32 +*nfs-utils-1.3.2-r2 (02 Feb 2015)
33 +
34 + 02 Feb 2015; Tim Harder <radhermit@g.o> -nfs-utils-1.3.2-r1.ebuild,
35 + +nfs-utils-1.3.2-r2.ebuild, +files/nfs-utils-1.3.2-background-statd.patch,
36 + files/rpc.statd.initd:
37 + Use upstream fix for backgrounding statd so it works for systemd as well.
38
39 *nfs-utils-1.3.2-r1 (31 Jan 2015)
40
41
42
43
44 1.1 net-fs/nfs-utils/nfs-utils-1.3.2-r2.ebuild
45
46 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/nfs-utils/nfs-utils-1.3.2-r2.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/nfs-utils/nfs-utils-1.3.2-r2.ebuild?rev=1.1&content-type=text/plain
48
49 Index: nfs-utils-1.3.2-r2.ebuild
50 ===================================================================
51 # Copyright 1999-2015 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 # $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/nfs-utils-1.3.2-r2.ebuild,v 1.1 2015/02/02 13:47:41 radhermit Exp $
54
55 EAPI="5"
56
57 inherit eutils flag-o-matic multilib autotools systemd
58
59 DESCRIPTION="NFS client and server daemons"
60 HOMEPAGE="http://linux-nfs.org/"
61 SRC_URI="mirror://sourceforge/nfs/${P}.tar.bz2"
62
63 LICENSE="GPL-2"
64 SLOT="0"
65 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
66 IUSE="caps ipv6 kerberos +libmount nfsdcld +nfsidmap +nfsv4 nfsv41 selinux tcpd +uuid"
67 REQUIRED_USE="kerberos? ( nfsv4 )"
68 RESTRICT="test" #315573
69
70 # kth-krb doesn't provide the right include
71 # files, and nfs-utils doesn't build against heimdal either,
72 # so don't depend on virtual/krb.
73 # (04 Feb 2005 agriffis)
74 DEPEND_COMMON="tcpd? ( sys-apps/tcp-wrappers )
75 caps? ( sys-libs/libcap )
76 sys-libs/e2fsprogs-libs
77 >=net-nds/rpcbind-0.2.0-r1
78 net-libs/libtirpc
79 libmount? ( sys-apps/util-linux )
80 nfsdcld? ( >=dev-db/sqlite-3.3 )
81 nfsv4? (
82 dev-libs/libevent
83 >=net-libs/libnfsidmap-0.21-r1
84 kerberos? (
85 >=net-libs/libtirpc-0.2.4-r1[kerberos]
86 app-crypt/mit-krb5
87 )
88 nfsidmap? (
89 >=net-libs/libnfsidmap-0.24
90 >=sys-apps/keyutils-1.5.9
91 )
92 )
93 nfsv41? (
94 sys-fs/lvm2
95 )
96 uuid? ( sys-apps/util-linux )"
97 RDEPEND="${DEPEND_COMMON}
98 !net-nds/portmap
99 !<sys-apps/openrc-0.13.4
100 selinux? (
101 sec-policy/selinux-rpc
102 sec-policy/selinux-rpcbind
103 )
104 "
105 DEPEND="${DEPEND_COMMON}
106 virtual/pkgconfig"
107
108 src_prepare() {
109 epatch "${FILESDIR}"/${PN}-1.1.4-mtab-sym.patch
110 epatch "${FILESDIR}"/${PN}-1.2.8-cross-build.patch
111 epatch "${FILESDIR}"/${PN}-1.3.2-background-statd.patch
112
113 sed \
114 -e "/^sbindir/s:= := \"${EPREFIX}\":g" \
115 -i utils/*/Makefile.am || die
116
117 epatch_user
118 eautoreconf
119 }
120
121 src_configure() {
122 export libsqlite3_cv_is_recent=yes # Our DEPEND forces this.
123 export ac_cv_header_keyutils_h=$(usex nfsidmap)
124 econf \
125 --with-statedir="${EPREFIX}"/var/lib/nfs \
126 --enable-tirpc \
127 --with-tirpcinclude="${EPREFIX}"/usr/include/tirpc/ \
128 $(use_enable libmount libmount-mount) \
129 $(use_with tcpd tcp-wrappers) \
130 $(use_enable nfsdcld nfsdcltrack) \
131 $(use_enable nfsv4) \
132 $(use_enable nfsv41) \
133 $(use_enable ipv6) \
134 $(use_enable caps) \
135 $(use_enable uuid) \
136 $(use_enable kerberos gss) \
137 --without-gssglue
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 "${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 for f in nfs nfsclient ; do
181 newconfd "${FILESDIR}"/${f}.confd ${f}
182 done
183 sed -i \
184 -e "/^NFS_NEEDED_SERVICES=/s:=.*:=\"${opt_need}\":" \
185 "${ED}"/etc/conf.d/nfs || die #234132
186
187 systemd_dounit systemd/*.{mount,service,target}
188 if ! use nfsv4 || ! use kerberos ; then
189 rm "${D}$(systemd_get_unitdir)"/rpc-{gssd,svcgssd}.service || die
190 fi
191 if ! use nfsv41 ; then
192 rm "${D}$(systemd_get_unitdir)"/nfs-blkmap.* || die
193 fi
194 rm "${D}$(systemd_get_unitdir)"/nfs-config.service || die
195 sed -i -r \
196 -e "/^EnvironmentFile=/s:=.*:=${EPREFIX}/etc/conf.d/nfs:" \
197 -e '/^(After|Wants)=nfs-config.service$/d' \
198 -e 's:/usr/sbin/rpc.statd:/sbin/rpc.statd:' \
199 "${D}$(systemd_get_unitdir)"/* || die
200 }
201
202 pkg_postinst() {
203 # Install default xtab and friends if there's none existing. In
204 # src_install we put them in /usr/lib/nfs for safe-keeping, but
205 # the daemons actually use the files in /var/lib/nfs. #30486
206 local f
207 mkdir -p "${EROOT}"/var/lib/nfs #368505
208 for f in "${EROOT}"/usr/$(get_libdir)/nfs/*; do
209 [[ -e ${EROOT}/var/lib/nfs/${f##*/} ]] && continue
210 einfo "Copying default ${f##*/} from ${EPREFIX}/usr/$(get_libdir)/nfs to ${EPREFIX}/var/lib/nfs"
211 cp -pPR "${f}" "${EROOT}"/var/lib/nfs/
212 done
213
214 if systemd_is_booted; then
215 if [[ ${REPLACING_VERSIONS} < 1.3.0 ]]; then
216 ewarn "We have switched to upstream systemd unit files. Since"
217 ewarn "they got renamed, you should probably enable the new ones."
218 ewarn "You can run 'equery files nfs-utils | grep systemd'"
219 ewarn "to know what services you need to enable now."
220 fi
221 else
222 ewarn "If you use OpenRC, the nfsmount service has been replaced with nfsclient."
223 ewarn "If you were using nfsmount, please add nfsclient and netmount to the"
224 ewarn "same runlevel as nfsmount."
225 fi
226 }