From 142cef0a9eed3db300d5b2a2bd6534924e12cdb7 Mon Sep 17 00:00:00 2001 From: Armijn Hemel Date: Sun, 28 Aug 2005 16:56:48 +0000 Subject: [PATCH] switch to dietlibc coreutils in the initrams. Use thit up until a certain point, after which we switch to the normal coreutils. Oh, this should really be refactored... svn path=/nixu/trunk/; revision=3738 --- fill-disk.sh | 2 +- make-disk.sh | 6 ++++-- pkgs.nix | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/fill-disk.sh b/fill-disk.sh index df64f7302199..203f4ac59a71 100755 --- a/fill-disk.sh +++ b/fill-disk.sh @@ -1,6 +1,6 @@ #! @bash@/bin/sh -e -export PATH=@bash@/bin:@coreutils@/bin:@findutils@/bin:@utillinux@/bin:@utillinux@/sbin:@e2fsprogs@/sbin:@grub@/sbin:@sysvinitPath@/sbin:@gnugrep@/bin:@which@/bin:@gnutar@/bin +export PATH=@bash@/bin:@coreutilsdiet@/bin:@coreutils@/bin:@findutils@/bin:@utillinux@/bin:@utillinux@/sbin:@e2fsprogs@/sbin:@grub@/sbin:@sysvinitPath@/sbin:@gnugrep@/bin:@which@/bin:@gnutar@/bin ## ## In the beginning we want to have a minimalistic environment, built with diff --git a/make-disk.sh b/make-disk.sh index 3d33571ec991..c8dd31d3b0ae 100755 --- a/make-disk.sh +++ b/make-disk.sh @@ -77,7 +77,7 @@ do done utilLinux=$($NIX_CMD_PATH/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).utillinux' | $NIX_CMD_PATH/nix-instantiate -))) -coreUtils=$($NIX_CMD_PATH/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).coreutils' | $NIX_CMD_PATH/nix-instantiate -))) +coreUtilsDiet=$($NIX_CMD_PATH/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).coreutilsDiet' | $NIX_CMD_PATH/nix-instantiate -))) e2fsProgs=$($NIX_CMD_PATH/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).e2fsprogsDiet' | $NIX_CMD_PATH/nix-instantiate -))) modUtils=$($NIX_CMD_PATH/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).module_init_tools' | $NIX_CMD_PATH/nix-instantiate -))) Grub=$($NIX_CMD_PATH/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).grubWrapper' | $NIX_CMD_PATH/nix-instantiate -))) @@ -88,6 +88,7 @@ SysVinit=$($NIX_CMD_PATH/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix BootPath=$($NIX_CMD_PATH/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).boot' | $NIX_CMD_PATH/nix-instantiate -))) bash=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).bash' | $NIX_CMD_PATH/nix-instantiate -)) +coreutilsdiet=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).coreutilsDiet' | $NIX_CMD_PATH/nix-instantiate -)) coreutils=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).coreutils' | $NIX_CMD_PATH/nix-instantiate -)) findutils=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).findutilsWrapper' | $NIX_CMD_PATH/nix-instantiate -)) utillinux=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).utillinux' | $NIX_CMD_PATH/nix-instantiate -)) @@ -169,6 +170,7 @@ sed -e "s^@sysvinitPath\@^$sysvinitPath^g" \ -e "s^@NIX_CMD_PATH\@^$nix^g" \ -e "s^@bash\@^$bash^g" \ -e "s^@findutils\@^$findutils^g" \ + -e "s^@coreutilsdiet\@^$coreutilsdiet^g" \ -e "s^@coreutils\@^$coreutils^g" \ -e "s^@utillinux\@^$utillinux^g" \ -e "s^@e2fsprogs\@^$e2fsprogs^g" \ @@ -210,7 +212,7 @@ ln -s ${bash}/bin/bash ${initdir}/bin/sh chmod u+x ${initdir}/init cp -fau --parents ${bashdeps} ${initdir} cp -fau --parents ${utilLinux} ${initdir} -cp -fau --parents ${coreUtils} ${initdir} +cp -fau --parents ${coreUtilsDiet} ${initdir} cp -fau --parents ${e2fsProgs} ${initdir} cp -fau --parents ${modUtils} ${initdir} cp -fau --parents ${hotplug} ${initdir} diff --git a/pkgs.nix b/pkgs.nix index d02d0a7a134c..fff17e9921d4 100644 --- a/pkgs.nix +++ b/pkgs.nix @@ -1,6 +1,6 @@ rec { inherit (import /nixpkgs/trunk/pkgs/system/i686-linux.nix) - stdenv kernel bash coreutils findutilsWrapper utillinux sysvinit + stdenv kernel bash coreutils coreutilsDiet findutilsWrapper utillinux sysvinit e2fsprogsDiet e2fsprogs nettools nix subversion gcc wget which vim less screen openssh binutils strace shadowutils iputils gnumake curl gnused gnutar gnugrep gzip @@ -13,7 +13,7 @@ rec { gnused gnutar gnugrep gzip mingettyWrapper grubWrapper parted module_init_tools hotplug udev dhcpWrapper man nano;}; - init = (import ./init) {inherit stdenv bash coreutils utillinux e2fsprogsDiet + init = (import ./init) {inherit stdenv bash coreutilsDiet utillinux e2fsprogsDiet nix shadowutils mingettyWrapper grubWrapper parted module_init_tools hotplug dhcpWrapper man nano;};