'bootcd-3-alpina-branch-point'.
+++ /dev/null
-.cvsps
-.rpmmacros
-BUILD
-RPMS
-SOURCES
-SPECS
-SRPMS
+++ /dev/null
-#
-# PlanetLab RPM generation
-#
-# Copyright (c) 2003 The Trustees of Princeton University (Trustees).
-# All Rights Reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided
-# with the distribution.
-#
-# * Neither the name of the copyright holder nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TRUSTEES OR
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# $Id: Makefile,v 1.55 2004/10/26 21:48:13 mlhuang Exp $
-#
-
-# Default target
-all:
-
-#
-# CVSROOT: CVSROOT to use
-# INITIAL: CVS tag to use for Source0 tarball
-# TAG: CVS tag to patch to (if not HEAD)
-# MODULE: CVS module name to use (if not HEAD)
-# SPEC: RPM spec file template
-# RPMFLAGS: Miscellaneous RPM flags
-# CVS_RSH: If not ssh
-# ALL: default targets
-#
-# If INITIAL is different than TAG, PatchSets will be generated
-# automatically with cvsps(1) to bring Source0 up to TAG. If TAG is
-# HEAD, a %{date} variable will be defined in the generated spec
-# file. If a Patch: tag in the spec file matches a generated PatchSet
-# number, the name of the patch will be as specified. Otherwise, the
-# name of the patch will be the PatchSet number. %patch tags in the
-# spec file are generated automatically.
-#
-
-# Default tags
-INITIAL := HEAD
-TAG := HEAD
-
-#
-# kernel
-#
-
-kernel-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
-kernel-MODULE := linux-2.6
-kernel-SPEC := linux-2.6/scripts/kernel-2.6-planetlab.spec
-ALL += kernel
-
-#
-# vnet
-#
-
-vnet-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
-vnet-MODULE := vnet
-vnet-SPEC := vnet/vnet.spec
-ALL += vnet
-
-# Build kernel first so we can bootstrap off of its build
-vnet: kernel
-
-#
-# util-vserver
-#
-
-util-vserver-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
-util-vserver-MODULE := util-vserver
-util-vserver-SPEC := util-vserver/util-vserver.spec
-ALL += util-vserver
-
-# Build kernel first so we can bootstrap off of its build
-util-vserver: kernel
-
-#
-# vserver-reference
-#
-
-vserver-reference-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
-vserver-reference-MODULE := vserver-reference
-vserver-reference-SPEC := vserver-reference/vserver-reference.spec
-ALL += vserver-reference
-
-#
-# lkcdutils
-#
-
-lkcdutils-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
-lkcdutils-MODULE := lkcdutils
-lkcdutils-SPEC := lkcdutils/spec/lkcdutils.spec
-ALL += lkcdutils
-
-# Build kernel first so we can bootstrap off of its build
-lkcdutils: kernel
-
-#
-# yum
-#
-
-yum-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
-yum-MODULE := yum
-yum-SPEC := yum/yum.spec
-ALL += yum
-
-#
-# ksymoops
-#
-
-ksymoops-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
-ksymoops-INITIAL := ksymoops-2_4_9
-ksymoops-MODULE := ksymoops
-ksymoops-SPEC := ksymoops/ksymoops.spec
-ALL += ksymoops
-
-#
-# PlanetLabAccounts
-#
-
-PlanetLabAccounts-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
-PlanetLabAccounts-MODULE := PlanetLabAccounts
-PlanetLabAccounts-SPEC := PlanetLabAccounts/PlanetLabAccounts.spec
-ALL += PlanetLabAccounts
-
-#
-# NodeUpdate
-#
-
-NodeUpdate-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
-NodeUpdate-MODULE := NodeUpdate
-NodeUpdate-SPEC := NodeUpdate/NodeUpdate.spec
-ALL += NodeUpdate
-
-#
-# PlanetLabConf
-#
-
-PlanetLabConf-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
-PlanetLabConf-MODULE := PlanetLabConf
-PlanetLabConf-SPEC := PlanetLabConf/PlanetLabConf.spec
-ALL += PlanetLabConf
-
-#
-# PlanetLabKeys
-#
-
-PlanetLabKeys-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
-PlanetLabKeys-MODULE := PlanetLabKeys
-PlanetLabKeys-SPEC := PlanetLabKeys/PlanetLabKeys.spec
-ALL += PlanetLabKeys
-
-#
-# ipod
-#
-
-ipod-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
-ipod-MODULE := ipod
-ipod-SPEC := ipod/ipod.spec
-ALL += ipod
-
-#
-# sudo
-#
-
-sudo-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
-sudo-MODULE := sudo
-sudo-SPEC := sudo/planetlab_sudo.spec
-ALL += sudo
-
-#
-# pycurl
-#
-
-pycurl-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
-pycurl-MODULE := pycurl
-pycurl-SPEC := pycurl/pycurl.spec
-ALL += pycurl
-
-#
-# BootServerRequest
-#
-
-BootServerRequest-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
-BootServerRequest-MODULE := BootServerRequest
-BootServerRequest-SPEC := BootServerRequest/PLBootServerRequest.spec
-ALL += BootServerRequest
-
-#
-# PlanetLabID
-#
-
-PlanetLabID-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
-PlanetLabID-MODULE := PlanetLabID
-PlanetLabID-SPEC := PlanetLabID/PlanetLabID.spec
-ALL += PlanetLabID
-
-#
-# Node Manager
-#
-
-sidewinder-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
-sidewinder-MODULE := sidewinder
-sidewinder-SPEC := sidewinder/sidewinder.spec
-ALL += sidewinder
-
-#
-# pl_sshd
-#
-
-pl_sshd-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
-pl_sshd-MODULE := pl_sshd
-pl_sshd-SPEC := pl_sshd/pl_sshd.spec
-ALL += pl_sshd
-
-#
-# Resource Management Tools
-#
-
-resman-CVSROOT := :pserver:anon@build.planet-lab.org:/cvs
-resman-MODULE := resman
-resman-SPEC := resman/resman.spec
-ALL += resman
-
-#
-# Proper: Privileged Operations Service
-#
-
-proper-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
-proper-MODULE := proper
-proper-SPEC := proper/proper.spec
-ALL += proper
-
-#
-# ulogd
-#
-
-ulogd-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
-ulogd-MODULE := ulogd
-ulogd-SPEC := ulogd/ulogd.spec
-ALL += ulogd
-
-ulogd: kernel proper
-
-#
-# netflow and netsummary
-#
-
-netflow-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
-netflow-MODULE := netflow netsummary
-netflow-SPEC := netflow/netflow.spec
-ALL += netflow
-
-ifeq ($(findstring $(package),$(ALL)),)
-
-# Build all packages
-all: $(ALL)
-
-# Recurse
-$(ALL):
- $(MAKE) package=$@
-
-# Remove files generated by this package
-$(foreach package,$(ALL),$(package)-clean): %-clean:
- $(MAKE) package=$* clean
-
-# Remove all generated files
-clean:
- rm -rf BUILD RPMS SOURCES SPECS SRPMS .rpmmacros .cvsps
-
-.PHONY: all $(ALL) $(foreach package,$(ALL),$(package)-clean) clean
-
-else
-
-# Define variables for Makerules
-CVSROOT := $($(package)-CVSROOT)
-INITIAL := $(if $($(package)-INITIAL),$($(package)-INITIAL),$(INITIAL))
-TAG := $(if $($(package)-TAG),$($(package)-TAG),$(TAG))
-MODULE := $($(package)-MODULE)
-SPEC := $($(package)-SPEC)
-RPMFLAGS := $($(package)-RPMFLAGS)
-CVS_RSH := $(if $($(package)-CVS_RSH),$($(package)-CVS_RSH),ssh)
-
-include Makerules
-
-endif
+++ /dev/null
-#
-# PlanetLab RPM generation
-#
-# Copyright (c) 2003 The Trustees of Princeton University (Trustees).
-# All Rights Reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided
-# with the distribution.
-#
-# * Neither the name of the copyright holder nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TRUSTEES OR
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# $Id: Makerules,v 1.11 2004/09/18 19:50:02 mlh-pl_rpm Exp $
-#
-
-# Base cvsps and rpmbuild in the current directory
-export HOME := $(shell pwd)
-export CVSROOT CVS_RSH
-
-#
-# Parse spec file template
-#
-
-MK := SPECS/$(patsubst %.spec,%.mk,$(notdir $(SPEC)))
-
-$(MK): SPECS/$(notdir $(SPEC)).in
- # Substitute '$' for '%' and 'name := value' for '%define name value' or 'name: value'
- sed -n \
- -e 's/%{/$${/g' \
- -e 's/%\([[:alnum:]]\+\)/$${\1}/g' \
- -e 's/^$${define}[ ]*\([^ ]*\)[ ]*\([^ ]*\)/\1 := \2/p' \
- -e 's/^\([^ ]*\):[ ]*\([^ ]*\)/\1 := \2/p' \
- $< > $@
-ifneq ($(INITIAL),$(TAG))
- # Get list of PatchSets
- cvsps --cvs-direct --root $(CVSROOT) -r $(INITIAL) $(if $(TAG:HEAD=),-r $(TAG)) $(MODULE) | \
- sed -ne 's|^PatchSet[ ]*\([0-9]*\)|PATCHES += \1|p' >> $@
-ifeq ($(shell echo $(MAKE_VERSION) | awk '{ print ($$1 < 3.80) }'),1)
- # make-3.80 can use $(eval) instead (see below)
- cvsps --cvs-direct --root $(CVSROOT) -r $(INITIAL) $(if $(TAG:HEAD=),-r $(TAG)) $(MODULE) | \
- sh Patchrules >> $@
-endif
-endif
-
-SPECS/$(notdir $(SPEC)).in:
- mkdir -p SPECS
- cvs -d $(CVSROOT) checkout -r $(TAG) -p $(SPEC) > $@
-
-include $(MK)
-
-#
-# Generate tarball
-#
-
-# Get rid of URL
-Source0 := $(notdir $(if $(Source),$(Source),$(Source0)))
-
-# Add tarball to the list of sources
-SOURCES += SOURCES/$(Source0)
-
-# Get rid of .tar.bz2 or .tar.gz or .tgz
-Base0 := $(basename $(basename $(Source0)))
-
-# Export module
-SOURCES/$(Base0):
- mkdir -p SOURCES
- cd SOURCES && cvs -d $(CVSROOT) export -r $(INITIAL) -d $(Base0) $(MODULE)
-
-.SECONDARY: $(SOURCES)/$(Base0)
-
-# Generate tarball
-SOURCES/$(Base0).tar.bz2: SOURCES/$(Base0)
- tar cpjf $@ -C SOURCES $(Base0)
-
-SOURCES/$(Base0).tar.gz SOURCES/$(Base0).tgz: SOURCES/$(Base0)
- tar cpzf $@ -C SOURCES $(Base0)
-
-SOURCES/$(Base0).tar: SOURCES/$(Base0)
- tar cpf $@ -C SOURCES $(Base0)
-
-#
-# Generate patches
-#
-
-define PATCH_template
-
-# In case the spec file did not explicitly list the PatchSet
-ifeq ($$(origin Patch$(1)),undefined)
-Patch$(1) := $$(package)-$(1).patch.bz2
-endif
-
-# Get rid of URL
-Patch$(1) := $$(notdir $$(Patch$(1)))
-
-# Add patch to the list of sources
-SOURCES += SOURCES/$$(Patch$(1))
-
-# Generate uncompressed patch
-SOURCES/$$(patsubst %.gz,%,$$(patsubst %.bz2,%,$$(Patch$(1)))):
- mkdir -p SOURCES
- cvsps --cvs-direct --root $$(CVSROOT) -g -s $(1) $$(MODULE) > $$@
-
-endef
-
-# bzip2
-%.bz2: %
- bzip2 -c $< > $@
-
-# gzip
-%.gz: %
- gzip -c $< > $@
-
-# Generate rules to generate patches (make-3.80 and above expands this)
-$(foreach n,$(PATCHES),$(eval $(call PATCH_template,$(n))))
-
-#
-# Generate spec file
-#
-
-ifeq ($(TAG),HEAD)
-# Define date for untagged builds
-DATE := $(shell date +%Y.%m.%d)
-endif
-
-# Generate spec file
-SPECS/$(notdir $(SPEC)): SPECS/$(notdir $(SPEC)).in
- rm -f $@
-ifeq ($(TAG),HEAD)
- # Define date for untagged builds
- echo "%define date $(DATE)" >> $@
-endif
- # Rewrite patch sections of spec file
- perl -n -e ' \
- next if /^Patch.*/; \
- next if /^%patch.*/; \
- print; \
- if (/^Source.*/) { $(foreach n,$(PATCHES),print "Patch$(n): $(Patch$(n))\n";) } \
- if (/^%setup.*/) { $(foreach n,$(PATCHES),print "%patch$(n) -p1\n";) } \
- ' $< >> $@
-
-#
-# Build
-#
-
-ifeq ($(TAG),HEAD)
-RPMFLAGS += --define "date $(DATE)"
-endif
-NVR := $(shell rpmquery $(RPMFLAGS) --specfile SPECS/$(notdir $(SPEC)).in 2>/dev/null | head -1)
-ARCH := $(shell rpmquery $(RPMFLAGS) --queryformat '%{ARCH}\n' --specfile SPECS/$(notdir $(SPEC)).in 2>/dev/null | head -1)
-
-all: RPMS/$(ARCH)/$(NVR).$(ARCH).rpm SRPMS/$(NVR).src.rpm
-
-# Build RPM
-RPMS/$(ARCH)/$(NVR).$(ARCH).rpm: SPECS/$(notdir $(SPEC)) $(SOURCES) .rpmmacros
- mkdir -p BUILD RPMS
- rpmbuild $(RPMFLAGS) -bb $<
-
-# Build SRPM
-SRPMS/$(NVR).src.rpm: SPECS/$(notdir $(SPEC)) $(SOURCES) .rpmmacros
- mkdir -p SRPMS
- rpmbuild $(RPMFLAGS) -bs $<
-
-# Base rpmbuild in the current directory
-.rpmmacros:
- echo "%_topdir $(HOME)" > $@
-
-# Remove files generated by this package
-clean:
- rm -rf \
- BUILD/$(Base0) \
- RPMS/$(ARCH)/$(NVR).$(ARCH).rpm \
- SOURCES/$(Base0)* SOURCES/$(package)* \
- SPECS/$(notdir $(SPEC)).in SPECS/$(notdir $(SPEC)) $(MK) \
- SRPMS/$(NVR).src.rpm \
- .cvsps/$(subst /,#,$(CVSROOT)/$(MODULE))
-
-.PHONY: all clean
+++ /dev/null
-#!/bin/sh
-#
-# Hack to generate patch rules for make < 3.80
-#
-# Copyright (c) 2003 The Trustees of Princeton University (Trustees).
-#
-# $Id: Patchrules,v 1.2 2004/04/09 19:37:19 alk-pl_rpm Exp $
-#
-
-while read PatchSet n ; do
-
-[ "$PatchSet" != "PatchSet" ] && continue;
-
-cat <<EOF
-
-# In case the spec file did not explicitly list the PatchSet
-ifeq (\$(origin Patch${n}),undefined)
-Patch${n} := \$(package)-${n}.patch.bz2
-endif
-
-# Get rid of URL
-Patch${n} := \$(notdir \$(Patch${n}))
-
-# Add patch to the list of sources
-SOURCES += SOURCES/\$(Patch${n})
-
-# Generate uncompressed patch
-SOURCES/\$(patsubst %.gz,%,\$(patsubst %.bz2,%,\$(Patch${n}))):
- mkdir -p SOURCES
- cvsps --cvs-direct --root \$(CVSROOT) -g -s ${n} \$(MODULE) > \$@
-EOF
-
-done
+++ /dev/null
-Copyright (c) 2003 The Trustees of Princeton University (Trustees).
-
-$Id: README,v 1.2 2004/04/14 21:22:09 mlh-pl_rpm Exp $
-
-Here are some general guidelines for writing spec files.
-
-* RPM does not allow you to use dashes in version or release
- numbers. Use dots, or nothing.
-
-* Most versions of RPM poorly handle version and release numbers that
- do not begin with a number. Start your version and release number with
- at least one number. Append as many minor numbers as you want, but
- leave alphabetic characters at the end of the string.
-
-* Always define BuildRoot based in %{_tmppath}.
-
-* In the %install step, always install files based in $RPM_BUILD_ROOT.
-
-* Don't be overly restrictive with Requires or BuildRequires tags. RPM
- is already pretty smart about analyzing your package for necessary
- dependencies. Usually, you only need to specify Requires tags to make
- sure a set of packages get installed in the right order (if there is
- one). Otherwise, it's likely your users will end up in awful
- situations requiring manual bootstrap.
-
-Here are some specific guidelines for writing spec files for this setup.
-
-* Write your spec file as you would normally. It should be an
- operational spec file on its own.
-
-* Explicitly %define %{name}, %{version}, %{release}, or don't use
- them. You should do this anyway to support older versions of RPM. This
- Makefile does not implicitly define these variables (based on the
- Name:, Version:, and Release: tags) as RPM does.
-
-* Run cvsps(1) manually on your repository, and synchronize the PatchSet
- numbers with any Patch: tags in your spec file that you would like
- explicitly named.
-
-* This Makefile assumes that the build directory (as specified by the -n
- option to %setup, or the RPM default %{name}-%{version}) is the
- basename of the Source file (i.e. without .tar[.gz|.bz2]).
-
-* Add %{?date:.%{date}} to your %{release} tag. When executed, this
- Makefile will define the variable to be the current date in YYYY.MM.DD
- form. This will help automated nightly upgrades. Tagged releases will
- not define this variable.
-
-* Unless you have a very good reason not to, use the following tags:
-
-Vendor: PlanetLab
-Packager: PlanetLab Central <support@planet-lab.org>
-Distribution: PlanetLab 2.0
-URL: http://www.planet-lab.org
+++ /dev/null
-#
-# PlanetLab RPM generation
-#
-# Copyright (c) 2003 The Trustees of Princeton University (Trustees).
-# All Rights Reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided
-# with the distribution.
-#
-# * Neither the name of the copyright holder nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TRUSTEES OR
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# $Id: Makerules,v 1.11 2004/09/18 19:50:02 mlh-pl_rpm Exp $
-#
-
-# Base cvsps and rpmbuild in the current directory
-export HOME := $(shell pwd)
-export CVSROOT CVS_RSH
-
-#
-# Parse spec file template
-#
-
-MK := SPECS/$(patsubst %.spec,%.mk,$(notdir $(SPEC)))
-
-$(MK): SPECS/$(notdir $(SPEC)).in
- # Substitute '$' for '%' and 'name := value' for '%define name value' or 'name: value'
- sed -n \
- -e 's/%{/$${/g' \
- -e 's/%\([[:alnum:]]\+\)/$${\1}/g' \
- -e 's/^$${define}[ ]*\([^ ]*\)[ ]*\([^ ]*\)/\1 := \2/p' \
- -e 's/^\([^ ]*\):[ ]*\([^ ]*\)/\1 := \2/p' \
- $< > $@
-ifneq ($(INITIAL),$(TAG))
- # Get list of PatchSets
- cvsps --cvs-direct --root $(CVSROOT) -r $(INITIAL) $(if $(TAG:HEAD=),-r $(TAG)) $(MODULE) | \
- sed -ne 's|^PatchSet[ ]*\([0-9]*\)|PATCHES += \1|p' >> $@
-ifeq ($(shell echo $(MAKE_VERSION) | awk '{ print ($$1 < 3.80) }'),1)
- # make-3.80 can use $(eval) instead (see below)
- cvsps --cvs-direct --root $(CVSROOT) -r $(INITIAL) $(if $(TAG:HEAD=),-r $(TAG)) $(MODULE) | \
- sh Patchrules >> $@
-endif
-endif
-
-SPECS/$(notdir $(SPEC)).in:
- mkdir -p SPECS
- cvs -d $(CVSROOT) checkout -r $(TAG) -p $(SPEC) > $@
-
-include $(MK)
-
-#
-# Generate tarball
-#
-
-# Get rid of URL
-Source0 := $(notdir $(if $(Source),$(Source),$(Source0)))
-
-# Add tarball to the list of sources
-SOURCES += SOURCES/$(Source0)
-
-# Get rid of .tar.bz2 or .tar.gz or .tgz
-Base0 := $(basename $(basename $(Source0)))
-
-# Export module
-SOURCES/$(Base0):
- mkdir -p SOURCES
- cd SOURCES && cvs -d $(CVSROOT) export -r $(INITIAL) -d $(Base0) $(MODULE)
-
-.SECONDARY: $(SOURCES)/$(Base0)
-
-# Generate tarball
-SOURCES/$(Base0).tar.bz2: SOURCES/$(Base0)
- tar cpjf $@ -C SOURCES $(Base0)
-
-SOURCES/$(Base0).tar.gz SOURCES/$(Base0).tgz: SOURCES/$(Base0)
- tar cpzf $@ -C SOURCES $(Base0)
-
-SOURCES/$(Base0).tar: SOURCES/$(Base0)
- tar cpf $@ -C SOURCES $(Base0)
-
-#
-# Generate patches
-#
-
-define PATCH_template
-
-# In case the spec file did not explicitly list the PatchSet
-ifeq ($$(origin Patch$(1)),undefined)
-Patch$(1) := $$(package)-$(1).patch.bz2
-endif
-
-# Get rid of URL
-Patch$(1) := $$(notdir $$(Patch$(1)))
-
-# Add patch to the list of sources
-SOURCES += SOURCES/$$(Patch$(1))
-
-# Generate uncompressed patch
-SOURCES/$$(patsubst %.gz,%,$$(patsubst %.bz2,%,$$(Patch$(1)))):
- mkdir -p SOURCES
- cvsps --cvs-direct --root $$(CVSROOT) -g -s $(1) $$(MODULE) > $$@
-
-endef
-
-# bzip2
-%.bz2: %
- bzip2 -c $< > $@
-
-# gzip
-%.gz: %
- gzip -c $< > $@
-
-# Generate rules to generate patches (make-3.80 and above expands this)
-$(foreach n,$(PATCHES),$(eval $(call PATCH_template,$(n))))
-
-#
-# Generate spec file
-#
-
-ifeq ($(TAG),HEAD)
-# Define date for untagged builds
-DATE := $(shell date +%Y.%m.%d)
-endif
-
-# Generate spec file
-SPECS/$(notdir $(SPEC)): SPECS/$(notdir $(SPEC)).in
- rm -f $@
-ifeq ($(TAG),HEAD)
- # Define date for untagged builds
- echo "%define date $(DATE)" >> $@
-endif
- # Rewrite patch sections of spec file
- perl -n -e ' \
- next if /^Patch.*/; \
- next if /^%patch.*/; \
- print; \
- if (/^Source.*/) { $(foreach n,$(PATCHES),print "Patch$(n): $(Patch$(n))\n";) } \
- if (/^%setup.*/) { $(foreach n,$(PATCHES),print "%patch$(n) -p1\n";) } \
- ' $< >> $@
-
-#
-# Build
-#
-
-ifeq ($(TAG),HEAD)
-RPMFLAGS += --define "date $(DATE)"
-endif
-NVR := $(shell rpmquery $(RPMFLAGS) --specfile SPECS/$(notdir $(SPEC)).in 2>/dev/null | head -1)
-ARCH := $(shell rpmquery $(RPMFLAGS) --queryformat '%{ARCH}\n' --specfile SPECS/$(notdir $(SPEC)).in 2>/dev/null | head -1)
-
-all: RPMS/$(ARCH)/$(NVR).$(ARCH).rpm SRPMS/$(NVR).src.rpm
-
-# Build RPM
-RPMS/$(ARCH)/$(NVR).$(ARCH).rpm: SPECS/$(notdir $(SPEC)) $(SOURCES) .rpmmacros
- mkdir -p BUILD RPMS
- rpmbuild $(RPMFLAGS) -bb $<
-
-# Build SRPM
-SRPMS/$(NVR).src.rpm: SPECS/$(notdir $(SPEC)) $(SOURCES) .rpmmacros
- mkdir -p SRPMS
- rpmbuild $(RPMFLAGS) -bs $<
-
-# Base rpmbuild in the current directory
-.rpmmacros:
- echo "%_topdir $(HOME)" > $@
-
-# Remove files generated by this package
-clean:
- rm -rf \
- BUILD/$(Base0) \
- RPMS/$(ARCH)/$(NVR).$(ARCH).rpm \
- SOURCES/$(Base0)* SOURCES/$(package)* \
- SPECS/$(notdir $(SPEC)).in SPECS/$(notdir $(SPEC)) $(MK) \
- SRPMS/$(NVR).src.rpm \
- .cvsps/$(subst /,#,$(CVSROOT)/$(MODULE))
-
-.PHONY: all clean
+++ /dev/null
-#!/bin/bash
-#
-# PlanetLab release build script. Intended to be used by scripts and
-# crontabs to build nightly releases (default). Can also be invoked
-# manually to build a tagged release (-r) in the current directory.
-#
-# $Id: build.sh,v 1.18 2004/10/30 16:01:03 mlhuang Exp $
-#
-
-# Set defaults
-CVSROOT=:pserver:anon@build.planet-lab.org:/cvs
-CVS_RSH=ssh
-MODULE=build
-TAG=HEAD
-BASE=$PWD
-
-# Alpha node repository
-ALPHA_BOOT=build@boot.planet-lab.org
-ALPHA_ROOT=/www/planetlab/install-rpms/archive/planetlab-alpha
-ALPHA_RPMS=/www/planetlab/install-rpms/planetlab-alpha
-
-# Export certain variables
-export CVS_RSH
-
-# Get options
-while getopts "d:r:m:b:x:h" opt ; do
- case $opt in
- d)
- CVSROOT=$OPTARG
- ;;
- r)
- TAG=$OPTARG
- ;;
- m)
- MAILTO=$OPTARG
- ;;
- b)
- BASE=$OPTARG
- ;;
- x)
- BUILDS=$OPTARG
- ;;
- h|*)
- echo "usage: `basename $0` [OPTION]..."
- echo " -d directory CVS repository root (default $CVSROOT)"
- echo " -r revision CVS revision to checkout (default $TAG)"
- echo " -m address Notify recipient of failures (default: none)"
- echo " -b base Run operations in specified base directory (default $BASE)"
- echo " -x N Remove all but the last N runs from the base directory (default: none)"
- exit 1
- ;;
- esac
-done
-
-# Base operations in specified directory
-mkdir -p $BASE
-cd $BASE || exit $?
-
-# Remove old runs
-if [ -n "$BUILDS" ] ; then
- ls -t | sed -n ${BUILDS}~1p | xargs rm -rf
-fi
-
-# Create a unique build base
-BASE=${TAG/HEAD/`date +%Y.%m.%d`}
-i=
-while ! mkdir ${BASE}${i} 2>/dev/null ; do
- [ -z ${i} ] && BASE=${BASE}.
- i=$((${i}+1))
- if [ $i -gt 100 ] ; then
- echo "$0: Failed to create release directory `pwd`/${BASE}${i}"
- exit 1
- fi
-done
-BASE=${BASE}${i}
-
-# Redirect output from here
-exec 2>&1
-exec &>${BASE}/log
-
-# Build
-cvs -d ${CVSROOT} export -r ${TAG} -d ${BASE} ${MODULE}
-make -C ${BASE}
-rc=$?
-
-if [ $rc -ne 0 ] ; then
- # Notify recipient of failure
- if [ -n "$MAILTO" ] ; then
- tail -100 ${BASE}/log | mail -s "Failures for ${BASE}" $MAILTO
- fi
- exit $rc
-fi
-
-# Create package manifest
-URLBASE=$(cd ${BASE} && pwd -P)
-URLBASE="http://build.planet-lab.org/${URLBASE##$HOME/}/SRPMS"
-${BASE}/packages.sh -b ${URLBASE} ${BASE}/SRPMS > ${BASE}/SRPMS/packages.xml
-
-# Usually only the nightly build specifies -x
-if [ -n "$BUILDS" ] ; then
- # Remove old nightly runs
- echo "cd ${ALPHA_ROOT} && ls -t | sed -n ${BUILDS}~1p | xargs rm -rf" | ssh ${ALPHA_BOOT} /bin/bash -s
- # Update alpha node repository
- for i in RPMS SRPMS ; do
- ssh ${ALPHA_BOOT} mkdir -p ${ALPHA_ROOT}/${BASE}/${i}
- find ${BASE}/${i} -type f | xargs -i scp {} ${ALPHA_BOOT}:${ALPHA_ROOT}/${BASE}/${i}
- ssh ${ALPHA_BOOT} yum-arch ${ALPHA_ROOT}/${BASE}/${i} >/dev/null
- done
- # Update symlink
- ssh ${ALPHA_BOOT} ln -nsf ${ALPHA_ROOT}/${BASE}/RPMS/ ${ALPHA_RPMS}
-fi
-
-exit 0
+++ /dev/null
-#
-# crontab(5) for build
-#
-# TMP=/tmp EDITOR=emacs crontab crontab
-#
-# $Id: crontab,v 1.8 2004/09/27 02:47:24 mlhuang Exp $
-#
-
-SHELL=/bin/bash
-MAILTO=build@lists.planet-lab.org
-
-CVSROOT=:pserver:anon@build.planet-lab.org:/cvs
-MODULE=build
-
-#
-# minute hour day-of-month month day-of-week
-#
-
-# install new crontab
-0 0 * * * cvs -d $CVSROOT checkout -p $MODULE/crontab 2>/dev/null | crontab -
-
-# nightly build
-17 5 * * * sudo /usr/sbin/chroot /export0/fedora su - build /bin/sh -c "cvs -d $CVSROOT checkout -p $MODULE/build.sh 2>/dev/null | $SHELL -s -- -b $HOME/build/nightly -m $MAILTO -x 7" >/dev/null 2>&1
+++ /dev/null
-#!/bin/bash
-#
-# Generates XML manifest of packages for
-# http://www.planet-lab.org/Software/download.php
-#
-# Mark Huang <mlhuang@cs.princeton.edu>
-# Copyright (C) 2004 The Trustees of Princeton University
-#
-# $Id: packages.sh,v 1.4 2004/10/28 14:53:05 mlhuang Exp $
-#
-
-# Set defaults
-BASE=
-
-# Get options
-while getopts "b:h" opt ; do
- case $opt in
- b)
- BASE=$OPTARG
- ;;
- h|*)
- echo "usage: `basename $0` [OPTION]..."
- echo " -b base URL base for packages (default: none)"
- exit 1
- ;;
- esac
-done
-shift $(($OPTIND - 1))
-
-xml_escape_pcdata() {
- # & to &
- # " to \"
- # ' to '
- # < to <
- # > to >
- sed \
- -e 's/\&/\&/g' | sed \
- -e 's/"/\"/g' \
- -e "s/'/\'/g" \
- -e 's/</\</g' \
- -e 's/>/\>/g'
-}
-
-xml_escape_cdata() {
- # & to &
- # \ to \\
- # " to \"
- # ' to '
- # < to <
- # > to >
- sed \
- -e 's/\&/\&/g' \
- -e 's/\\/\\\\/g' | sed \
- -e 's/"/\\"/g' \
- -e "s/'/\'/g" \
- -e 's/</\</g' \
- -e 's/>/\>/g'
-}
-
-# XXX rpmquery version 4.3.1 crashes if too large of a queryformat is passed
-#TAGS=$(rpm --querytags)
-TAGS="NAME VERSION RELEASE URL BUILDTIME DESCRIPTION"
-
-cat <<EOF
-<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
-<!-- \$Id: packages.sh,v 1.4 2004/10/28 14:53:05 mlhuang Exp $ -->
-<!-- Generated at $(date) in $(cd ${1-.} && pwd -P) on $HOSTNAME by $USER -->
-<!DOCTYPE PACKAGES [
- <!ELEMENT PACKAGES (PACKAGE)*>
- <!ATTLIST PACKAGES
- BASE CDATA #REQUIRED
- >
- <!ELEMENT PACKAGE (#PCDATA)>
- <!ATTLIST PACKAGE
-EOF
-
-# List each tag as an attribute
-QUERYFORMAT=
-for tag in $TAGS ; do
-
-cat <<EOF
- $tag CDATA #REQUIRED
-EOF
-
- # Build up QUERYFORMAT for later use
- QUERYFORMAT="$QUERYFORMAT $tag=@QUOTE@%{$tag}@QUOTE@\n"
-
-done
-
-cat <<EOF
- >
-]>
-<PACKAGES
-BASE="$BASE"
->
-EOF
-
-# For every RPM in the current directory
-RPMS=$(find ${1-.} -name '*.rpm')
-for rpm in $RPMS ; do
-
-cat <<EOF
- <PACKAGE
-EOF
-
- # Print the tags (@QUOTE@ prevents escaping of syntax)
- rpmquery --queryformat "$QUERYFORMAT" -p $rpm | xml_escape_cdata | sed -e 's/@QUOTE@/"/g'
-
-# Print the name of the RPM
-cat <<EOF
- >
- $(basename $rpm | xml_escape_pcdata)
- </PACKAGE>
-EOF
-
-done
-
-cat <<EOF
-</PACKAGES>
-EOF