(*) 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

build.sh
planetlab-vserver.lst [deleted file]
planetlab-vservers/planetflow.lst [deleted file]

index dad616b..18442e6 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -57,23 +57,22 @@ vref=${vrefdir}/${vrefname}
 install -d -m 755 ${vref}
 
 # "Parse" out the packages and groups for mkfedora
-lst="${pldistro}-vserver.lst"
-options="$(pl_getPackagesOptions2 ${pl_DISTRO_NAME} $lst) $(pl_getGroupsOptions2 ${pl_DISTRO_NAME} $lst)"
+pkgsfile=$(pl_locateDistroFile ../build/ ${pldistro} vserver.pkgs)
 
 # Populate a minimal /dev in the reference image
 pl_makedevs ${vref}
 
 # Populate image with vserver-reference packages
-pl_setup_chroot ${vref} ${options} -k
+pl_setup_chroot ${vref} -k -f $pkgsfile
 
-for systemvserver in ${pldistro}-vservers/*.lst ; do
-    NAME=$(basename $systemvserver .lst)
+for systemvserver in ../build/config.${pldistro}/vserver-*.pkgs ; do
+    NAME=$(basename $systemvserver .pkgs | sed -e s,vserver-,,)
 
     echo "--------START BUILDING system vserver ${NAME}: $(date)"
 
     # "Parse" out the packages and groups for yum
-    systempackages=$(pl_getPackages2 ${pl_DISTRO_NAME} $systemvserver)
-    systemgroups=$(pl_getGroups2 ${pl_DISTRO_NAME} $systemvserver)
+    systempackages=$(pl_getPackages ${pl_DISTRO_NAME} $systemvserver)
+    systemgroups=$(pl_getGroups ${pl_DISTRO_NAME} $systemvserver)
 
     vdir=${vstubdir}/${NAME}
     rm -rf ${vdir}/*
diff --git a/planetlab-vserver.lst b/planetlab-vserver.lst
deleted file mode 100644 (file)
index 5f90b72..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-# define packages
-package: bash
-package: coreutils
-package: iputils
-package: kernel-vserver
-package: bzip2
-package: crontabs
-package: diffutils
-package: logrotate
-package: openssh-clients
-package: passwd
-package: rsh
-package: rsync
-package: sudo
-package: tcpdump
-package: telnet
-package: traceroute
-package: time
-package: vixie-cron
-package: wget
-package: which
-package: yum
-package: curl
-package: gzip
-package: perl
-package: python
-package: tar
-package: findutils
-package: filesystem
diff --git a/planetlab-vservers/planetflow.lst b/planetlab-vservers/planetflow.lst
deleted file mode 100644 (file)
index 6f7b3ad..0000000
+++ /dev/null
@@ -1 +0,0 @@
-package: netflow