* util-linux-ng: updated to 2.16. Don't build a separate mount

anymore since the build process was very hacky.  Instead
  mount/umount looks for mount helpers in
  /var/run/current-system/sw/sbin.  It would be better to use an
  environment variable, but that would be risky if mount is setuid
  root.
* e2fsprogs: updated to 1.41.8.  Don't build libuuid, libblkid
  etc. anymore, since they have been moved to util-linux-ng.
* nfs-utils: updated to 1.2.0.

svn path=/nixpkgs/trunk/; revision=16682
This commit is contained in:
Eelco Dolstra 2009-08-11 20:57:29 +00:00
parent c2737e315a
commit 6f70fd1c6b
7 changed files with 54 additions and 143 deletions

View File

@ -1,35 +0,0 @@
{stdenv, fetchurl}:
stdenv.mkDerivation rec {
name = "e2fsprogs-1.41.5";
src = fetchurl {
url = "mirror://sourceforge/e2fsprogs/${name}.tar.gz";
sha256 = "1611lcfp5vcng7g9sacyxhg1dklxpn2p5m43mvfl0dwa0phx1mxk";
};
configureFlags =
(if stdenv ? isDietLibC
then "--with-diet-libc"
else (if stdenv.system == "i686-darwin" then " --enable-bsd-shlibs" else "--enable-elf-shlibs" ) ) ;
preBuild = if stdenv ? isDietLibC then ''
sed -e 's/-lpthread//' -i Makefile */Makefile */*/Makefile
'' else "";
preInstall = "installFlagsArray=('LN=ln -s')";
postInstall = "make install-libs";
NIX_CFLAGS_COMPILE =
if stdenv ? isDietLibC then
"-UHAVE_SYS_PRCTL_H " +
(if stdenv.system == "x86_64-linux" then "-DHAVE_LSEEK64_PROTOTYPE=1 -Dstat64=stat" else "")
+ " -lcompat -lpthread "
else "";
meta = {
homepage = http://e2fsprogs.sourceforge.net/;
description = "Tools for creating and checking ext2/ext3/ext4 filesystems";
};
}

View File

@ -1,35 +0,0 @@
{stdenv, fetchurl}:
stdenv.mkDerivation rec {
name = "e2fsprogs-1.41.6";
src = fetchurl {
url = "mirror://sourceforge/e2fsprogs/${name}.tar.gz";
sha256 = "0i5ldfgx3rccr4d59fgxc1zcv33i1jm4ggb3nqyvr5wik5qmv5sq";
};
configureFlags =
if stdenv ? isDietLibC
then "--with-diet-libc"
else "--enable-elf-shlibs";
preBuild = if stdenv ? isDietLibC then ''
sed -e 's/-lpthread//' -i Makefile */Makefile */*/Makefile
'' else "";
preInstall = "installFlagsArray=('LN=ln -s')";
postInstall = "make install-libs";
NIX_CFLAGS_COMPILE =
if stdenv ? isDietLibC then
"-UHAVE_SYS_PRCTL_H " +
(if stdenv.system == "x86_64-linux" then "-DHAVE_LSEEK64_PROTOTYPE=1 -Dstat64=stat" else "")
+ " -lcompat -lpthread "
else "";
meta = {
homepage = http://e2fsprogs.sourceforge.net/;
description = "Tools for creating and checking ext2/ext3/ext4 filesystems";
};
}

View File

@ -0,0 +1,24 @@
{stdenv, fetchurl, pkgconfig, libuuid}:
stdenv.mkDerivation rec {
name = "e2fsprogs-1.41.8";
src = fetchurl {
url = "mirror://sourceforge/e2fsprogs/${name}.tar.gz";
sha256 = "009qwd0ig9nrr19gmd9vg73l0ay1xrdlcn8pqrvd2w593hl9yb3q";
};
buildInputs = [pkgconfig libuuid];
# libuuid, libblkid, uuidd and fsck are in util-linux-ng (the "libuuid" dependency).
configureFlags = "--enable-elf-shlibs --disable-libuuid --disable-libblkid --disable-uuidd --disable-fsck";
preInstall = "installFlagsArray=('LN=ln -s')";
postInstall = "make install-libs";
meta = {
homepage = http://e2fsprogs.sourceforge.net/;
description = "Tools for creating and checking ext2/ext3/ext4 filesystems";
};
}

View File

@ -1,22 +1,24 @@
{ fetchurl, stdenv, tcpWrapper, e2fsprogs }:
{ fetchurl, stdenv, tcpWrapper, libuuid }:
stdenv.mkDerivation rec {
name = "nfs-utils-1.1.2";
name = "nfs-utils-1.2.0";
src = fetchurl {
url = "mirror://sourceforge/nfs/${name}.tar.gz";
sha256 = "0cs0kl18f4h8nkbnd7n3flw9krhkm3mx9sh7vz9dkvp46g0v228x";
url = "mirror://sourceforge/nfs/${name}.tar.bz2";
sha256 = "1ld1f6wcm53pza3zy768y1y8xa01zq3bnjyy1j3z62yd7a5lcffb";
};
patches = [ ./sbindir.patch ];
# Needs `libblkid' and `libcomerr' from `e2fsprogs'.
buildInputs = [ tcpWrapper e2fsprogs ];
# Needs `libblkid' and `libcomerr' from `e2fsprogs' or `util-linux-ng'.
buildInputs = [ tcpWrapper libuuid ];
# FIXME: Currently too lazy to build the dependencies needed for NFSv4.
configurePhase = ''./configure --prefix=$out \
--disable-gss --disable-nfsv4 \
--with-statedir=$out/var/lib/nfs'';
configureFlags = "--disable-gss --disable-nfsv4 --with-statedir=/var/lib/nfs";
preBuild =
''
makeFlags="sbindir=$out/sbin"
installFlags="statedir=$TMPDIR" # hack to make `make install' work
'';
meta = {
description = "Linux user-space NFS utilities";

View File

@ -1,11 +0,0 @@
--- nfs-utils-1.1.2/utils/mount/Makefile.in 2008-03-14 18:44:42.000000000 +0100
+++ nfs-utils-1.1.2/utils/mount/Makefile.in 2008-03-30 19:30:57.000000000 +0200
@@ -219,7 +219,7 @@ psdir = @psdir@
# These binaries go in /sbin (not /usr/sbin), and that cannot be
# overriden at config time.
-sbindir = /sbin
+sbindir = @prefix@/sbin
secure_statd = @secure_statd@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@

View File

@ -1,22 +1,11 @@
{ stdenv, fetchurl, ncurses ? null
{ stdenv, fetchurl, ncurses ? null }:
, # Util-linux-ng requires libuuid and libblkid.
libuuid
, # Build mount/umount only.
buildMountOnly ? false
, # A directory containing mount helpers programs
# (i.e. `mount.<fstype>') to be used instead of /sbin.
mountHelpers ? null
}:
stdenv.mkDerivation {
name = (if buildMountOnly then "mount-" else "") + "util-linux-ng-2.14.2";
stdenv.mkDerivation rec {
name = "util-linux-ng-2.16";
src = fetchurl {
url = mirror://kernel/linux/utils/util-linux-ng/v2.14/util-linux-ng-2.14.2.tar.bz2;
sha256 = "03k3w0f1ljwvv31glnxkk1f66fzyw0wdshgqxz0aixh7l3ln73hh";
url = "mirror://kernel/linux/utils/util-linux-ng/v2.16/${name}.tar.bz2";
sha256 = "08i7qv1rvq3rgi49q64aiy0vdhl6h00ilkhnaam9yhrl5g5mydm6";
};
configureFlags = ''
@ -24,31 +13,15 @@ stdenv.mkDerivation {
${if ncurses == null then "--without-ncurses" else ""}
'';
buildInputs = [libuuid]
++ stdenv.lib.optional (ncurses != null) ncurses;
inherit mountHelpers;
buildInputs = stdenv.lib.optional (ncurses != null) ncurses;
# !!! It would be better to obtain the path to the mount helpers
# (/sbin/mount.*) through an environment variable, but that's
# somewhat risky because we have to consider that mount can setuid
# root...
preConfigure = ''
makeFlagsArray=(usrbinexecdir=$out/bin usrsbinexecdir=$out/sbin datadir=$out/share exampledir=$out/share/getopt)
if test -n "$mountHelpers"; then
substituteInPlace mount/mount.c --replace /sbin/mount. $mountHelpers/mount.
substituteInPlace mount/umount.c --replace /sbin/umount. $mountHelpers/umount.
fi
substituteInPlace mount/mount.c --replace /sbin/mount. /var/run/current-system/sw/sbin/mount.
substituteInPlace mount/umount.c --replace /sbin/umount. /var/run/current-system/sw/sbin/umount.
'';
buildPhase =
if buildMountOnly then ''
make "''${makeFlagsArray[@]}" -C lib
make "''${makeFlagsArray[@]}" -C mount
'' else "";
installPhase =
if buildMountOnly then ''
make "''${makeFlagsArray[@]}" -C lib install
make "''${makeFlagsArray[@]}" -C mount install
'' else "";
# Hack to get static builds to work.
NIX_CFLAGS_COMPILE = "-DHAVE___PROGNAME=1";
}

View File

@ -4648,7 +4648,7 @@ let
};
nfsUtils = import ../os-specific/linux/nfs-utils {
inherit fetchurl stdenv tcpWrapper e2fsprogs;
inherit fetchurl stdenv tcpWrapper libuuid;
};
acpi = import ../os-specific/linux/acpi {
@ -4724,17 +4724,10 @@ let
stdenv = if stdenv.system == "powerpc-linux" then overrideGCC stdenv gcc34 else stdenv;
};
# libuuid is used as an (indirect) dependency for lots of other
# packages such as X and KDE, which we don't want to rebuild every
# time we update e2fsprogs.
e2fsprogsOld = import ../os-specific/linux/e2fsprogs/1.41.5.nix {
inherit fetchurl stdenv;
};
libuuid = utillinuxng;
libuuid = e2fsprogsOld;
e2fsprogs = import ../os-specific/linux/e2fsprogs/1.41.6.nix {
inherit fetchurl stdenv;
e2fsprogs = import ../os-specific/linux/e2fsprogs/1.41.8.nix {
inherit fetchurl stdenv pkgconfig libuuid;
};
e3cfsprogs = import ../os-specific/linux/e3cfsprogs {
@ -5576,7 +5569,7 @@ let
utillinuxCurses = utillinuxngCurses;
utillinuxng = makeOverridable (import ../os-specific/linux/util-linux-ng) {
inherit fetchurl stdenv libuuid;
inherit fetchurl stdenv;
};
utillinuxngCurses = utillinuxng.override {