nfs-utils: 2.1.1 -> 2.3.2, integrate libnfsidmap

- switch source to kernel.org
- libnfsidmap 2.3.2 is built from the nfs-utils source,
  put it in nfs-utils.lib
- split outputs
- adapt sssd, the only other package using libnfsidmap
This commit is contained in:
Uli Baum 2018-08-29 14:26:53 +02:00
parent ff449e176a
commit c62bb34f7a
4 changed files with 20 additions and 36 deletions

View file

@ -1,26 +0,0 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "libnfsidmap-0.25";
src = fetchurl {
url = "http://www.citi.umich.edu/projects/nfsv4/linux/libnfsidmap/${name}.tar.gz";
sha256 = "1kzgwxzh83qi97rblcm9qj80cdvnv8kml2plz0q103j0hifj8vb5";
};
postPatch = ''
sed -i '1i#include <sys/types.h>' cfg.h
'';
preConfigure =
''
configureFlags="--with-pluginpath=$out/lib/libnfsidmap"
'';
meta = {
homepage = http://www.citi.umich.edu/projects/nfsv4/linux/;
description = "Library for holding mulitiple methods of mapping names to id's and visa versa, mainly for NFSv4";
license = "BSD";
platforms = stdenv.lib.platforms.unix;
};
}

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchpatch, lib, pkgconfig, utillinux, libcap, libtirpc, libevent, libnfsidmap
{ stdenv, fetchurl, fetchpatch, lib, pkgconfig, utillinux, libcap, libtirpc, libevent
, sqlite, kerberos, kmod, libuuid, keyutils, lvm2, systemd, coreutils, tcp_wrappers
, buildEnv
}:
@ -14,17 +14,21 @@ let
in stdenv.mkDerivation rec {
name = "nfs-utils-${version}";
version = "2.1.1";
version = "2.3.2";
src = fetchurl {
url = "mirror://sourceforge/nfs/${name}.tar.bz2";
sha256 = "02dvxphndpm8vpqqnl0zvij97dq9vsq2a179pzrjcv2i91ll2a0a";
url = "https://kernel.org/pub/linux/utils/nfs-utils/${version}/${name}.tar.xz";
sha256 = "06av6cjf8h18dpaxh8cd1awsra75zf6s5sj5r2z5g7scbj051ziw";
};
# libnfsidmap is built together with nfs-utils from the same source,
# put it in the "lib" output, and the headers in "dev"
outputs = [ "out" "dev" "lib" "man" ];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [
libtirpc libcap libevent libnfsidmap sqlite lvm2
libtirpc libcap libevent sqlite lvm2
libuuid keyutils kerberos tcp_wrappers
];
@ -36,6 +40,9 @@ in stdenv.mkDerivation rec {
"--with-krb5=${kerberosEnv}"
"--with-systemd=$(out)/etc/systemd/system"
"--enable-libmount-mount"
# need an absolute path to lib output here.
# TODO: use ${placeholder lib} when nix 1.1 is no longer supported
"--with-pluginpath=@lib@/lib/libnfsidmap" # this installs libnfsidmap
]
++ lib.optional (stdenv ? glibc) "--with-rpcgen=${stdenv.glibc.bin}/bin/rpcgen";
@ -68,6 +75,11 @@ in stdenv.mkDerivation rec {
sed '1i#include <stdint.h>' -i support/nsm/rpc.c
'';
# TODO: remove when placeholders are allowed (see configureFlags)
postConfigure = ''
substituteInPlace support/include/config.h --replace '@lib@' "$lib"
'';
makeFlags = [
"sbindir=$(out)/bin"
"generator_dir=$(out)/etc/systemd/system-generators"
@ -99,7 +111,7 @@ in stdenv.mkDerivation rec {
daemons.
'';
homepage = https://sourceforge.net/projects/nfs/;
homepage = https://linux-nfs.org/;
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = with maintainers; [ abbradar ];

View file

@ -1,5 +1,5 @@
{ stdenv, fetchurl, pkgs, glibc, augeas, dnsutils, c-ares, curl,
cyrus_sasl, ding-libs, libnl, libunistring, nss, samba, libnfsidmap, doxygen,
cyrus_sasl, ding-libs, libnl, libunistring, nss, samba, nfs-utils, doxygen,
python, python3, pam, popt, talloc, tdb, tevent, pkgconfig, ldb, openldap,
pcre, kerberos, cifs-utils, glib, keyutils, dbus, fakeroot, libxslt, libxml2,
libuuid, ldap, systemd, nspr, check, cmocka, uid_wrapper,
@ -48,7 +48,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
buildInputs = [ augeas dnsutils c-ares curl cyrus_sasl ding-libs libnl libunistring nss
samba libnfsidmap doxygen python python3 popt
samba nfs-utils doxygen python python3 popt
talloc tdb tevent pkgconfig ldb pam openldap pcre kerberos
cifs-utils glib keyutils dbus fakeroot libxslt libxml2
libuuid ldap systemd nspr check cmocka uid_wrapper

View file

@ -10532,8 +10532,6 @@ with pkgs;
libnfs = callPackage ../development/libraries/libnfs { };
libnfsidmap = callPackage ../development/libraries/libnfsidmap { };
libnice = callPackage ../development/libraries/libnice { };
libnsl = callPackage ../development/libraries/libnsl { };