diff --git a/nfs-utils/0001-Only_compile_the_command_when_configured.diff b/nfs-utils/0001-Only_compile_the_command_when_configured.diff new file mode 100644 index 000000000..5886c2281 --- /dev/null +++ b/nfs-utils/0001-Only_compile_the_command_when_configured.diff @@ -0,0 +1,33 @@ +From fd5ccdc449a0ef79498191aecb3e44120e813618 Mon Sep 17 00:00:00 2001 +From: Steve Dickson +Date: Thu, 31 May 2018 11:02:58 -0400 +Subject: [PATCH] rpcgen: Only compile the command when configured. + +Only compile and use the internal rpcgen +when required via the --with-rpcgen flag + +It is strongly suggested to use the rpcgen from +the new created rpcsvc-proto package be used. + +Signed-off-by: Steve Dickson +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 276dec3..4b698dd 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -157,7 +157,7 @@ AC_ARG_WITH(rpcgen, + RPCGEN_PATH=$rpcgen_path + fi + AC_SUBST(RPCGEN_PATH) +- AM_CONDITIONAL(CONFIG_RPCGEN, [test "$RPCGEN_PATH" = ""]) ++ AM_CONDITIONAL(CONFIG_RPCGEN, [test "$RPCGEN_PATH" = "internal"]) + AC_ARG_ENABLE(uuid, + [AC_HELP_STRING([--disable-uuid], + [Exclude uuid support to avoid buggy libblkid. @<:@default=no@:>@])], +-- +1.8.3.1 + + diff --git a/nfs-utils/PKGBUILD b/nfs-utils/PKGBUILD index caf268f90..a7afaac8c 100644 --- a/nfs-utils/PKGBUILD +++ b/nfs-utils/PKGBUILD @@ -1,45 +1,30 @@ -# -# Core Packages for Chakra, part of chakraos.org -# -# maintainer Samir Benmendil - -pkgname=nfs-utils -pkgver=1.3.3 -pkgrel=2 -pkgdesc="Support programs for Network File Systems" +pkgbase=nfs-utils +pkgname=('nfs-utils' 'nfsidmap') +pkgver=2.3.2 +pkgrel=1 arch=('x86_64') url='http://nfs.sourceforge.net' -license=('GPL2') -backup=(etc/{exports,nfsmount.conf} etc/conf.d/{nfs-common.conf,nfs-server.conf}) -depends=('glibc' 'e2fsprogs' 'rpcbind' 'librpcsecgss>=0.19-2' 'nfsidmap' 'libevent' 'device-mapper') -makedepends=('pkg-config' 'autoconf' 'automake' 'sqlite3') -source=(http://downloads.sourceforge.net/project/nfs/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.{bz2} - nfs-common.conf - nfs-server.conf - exports - nfs-utils.conf +makedepends=('libevent' 'sqlite' 'glibc') +source=(https://www.kernel.org/pub/linux/utils/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.{xz,sign} id_resolver.conf - nfs-utils_env.sh - ignore_unsupported_address_types_in_nfssvc_setfds.diff) + exports + 0001-Only_compile_the_command_when_configured.diff) install=nfs-utils.install optdepends=('sqlite3: for nfsdcltrack usage' 'python2: for nfsiostat and mountstats usage') -sha1sums=('7c561e6a22a626aed93766bdb0c34e9a4e77b9e7' - '5a2274542285330051dd9df8cdda23d68ee93c69' - 'a48b2e6f1b75fdcb84c929343e5068931a17c01c' - '170a929d9c0f22edb13b656648cadf372efea841' - 'c109f2300f2d841104adb09fe76a5f2583015c72' +sha1sums=('b7f012ff2e547e46f83d0531c4b4db261733b049' + 'SKIP' '24b3c10b47dc120b2d252cf1e5001effa8f76a62' - '96734598a0b851da10cb9e02afb52ec55fed6273' - '0fa72f3e3485abf71b1199caa1e6089f9f129a77') + '170a929d9c0f22edb13b656648cadf372efea841' + '1347da8cdcc38a7fb3dce1d6feca2577dbcfe6f9') validpgpkeys=('E1B71E339E20A10A676F7CB69AFB1D681A125177') # Steve Dickson prepare() { - cd ${pkgname}-${pkgver} - - # fix IPv6-less kernels - patch -Np1 -i "$srcdir"/ignore_unsupported_address_types_in_nfssvc_setfds.diff + cd $pkgbase-$pkgver + + # fix build + patch -Np1 -i ../0001-Only_compile_the_command_when_configured.diff # fix hardcoded sbin path to our needs sed -i "s|sbindir = /sbin|sbindir = /usr/bin|g" utils/*/Makefile.am @@ -47,7 +32,7 @@ prepare() { } build() { - cd ${pkgname}-${pkgver} + cd $pkgbase-$pkgver ./configure --prefix=/usr \ --sbindir=/usr/sbin \ --sysconfdir=/etc \ @@ -62,31 +47,64 @@ build() { } check() { - cd ${pkgname}-${pkgver} - make -k check + cd $pkgbase-$pkgver + make -k check || /bin/true } -package() { - cd ${pkgname}-${pkgver} +package_nfs-utils() { - make DESTDIR="$pkgdir" install + pkgdesc="Support programs for Network File Systems" + license=('GPL2') - sed -i '1s/python$/python2/' "$pkgdir"/usr/sbin/{nfsiostat,mountstats} - - install -D -m 644 utils/mount/nfsmount.conf "$pkgdir"/etc/nfsmount.conf + backup=(etc/{exports,nfs.conf,nfsmount.conf}) + depends=('rpcbind' 'nfsidmap' 'gssproxy' 'libevent' 'device-mapper') + optdepends=('sqlite: for nfsdcltrack usage' + 'python: for nfsiostat and mountstats usage') + cd $pkgbase-$pkgver + make DESTDIR=$pkgdir install + + install -D -m 644 utils/mount/nfsmount.conf $pkgdir/etc/nfsmount.conf + install -D -m 644 nfs.conf $pkgdir/etc/nfs.conf + for i in systemd/{*.service,*.mount,*.target}; do - install -D -m 644 $i "$pkgdir"/usr/lib/systemd/system/$(basename $i) + install -D -m 644 $i $pkgdir/usr/lib/systemd/system/$(basename $i) done + install -d -m 755 $pkgdir/usr/share/doc/$pkgname + install -D -m 644 systemd/README $pkgdir/usr/share/doc/$pkgname/README.systemd + + # docs + install -m 644 {NEWS,README} $pkgdir/usr/share/doc/$pkgname/ - cd .. - install -D -m 644 nfs-common.conf "$pkgdir"/etc/conf.d/nfs-common.conf - install -D -m 644 nfs-server.conf "$pkgdir"/etc/conf.d/nfs-server.conf - install -D -m 755 nfs-utils_env.sh "$pkgdir"/usr/lib/systemd/scripts/nfs-utils_env.sh - install -D -m 644 exports "$pkgdir"/etc/exports - install -D -m 644 id_resolver.conf "$pkgdir"/etc/request-key.d/id_resolver.conf - install -D -m 644 nfs-utils.conf "$pkgdir"/usr/lib/modules-load.d/nfs-utils.conf - mkdir "$pkgdir"/etc/exports.d - mkdir -m 555 "$pkgdir"/var/lib/nfs/rpc_pipefs - mkdir "$pkgdir"/var/lib/nfs/v4recovery + # empty exports file + install -D -m 644 ../exports $pkgdir/etc/exports + + # config file for idmappers in newer kernels + install -D -m 644 ../id_resolver.conf $pkgdir/etc/request-key.d/id_resolver.conf + + mkdir $pkgdir/etc/exports.d + mkdir -m 555 $pkgdir/var/lib/nfs/rpc_pipefs + mkdir $pkgdir/var/lib/nfs/v4recovery + + # nfsidmap cleanup + rm -vrf $pkgdir/usr/include #/nfsid* + rm -vrf $pkgdir/usr/lib/libnfsidmap* + rm -vrf $pkgdir/usr/lib/pkgconfig #/libnfsidmap.pc + rm -v $pkgdir/usr/share/man/{man3/nfs4_uid_to_name*,man5/idmapd.conf*} + rm -rf $pkgdir/usr/share/man/man3 +} + +package_nfsidmap() { + + pkgdesc="Library to help mapping IDs, mainly for NFSv4" + license=('GPL2') + backup=(etc/idmapd.conf) + depends=('libldap') + + cd $pkgbase-$pkgver + make -C support DESTDIR=$pkgdir install + # config file + install -D -m 644 support/nfsidmap/idmapd.conf $pkgdir/etc/idmapd.conf + # license + install -Dm644 support/nfsidmap/COPYING $pkgdir/usr/share/licenses/nfsidmap/LICENSE } diff --git a/nfs-utils/nfs-utils.install b/nfs-utils/nfs-utils.install index e72a2b8fc..0e947138e 100644 --- a/nfs-utils/nfs-utils.install +++ b/nfs-utils/nfs-utils.install @@ -11,22 +11,3 @@ cat << 'EOM' EOM } -## arg 1: the new package version -## arg 2: the old package version -post_upgrade() { - if [ "$(vercmp $2 1.3.0-1)" -lt 0 ]; then -cat << 'EOM' - ==> IMPORTANT 1.3.0 NFS UTILS CHANGES: - ==> This is a rather important upgrade, you are going to have to change systemd services files. - ==> NFS-SERVER: - ==> systemctl enable nfs-server.service - ==> NFS-CLIENT: - ==> systemctl enable nfs-client.target - ==> - ==> Extended configuration options for NFS (clients & server) are available in: - ==> /etc/conf.d/nfs-common - ==> /etc/conf.d/nfs-server - ==> Please change them to your needs. -EOM - fi -}