diff options
author | Holger Levsen <holger@layer-acht.org> | 2014-10-09 16:15:13 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2014-10-09 19:02:58 +0200 |
commit | 371c33faaad0a1af6c6dd1effe67ee9a653019e8 (patch) | |
tree | 8f71f9a35b9f3c9ebbbfa8a4253512c5008be817 | |
parent | 305529674c3aa19813f59b0ec2185da1d92d3a6a (diff) | |
download | jenkins.debian.net-371c33faaad0a1af6c6dd1effe67ee9a653019e8.tar.xz |
reproducible: use dcmd rm .dsc first, and then dcmd rm .changes, as the changes file might not contain the .orig.tar archive
-rwxr-xr-x | bin/reproducible_build.sh | 6 | ||||
-rw-r--r-- | etc/sudoers.d/jenkins | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index 0e5c1703..ccb49cce 100755 --- a/bin/reproducible_build.sh +++ b/bin/reproducible_build.sh @@ -170,9 +170,14 @@ for SRCPACKAGE in ${PACKAGES} ; do if [ -f /var/cache/pbuilder/result/${SRCPACKAGE}_${EVERSION}_amd64.changes ] ; then mkdir b1 b2 dcmd cp /var/cache/pbuilder/result/${SRCPACKAGE}_${EVERSION}_amd64.changes b1 + # the .changes file might not contain the original sources archive + # so first delete files from .dsc, then from .changes file + sudo dcmd rm /var/cache/pbuilder/result/${SRCPACKAGE}_${EVERSION}_amd64.dsc sudo dcmd rm /var/cache/pbuilder/result/${SRCPACKAGE}_${EVERSION}_amd64.changes sudo DEB_BUILD_OPTIONS="parallel=$NUM_CPU" pbuilder --build --debbuildopts "-b" --basetgz /var/cache/pbuilder/base-reproducible.tgz --distribution sid ${SRCPACKAGE}_${EVERSION}.dsc dcmd cp /var/cache/pbuilder/result/${SRCPACKAGE}_${EVERSION}_amd64.changes b2 + # and again (see comment 5 lines above) + sudo dcmd rm /var/cache/pbuilder/result/${SRCPACKAGE}_${EVERSION}_amd64.dsc sudo dcmd rm /var/cache/pbuilder/result/${SRCPACKAGE}_${EVERSION}_amd64.changes cat b1/${SRCPACKAGE}_${EVERSION}_amd64.changes | tee -a ${RBUILDLOG} LOGFILE=$(ls ${SRCPACKAGE}_${EVERSION}.dsc) @@ -218,7 +223,6 @@ for SRCPACKAGE in ${PACKAGES} ; do fi set -x rm b1 b2 -rf - sudo dcmd rm -f /var/cache/pbuilder/result/${SRCPACKAGE}_${EVERSION}.dsc else sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO source_packages VALUES (\"${SRCPACKAGE}\", \"${VERSION}\", \"FTBFS\", \"$DATE\")" set +x diff --git a/etc/sudoers.d/jenkins b/etc/sudoers.d/jenkins index 9bace4e2..2e24ae7f 100644 --- a/etc/sudoers.d/jenkins +++ b/etc/sudoers.d/jenkins @@ -31,6 +31,7 @@ jenkins ALL= \ /bin/rm /var/cache/pbuilder/base*.tgz, \ /bin/rm /var/cache/pbuilder/result/*, \ /usr/bin/dcmd rm *.changes, \ + /usr/bin/dcmd rm *.dsc, \ /usr/bin/dcmd rm -f *.dsc, \ /usr/bin/apt-get update |