takes package list out of prep.sh in a .lst -- provides -k to mkfedora as it used...
Thierry Parmentelat [Mon, 19 Nov 2007 14:39:37 +0000 (14:39 +0000)]
bootcd.spec
planetlab-fc6-bootcd.lst [new file with mode: 0644]
prep.sh

index eb571ff..78d2cbb 100644 (file)
@@ -40,7 +40,7 @@ Central servers.
 pushd BootCD
 
 # Build the reference image
-./prep.sh -a $(uname -i) -r $([ -f "/etc/fedora-release" ] && awk ' { if ($2=="Core") print $4; else print $3 } ' /etc/fedora-release || echo 4)
+./prep.sh %{pldistro}
 
 # Build the default configuration (PlanetLab)
 ./build.sh
diff --git a/planetlab-fc6-bootcd.lst b/planetlab-fc6-bootcd.lst
new file mode 100644 (file)
index 0000000..916a374
--- /dev/null
@@ -0,0 +1,44 @@
+# 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: lvm
+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
diff --git a/prep.sh b/prep.sh
index 093d749..0b7421d 100755 (executable)
--- a/prep.sh
+++ b/prep.sh
@@ -28,52 +28,11 @@ export PATH
 
 . build.common
 
-# Packages to install
-packagelist=(
-udev
-dhclient
-bash
-coreutils
-iputils
-kernel
-bzip2
-diffutils
-logrotate
-passwd
-rsh
-rsync
-sudo
-tcpdump
-telnet
-traceroute
-time
-wget
-yum
-curl
-gzip
-python
-tar
-pciutils
-kbd
-authconfig
-hdparm
-lvm
-lvm2
-kexec-tools
-gnupg
-nano
-parted
-pyparted
-openssh-server
-openssh-clients
-ncftp
-dosfstools
-dos2unix
-bind-utils
-sharutils
-vconfig
-filesystem
-)
+# pldistro expected as $1 - defaults to planetlab
+pldistro=planetlab
+[ -n "$@" ] && pldistro=$1
+
+# Packages to install : see <pldistro>-<fcdistro>-bootcd.lst
 
 # Unnecessary junk
 junk=(
@@ -119,11 +78,10 @@ install -d -m 755 $bootcd
 rpmquery --specfile bootcd.spec --queryformat '%{VERSION}\n' | head -1 >build/version.txt
 
 # Install base system
-for package in "${packagelist[@]}" ; do
-    packages="$packages -p $package"
-done
+lst=${pldistro}-${pl_DISTRO_NAME}-bootcd.lst
+options=$(pl_getPackagesOptions $lst)
 
-pl_setup_chroot $bootcd $packages
+pl_setup_chroot $bootcd $options -k
 
 pushd $bootcd