From: Thierry Parmentelat Date: Thu, 13 Dec 2007 14:28:01 +0000 (+0000) Subject: yumgroups generated from bootstrapfs.pkgs X-Git-Tag: 4.2-rc2~339 X-Git-Url: http://git.onelab.eu/?p=build.git;a=commitdiff_plain;h=a14676427a1e9c5c3c444e3f7689f928c8a85ba8 yumgroups generated from bootstrapfs.pkgs --- diff --git a/Makefile b/Makefile index cd9911fb..58d0fc66 100644 --- a/Makefile +++ b/Makefile @@ -21,15 +21,7 @@ # #################### (planetlab) distributions # -# (*) the default distribution is called 'planetlab' -# (*) you may define an alternative distribution, e.g. onelab -# in this case you need to -# (*) create onelab.mk that defines your *packages* (see below) -# (*) create onelab-tags.mk that defines where to fetch your *modules* -# (*) create your main yumgroups.xml as groups/.xml -# (*) there are also various places where a set of modules are defined. -# check for .lst files in the various modules that build root images -# and mimic what's done for planetlab +# (*) see README-pldistros.txt # (*) then you need to run # make stage1=true PLDISTRO=onelab # @@ -188,15 +180,10 @@ all: repo endif endif -### yumgroups.xml -# the source -ifndef YUMGROUPS -YUMGROUPS := groups/$(PLDISTRO).xml -endif - -RPMS/yumgroups.xml: $(YUMGROUPS) +### yumgroups.xml : compute from bootstrapfs.pkgs +RPMS/yumgroups.xml: mkdir -p RPMS - install -D -m 644 $(YUMGROUPS) $@ + yumgroups.sh $(PLDISTRO) bootstrapfs.pkgs > $@ createrepo = createrepo --quiet -g yumgroups.xml RPMS/ diff --git a/README-pldistros.txt b/README-pldistros.txt index b47f1609..e68c449e 100644 --- a/README-pldistros.txt +++ b/README-pldistros.txt @@ -1,25 +1,35 @@ -we've tried to isolate the distro-dependent configurations from the code -the places where these distro-dependent config files lie are +We've tried to isolate the distro-dependent configurations from the code -./build/groups/.xml - that is used as the yumgroups.xml +Most of the .pgks files are optional to define a new distro: +missing files are searched in the planetlab distro + +========== build environment ./build/.mk - that defines the contents of the build + that defines the contents of the build -- see Makefile ./build/-tags.mk that defines the svn locations of the various modules ./build/-install.mk optional make file to define the install target -./build/-devel.lst - set of packages required for building +========== kernel config ./Linux-2.6/configs/kernel-2.6.--.config (subject to change location in the future) -./bootcd/-bootcd.lst -./bootstrapfs/-base.lst -./bootstrapfs/-filesystems - all *.lst files here - produce tar.bz2 images -./myplc/-plc.lst -./vserver/-vserver.lst -./vserver/-vservers - all *.lst files here - produce vserver images +========== various system images +./build/config./devel.pkgs + set of packages required for building +./build/config./bootcd.pkgs + contents of the bootcd image +./build/config./bootstrapfs.pkgs + the standard contents of the node root + used to generate yumgroups.xml +./build/config./bootstrapfs-*.pkgs + all *.pkgs files here - produce additional node root images (tar.bz2) +./build/config./myplc.pkgs + contents of the myplc image +./build/config./vserver.pkgs + the contents of the standard vserver reference image +./build/config./vserver-*.pkgs + all *.pkgs files here - produce additional vserver images +./build/config./native-shell.pkgs + used to create test vservers for myplc-native diff --git a/build.common b/build.common index fd05d78c..ae938c30 100644 --- a/build.common +++ b/build.common @@ -717,3 +717,50 @@ function pl_locateDistroFile () { return 0 fi } + +# experimental +function yumgroups_from_pkgs () { + groupname=$1; shift + groupdesc=$1; shift + pkgsfile=$1; shift + fcdistro=$pl_DISTRO_NAME + [[ -n "$@" ]] && fcdistro=$1; shift + if [[ -n "$@" ]] ; then + echo "yumgroups_from_pkgs : wrong signature" + return 1 + fi + + packages=$(pl_getPackages $fcdistro $pkgsfile) + + cat <<__header + + + + + $(echo $groupname|tr A-Z a-z) + $groupname + true + $groupdesc + false + +__header + + for package in $packages; do + echo "$package" + done + +cat <<__footer + + + +__footer +} + +function toplevel_yumgroups () { + pldistro=$1; shift + pkgsname=$1; shift + builddir=$(dirname $0) + pkgsfile=$(pl_locateDistroFile $builddir $pldistro $pkgsname) + yumgroups_from_pkgs 'PlanetLab' 'PlanetLab Node Root' $pkgsfile +} + diff --git a/config.planetlab/bootstrapfs.pkgs b/config.planetlab/bootstrapfs.pkgs index 73d42d3f..351648c4 100644 --- a/config.planetlab/bootstrapfs.pkgs +++ b/config.planetlab/bootstrapfs.pkgs @@ -1,7 +1,108 @@ -package: bash -package: filesystem +package: kernel +package: kernel-smp package: udev +package: basesystem +package: filesystem +package: bash +package: coreutils +package: python package: coreutils -# see former bootmanager/support-files/buildnode.sh +package: cpio +package: e2fsprogs +package: ed +package: file +package: glibc +package: hdparm +package: initscripts +package: iproute +package: iputils +package: kbd +package: libtermcap +package: passwd +package: procps +package: readline +package: fedora-release +package: rootfiles +package: rpm +package: setserial +package: setup +package: sysklogd +package: SysVinit +package: termcap +package: util-linux +package: vim-minimal +package: authconfig +package: shadow-utils +package: anacron +package: at +package: authconfig +package: autofs +package: bc +package: bind-utils +package: bzip2 +package: crontabs +package: dhclient +package: diffutils +package: ethtool +package: logrotate +package: lsof +package: logwatch +package: mailcap +package: nano +package: nc +package: netdump +package: openssh-clients +package: parted +package: pciutils +package: psacct +package: quota +package: rsh +package: rsync +package: sendmail +package: sudo +package: telnet +package: traceroute +package: time +package: tmpwatch +package: tcpdump +package: openssh-server +package: vixie-cron +package: wget +package: yum +package: curl +package: gzip +package: iptables +package: mkinitrd +package: ntp +package: perl package: python -group: PlanetLab +package: tar +package: expect +package: portmap +package: nfs-utils +package: schedutils +package: openvpn +package: vconfig +package: madwifi +package: wireless-tools +package: util-vserver +package: util-vserver-build +package: util-vserver-lib +package: util-vserver-core +package: util-vserver-sysv +package: util-vserver-legacy +package: util-vserver-pl +#package: util-python +package: NodeManager +package: NodeUpdate +package: codemux +package: autofs +package: pl_sshd +package: ipod +package: vserver-reference +package: vserver-system-packages +package: pl_mom +package: netflow-utils +package: PyXML +package: proper +package: vsys diff --git a/config.planetlab/devel.pkgs b/config.planetlab/devel.pkgs index b836e0cb..d1a616e7 100644 --- a/config.planetlab/devel.pkgs +++ b/config.planetlab/devel.pkgs @@ -78,5 +78,3 @@ package: pciutils-devel # for vsys package: ocaml ocaml-docs package: inotify-tools-devel -# for bootstrapfs & useradd -package: shadow-utils diff --git a/groups/planetlab.xml b/groups/planetlab.xml deleted file mode 100644 index 77993d2e..00000000 --- a/groups/planetlab.xml +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - planetlab - PlanetLab - true - PlanetLab Node Packages - false - - basesystem - bash - coreutils - cpio - e2fsprogs - ed - file - filesystem - glibc - hdparm - initscripts - iproute - iputils - kbd - kernel - kernel-smp - libtermcap - passwd - procps - readline - fedora-release - rootfiles - rpm - setserial - setup - sysklogd - SysVinit - termcap - util-linux - vim-minimal - - authconfig - shadow-utils - - anacron - at - authconfig - autofs - bc - bind-utils - bzip2 - crontabs - dhclient - diffutils - ethtool - logrotate - lsof - logwatch - mailcap - nano - nc - netdump - openssh-clients - parted - pciutils - psacct - quota - rsh - rsync - sendmail - sudo - telnet - traceroute - time - tmpwatch - tcpdump - openssh-server - vixie-cron - wget - yum - - curl - gzip - iptables - mkinitrd - ntp - perl - python - tar - expect - - portmap - nfs-utils - - schedutils - - openvpn - - vconfig - - madwifi - wireless-tools - util-vserver - util-vserver-build - util-vserver-lib - util-vserver-core - util-vserver-sysv - util-vserver-legacy - util-vserver-pl - util-python - NodeManager - NodeUpdate - codemux - autofs - pl_sshd - ipod - vserver-reference - vserver-system-packages - pl_mom - netflow-utils - PyXML - proper - - - - - planetlabalpha - PlanetLab Alpha - true - - - - - - - - planetlabbeta - PlanetLab Beta - true - - - - - - - diff --git a/yumgroups.sh b/yumgroups.sh new file mode 100755 index 00000000..28f9c492 --- /dev/null +++ b/yumgroups.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +. build.common + +function usage () { + echo "Usage: $0 pldistro" + exit 1 +} + +[ "$#" = 2 ] || usage +pldistro=$1; shift +pkgsname=$1; shift + +toplevel_yumgroups $pldistro $pkgsname