# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2003-2005 The Trustees of Princeton University
#
-# $Id: Makefile,v 1.79 2005/09/04 17:37:36 mlhuang Exp $
+# $Id: Makefile,v 1.83 2005/12/27 23:19:51 mef Exp $
#
# Default target
TAG := HEAD
CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
+# By default, the naming convention for built RPMS is
+# <name>-<version>-<release>.planetlab.<arch>.rpm
+# Set PLDISTRO on the command line to differentiate between downstream
+# variants.
+PLDISTRO := planetlab
+
#
# kernel
#
resman-SPEC := resman/resman.spec
ALL += resman
+#
+# libhttpd++:
+#
+
+libhttpd++-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
+libhttpd++-MODULE := libhttpd++
+libhttpd++-SPEC := libhttpd++/libhttpd++.spec
+ALL += libhttpd++
+
#
# Proper: Privileged Operations Service
#
proper-SPEC := proper/proper.spec
ALL += proper
+proper: libhttpd++
+
#
# ulogd
#
kexec-tools-SPEC := kexec-tools/kexec-tools.spec
ALL += kexec-tools
+#
+# dhcp
+#
+
+dhcp-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
+dhcp-MODULE := dhcp
+dhcp-SPEC := dhcp/dhcp.spec
+ALL += dhcp
+
#
# util-python
#
bootmanager-RPMBUILD := sudo rpmbuild
ALL += bootmanager
-# bootmanager may require current packages
+# bootmanager requires current packages
bootmanager: $(filter-out bootmanager,$(ALL))
# ...and the yum manifest
bootmanager: RPMS/yumgroups.xml
+#
+# bootcd
+#
+
+bootcd-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
+bootcd-MODULE := bootcd_v3
+bootcd-SPEC := bootcd_v3/bootcd.spec
+bootcd-RPMBUILD := sudo rpmbuild
+ALL += bootcd
+
+# bootcd requires current packages
+bootcd: $(filter-out bootcd,$(ALL))
+
+# ...and the yum manifest
+bootcd: RPMS/yumgroups.xml
+
ifeq ($(findstring $(package),$(ALL)),)
# Build all packages
# Remove all generated files
clean:
- rm -rf BUILD RPMS SOURCES SPECS SRPMS .rpmmacros .cvsps
+ rm -rf BUILD RPMS SOURCES SPECS SRPMS .rpmmacros .cvsps tmp
.PHONY: all $(ALL) $(foreach package,$(ALL),$(package)-clean) clean
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2003-2005 The Trustees of Princeton University
#
-# $Id: Makerules,v 1.16 2005/09/01 18:58:45 mlhuang Exp $
+# $Id: Makerules,v 1.18 2005/12/15 17:02:07 mlhuang Exp $
#
-# Base cvsps and rpmbuild in the current directory
+# Base rpmbuild in the current directory
export HOME := $(shell pwd)
export CVSROOT CVS_RSH
-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
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 $< > $@
%.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
#
# 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";) } \
- ' $< >> $@
+ echo "%define pldistro $(PLDISTRO)" >> $@
+ cat $< >> $@
#
# Build
#
+RPMFLAGS += --define "pldistro $(PLDISTRO)"
ifeq ($(TAG),HEAD)
RPMFLAGS += --define "date $(DATE)"
endif
SOURCES/$(Base0)* SOURCES/$(package)* \
SPECS/$(notdir $(SPEC)).in SPECS/$(notdir $(SPEC)) $(MK) \
SRPMS/$(NVR).src.rpm \
- tmp \
- .cvsps/$(subst /,#,$(CVSROOT)/$(MODULE))
+ tmp
.PHONY: all clean
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2003-2005 The Trustees of Princeton University
#
-# $Id: Makerules,v 1.16 2005/09/01 18:58:45 mlhuang Exp $
+# $Id: Makerules,v 1.18 2005/12/15 17:02:07 mlhuang Exp $
#
-# Base cvsps and rpmbuild in the current directory
+# Base rpmbuild in the current directory
export HOME := $(shell pwd)
export CVSROOT CVS_RSH
-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
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 $< > $@
%.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
#
# 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";) } \
- ' $< >> $@
+ echo "%define pldistro $(PLDISTRO)" >> $@
+ cat $< >> $@
#
# Build
#
+RPMFLAGS += --define "pldistro $(PLDISTRO)"
ifeq ($(TAG),HEAD)
RPMFLAGS += --define "date $(DATE)"
endif
SOURCES/$(Base0)* SOURCES/$(package)* \
SPECS/$(notdir $(SPEC)).in SPECS/$(notdir $(SPEC)) $(MK) \
SRPMS/$(NVR).src.rpm \
- tmp \
- .cvsps/$(subst /,#,$(CVSROOT)/$(MODULE))
+ tmp
.PHONY: all clean
<packagereq type="mandatory">kbd</packagereq>
<packagereq type="mandatory">kernel</packagereq>
<packagereq type="mandatory">libtermcap</packagereq>
- <packagereq type="mandatory">losetup</packagereq>
<packagereq type="mandatory">passwd</packagereq>
<packagereq type="mandatory">procps</packagereq>
<packagereq type="mandatory">readline</packagereq>
</packagelist>
</group>
+ <group>
+ <id>bootcd</id>
+ <name>BootCD</name>
+ <uservisible>true</uservisible>
+ <description>BootCD Image</description>
+ <packagelist>
+ <packagereq type="mandatory">dhclient</packagereq>
+ <packagereq type="mandatory">bash</packagereq>
+ <packagereq type="mandatory">coreutils</packagereq>
+ <packagereq type="mandatory">iputils</packagereq>
+ <packagereq type="mandatory">kernel</packagereq>
+ <packagereq type="mandatory">bzip2</packagereq>
+ <packagereq type="mandatory">crontabs</packagereq>
+ <packagereq type="default">diffutils</packagereq>
+ <packagereq type="mandatory">logrotate</packagereq>
+ <packagereq type="default">openssh-clients</packagereq>
+ <packagereq type="mandatory">passwd</packagereq>
+ <packagereq type="default">rsh</packagereq>
+ <packagereq type="default">rsync</packagereq>
+ <packagereq type="default">sudo</packagereq>
+ <packagereq type="default">tcpdump</packagereq>
+ <packagereq type="mandatory">telnet</packagereq>
+ <packagereq type="mandatory">traceroute</packagereq>
+ <packagereq type="mandatory">time</packagereq>
+ <packagereq type="default">vixie-cron</packagereq>
+ <packagereq type="default">wget</packagereq>
+ <packagereq type="default">yum</packagereq>
+ <packagereq type="mandatory">curl</packagereq>
+ <packagereq type="mandatory">gzip</packagereq>
+ <packagereq type="mandatory">perl</packagereq>
+ <packagereq type="mandatory">python</packagereq>
+ <packagereq type="mandatory">tar</packagereq>
+ <packagereq type="mandatory">pciutils</packagereq>
+ <packagereq type="mandatory">kbd</packagereq>
+ <packagereq type="mandatory">authconfig</packagereq>
+ <packagereq type="mandatory">hdparm</packagereq>
+ <packagereq type="mandatory">lvm</packagereq>
+ <packagereq type="mandatory">lvm2</packagereq>
+ <packagereq type="mandatory">kexec-tools</packagereq>
+ <packagereq type="mandatory">gnupg</packagereq>
+ <packagereq type="mandatory">nano</packagereq>
+ <packagereq type="mandatory">parted</packagereq>
+ <packagereq type="mandatory">pyparted</packagereq>
+ <packagereq type="mandatory">openssh-server</packagereq>
+ <packagereq type="mandatory">openssh-clients</packagereq>
+ <packagereq type="mandatory">ncftp</packagereq>
+ <packagereq type="mandatory">dosfstools</packagereq>
+ <packagereq type="mandatory">dos2unix</packagereq>
+ <packagereq type="mandatory">bind-utils</packagereq>
+ <packagereq type="mandatory">sharutils</packagereq>
+ </packagelist>
+ </group>
+
</comps>