summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/os-specific/linux/e2fsprogs/1.41.5.nix35
-rw-r--r--pkgs/os-specific/linux/e2fsprogs/1.41.6.nix35
-rw-r--r--pkgs/os-specific/linux/e2fsprogs/1.41.8.nix24
-rw-r--r--pkgs/os-specific/linux/nfs-utils/default.nix24
-rw-r--r--pkgs/os-specific/linux/nfs-utils/sbindir.patch11
-rw-r--r--pkgs/os-specific/linux/util-linux-ng/default.nix51
-rw-r--r--pkgs/top-level/all-packages.nix17
7 files changed, 54 insertions, 143 deletions
diff --git a/pkgs/os-specific/linux/e2fsprogs/1.41.5.nix b/pkgs/os-specific/linux/e2fsprogs/1.41.5.nix
deleted file mode 100644
index 8d72e9fc439..00000000000
--- a/pkgs/os-specific/linux/e2fsprogs/1.41.5.nix
+++ /dev/null
@@ -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";
-  };
-}
diff --git a/pkgs/os-specific/linux/e2fsprogs/1.41.6.nix b/pkgs/os-specific/linux/e2fsprogs/1.41.6.nix
deleted file mode 100644
index 37cd9cd17cd..00000000000
--- a/pkgs/os-specific/linux/e2fsprogs/1.41.6.nix
+++ /dev/null
@@ -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";
-  };
-}
diff --git a/pkgs/os-specific/linux/e2fsprogs/1.41.8.nix b/pkgs/os-specific/linux/e2fsprogs/1.41.8.nix
new file mode 100644
index 00000000000..76a6df4c04c
--- /dev/null
+++ b/pkgs/os-specific/linux/e2fsprogs/1.41.8.nix
@@ -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";
+  };
+}
diff --git a/pkgs/os-specific/linux/nfs-utils/default.nix b/pkgs/os-specific/linux/nfs-utils/default.nix
index 7efdb07687f..90b9068eacc 100644
--- a/pkgs/os-specific/linux/nfs-utils/default.nix
+++ b/pkgs/os-specific/linux/nfs-utils/default.nix
@@ -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";
diff --git a/pkgs/os-specific/linux/nfs-utils/sbindir.patch b/pkgs/os-specific/linux/nfs-utils/sbindir.patch
deleted file mode 100644
index 2884b56e6d1..00000000000
--- a/pkgs/os-specific/linux/nfs-utils/sbindir.patch
+++ /dev/null
@@ -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@
diff --git a/pkgs/os-specific/linux/util-linux-ng/default.nix b/pkgs/os-specific/linux/util-linux-ng/default.nix
index 857581960a2..4f916a4154b 100644
--- a/pkgs/os-specific/linux/util-linux-ng/default.nix
+++ b/pkgs/os-specific/linux/util-linux-ng/default.nix
@@ -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"; 
 }
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 47cac7763f6..833ed09c551 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -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 = e2fsprogsOld;
+  libuuid = utillinuxng;
 
-  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 {