pack Nix packages in a tarball, unpack tarball, don't copy it file for file from CD (== slow)

svn path=/nixu/trunk/; revision=6030
This commit is contained in:
Armijn Hemel 2006-08-03 13:43:44 +00:00
parent 71755c6176
commit fcc3b33cb9
2 changed files with 11 additions and 9 deletions

View File

@ -1,6 +1,6 @@
#! @bash@/bin/sh -e
export PATH=/bin:/sbin:@bash@/bin:@coreutilsdiet@/bin:@coreutils@/bin:@findutils@/bin:@utillinux@/bin:@utillinux@/sbin:@utilLinux@/bin:@utilLinux@/sbin:@e2fsprogs@/sbin:@grub@/sbin:@sysvinitPath@/sbin:@gnugrep@/bin:@which@/bin:@gnutar@/bin:@eject@/bin:@kudzu@/sbin:@utillinux@/bin
export PATH=/bin:/sbin:@bash@/bin:@coreutilsdiet@/bin:@coreutils@/bin:@findutils@/bin:@utillinux@/bin:@utillinux@/sbin:@utilLinux@/bin:@utilLinux@/sbin:@e2fsprogs@/sbin:@grub@/sbin:@sysvinitPath@/sbin:@gnugrep@/bin:@which@/bin:@gnutar@/bin:@eject@/bin:@kudzu@/sbin:@utillinux@/bin:@gzip@/bin
##
## In the beginning we want to have a minimalistic environment, built with
@ -165,8 +165,8 @@ make_dir 00755 /nix/var/nix/profiles
make_dir 00755 /nix/var/nix/temproots
make_dir 00755 /nix/var/log
make_dir 00755 /nix/var/log/nix
make_dir 00755 /nixpkgs
make_dir 00755 /nixpkgs/trunk
#make_dir 00755 /nixpkgs
#make_dir 00755 /nixpkgs/trunk
make_dir 00755 /proc
make_dir 00750 /root
make_dir 00755 /sbin
@ -230,9 +230,9 @@ echo mounting /cdrom in the target
mount --bind /cdrom $root/cdrom
echo switch to /nix and /nixpkgs from CD
echo switch to /nix from CD
## starting here it's OK to have full blown glibc
ln -s /cdrom/nixpkgs /nixpkgs
#ln -s /cdrom/nixpkgs /nixpkgs
mount --bind /cdrom/nix /nix
@ -261,7 +261,8 @@ $NIX/nix-store --verify
echo copying nixpkgs...
#cp -fLa /cdrom/pkgs $root/nixpkgs/trunk
tar --directory=/cdrom -cf - pkgs | tar --directory=$root/nixpkgs/trunk -xvf -
#tar --directory=/cdrom -cf - pkgs | tar --directory=$root/nixpkgs/trunk -xvf -
tar --directory=$root -zxvf /cdrom/nixpkgs.tgz
make_dir 0755 /tmp/scripts
cp -fa /cdrom/scripts $root/tmp

View File

@ -65,7 +65,7 @@ gnugrep=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).gnugrep' | $NIX/nix-inst
grub=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).grubWrapper' | $NIX/nix-instantiate -))
combideps=$($NIX/nix-store -qR $nix $utillinux $gnugrep $grub)
combideps=$($NIX/nix-store -qR $nix $utillinux $gnugrep $grub $gzip)
#for i in $storeExpr
#for i in $nixDeps
@ -154,8 +154,8 @@ $coreutils/bin/mkdir ${initdir}/var/run
echo copying nixpkgs
#svn export ${nixpkgs} ${archivesDir}/pkgs
$coreutils/bin/cp -fa ${nixpkgs} ${archivesDir}
#tar cf $archivesDir
#$coreutils/bin/cp -fa ${nixpkgs} ${archivesDir}
tar -zcf ${archivesDir}/nixpkgs.tgz ${nixpkgs}
#echo copying packages from store
@ -199,6 +199,7 @@ $gnused/bin/sed -e "s^@sysvinitPath\@^$sysvinitPath^g" \
-e "s^@kudzu\@^$kudzu^g" \
-e "s^@sysklogd\@^$sysklogd^g" \
-e "s^@gnutar\@^$gnutar^g" \
-e "s^@gzip\@^$gzip^g" \
-e "s^@mingetty\@^$mingettyWrapper^g" \
< $fill_disk > $fill_disk.tmp
$coreutils/bin/mv $fill_disk.tmp $fill_disk