summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra2004-02-16 10:40:45 +0000
committerEelco Dolstra2004-02-16 10:40:45 +0000
commita33753a9730cc48bc3b1ab22ed339cae6a895ca2 (patch)
treeadeab6a846d48c120aeae49f627846072e8e257d
parentd6a58594d2ed549d24c6387ee2d9439f396257c1 (diff)
* Added util-linux (for mount etc.).
svn path=/nixpkgs/trunk/; revision=786
-rw-r--r--pkgs/os-specific/linux/util-linux/MCONFIG.patch140
-rwxr-xr-xpkgs/os-specific/linux/util-linux/builder.sh16
-rw-r--r--pkgs/os-specific/linux/util-linux/default.nix13
-rw-r--r--pkgs/system/all-packages-generic.nix5
-rw-r--r--pkgs/system/all-packages.nix2
5 files changed, 175 insertions, 1 deletions
diff --git a/pkgs/os-specific/linux/util-linux/MCONFIG.patch b/pkgs/os-specific/linux/util-linux/MCONFIG.patch
new file mode 100644
index 000000000000..cce5b35550dd
--- /dev/null
+++ b/pkgs/os-specific/linux/util-linux/MCONFIG.patch
@@ -0,0 +1,140 @@
+*** MCONFIG.old	2004-02-16 10:54:10.000000000 +0100
+--- MCONFIG.new	2004-02-16 11:38:35.000000000 +0100
+***************
+*** 55,66 ****
+  # If HAVE_WRITE is set to "yes", then write will not be built or
+  # installed from the misc-utils subdirectory.
+  # (There is a network aware write in netwrite from NetKit 0.16 or later.)
+! HAVE_WRITE=no
+  
+  # If HAVE_GETTY is set to "yes", then agetty will not be built or
+  # installed from the login-utils subdirectory.  Note that agetty can
+  # co-exist with other gettys, so this option should never be used.
+! HAVE_GETTY=no
+  
+  # If USE_TTY_GROUP is set to "yes", then wall and write will be installed
+  # setgid to the "tty" group, and mesg will only set the group write bit.
+--- 55,66 ----
+  # If HAVE_WRITE is set to "yes", then write will not be built or
+  # installed from the misc-utils subdirectory.
+  # (There is a network aware write in netwrite from NetKit 0.16 or later.)
+! HAVE_WRITE=yes
+  
+  # If HAVE_GETTY is set to "yes", then agetty will not be built or
+  # installed from the login-utils subdirectory.  Note that agetty can
+  # co-exist with other gettys, so this option should never be used.
+! HAVE_GETTY=yes
+  
+  # If USE_TTY_GROUP is set to "yes", then wall and write will be installed
+  # setgid to the "tty" group, and mesg will only set the group write bit.
+***************
+*** 68,74 ****
+  # user's tty to "tty" [The login in util-linux does this correctly, and
+  # xterm will do it correctly if X is compiled with USE_TTY_GROUP set
+  # properly.]
+! USE_TTY_GROUP=yes
+  
+  # If HAVE_KILL is set to "yes", then kill will not be built or
+  # installed from the misc-utils subdirectory.
+--- 68,74 ----
+  # user's tty to "tty" [The login in util-linux does this correctly, and
+  # xterm will do it correctly if X is compiled with USE_TTY_GROUP set
+  # properly.]
+! USE_TTY_GROUP=no
+  
+  # If HAVE_KILL is set to "yes", then kill will not be built or
+  # installed from the misc-utils subdirectory.
+***************
+*** 88,97 ****
+  # If HAVE_SLN is set to "yes", then sln won't be installed
+  # (but the man page sln.8 will be installed anyway).
+  # sln also comes with libc and glibc.
+! HAVE_SLN=no
+  
+  # If HAVE_FDUTILS is set to "yes", then setfdprm won't be installed.
+! HAVE_FDUTILS=no
+  
+  # If SILENT_PG is set to "yes", then pg will not ring the bell
+  # when an invalid key is pressed
+--- 88,97 ----
+  # If HAVE_SLN is set to "yes", then sln won't be installed
+  # (but the man page sln.8 will be installed anyway).
+  # sln also comes with libc and glibc.
+! HAVE_SLN=yes
+  
+  # If HAVE_FDUTILS is set to "yes", then setfdprm won't be installed.
+! HAVE_FDUTILS=yes
+  
+  # If SILENT_PG is set to "yes", then pg will not ring the bell
+  # when an invalid key is pressed
+***************
+*** 146,162 ****
+  DEV_DIR=	/dev
+  ETC_DIR=	/etc
+  SBIN_DIR=	/sbin
+! USRSBIN_DIR=	/usr/sbin
+! USRLIB_DIR=	/usr/lib
+! USRBIN_DIR=	/usr/bin
+  USRGAMES_DIR=	/usr/games
+! USRSHAREMISC_DIR=/usr/share/misc
+! LOCALE_DIR=	/usr/share/locale
+  BIN_DIR=        /bin
+  VAR_PATH=	/var
+  LOG_DIR=	/var/log
+! MAN_DIR=	/usr/share/man
+! INFO_DIR=	/usr/share/info
+  
+  #
+  # Paths used for install
+--- 146,162 ----
+  DEV_DIR=	/dev
+  ETC_DIR=	/etc
+  SBIN_DIR=	/sbin
+! USRSBIN_DIR=	/sbin
+! USRLIB_DIR=	/lib
+! USRBIN_DIR=	/bin
+  USRGAMES_DIR=	/usr/games
+! USRSHAREMISC_DIR=/share/misc
+! LOCALE_DIR=	/share/locale
+  BIN_DIR=        /bin
+  VAR_PATH=	/var
+  LOG_DIR=	/var/log
+! MAN_DIR=	/share/man
+! INFO_DIR=	/share/info
+  
+  #
+  # Paths used for install
+***************
+*** 190,196 ****
+  MANMODE=	644
+  DATMODE=	644
+  INFOMODE=	644
+! SUIDMODE=      4755
+  
+  CHMOD=		chmod
+  INSTALL=	install
+--- 190,196 ----
+  MANMODE=	644
+  DATMODE=	644
+  INFOMODE=	644
+! SUIDMODE=       755
+  
+  CHMOD=		chmod
+  INSTALL=	install
+***************
+*** 198,204 ****
+  INSTALLBIN=	$(INSTALL) -m $(BINMODE)
+  INSTALLMAN=	$(INSTALL) -m $(MANMODE)
+  INSTALLDAT=	$(INSTALL) -m $(DATMODE)
+! INSTALLSUID=    $(INSTALL) -m $(SUIDMODE) -o root
+  
+  ifeq "$(DISABLE_NLS)" "yes"
+  NLSFLAGS = -DDISABLE_NLS
+--- 198,204 ----
+  INSTALLBIN=	$(INSTALL) -m $(BINMODE)
+  INSTALLMAN=	$(INSTALL) -m $(MANMODE)
+  INSTALLDAT=	$(INSTALL) -m $(DATMODE)
+! INSTALLSUID=    $(INSTALL) -m $(SUIDMODE) # -o root
+  
+  ifeq "$(DISABLE_NLS)" "yes"
+  NLSFLAGS = -DDISABLE_NLS
diff --git a/pkgs/os-specific/linux/util-linux/builder.sh b/pkgs/os-specific/linux/util-linux/builder.sh
new file mode 100755
index 000000000000..d60064c8b7fe
--- /dev/null
+++ b/pkgs/os-specific/linux/util-linux/builder.sh
@@ -0,0 +1,16 @@
+#! /bin/sh -e
+
+buildinputs="$patch"
+. $stdenv/setup
+
+# !!! hack; this is because $linuxHeaders/config.h includes some
+# file autoconf.h.  What is that?
+export NIX_CFLAGS_COMPILE="-D_LINUX_CONFIG_H $NIX_CFLAGS_COMPILE"
+
+tar xvfz $src
+cd util-linux-*
+patch MCONFIG $mconfigPatch
+./configure
+make
+export DESTDIR=$out
+make install
diff --git a/pkgs/os-specific/linux/util-linux/default.nix b/pkgs/os-specific/linux/util-linux/default.nix
new file mode 100644
index 000000000000..86f95f2588af
--- /dev/null
+++ b/pkgs/os-specific/linux/util-linux/default.nix
@@ -0,0 +1,13 @@
+{stdenv, fetchurl, patch}:
+
+derivation {
+  name = "util-linux-2.12";
+  system = stdenv.system;
+  builder = ./builder.sh;
+  src = fetchurl {
+    url = http://ftp.cwi.nl/aeb/util-linux/util-linux-2.12.tar.gz;
+    md5 = "997adf78b98d9d1c5db4f37ea982acff";
+  };
+  mconfigPatch = ./MCONFIG.patch;
+  inherit stdenv patch;
+}
diff --git a/pkgs/system/all-packages-generic.nix b/pkgs/system/all-packages-generic.nix
index 03b238fe73f6..e8d72135dc77 100644
--- a/pkgs/system/all-packages-generic.nix
+++ b/pkgs/system/all-packages-generic.nix
@@ -559,6 +559,11 @@
     inherit fetchurl stdenv;
   };
 
+  utillinux = (import ../os-specific/linux/util-linux) {
+    inherit fetchurl stdenv;
+    patch = gnupatch;
+  };
+
 
   ### DATA
 
diff --git a/pkgs/system/all-packages.nix b/pkgs/system/all-packages.nix
index 49a1877b6f37..70feb66a4361 100644
--- a/pkgs/system/all-packages.nix
+++ b/pkgs/system/all-packages.nix
@@ -46,7 +46,7 @@
   stdenvLinuxPkgs =
     allPackages {system = system; stdenv = stdenvLinux;} //
     {inherit (stdenvLinuxBootPkgs)
-      gzip bzip2 bash binutils coreutils diffutils findutils gawk gcc
+      gzip bzip2 /* bash */ binutils coreutils diffutils findutils gawk gcc
       gnumake gnused gnutar gnugrep wget;
     } //
     {glibc = stdenvLinuxGlibc;};