(*) groups distro-dependent files in build/config.<distro>
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Thu, 6 Dec 2007 08:55:20 +0000 (08:55 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Thu, 6 Dec 2007 08:55:20 +0000 (08:55 +0000)
(*) renamed .lst files into .pkgs (lst suffix commonly used for other/tmp purposes)
(*) distro-dependent files are (mostly) optional, defaults to planetlab
(*) mkfedora accepts new -f argument : to pass a pkgs file rather than -p .. -g ..
(*) mkfedora supports junk: and precious: in pkgs file
    this is from the former bootcd/prep.sh - to reduce footprint

Notes.
(*) this is untested
(*) mkfedora still supports -x (exclude) on the command line and in pkgs file
    however I suspect this feature is never used
(*) mkfedora is still a separate command - could/should be merged into buld.common
(*) myplc/build.functions could/should be merged into build.common as well

planetlab-bootcd.lst [deleted file]
prep.sh

diff --git a/planetlab-bootcd.lst b/planetlab-bootcd.lst
deleted file mode 100644 (file)
index e1a69a5..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# from prep.sh, was hardwired as packagelist
-package: filesystem
-package: udev
-package: dhclient
-package: bash
-package: coreutils
-package: iputils
-package: kernel
-package: bzip2
-package: diffutils
-package: logrotate
-package: passwd
-#package: rsh
-package: rsync
-package: sudo
-package: tcpdump
-package: telnet
-package: traceroute
-package: time
-package: wget
-package: yum
-package: curl
-package: gzip
-package: python
-package: tar
-package: pciutils
-package: kbd
-package: authconfig
-package: hdparm
-package: lvm2
-package: kexec-tools
-package: gnupg
-package: nano
-package: parted
-package: pyparted
-package: openssh-server
-package: openssh-clients
-package: ncftp
-package: dosfstools
-package: dos2unix
-package: bind-utils
-package: sharutils
-package: vconfig
-package: ntp
-package: pypcilib
-package: openvpn
diff --git a/prep.sh b/prep.sh
index 8a6b333..0ac5c37 100755 (executable)
--- a/prep.sh
+++ b/prep.sh
@@ -32,40 +32,7 @@ export PATH
 pldistro=planetlab
 [ -n "$@" ] && pldistro=$1
 
-# Packages to install : see <pldistro>-bootcd.lst
-
-# Unnecessary junk
-junk=(
-lib/obsolete
-lib/tls
-usr/share/cracklib
-usr/share/emacs
-usr/share/gnupg
-usr/share/i18n
-usr/share/locale
-usr/share/terminfo
-usr/share/zoneinfo
-usr/sbin/build-locale-archive
-usr/sbin/dbconverter-2
-usr/sbin/sasl*
-usr/sbin/tcpslice
-usr/lib/perl*
-usr/lib/locale
-usr/lib/sasl*
-usr/lib/gconv
-usr/lib/tls
-)
-
-precious=(
-usr/share/i18n/locales/en_US
-usr/share/i18n/charmaps/UTF-8.gz
-usr/share/locale/en
-usr/share/terminfo/l/linux
-usr/share/terminfo/v/vt100
-usr/share/terminfo/x/xterm
-usr/share/zoneinfo/UTC
-usr/lib/locale/en_US.utf8
-)
+# Packages to install, junk and precious : see build/<pldistro>/bootcd.pkgs
 
 # Do not tolerate errors
 set -e
@@ -78,26 +45,8 @@ install -d -m 755 $bootcd
 rpmquery --specfile bootcd.spec --queryformat '%{VERSION}\n' | head -1 >build/version.txt
 
 # Install base system
-lst=${pldistro}-bootcd.lst
-options=$(pl_getPackagesOptions2 ${pl_DISTRO_NAME} $lst)
-
-pl_setup_chroot $bootcd $options -k
-
-pushd $bootcd
-
-echo "* Removing unnecessary junk"
-
-# Save precious files
-tar --ignore-failed-read -cpf precious.tar ${precious[*]}
-
-# Remove unnecessary junk
-rm -rf ${junk[*]}
-
-# Restore precious files
-tar -xpf precious.tar
-rm -f precious.tar
-
-popd
+pkgsfile=$(pl_locateDistroFile ../build/ $pldistro bootcd.pkgs) 
+pl_setup_chroot $bootcd -k -f $pkgsfile 
 
 # Install ipnmac (for SuperMicro machines with IPMI)
 echo "* Installing IPMI utilities"