summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/d-i_build.sh3
-rw-r--r--bin/repo.mak48
2 files changed, 50 insertions, 1 deletions
diff --git a/bin/d-i_build.sh b/bin/d-i_build.sh
index 19059c5e..3d0ac570 100755
--- a/bin/d-i_build.sh
+++ b/bin/d-i_build.sh
@@ -58,6 +58,7 @@ preserve_artifacts() {
if [ "$JOB_NAME" != "d-i_pu-triggered_debian-installer" ] ; then
mkdir -p $udeb_dir
cp ${RESULT_DIR}/*.udeb $udeb_dir
+ make -f /srv/jenkins/bin/repo.mak -C $udeb_dir Release
fi
# this is put into env.txt below, so that the variable(s) can be injected into the jenkins environment
ENV_TO_INJECT="OUR_BRANCH=$GIT_BRANCH"
@@ -136,7 +137,7 @@ pdebuild_package() {
# then grab the generated udebs. FIXME -- we need to work out a way of cleaning up old branches
#
if udeb_dir=$(replace_origin_pu "/srv/udebs/" $TRIGGERING_BRANCH) ; then
- cp $udeb_dir/* build/localudebs
+ cp $udeb_dir/*.udeb build/localudebs
fi
pdebuild --use-pdebuild-internal --debbuildopts "-j$NUM_CPU -b" --buildresult ${RESULT_DIR} -- --http-proxy $http_proxy
# cleanup
diff --git a/bin/repo.mak b/bin/repo.mak
new file mode 100644
index 00000000..04aeec26
--- /dev/null
+++ b/bin/repo.mak
@@ -0,0 +1,48 @@
+.PHONY: all
+
+all: Release InRelease Release.gpg
+
+BINARY_PACKAGES = $(sort $(wildcard *.deb))
+SOURCE_PACKAGES = $(sort $(wildcard *.dsc))
+GPG_KEY := 248645A4EA225CC4DA9B5370F0157CE09656467C
+SECRING := /var/lib/jenkins/.gnupg/secring.gpg
+PUBRING := /var/lib/jenkins/.gnupg/pubring.gpg
+GPG_OPTS := --no-default-keyring --secret-keyring=$(SECRING) --keyring=$(PUBRING) -u $(GPG_KEY) --digest-algo SHA512
+
+Release: Packages Sources Packages.gz Sources.gz
+ apt-ftparchive -o APT::FTPArchive::Release::Origin=jenkins-debian-net-d-i-jobs \
+ release . > $@.new
+ mv $@.new $@
+ chmod 664 $@
+
+InRelease: Release
+ gpg $(GPG_OPTS) --clearsign -o - Release > $@.new
+ mv $@.new $@
+ chmod 664 $@
+
+Release.gpg: Release
+ gpg $(GPG_OPTS) -o - -abs Release > $@.new
+ mv $@.new $@
+ chmod 664 $@
+
+Packages: $(BINARY_PACKAGES)
+ apt-ftparchive packages . > $@.new
+ mv $@.new $@
+ chmod 664 $@
+
+Sources: $(SOURCE_PACKAGES)
+ apt-ftparchive sources . > $@.new
+ mv $@.new $@
+ chmod 664 $@
+ for i in $? ; do [ -f .kgb-stamp/$$i.stamp ] || ( /home/groups/kgb/bin/kgb-client-trunk --conf /home/groups/reproducible/private/kgb-client.conf --relay-msg "$$i has just been uploaded to https://wiki.debian.org/ReproducibleBuilds/ExperimentalToolchain" && echo "$$i has just been uploaded to https://wiki.debian.org/ReproducibleBuilds/ExperimentalToolchain" | mail -s "package uploaded to our repo" phil@hands.com && touch .kgb-stamp/$$i.stamp ) ; done
+
+Packages.gz: Packages
+ gzip -n9 < $< > $@.new
+ mv $@.new $@
+ chmod 664 $@
+
+Sources.gz: Sources
+ gzip -n9 < $< > $@.new
+ mv $@.new $@
+ chmod 664 $@
+