summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/reproducible_pbuild_run.sh18
-rwxr-xr-xbin/reproducible_pbuilder_setup.sh18
-rw-r--r--etc/sudoers.d/jenkins4
-rw-r--r--job-cfg/reproducible.yaml25
-rw-r--r--job-cfg/schroot.yaml16
5 files changed, 54 insertions, 27 deletions
diff --git a/bin/reproducible_pbuild_run.sh b/bin/reproducible_pbuild_run.sh
new file mode 100755
index 00000000..659728da
--- /dev/null
+++ b/bin/reproducible_pbuild_run.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# Copyright 2014 Holger Levsen <holger@layer-acht.org>
+# released under the GPLv=2
+
+. /srv/jenkins/bin/common-functions.sh
+common_init "$@"
+
+PACKAGE=$1
+apt-get source --download-only ${PACKAGE}
+sudo pbuilder --build --basetgz /var/cache/pbuilder/base-reproducible.tgz ${PACKAGE}_*.dsc
+mkdir b1 b2
+dcmd cp /var/cache/pbuilder/result/${PACKAGE}_*.changes b1
+sudo dcmd rm /var/cache/pbuilder/result/${PACKAGE}_*.changes
+sudo pbuilder --build --basetgz /var/cache/pbuilder/base-reproducible.tgz ${PACKAGE}_*.dsc
+dcmd cp /var/cache/pbuilder/result/${PACKAGE}_*.changes b2
+sudo dcmd rm /var/cache/pbuilder/result/${PACKAGE}_*.changes
+
diff --git a/bin/reproducible_pbuilder_setup.sh b/bin/reproducible_pbuilder_setup.sh
new file mode 100755
index 00000000..282d61eb
--- /dev/null
+++ b/bin/reproducible_pbuilder_setup.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+# Copyright 2014 Holger Levsen <holger@layer-acht.org>
+# released under the GPLv=2
+
+. /srv/jenkins/bin/common-functions.sh
+common_init "$@"
+
+TMPFILE=$(mktemp=)
+cat > $TMPFILE <<- EOF
+echo 'deb http://reproducible.alioth.debian.org/debian/ ./' > /etc/apt/sources.list.d/reproducible.list
+apt-get update
+apt-get install -y dpkg dpkg-dev debhelper dh-python proot
+EOF
+
+sudo cp /var/cache/pbuilder/base.tgz /var/cache/pbuilder/base-reproducible.tgz
+sudo pbuilder --execute $TMPFILE --save-after-exec --basetgz /var/cache/pbuilder/base-reproducible.tgz
+rm $TMPFILE
diff --git a/etc/sudoers.d/jenkins b/etc/sudoers.d/jenkins
index dcdd0814..1e1ada9b 100644
--- a/etc/sudoers.d/jenkins
+++ b/etc/sudoers.d/jenkins
@@ -27,7 +27,9 @@ jenkins ALL= \
/bin/cp -r /media/*, \
/bin/chown -R jenkins\:jenkins /var/lib/jenkins/jobs/*,\
SETENV: NOPASSWD: /usr/sbin/pbuilder *, \
- /bin/rm /var/cache/pbuilder/base.tgz
+ /bin/rm /var/cache/pbuilder/base.tgz, \
+ /bin/cp /var/cache/pbuilder/base.tgz /var/cache/pbuilder/base-reproducible.tgz, \
+ /usr/bin/dcmd rm *.changes
# keep these environment variables
Defaults env_keep += "http_proxy", env_reset
diff --git a/job-cfg/reproducible.yaml b/job-cfg/reproducible.yaml
index eb925b7c..fa2158f4 100644
--- a/job-cfg/reproducible.yaml
+++ b/job-cfg/reproducible.yaml
@@ -21,25 +21,30 @@
artifactDaysToKeep: -1
artifactNumToKeep: -1
builders:
- - shell: '/srv/jenkins/bin/chroot-run.sh {my_distro} {my_shell}'
+ - shell: '{my_shell}'
- job-template:
defaults: reproducible
- name: '{name}_sid_core'
- triggers:
- - pollscm: '*/6 * * * *'
+ name: '{name}_pbuilder_setup'
publishers:
- email:
recipients: 'jenkins+sid-reproducible holger@layer-acht.org lunar@debian.org'
- - trigger:
- timed: "0 42 23 * *"
+- job-template:
+ defaults: reproducible
+ name: '{name}_pbuild_one'
+ publishers:
+ - email:
+ recipients: 'jenkins+sid-reproducible holger@layer-acht.org' # FIXME add lunar here again
- project:
name: reproducible
jobs:
- - '{name}_sid_core':
- my_distro: 'sid'
- my_shell: "echo 'deb http://reproducible.alioth.debian.org/debian/ ./' > /etc/apt/sources.list.d/reproducible.list ; apt-get update ; apt-get install dpkg dpkg-dev debhelper dh-python proot"
- my_description: 'Start with reproducible builds...'
+ - '{name}_pbuilder_setup':
+ my_description: 'Setup pbuilder for reproducible builds as described in https://wiki.debian.org/ReproducibleBuilds#Usage_example'
+ my_shell: '/srv/jenkins/bin/reproducible_pbuilder_setup.sh'
+ jobs:
+ - '{name}_pbuild_one':
+ my_description: 'Build one package with pbuilder so far....'
+ my_shell: '/srv/jenkins/bin/reproducible_pbuild_run.sh acl'
diff --git a/job-cfg/schroot.yaml b/job-cfg/schroot.yaml
index 649668fd..a2c0d7a2 100644
--- a/job-cfg/schroot.yaml
+++ b/job-cfg/schroot.yaml
@@ -76,14 +76,6 @@
defaults: schroot-upgrade
name: '{name}-haskell-upgrade'
-- job-template:
- defaults: schroot-create
- name: '{name}-reproducible-sid-create'
-
-- job-template:
- defaults: schroot-upgrade
- name: '{name}-reproducible-sid-upgrade'
-
- project:
name: schroot
do_not_edit: '<br><br>Job configuration source is <a href="http://anonscm.debian.org/cgit/qa/jenkins.debian.net.git/job-cfg/schroot.yaml">schroot.yaml</a>.'
@@ -104,12 +96,4 @@
- '{name}-haskell-upgrade':
my_schroot: haskell
my_time: '0 16 * * *'
- - '{name}-reproducible-sid-create':
- my_schroot: reproducible-sid
- my_distro: sid
- my_extra_pkgs: 'build-essential dpkg-dev debhelper dh-python proot'
- my_time: '0 14 * * 1'
- - '{name}-reproducible-sid-upgrade':
- my_schroot: reproducible-sid
- my_time: '0 17 * * *'