diff options
author | Holger Levsen <holger@layer-acht.org> | 2014-09-24 08:53:10 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2014-09-24 08:54:00 +0200 |
commit | b8e4764df89a60b6faa9e00380a7f11b4934447d (patch) | |
tree | 64c9d0e2a2ef7ee0d0b5435343578ac4ba1df6fc /bin | |
parent | 1f87a0e90d3aa66a4cde02d169c641dfdfee528d (diff) | |
download | jenkins.debian.net-b8e4764df89a60b6faa9e00380a7f11b4934447d.tar.xz |
reprodicible: catch packages which are not source packages
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_build.sh | 56 |
1 files changed, 33 insertions, 23 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index c5e76e68..7e2b796b 100755 --- a/bin/reproducible_build.sh +++ b/bin/reproducible_build.sh @@ -19,34 +19,43 @@ COUNT_GOOD=0 COUNT_BAD=0 GOOD="" BAD="" +SOURCELESS="" for SRCPACKAGE in "$@" ; do let "COUNT_TOTAL=COUNT_TOTAL+1" rm b1 b2 -rf - apt-get source --download-only ${SRCPACKAGE} || true - RESULT=0 - sudo pbuilder --build --basetgz /var/cache/pbuilder/base-reproducible.tgz ${SRCPACKAGE}_*.dsc || RESULT=$? || true - if [ $RESULT = 0 ] ; then - mkdir b1 b2 - dcmd cp /var/cache/pbuilder/result/${SRCPACKAGE}_*.changes b1 - sudo dcmd rm /var/cache/pbuilder/result/${SRCPACKAGE}_*.changes + set +e + apt-get source --download-only ${SRCPACKAGE} + RESULT=$? + if [ $RESULT != 0 ] ; then + SOURCELESS="${SOURCELESS} ${SRCPACKAGE}" + echo "Warning: ${SRCPACKAGE} is not a source package, or was removed or renamed. Please investigate." + else sudo pbuilder --build --basetgz /var/cache/pbuilder/base-reproducible.tgz ${SRCPACKAGE}_*.dsc - dcmd cp /var/cache/pbuilder/result/${SRCPACKAGE}_*.changes b2 - sudo dcmd rm /var/cache/pbuilder/result/${SRCPACKAGE}_*.changes - cat b1/${SRCPACKAGE}_*.changes - TMPFILE=$(mktemp) - ./misc.git/diffp b1/*.changes b2/*.changes | tee ${TMPFILE} - if $(grep -qv '^\*\*\*\*\*' ${TMPFILE}) ; then - figlet ${SRCPACKAGE} - echo - echo "${SRCPACKAGE} build successfull." - let "COUNT_GOOD=COUNT_GOOD+1" - GOOD="${SRCPACKAGE} ${GOOD}" - else - echo "Warning: ${SRCPACKAGE} failed to build reproducible." - let "COUNT_BAD=COUNT_BAD+1" - GOOD="${SRCPACKAGE} ${BAD}" + RESULT=$? + if [ $RESULT = 0 ] ; then + mkdir b1 b2 + dcmd cp /var/cache/pbuilder/result/${SRCPACKAGE}_*.changes b1 + sudo dcmd rm /var/cache/pbuilder/result/${SRCPACKAGE}_*.changes + sudo pbuilder --build --basetgz /var/cache/pbuilder/base-reproducible.tgz ${SRCPACKAGE}_*.dsc + dcmd cp /var/cache/pbuilder/result/${SRCPACKAGE}_*.changes b2 + sudo dcmd rm /var/cache/pbuilder/result/${SRCPACKAGE}_*.changes + set -e + cat b1/${SRCPACKAGE}_*.changes + TMPFILE=$(mktemp) + ./misc.git/diffp b1/${SRCPACKAGE}_.changes b2/${SRCPACKAGE}_.changes | tee ${TMPFILE} + if $(grep -qv '^\*\*\*\*\*' ${TMPFILE}) ; then + figlet ${SRCPACKAGE} + echo + echo "${SRCPACKAGE} build successfull." + let "COUNT_GOOD=COUNT_GOOD+1" + GOOD="${SRCPACKAGE} ${GOOD}" + else + echo "Warning: ${SRCPACKAGE} failed to build reproducible." + let "COUNT_BAD=COUNT_BAD+1" + GOOD="${SRCPACKAGE} ${BAD}" + fi + rm b1 b2 ${TMPFILE} -rf fi - rm b1 b2 ${TMPFILE} -rf fi set +x @@ -62,3 +71,4 @@ echo echo "$COUNT_TOTAL packages attempted to build in total." echo "$COUNT_GOOD packages successfully built reproducible: ${GOOD}" echo "$COUNT_BAD packages failed to built reproducible: ${BAD}" +echo "The following source packages doesn't exist in sid: $SOURCELESS" |