From 99a5106f6fca22e843478cb72bb38a6bc91d2299 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Tue, 23 Sep 2014 18:39:45 +0200 Subject: reproducible jobs: make basic job working --- bin/reproducible_build.sh | 18 ++++++++++++++++++ bin/reproducible_pbuild_run.sh | 18 ------------------ bin/reproducible_pbuilder_setup.sh | 18 ------------------ bin/reproducible_setup.sh | 19 +++++++++++++++++++ job-cfg/reproducible.yaml | 19 ++++++++++++------- 5 files changed, 49 insertions(+), 43 deletions(-) create mode 100755 bin/reproducible_build.sh delete mode 100755 bin/reproducible_pbuild_run.sh delete mode 100755 bin/reproducible_pbuilder_setup.sh create mode 100755 bin/reproducible_setup.sh diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh new file mode 100755 index 00000000..641a46d7 --- /dev/null +++ b/bin/reproducible_build.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# Copyright 2014 Holger Levsen +# 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_pbuild_run.sh b/bin/reproducible_pbuild_run.sh deleted file mode 100755 index 659728da..00000000 --- a/bin/reproducible_pbuild_run.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -# Copyright 2014 Holger Levsen -# 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 deleted file mode 100755 index 282d61eb..00000000 --- a/bin/reproducible_pbuilder_setup.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -# Copyright 2014 Holger Levsen -# 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/bin/reproducible_setup.sh b/bin/reproducible_setup.sh new file mode 100755 index 00000000..41af2bff --- /dev/null +++ b/bin/reproducible_setup.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# Copyright 2014 Holger Levsen +# 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 +echo "Warning: Usage of --force-yes to override the apt authentication warning. Don't do this." +apt-get install --force-yes -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/job-cfg/reproducible.yaml b/job-cfg/reproducible.yaml index fa2158f4..38e0240c 100644 --- a/job-cfg/reproducible.yaml +++ b/job-cfg/reproducible.yaml @@ -25,26 +25,31 @@ - job-template: defaults: reproducible - name: '{name}_pbuilder_setup' + name: '{name}_setup' publishers: - email: recipients: 'jenkins+sid-reproducible holger@layer-acht.org lunar@debian.org' - job-template: defaults: reproducible - name: '{name}_pbuild_one' + name: '{name}_build_core' publishers: - email: recipients: 'jenkins+sid-reproducible holger@layer-acht.org' # FIXME add lunar here again + scm: + - git: + url: 'git://git.debian.org/git/reproducible/misc.git' + branches: + - master + - project: name: reproducible jobs: - - '{name}_pbuilder_setup': + - '{name}_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_shell: '/srv/jenkins/bin/reproducible_setup.sh' + - '{name}_build_core': my_description: 'Build one package with pbuilder so far....' - my_shell: '/srv/jenkins/bin/reproducible_pbuild_run.sh acl' + my_shell: '/srv/jenkins/bin/reproducible_build.sh acl' -- cgit v1.2.3-70-g09d2