Changed package fetching Makefiles for abusehelper, vsroom and wiki

No longer uses symlinks to manage package versions. Ppackage versions
are now recorded in /srv/puppet/files/common/packages/manifests/*.pp
instead, which must be included in the site or node manifest.
This commit is contained in:
Ossi Salmi 2011-12-08 14:59:08 +02:00 committed by Timo Mkinen
parent 32956c0d26
commit 29bc90e6f6
6 changed files with 70 additions and 52 deletions

View file

@ -1,19 +1,26 @@
AHELPER = default
AHELPERURL = https://bitbucket.org/clarifiednetworks/abusehelper/get/$(AHELPER).tar.gz
IDIOKIT = default
IDIOKITURL = https://bitbucket.org/clarifiednetworks/idiokit/get/$(IDIOKIT).tar.gz
OUT = /srv/puppet/files/common/packages
include $(CURDIR)/../Makefile.inc
all: tarball
tarball: abusehelper.tar.gz idiokit.tar.gz
.PHONY: abusehelper.tar.gz idiokit.tar.gz
AHBRANCH = default
AHSOURCE = https://bitbucket.org/clarifiednetworks/abusehelper/get/$(AHBRANCH).tar.gz
AHTARGET = abusehelper-$(AHBRANCH)-$(TIMESTAMP).tar.gz
abusehelper.tar.gz:
@umask 022 && mkdir -p $(OUT)/abusehelper && \
cd $(OUT)/abusehelper && wget -nv -N $(AHELPERURL) && \
cd $(OUT) && ln -fs abusehelper/$(AHELPER).tar.gz abusehelper.tar.gz
IKBRANCH = default
IKSOURCE = https://bitbucket.org/clarifiednetworks/idiokit/get/$(IKBRANCH).tar.gz
IKTARGET = idiokit-$(AHBRANCH)-$(TIMESTAMP).tar.gz
idiokit.tar.gz:
@umask 022 && mkdir -p $(OUT)/idiokit && \
cd $(OUT)/idiokit && wget -nv -N $(IDIOKITURL) && \
cd $(OUT) && ln -fs idiokit/$(IDIOKIT).tar.gz idiokit.tar.gz
all: tarball manifest
tarball: $(PACKAGES)/$(AHTARGET) $(PACKAGES)/$(IKTARGET)
manifest: $(MANIFESTS)/abusehelper.pp
$(PACKAGES)/$(AHTARGET):
@umask 022; echo $@; \
test -f $@ || curl -o $@ $(AHSOURCE)
$(PACKAGES)/$(IKTARGET):
@umask 022; echo $@; \
test -f $@ || curl -o $@ $(IKSOURCE)
$(MANIFESTS)/abusehelper.pp: $(PACKAGES)/$(AHTARGET) $(PACKAGES)/$(IKTARGET)
@umask 022; echo $@; \
echo '$$abusehelper_package = "$(AHTARGET)"' > $@ && \
echo '$$idiokit_package = "$(IKTARGET)"' >> $@

View file

@ -29,7 +29,7 @@ class abusehelper {
mode => 0644,
owner => root,
group => root,
source => "puppet:///files/packages/abusehelper.tar.gz",
source => "puppet:///files/packages/${abusehelper_package}",
links => follow,
}
util::extract::tar { "/usr/local/src/abusehelper":
@ -43,7 +43,7 @@ class abusehelper {
mode => 0644,
owner => root,
group => root,
source => "puppet:///files/packages/idiokit.tar.gz",
source => "puppet:///files/packages/${idiokit_package}",
links => follow,
}
util::extract::tar { "/usr/local/src/idiokit":