From dd88fed790f12c1ca09f356b25bcc7837f8d5333 Mon Sep 17 00:00:00 2001 From: Sapan Bhatia Date: Tue, 12 Jun 2012 09:02:23 -0400 Subject: [PATCH] Added MeasurementLab distribution --- config.mlab/bootcd.pkgs | 89 +++++ config.mlab/devel.pkgs | 118 ++++++ config.mlab/nodeimage.pkgs | 127 ++++++ config.mlab/nodeimage.post | 92 +++++ config.mlab/planetlab.mirrors | 11 + config.mlab/sliceimage-drl.pkgs | 4 + config.mlab/sliceimage-planetflow.pkgs | 5 + config.mlab/sliceimage.pkgs | 37 ++ config.mlab/sliceimage.post | 24 ++ config.mlab/vtest.pkgs | 10 + config.mlab/yumexclude.pkgs | 10 + mlab-tags.mk | 59 +++ mlab.mk | 513 +++++++++++++++++++++++++ 13 files changed, 1099 insertions(+) create mode 100644 config.mlab/bootcd.pkgs create mode 100644 config.mlab/devel.pkgs create mode 100644 config.mlab/nodeimage.pkgs create mode 100644 config.mlab/nodeimage.post create mode 100644 config.mlab/planetlab.mirrors create mode 100644 config.mlab/sliceimage-drl.pkgs create mode 100644 config.mlab/sliceimage-planetflow.pkgs create mode 100644 config.mlab/sliceimage.pkgs create mode 100644 config.mlab/sliceimage.post create mode 100644 config.mlab/vtest.pkgs create mode 100644 config.mlab/yumexclude.pkgs create mode 100644 mlab-tags.mk create mode 100644 mlab.mk diff --git a/config.mlab/bootcd.pkgs b/config.mlab/bootcd.pkgs new file mode 100644 index 00000000..b88f0f56 --- /dev/null +++ b/config.mlab/bootcd.pkgs @@ -0,0 +1,89 @@ +groupname: PlanetLabBootcd +groupdesc: PlanetLab BootCD +# packages to exclude from stock repositories +yumexclude: @NODEYUMEXCLUDE@ +# define packages +package: filesystem +package: udev +package: dhclient +package: bash +package: coreutils +package: iputils +package: kernel +package: bzip2 +package: diffutils +package: logrotate +package: passwd +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>=f8 package>=centos5: gnupg +package>=sl6: gnupg2 +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 +# make this explicit for f14 as we need mkfs.ext2 in bm +package: e2fsprogs +# used to be installed until f12, make it explicit for f14, might come in handy +package>=f14: rsyslog +package: strace lsof +#################### formerly in prep.sh +junk: lib/obsolete +junk: lib/tls +junk: usr/share/cracklib +junk: usr/share/emacs +junk: usr/share/gnupg +junk: usr/share/i18n +junk: usr/share/locale +junk: usr/share/terminfo +junk: usr/share/zoneinfo +junk: usr/sbin/build-locale-archive +junk: usr/sbin/dbconverter-2 +junk: usr/sbin/sasl* +junk: usr/sbin/tcpslice +junk: usr/lib/perl* +junk: usr/lib/locale +junk: usr/lib/sasl* +junk: usr/lib/gconv +junk: usr/lib/tls +junk: usr/boot +# +precious: usr/share/i18n/locales/en_US +precious: usr/share/i18n/charmaps/UTF-8.gz +precious: usr/share/locale/en +precious: usr/share/terminfo/l/linux +precious: usr/share/terminfo/v/vt100 +precious: usr/share/terminfo/x/xterm +precious: usr/share/zoneinfo/UTC +precious: boot/*@pldistro@* +precious: boot/config* +precious: boot/initrd-boot* +precious: boot/kernel-boot* +precious: boot/grub +precious<=f8 precious<=centos5: usr/lib/locale/en_US.utf8 diff --git a/config.mlab/devel.pkgs b/config.mlab/devel.pkgs new file mode 100644 index 00000000..5e51b485 --- /dev/null +++ b/config.mlab/devel.pkgs @@ -0,0 +1,118 @@ +# +groupname: PlanetLabDevel +groupdesc: Building PlanetLab +# +# general utilities +package: sendmail sendmail-cf mailx +package: make git +package: glibc glibc-common +package: bzip2 gzip +package: cpio tar +package: coreutils +package: rpm rpm-build rpm-devel +package: redhat-rpm-config +package: curl curl-devel +package: subversion cvs +package: less +package: openssh +package: emacs-nox +# undetermined +package: expect +package: gd +package: httpd mod_python mod_ssl +package: openssl +package: openssl-devel +package: zlib +package: zlib-devel +package: bison flex +package: libtool +package: metadata +package: mysql mysql-devel mysql-server +package: python python-devel +package: doxygen +package: vixie-cron +package: xmlsec1 xmlsec1-openssl +package: udev +package: expat-devel +package: db4-devel +package: ncurses-devel +package: readline-devel +package: dnsmasq +# for spec2make / rpmlib +package=f8: popt-devel +# kernel +package: gnupg +package: diffutils +package: patchutils +package: vconfig +package: iptables +package: wget +package: beecrypt-devel +package: tetex-latex +package: gcc-c++ +package: binutils-devel +# required for perf +package: xmlto asciidoc newt-devel +package: perl-ExtUtils-Embed +# iptables +package: linuxdoc-tools +package: sudo +package: yum createrepo +## mysql +#package: gperf +#package: time +# bootmanager +package: sharutils +# bootcd +package: nasm +package: mkisofs +package: dosfstools +package: mtools +package: syslinux +# myplc +package: rsync +package: ghostscript +# myplc-docs +package: ed +package: docbook-utils-pdf +# plcapi +package: postgresql postgresql-devel postgresql-python postgresql-server +# if we don't specify @arch@ for php-devel, we end up with the 2 variants (i386 and x86_64) +# in an undetermined order, and php-config --extension-dir might return the wrong place +package: php php-devel.@arch@ php-gd php-pgsql +# now this seems to have been fixed in f12 +package>=f12: php-devel +package: PyXML +# used to reference SOAPpy as well +# for pypcilib +package: pciutils-devel +package: python-simplejson +########## +# for vsys - same as for php-devel above +package: ocaml.@arch@ +# use local inotify-tools on centos +package>=f8:inotify-tools-devel +########## +## for util-vserver-pl +# use local libnl on centos +package>=f8: libnl-devel +# for util-vserver +package: ctags +# +package=f8: e2fsprogs-devel.@arch@ +package>=f12: e2fsprogs-devel +package>=f14: e2fsprogs nss-devel +########## +# zabbix/monitor +package=centos5: krb5-devel.@arch@ e2fsprogs-devel.@arch@ libidn-devel.@arch@ +########## +# for sfa : rebuilding wsdl index at build-time +package: python-uuid pyOpenSSL m2crypto +package: libxml2-python libxslt-python +package: python-ZSI +package: python-psycopg2 +package: python-setuptools +package: python-dateutil +package: python-lxml +# DistributedRateLimiting +package: libxml2-devel diff --git a/config.mlab/nodeimage.pkgs b/config.mlab/nodeimage.pkgs new file mode 100644 index 00000000..bb959d35 --- /dev/null +++ b/config.mlab/nodeimage.pkgs @@ -0,0 +1,127 @@ +# +# Keeping the old name as it might be referenced elsewhere (node update..) +# groupname: Bootstrapfs +groupname: PlanetLab +groupdesc: PlanetLab Node Root +# packages to exclude from stock repositories +yumexclude: @NODEYUMEXCLUDE@ +# fedora-release or centos-release are pulled from deps +# define packages +package: kernel +package: udev +package: basesystem +package: filesystem +package>=f14: lvm2 +package: bash +package: coreutils +package: python +package: cpio +package: e2fsprogs +package: ed +package: file +package: glibc +package: hdparm +package: initscripts +package: iproute +package: iputils +package: kbd +package: passwd +package: procps +package: readline +package: rootfiles +package: rpm +package: setserial +package: setup +package: vim-minimal +package: shadow-utils +package>=centos5: anacron +package<=f10: anacron +package>=f12: cronie-anacron +package: at +package: authconfig +package: bc +package: bind-utils +package: bzip2 +package: crontabs +package: dhclient +package: diffutils +package: ethtool +package: logrotate +package: libnl +package: lsof +package: mailcap +package: nano +package: nc +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: wget +package: yum +package: curl +package: gzip +package: iptables +package>=centos5: mkinitrd +package<=f12: mkinitrd +package>=f14: dracut +package: ntp +package: perl +package: python +package: tar +package: expect +package: nfs-utils +package: openvpn +package: vconfig +package: PyXML + +# +# platform-dependent +# +package>=f8: rsyslog +package=centos5: sysklogd + +package>=f8: util-linux-ng +package=centos5: util-linux + +package<=f8 package=centos5: termcap libtermcap vixie-cron +package>=f10: cronie + +# +# planetlab +# +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: pl_sshd +package: ipod +package: sliceimage-@pldistro@-@fcdistro@-@arch@ +package: sliceimage-system-@pldistro@-@fcdistro@-@arch@ +package: vserver-sliceimage +package: pl_mom +package: fprobe-ulog +package: vsys +package: vsys-scripts +package: monitor-client +package: monitor-runlevelagent +package: pyplnet diff --git a/config.mlab/nodeimage.post b/config.mlab/nodeimage.post new file mode 100644 index 00000000..79d54fe3 --- /dev/null +++ b/config.mlab/nodeimage.post @@ -0,0 +1,92 @@ +#!/bin/bash + +vdir=$1 +if [ -z "${vdir}" ] ; then + echo "ERROR: $0" + echo "Provide the directory of the root filesystem to operate on" + exit +fi + +# Cleanup yum config entirely, waiting for the config files to populate this +rm -rf ${vdir}/etc/yum.conf ${vdir}/etc/yum.repos.d + +# Tweaking services +# turn OFF firstboot if present, might cause the node to hang +chroot ${vdir} /sbin/chkconfig firstboot off || : +# NOTE: we're enabling util-vserver to allow it to help shutdown all slices +# before rebooting. This has been problematic in the past +chroot ${vdir} /sbin/chkconfig util-vserver on || : +# enabling network as it ends up turned off on systems that come with NetworkManager, starting with fedora9 +chroot ${vdir} /sbin/chkconfig network on || : +# and turn off NetworkManager if present, as it quite obviously messes with network +chroot ${vdir} /sbin/chkconfig NetworkManager off || : + +# turn OFF vservers-default ; this is to automatically restart vservers, let nm do that +chroot ${vdir} /sbin/chkconfig vservers-default off || : +# turn ON vprocunhide ; is required with kernels that have CONFIG_VSERVER_PROC_SECURE enabled +# which is the case for our k32 kernel +chroot ${vdir} /sbin/chkconfig vprocunhide on || : + +# turn OFF selinux if set +# this may happen accidentally if you mention too much stuff in bootstrapfs.pkgs +for file in /etc/sysconfig/selinux /sbin/load_policy; do + [ -f ${vdir}/${file} ] || { echo "$file not found in $vdir - fine" ; continue; } + selinuxrpm=$(chroot ${vdir} rpm -qf ${file}) + if [ -z "$selinuxrpm" ] ; then + echo "SElinux: warning : could not rpm for file $file" + else + echo "Force-removing package ${selinuxrpm}" + chroot ${vdir} rpm -e --nodeps ${selinuxrpm} + fi +done + +# Disable splaying of cron. +echo > ${vdir}/etc/sysconfig/crontab + +# Add site_admin account +chroot ${vdir} /usr/sbin/useradd -p "" -u 502 -m site_admin + +# Remove 32bit packages from 64bit system (http://wiki.centos.org/FAQ/General#head-357346ff0bf7c14b0849c3bcce39677aaca528e9) +# use rpm instead of yum as /proc is not mounted at that poing +if echo ${vdir} | grep -q x86_64 ; then + chroot ${vdir} rpm -qa --qf '%{name}.%{arch}\n' | grep 'i[36]86$' | xargs chroot ${vdir} rpm -e +fi + +# Add a logrotate script for btmp, which logs failed ssh logins, which can +# grow unbounded on public plnodes and fill the root fs. +cat < ${vdir}/etc/logrotate.d/btmp +/var/log/btmp { + weekly + minsize 1M + create 0600 root utmp + rotate 2 + compress + notifempty +} +EOF + +# NOTE: This is added to relieve one site's Cisco router configuration that +# fails to recognize the host once the arping is sent out. +# NOTE: this is pretty fragile, and fails on fedora 10 that as of today (oct. 20 2009) +# has initscripts-8.86.3-1.i386 which reads almost identical but with /sbin/arping instead +# NOTE: this might work with fedora8 and centos5 +# the other distros will probably just fail to add this patch +cat <<\EOF | patch -d ${vdir}/etc/sysconfig/network-scripts/ +--- ifup-eth 2008-07-08 13:19:49.000000000 -0400 ++++ ifup-eth-orig 2008-07-08 13:20:02.000000000 -0400 +@@ -263,10 +263,10 @@ + fi + + if ! LC_ALL=C ip addr ls ${REALDEVICE} | LC_ALL=C grep -q "${IPADDR}/${PREFIX}" ; then +- if ! arping -q -c 2 -w 3 -D -I ${REALDEVICE} ${IPADDR} ; then +- echo $"Error, some other host already uses address ${IPADDR}." +- exit 1 +- fi ++ #if ! arping -q -c 2 -w 3 -D -I ${REALDEVICE} ${IPADDR} ; then ++ # echo $"Error, some other host already uses address ${IPADDR}." ++ # exit 1 ++ #fi + if ! ip addr add ${IPADDR}/${PREFIX} \ + brd ${BROADCAST:-+} dev ${REALDEVICE} ${SCOPE} label ${DEVICE}; then + echo $"Error adding address ${IPADDR} for ${DEVICE}." +EOF diff --git a/config.mlab/planetlab.mirrors b/config.mlab/planetlab.mirrors new file mode 100644 index 00000000..07acaefc --- /dev/null +++ b/config.mlab/planetlab.mirrors @@ -0,0 +1,11 @@ +# define here the ordered set of mirrors that you'd like to use when running mkfedora +# used to be hard-wired in build.common / mkfedora +# see http://svn.planet-lab.org/wiki/VserverCentos for howto setup local mirroring +mirror: http://localhost/mirror/ +mirror: http://build.planet-lab.org/ +#mirror: file:///data/fedora +#mirror: http://localhost/fedora +#mirror: http://coblitz.codeen.org/coblitz.planet-lab.org/pub/fedora +#mirror: ftp://mirror.cs.princeton.edu/pub/mirrors/fedora +#mirror: ftp://mirror.stanford.edu/pub/mirrors/fedora +#mirror: ftp://rpmfind.net/linux/fedora diff --git a/config.mlab/sliceimage-drl.pkgs b/config.mlab/sliceimage-drl.pkgs new file mode 100644 index 00000000..f9b3b0e3 --- /dev/null +++ b/config.mlab/sliceimage-drl.pkgs @@ -0,0 +1,4 @@ +# +groupname: drl +groupdesc: Distributed Rate Limiting +package: ulogd diff --git a/config.mlab/sliceimage-planetflow.pkgs b/config.mlab/sliceimage-planetflow.pkgs new file mode 100644 index 00000000..eca4d782 --- /dev/null +++ b/config.mlab/sliceimage-planetflow.pkgs @@ -0,0 +1,5 @@ +# +groupname: PlanetFlowReference +groupdesc: PlanetFlow Reference Image +package: rsync +package: pf2slice diff --git a/config.mlab/sliceimage.pkgs b/config.mlab/sliceimage.pkgs new file mode 100644 index 00000000..58b19623 --- /dev/null +++ b/config.mlab/sliceimage.pkgs @@ -0,0 +1,37 @@ +# +groupname: PlanetLabSlice +groupdesc: PlanetLab Slice Reference Image +# packages to exclude from stock repositories +yumexclude: @NODEYUMEXCLUDE@ +# 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: wget +package: which +package: yum +package: curl +package: gzip +package: perl +package: python +package: python-devel +package: tar +package: findutils +package: filesystem + +package<=f8 package=centos5: vixie-cron +package>=f10: cronie diff --git a/config.mlab/sliceimage.post b/config.mlab/sliceimage.post new file mode 100644 index 00000000..dabcc1e1 --- /dev/null +++ b/config.mlab/sliceimage.post @@ -0,0 +1,24 @@ +#!/bin/bash + +vdir=$1 + +if [ -z "${vdir}" ] ; then + echo "ERROR: $0" + echo "Provide the directory of the root filesystem to operate on" + exit +fi + +# reset root password to be empty +echo "in slice image: resetting root password" +sed -i -e "s/root:[\*|x]/root:/" ${vdir}/etc/passwd + +# modify the sudoers file to remove the 'requiretty' attribute +echo "in slice image: removing requiretty from /etc/sudoers" +sed -i -e 's,^\(Defaults.*requiretty\),#\1,' ${vdir}/etc/sudoers + +# Fix up /etc/init.d/halt +echo "in slice image: fixing /etc/init.d/halt" +cat > ${vdir}/etc/init.d/halt <=f12: kernel* util-vserver* iptables iptables-ipv6 +nodeyumexclude=centos5: kernel kernel-vserver kernel-devel kernel-headers kernel-debuginfo util-vserver* iptables inotify-tools* libnl +nodeyumexclude=sl6: kernel kernel-debug kernel-debug-devel kernel-devel kernel-doc kernel-firmware kernel-headers iptables diff --git a/mlab-tags.mk b/mlab-tags.mk new file mode 100644 index 00000000..16c56f6c --- /dev/null +++ b/mlab-tags.mk @@ -0,0 +1,59 @@ +# build-GITPATH is now set by vbuild-nightly.sh to avoid duplication + +mkinitrd-GITPATH := git://git.planet-lab.org/mkinitrd.git@mkinitrd-5.1.19.6-2 +linux-2.6-BRANCH := 32 # This line is defunct +linux-2.6-GITPATH := git://git.planet-lab.org/linux-2.6.git@rhel6-mlab +# help out spec2make on f8 and centos5, due to a bug in rpm +ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f8 centos5)" +kernel-WHITELIST-RPMS := kernel-devel,kernel-headers +endif +kernel-DEVEL-RPMS += elfutils-libelf-devel +madwifi-GITPATH := git://git.planet-lab.org/madwifi.git@madwifi-4132-5 +iptables-GITPATH := git://git.planet-lab.org/iptables.git@iptables-1.4.10-5 +# we use the stock iproute2 with 2.6.32, since our gre patch is not needed anymore with that kernel +# note that this should be consistently reflected in yumexclude +ALL := $(filter-out iproute,$(ALL)) +util-vserver-GITPATH := git://git.planet-lab.org/util-vserver.git@util-vserver-0.30.216-20 +libnl-GITPATH := git://git.planet-lab.org/libnl.git@libnl-1.1-2 +util-vserver-pl-GITPATH := git://git.planet-lab.org/util-vserver-pl.git@util-vserver-pl-0.4-26 +nodeupdate-GITPATH := git://git.planet-lab.org/nodeupdate.git@nodeupdate-0.5-9 +PingOfDeath-SVNPATH := http://svn.planet-lab.org/svn/PingOfDeath/tags/PingOfDeath-2.2-1 +nodemanager-GITPATH := git://git.planet-lab.org/nodemanager.git@nodemanager-2.0-36 +# Trellis-specific NodeManager plugins +nodemanager-topo-GITPATH := git://git.planet-lab.org/NodeManager-topo@master +NodeManager-optin-SVNPATH := http://svn.planet-lab.org/svn/NodeManager-optin/trunk +# +pl_sshd-SVNPATH := http://svn.planet-lab.org/svn/pl_sshd/tags/pl_sshd-1.0-11 +codemux-GITPATH := git://git.planet-lab.org/codemux.git@codemux-0.1-15 +fprobe-ulog-SVNPATH := http://svn.planet-lab.org/svn/fprobe-ulog/tags/fprobe-ulog-1.1.3-3 +pf2slice-SVNPATH := http://svn.planet-lab.org/svn/pf2slice/tags/pf2slice-1.0-2 +Mom-SVNPATH := http://svn.planet-lab.org/svn/Mom/tags/Mom-2.3-4 +inotify-tools-SVNPATH := http://svn.planet-lab.org/svn/inotify-tools/tags/inotify-tools-3.13-2 +openvswitch-GITPATH := git://git.planet-lab.org/openvswitch.git@master +vsys-GITPATH := git://git.planet-lab.org/vsys.git@vsys-0.99-2 +vsys-scripts-GITPATH := git://git.planet-lab.org/vsys-scripts@vsys-scripts-0.95-41 +plcapi-GITPATH := git://git.planet-lab.org/plcapi@master +drupal-GITPATH := git://git.planet-lab.org/drupal.git@drupal-4.7-15 +plewww-GITPATH := git://git.planet-lab.org/plewww@plewww-4.3-72 +www-register-wizard-SVNPATH := http://svn.planet-lab.org/svn/www-register-wizard/tags/www-register-wizard-4.3-5 +monitor-GITPATH := git://git.planet-lab.org/monitor@monitor-3.1-6 +PLCRT-SVNPATH := http://svn.planet-lab.org/svn/PLCRT/tags/PLCRT-1.0-11 +pyopenssl-GITPATH := git://git.planet-lab.org/pyopenssl.git@pyopenssl-0.9-2 +### +pyaspects-GITPATH := git://git.planet-lab.org/pyaspects.git@pyaspects-0.4.1-2 +omf-GITPATH := git://git.onelab.eu/omf.git@omf-5.3-11 +### +sfa-GITPATH := git://git.planet-lab.org/sfa.git@sfa-2.1-11 +sface-GITPATH := git://git.planet-lab.org/sface.git@sface-0.9-8 +nodeconfig-GITPATH := git://git.planet-lab.org/nodeconfig.git@nodeconfig-5.0-7 +bootmanager-GITPATH := git://git.planet-lab.org/bootmanager.git@bootmanager-5.0-22 +pypcilib-GITPATH := git://git.planet-lab.org/pypcilib.git@pypcilib-0.2-10 +pyplnet-GITPATH := git://git.planet-lab.org/pyplnet.git@pyplnet-4.3-14 +DistributedRateLimiting-SVNPATH := http://svn.planet-lab.org/svn/DistributedRateLimiting/tags/DistributedRateLimiting-0.1-1 +pcucontrol-GITPATH := git://git.planet-lab.org/pcucontrol.git@pcucontrol-1.0-12 +bootcd-GITPATH := git://git.planet-lab.org/bootcd.git@master +sliceimage-GITPATH := git://git.planet-lab.org/sliceimage.git@master +nodeimage-GITPATH := git://git.planet-lab.org/nodeimage.git@master +myplc-GITPATH := git://git.planet-lab.org/myplc.git@master +# locating the right test directory - see make tests_gitpath +tests-GITPATH := git://git.planet-lab.org/tests.git@tests-5.1-6 diff --git a/mlab.mk b/mlab.mk new file mode 100644 index 00000000..ae3f6236 --- /dev/null +++ b/mlab.mk @@ -0,0 +1,513 @@ +# +# declare the packages to be built and their dependencies +# initial version from Mark Huang +# Mark Huang +# Copyright (C) 2003-2006 The Trustees of Princeton University +# rewritten by Thierry Parmentelat - INRIA Sophia Antipolis +# +# see doc in Makefile +# + +# mkinitrd +# +ifeq "$(PLDISTROTAGS)" "planetlab-k32-tags.mk" +ifeq "$(DISTRONAME)" "centos5" +mkinitrd-MODULES := mkinitrd +mkinitrd-SPEC := mkinitrd.spec +mkinitrd-BUILD-FROM-SRPM := yes +mkinitrd-DEVEL-RPMS += parted-devel glib2-devel libdhcp4client-devel libdhcp6client-devel libdhcp-devel +mkinitrd-DEVEL-RPMS += device-mapper libselinux-devel libsepol-devel libnl-devel +ALL += mkinitrd +IN_BOOTCD += mkinitrd +IN_SLICEIMAGE += mkinitrd +IN_NODEIMAGE += mkinitrd +IN_MYPLC += mkinitrd +endif +endif +# +# kernel +# +# use a package name with srpm in it: +# so the source rpm is created by running make srpm in the codebase +# + +kernel-MODULES := linux-2.6 +kernel-SPEC := kernel-2.6.spec +kernel-BUILD-FROM-SRPM := yes +ifeq "$(HOSTARCH)" "i386" +kernel-RPMFLAGS:= --target i686 +else +kernel-RPMFLAGS:= --target $(HOSTARCH) +endif +kernel-SPECVARS += kernelconfig=planetlab +KERNELS += kernel + +kernels: $(KERNELS) +kernels-clean: $(foreach package,$(KERNELS),$(package)-clean) + +ALL += $(KERNELS) +# this is to mark on which image a given rpm is supposed to go +IN_BOOTCD += $(KERNELS) +IN_SLICEIMAGE += $(KERNELS) +IN_NODEIMAGE += $(KERNELS) + +# +# madwifi +# +# skip this with k32/f8 +ifneq "" "$(findstring k32,$(PLDISTROTAGS))" +ifneq "$(DISTRONAME)" "f8" +madwifi-MODULES := madwifi +madwifi-SPEC := madwifi.spec +madwifi-BUILD-FROM-SRPM := yes +madwifi-DEPEND-DEVEL-RPMS += kernel-devel +madwifi-SPECVARS = kernel_version=$(kernel.rpm-version) \ + kernel_release=$(kernel.rpm-release) \ + kernel_arch=$(kernel.rpm-arch) +ALL += madwifi +IN_NODEIMAGE += madwifi +endif +endif + +# +# iptables +# +iptables-MODULES := iptables +iptables-SPEC := iptables.spec +iptables-BUILD-FROM-SRPM := yes +iptables-DEPEND-DEVEL-RPMS += kernel-devel kernel-headers +ALL += iptables +IN_NODEIMAGE += iptables + +# +# iproute +# +iproute-MODULES := iproute2 +iproute-SPEC := iproute.spec +iproute-BUILD-FROM-SRPM := yes +ALL += iproute +IN_NODEIMAGE += iproute +IN_SLICEIMAGE += iproute +IN_BOOTCD += iproute + +# +# util-vserver +# +util-vserver-MODULES := util-vserver +util-vserver-SPEC := util-vserver.spec +# starting with 0.4 +util-vserver-BUILD-FROM-SRPM := yes +util-vserver-RPMFLAGS:= --without dietlibc --without doc +ALL += util-vserver +IN_NODEIMAGE += util-vserver + +# +# libnl - local import +# we need either 1.1 or at least 1.0.pre6 +# rebuild this on centos5 - see yumexclude +# +local_libnl=false +ifeq "$(DISTRONAME)" "centos5" +local_libnl=true +endif + +ifeq "$(local_libnl)" "true" +libnl-MODULES := libnl +libnl-SPEC := libnl.spec +libnl-BUILD-FROM-SRPM := yes +# this sounds like the thing to do, but in fact linux/if_vlan.h comes with kernel-headers +libnl-DEPEND-DEVEL-RPMS += kernel-devel kernel-headers +ALL += libnl +IN_NODEIMAGE += libnl +endif + +# +# util-vserver-pl +# +util-vserver-pl-MODULES := util-vserver-pl +util-vserver-pl-SPEC := util-vserver-pl.spec +util-vserver-pl-DEPEND-DEVEL-RPMS += util-vserver-lib util-vserver-devel util-vserver-core +ifeq "$(local_libnl)" "true" +util-vserver-pl-DEPEND-DEVEL-RPMS += libnl libnl-devel +endif +ALL += util-vserver-pl +IN_NODEIMAGE += util-vserver-pl + +# +# NodeUpdate +# +nodeupdate-MODULES := nodeupdate +nodeupdate-SPEC := NodeUpdate.spec +ALL += nodeupdate +IN_NODEIMAGE += nodeupdate + +# +# ipod +# +ipod-MODULES := PingOfDeath +ipod-SPEC := ipod.spec +ALL += ipod +IN_NODEIMAGE += ipod + +# +# NodeManager +# +nodemanager-MODULES := nodemanager +nodemanager-SPEC := NodeManager.spec +ALL += nodemanager +IN_NODEIMAGE += nodemanager + +# +# pl_sshd +# +sshd-MODULES := pl_sshd +sshd-SPEC := pl_sshd.spec +ALL += sshd +IN_NODEIMAGE += sshd + +# +# codemux: Port 80 demux +# +codemux-MODULES := codemux +codemux-SPEC := codemux.spec +ALL += codemux +IN_NODEIMAGE += codemux + +# +# fprobe-ulog +# +fprobe-ulog-MODULES := fprobe-ulog +fprobe-ulog-SPEC := fprobe-ulog.spec +ALL += fprobe-ulog +IN_NODEIMAGE += fprobe-ulog + +# +# DistributedRateLimiting +# +DistributedRateLimiting-MODULES := DistributedRateLimiting +DistributedRateLimiting-SPEC := DistributedRateLimiting.spec +ALL += DistributedRateLimiting +IN_NODEREPO += DistributedRateLimiting + +# +# pf2slice +# +pf2slice-MODULES := pf2slice +pf2slice-SPEC := pf2slice.spec +ALL += pf2slice + +# +# PlanetLab Mom: Cleans up your mess +# +mom-MODULES := Mom +mom-SPEC := pl_mom.spec +ALL += mom +IN_NODEIMAGE += mom + +# +# inotify-tools - local import +# rebuild this on centos5 (not found) - see yumexclude +# +local_inotify_tools=false +ifeq "$(DISTRONAME)" "centos5" +local_inotify_tools=true +endif + +ifeq "$(DISTRONAME)" "sl6" +local_inotify_tools=true +endif + +ifeq "$(local_inotify_tools)" "true" +inotify-tools-MODULES := inotify-tools +inotify-tools-SPEC := inotify-tools.spec +inotify-tools-BUILD-FROM-SRPM := yes +IN_NODEIMAGE += inotify-tools +ALL += inotify-tools +endif + +# +# openvswitch +# +openvswitch-MODULES := openvswitch +openvswitch-SPEC := openvswitch.spec +openvswitch-DEPEND-DEVEL-RPMS += kernel-devel + +#ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f14 f15 f16)" +#IN_NODEIMAGE += openvswitch +#ALL += openvswitch +#endif + +# +# vsys +# +vsys-MODULES := vsys +vsys-SPEC := vsys.spec +# ocaml-docs is not needed anymore but keep it on a tmp basis as some tags may still have it +vsys-DEVEL-RPMS += ocaml-ocamldoc ocaml-docs +ifeq "$(local_inotify_tools)" "true" +vsys-DEPEND-DEVEL-RPMS += inotify-tools inotify-tools-devel +endif +IN_NODEIMAGE += vsys +ALL += vsys + +# +# vsyssh : installed in slivers +# +vsyssh-MODULES := vsys +vsyssh-SPEC := vsyssh.spec +IN_SLICEIMAGE += vsyssh +ALL += vsyssh + +# +# vsys-scripts +# +vsys-scripts-MODULES := vsys-scripts +vsys-scripts-SPEC := vsys-scripts.spec +IN_NODEIMAGE += vsys-scripts +ALL += vsys-scripts + +# +# plcapi +# +plcapi-MODULES := plcapi +plcapi-SPEC := PLCAPI.spec +ALL += plcapi +IN_MYPLC += plcapi + +# +# drupal +# +drupal-MODULES := drupal +drupal-SPEC := drupal.spec +drupal-BUILD-FROM-SRPM := yes +ALL += drupal +IN_MYPLC += drupal + +# +# use the plewww module instead +# +plewww-MODULES := plewww +plewww-SPEC := plewww.spec +ALL += plewww +IN_MYPLC += plewww + +# +# www-register-wizard +# +www-register-wizard-MODULES := www-register-wizard +www-register-wizard-SPEC := www-register-wizard.spec +ALL += www-register-wizard +IN_MYPLC += www-register-wizard + +# +# pcucontrol +# +pcucontrol-MODULES := pcucontrol +pcucontrol-SPEC := pcucontrol.spec +ALL += pcucontrol + +# +# monitor +# +monitor-MODULES := monitor +monitor-SPEC := Monitor.spec +monitor-DEVEL-RPMS += net-snmp net-snmp-devel +ALL += monitor +IN_NODEIMAGE += monitor + +# +# PLC RT +# +plcrt-MODULES := PLCRT +plcrt-SPEC := plcrt.spec +ALL += plcrt + +# f12 has 0.9-1 already +ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f8 centos5)" +# +# pyopenssl +# +pyopenssl-MODULES := pyopenssl +pyopenssl-SPEC := pyOpenSSL.spec +pyopenssl-BUILD-FROM-SRPM := yes +ALL += pyopenssl +endif + +# +# pyaspects +# +pyaspects-MODULES := pyaspects +pyaspects-SPEC := pyaspects.spec +pyaspects-BUILD-FROM-SRPM := yes +ALL += pyaspects + +# sfa now uses the with statement that's not supported on python-2.4 - not even through __future__ +# In addition we now use sqlalchemy and 0.5 as per f12 is not compatible with our model +build_sfa=true +ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f8 f12 centos5)" +build_sfa=false +endif + +ifeq "$(build_sfa)" "true" +# +# sfa - Slice Facility Architecture +# +sfa-MODULES := sfa +sfa-SPEC := sfa.spec +ALL += sfa + +sface-MODULES := sface +sface-SPEC := sface.spec +ALL += sface +endif + +# +# nodeconfig +# +nodeconfig-MODULES := nodeconfig +nodeconfig-SPEC := nodeconfig.spec +ALL += nodeconfig +IN_MYPLC += nodeconfig + +# +# bootmanager +# +bootmanager-MODULES := bootmanager +bootmanager-SPEC := bootmanager.spec +ALL += bootmanager +IN_MYPLC += bootmanager + +# +# pypcilib : used in bootcd +# +pypcilib-MODULES := pypcilib +pypcilib-SPEC := pypcilib.spec +ALL += pypcilib +IN_BOOTCD += pypcilib + +# +# pyplnet +# +pyplnet-MODULES := pyplnet +pyplnet-SPEC := pyplnet.spec +ALL += pyplnet +IN_NODEIMAGE += pyplnet +IN_MYPLC += pyplnet +IN_BOOTCD += pyplnet + +# +# OMF resource controller +# +omf-resctl-MODULES := omf +omf-resctl-SPEC := omf-resctl.spec +ALL += omf-resctl +IN_SLICEIMAGE += omf-resctl + +# +# OMF exp controller +# +omf-expctl-MODULES := omf +omf-expctl-SPEC := omf-expctl.spec +ALL += omf-expctl + +# +# bootcd +# +bootcd-MODULES := bootcd build +bootcd-SPEC := bootcd.spec +bootcd-DEPEND-PACKAGES := $(IN_BOOTCD) +bootcd-DEPEND-FILES := RPMS/yumgroups.xml +bootcd-RPMDATE := yes +ALL += bootcd +IN_MYPLC += bootcd + +# +# images for slices +# +sliceimage-MODULES := sliceimage build +sliceimage-SPEC := sliceimage.spec +sliceimage-DEPEND-PACKAGES := $(IN_SLICEIMAGE) +sliceimage-DEPEND-FILES := RPMS/yumgroups.xml +sliceimage-RPMDATE := yes +ALL += sliceimage +IN_NODEIMAGE += sliceimage + +# +# vserver-specific sliceimage initialization +# +vserver-sliceimage-MODULES := sliceimage +vserver-sliceimage-SPEC := vserver-sliceimage.spec +vserver-sliceimage-RPMDATE := yes +ALL += vserver-sliceimage +IN_NODEIMAGE += vserver-sliceimage + +# +# nodeimage +# +nodeimage-MODULES := nodeimage build +nodeimage-SPEC := nodeimage.spec +nodeimage-DEPEND-PACKAGES := $(IN_NODEIMAGE) +nodeimage-DEPEND-FILES := RPMS/yumgroups.xml +nodeimage-RPMDATE := yes +ALL += nodeimage +IN_MYPLC += nodeimage + +# +# noderepo +# +# all rpms resulting from packages marked as being in nodeimage and sliceimage +NODEREPO_RPMS = $(foreach package,$(IN_NODEIMAGE) $(IN_NODEREPO) $(IN_SLICEIMAGE),$($(package).rpms)) +# replace space with +++ (specvars cannot deal with spaces) +SPACE=$(subst x, ,x) +NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS)) + +noderepo-MODULES := nodeimage +noderepo-SPEC := noderepo.spec +# package requires all embedded packages +noderepo-DEPEND-PACKAGES := $(IN_NODEIMAGE) $(IN_NODEREPO) $(IN_SLICEIMAGE) +noderepo-DEPEND-FILES := RPMS/yumgroups.xml +#export rpm list to the specfile +noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS) +noderepo-RPMDATE := yes +ALL += noderepo +IN_MYPLC += noderepo + +# +# slicerepo +# +# all rpms resulting from packages marked as being in vserver +SLICEREPO_RPMS = $(foreach package,$(IN_SLICEIMAGE),$($(package).rpms)) +# replace space with +++ (specvars cannot deal with spaces) +SPACE=$(subst x, ,x) +SLICEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(SLICEREPO_RPMS)) + +slicerepo-MODULES := nodeimage +slicerepo-SPEC := slicerepo.spec +# package requires all embedded packages +slicerepo-DEPEND-PACKAGES := $(IN_SLICEIMAGE) +slicerepo-DEPEND-FILES := RPMS/yumgroups.xml +#export rpm list to the specfile +slicerepo-SPECVARS = slice_rpms_plus=$(SLICEREPO_RPMS_3PLUS) +slicerepo-RPMDATE := yes +ALL += slicerepo + +# +# MyPLC : lightweight packaging, dependencies are yum-installed in a vserver +# +myplc-MODULES := myplc +myplc-SPEC := myplc.spec +myplc-DEPEND-FILES := myplc-release RPMS/yumgroups.xml +ALL += myplc + +# myplc-docs only contains docs for PLCAPI and NMAPI, but +# we still need to pull MyPLC, as it is where the specfile lies, +# together with the utility script docbook2drupal.sh +myplc-docs-MODULES := myplc plcapi nodemanager monitor +myplc-docs-SPEC := myplc-docs.spec +ALL += myplc-docs + +# using some other name than myplc-release, as this is a make target already +release-MODULES := myplc +release-SPEC := myplc-release.spec +release-RPMDATE := yes +ALL += release -- 2.43.0