summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/reproducible_setup_pbuilder.sh30
-rw-r--r--job-cfg/reproducible.yaml4
2 files changed, 30 insertions, 4 deletions
diff --git a/bin/reproducible_setup_pbuilder.sh b/bin/reproducible_setup_pbuilder.sh
index a666361f..dd659732 100755
--- a/bin/reproducible_setup_pbuilder.sh
+++ b/bin/reproducible_setup_pbuilder.sh
@@ -98,8 +98,34 @@ setup_pbuilder() {
|| ( echo ; echo "Package ${PKG} is not installed at all or probably rather not in our version, so removing the chroot and exiting now." ; sudo rm -v /var/cache/pbuilder/${NAME}-new.tgz ; exit 1 )
done
sudo mv /var/cache/pbuilder/${NAME}-new.tgz /var/cache/pbuilder/${NAME}.tgz
+ # create stamp file to record initial creation date
+ touch /var/log/jenkins/${NAME}.tgz.stamp
rm ${TMPFILE}
- echo
}
-setup_pbuilder $SUITE $SUITE-reproducible-base dpkg dpkg-dev debhelper
+#
+# update pbuilder for reproducible builds
+#
+update_pbuilder() {
+ NAME=$1
+ sudo pbuilder --update --basetgz /var/cache/pbuilder/${NAME}.tgz
+}
+
+#
+# main
+#
+BASETGZ=/var/cache/pbuilder/$SUITE-reproducible-base.tgz
+STAMP=/var/log/jenkins/$SUITE-reproducible-base.tgz.stamp
+OLDSTAMP=$(find $STAMP -mtime +1 -exec ls -lad {} \;)
+if [ -n "$OLDSTAMP" ] || [ ! -f $BASETGZ ] || [ ! -f $STAMP ] ; then
+ if [ ! -f $BASETGZ ] ; then
+ echo "No $BASETGZ exists, creating a new one..."
+ else
+ echo "$BASETGZ outdated, creating a new one..."
+ fi
+ setup_pbuilder $SUITE $SUITE-reproducible-base dpkg dpkg-dev debhelper
+else
+ echo "Updating $BASETGZ..."
+ update_pbuilder $SUITE-reproducible-base
+fi
+echo
diff --git a/job-cfg/reproducible.yaml b/job-cfg/reproducible.yaml
index b0e4cc3e..53e9cac6 100644
--- a/job-cfg/reproducible.yaml
+++ b/job-cfg/reproducible.yaml
@@ -212,12 +212,12 @@
my_recipients: 'holger@layer-acht.org'
- '{name}_setup_pbuilder_sid':
my_description: 'Setup pbuilder for reproducible builds of packages from sid as described in https://wiki.debian.org/ReproducibleBuilds#Usage_example'
- my_timed: '23 0 * * *'
+ my_timed: '23 0,4,8,12,16,20 * * *'
my_shell: '/srv/jenkins/bin/reproducible_setup_pbuilder.sh sid'
my_recipients: 'jenkins+debian-reproducible holger@layer-acht.org'
- '{name}_setup_pbuilder_experimental':
my_description: 'Setup pbuilder for reproducible builds of packages from experimental as described in https://wiki.debian.org/ReproducibleBuilds#Usage_example'
- my_timed: '23 0 * * *'
+ my_timed: '23 0,4,8,12,16,20 * * *'
my_shell: '/srv/jenkins/bin/reproducible_setup_pbuilder.sh experimental'
my_recipients: 'jenkins+debian-reproducible holger@layer-acht.org'
- '{name}_setup_schroot_sid_debbindiff':