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":

View file

@ -1,12 +1,17 @@
VSROOM = default
VSROOMURL = https://bitbucket.org/clarifiednetworks/vsroom/get/$(VSROOM).tar.gz
OUT = /srv/puppet/files/common/packages
include $(CURDIR)/../Makefile.inc
all: tarball
tarball: vsroom.tar.gz
.PHONY: vsroom.tar.gz
BRANCH = default
SOURCE = https://bitbucket.org/clarifiednetworks/vsroom/get/$(BRANCH).tar.gz
TARGET = vsroom-$(BRANCH)-$(TIMESTAMP).tar.gz
vsroom.tar.gz:
@umask 022 && mkdir -p $(OUT)/vsroom && \
cd $(OUT)/vsroom && wget -nv -N $(VSROOMURL) && \
cd $(OUT) && ln -fs vsroom/$(VSROOM).tar.gz vsroom.tar.gz
all: tarball manifest
tarball: $(PACKAGES)/$(TARGET)
manifest: $(MANIFESTS)/vsroom.pp
$(PACKAGES)/$(TARGET):
@umask 022; echo $@; \
test -f $@ || curl -o $@ $(SOURCE)
$(MANIFESTS)/vsroom.pp: $(PACKAGES)/$(TARGET)
@umask 022; echo $@; \
echo '$$vsroom_package = "$(TARGET)"' > $@

View file

@ -22,7 +22,7 @@ class vsroom {
mode => 0644,
owner => root,
group => root,
source => "puppet:///files/packages/vsroom.tar.gz",
source => "puppet:///files/packages/${vsroom_package}",
links => follow,
}
util::extract::tar { "/usr/local/src/vsroom":

View file

@ -1,19 +1,27 @@
GWIKI = default
GWIKIURL = https://bitbucket.org/clarifiednetworks/graphingwiki/get/$(GWIKI).tar.gz
MOIN = 1.8.8
MOINURL = http://static.moinmo.in/files/moin-$(MOIN).tar.gz
OUT = /srv/puppet/files/common/packages
include $(CURDIR)/../Makefile.inc
all: tarball
tarball: graphingwiki.tar.gz moin.tar.gz
.PHONY: graphingwiki.tar.gz moin.tar.gz
GWIKIBRANCH = default
GWIKISOURCE = https://bitbucket.org/clarifiednetworks/graphingwiki/get/$(GWIKIBRANCH).tar.gz
GWIKITARGET = graphingwiki-$(GWIKIBRANCH)-$(TIMESTAMP).tar.gz
graphingwiki.tar.gz:
@umask 022 && mkdir -p $(OUT)/graphingwiki && \
cd $(OUT)/graphingwiki && wget -nv -N $(GWIKIURL) && \
cd $(OUT) && ln -fs graphingwiki/$(GWIKI).tar.gz graphingwiki.tar.gz
MOINVERSION = 1.8.9
MOINSOURCE = http://static.moinmo.in/files/moin-$(MOINVERSION).tar.gz
MOINTARGET = moin-$(MOINVERSION).tar.gz
moin.tar.gz:
@umask 022 && mkdir -p $(OUT)/moin && \
cd $(OUT)/moin && wget -nv -N $(MOINURL) && \
cd $(OUT) && ln -fs moin/moin-$(MOIN).tar.gz moin.tar.gz
all: tarball manifest
tarball: $(PACKAGES)/$(GWIKITARGET) $(PACKAGES)/$(MOINTARGET)
manifest: $(MANIFESTS)/wiki.pp
$(PACKAGES)/$(GWIKITARGET):
@umask 022; echo $@; \
test -f $@ || curl -o $@ $(GWIKISOURCE)
$(PACKAGES)/$(MOINTARGET):
@umask 022; echo $@; \
test -f $@ || curl -o $@ $(MOINSOURCE)
$(MANIFESTS)/wiki.pp: $(PACKAGES)/$(GWIKITARGET) $(PACKAGES)/$(MOINTARGET)
@umask 022; echo $@; \
echo '$$graphingwiki_package = "$(GWIKITARGET)"' > $@ && \
echo '$$moin_package = "$(MOINTARGET)"' >> $@ && \
echo '$$moin_patch = "moin-$(MOINVERSION).patch"' >> $@

View file

@ -7,7 +7,7 @@ class wiki::moin {
mode => 0644,
owner => root,
group => root,
source => "puppet:///files/packages/moin.tar.gz",
source => "puppet:///files/packages/${moin_package}",
links => follow,
}
file { "/usr/local/src/moin.patch":
@ -15,7 +15,7 @@ class wiki::moin {
mode => 0644,
owner => root,
group => root,
source => "puppet:///files/packages/moin.patch",
source => "puppet:///files/packages/${moin_patch}",
links => follow,
}
util::extract::tar { "/usr/local/src/moin":
@ -43,7 +43,7 @@ class wiki::graphingwiki::common {
mode => 0644,
owner => root,
group => root,
source => "puppet:///files/packages/graphingwiki.tar.gz",
source => "puppet:///files/packages/${graphingwiki_package}",
links => follow,
}
util::extract::tar { "/usr/local/src/graphingwiki":
@ -284,10 +284,8 @@ class wiki::collab::base {
}
}
if !$collab_webhosts {
$collab_webhosts = [ "${homename}" ]
}
if $collab_webhosts {
configwebhost { $collab_webhosts: }
}
}