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 | |
parent | 1f87a0e90d3aa66a4cde02d169c641dfdfee528d (diff) | |
download | jenkins.debian.net-b8e4764df89a60b6faa9e00380a7f11b4934447d.tar.xz |
reprodicible: catch packages which are not source packages
-rwxr-xr-x | bin/reproducible_build.sh | 56 | ||||
-rw-r--r-- | job-cfg/reproducible.yaml | 2 |
2 files changed, 34 insertions, 24 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" diff --git a/job-cfg/reproducible.yaml b/job-cfg/reproducible.yaml index c94ed47e..4848cedb 100644 --- a/job-cfg/reproducible.yaml +++ b/job-cfg/reproducible.yaml @@ -63,7 +63,7 @@ my_shell: '/srv/jenkins/bin/reproducible_build.sh debianutils hostname' # lsof - '{name}_build_core': my_description: 'Reproducible build all the core packages as defined by UDD as described in https://wiki.debian.org/ReproducibleBuilds' - my_shell: '/srv/jenkins/bin/reproducible_build.sh acl adduser base-files base-passwd bash binutils bsdmainutils bsdutils build-essential bzip2 coreutils cpp cpp-4.9 dash debconf debhelper debianutils dh-buildinfo diffutils dmsetup dpkg dpkg-dev e2fslibs e2fsprogs file findutils g++ g++-4.9 gcc gcc-4.9 gcc-4.9-base gettext gettext-base grep groff-base gzip hostname init initscripts insserv intltool-debian libacl1 libasan1 libasprintf0c2 libatomic1 libattr1 libaudit1 libaudit-common libblkid1 libbz2-1.0 libc6 libc6-dev libcap2 libcap2-bin libc-bin libc-dev-bin libcilkrts5 libcloog-isl4 libcomerr2 libcroco3 libcryptsetup4 libdb5.3 libdbus-1-3 libdebconfclient0 libdevmapper1.02.1 libdpkg-perl libffi6 libgcc1 libgcc-4.9-dev libgcrypt11 libgcrypt20 libgdbm3 libglib2.0-0 libgmp10 libgomp1 libgpg-error0 libintl-perl libisl10 libitm1 libkmod2 liblzma5 libmagic1 libmount1 libmpc3 libmpfr4 libncurses5 libncurses5-dev libncursesw5 libpam0g libpam-modules libpam-modules-bin libpam-runtime libpcre3 libpipeline1 libprocps3 libquadmath0 libselinux1 libsemanage1 libsemanage-common libsepol1 libss2 libstdc++-4.9-dev libstdc++6 libsystemd-journal0 libsystemd-login0 libtext-unidecode-perl libtimedate-perl libtinfo5 libtinfo-dev libubsan0 libudev1 libunistring0 libustr-1.0-1 libuuid1 libwrap0 libxml2 libxml-libxml-perl libxml-namespacesupport-perl libxml-sax-base-perl libxml-sax-perl linux-libc-dev login lsb-base make man-db mawk mount ncurses-base ncurses-bin passwd patch perl perl-base perl-modules po-debconf procps sed sensible-utils startpar systemd systemd-sysv sysvinit-utils sysv-rc tar texinfo tzdata ucf udev util-linux xz-utils zlib1g' + my_shell: '/srv/jenkins/bin/reproducible_build.sh acl adduser base-files base-passwd bash binutils bsdmainutils bsdutils build-essential bzip2 coreutils cpp cpp-4.9 dash debconf debhelper debianutils dh-buildinfo diffutils dmsetup dpkg dpkg-dev e2fslibs e2fsprogs file findutils g++ g++-4.9 gcc gcc-4.9 gcc-4.9-base gettext gettext-base grep groff-base gzip hostname init initscripts insserv intltool-debian libacl1 libasan1 libasprintf0c2 libatomic1 libattr1 libaudit1 libaudit-common libblkid1 libbz2-1.0 libc6 libc6-dev libcap2 libcap2-bin libc-bin libc-dev-bin libcilkrts5 libcloog-isl4 libcomerr2 libcroco3 libcryptsetup4 libdb5.3 libdbus-1-3 libdebconfclient0 libdevmapper1.02.1 libdpkg-perl libffi6 libgcc1 libgcc-4.9-dev libgcrypt11 libgcrypt20 libgdbm3 libglib2.0-0 libgmp10 libgomp1 libgpg-error0 libintl-perl libisl10 libitm1 libkmod2 liblzma5 libmagic1 libmount1 libmpc3 libmpfr4 libncurses5 libncurses5-dev libncursesw5 libpam0g libpam-modules libpam-modules-bin libpam-runtime libpcre3 libpipeline1 libprocps3 libquadmath0 libselinux1 libsemanage1 libsemanage-common libsepol1 libss2 libstdc++-4.9-dev libstdc++6 libsystemd-journal0 libsystemd-login0 libtext-unidecode-perl libtimedate-perl libtinfo5 libtinfo-dev libubsan0 libudev1 libunistring0 libustr-1.0-1 libuuid1 libwrap0 libxml2 libxml-libxml-perl libxml-namespacesupport-perl libxml-sax-base-perl libxml-sax-perl linux-libc-dev login lsb-base make man-db mawk mount ncurses-base ncurses-bin passwd patch perl perl-base perl-modules po-debconf procps sed sensible-utils startpar systemd systemd-sysv sysvinit-utils sysv-rc tar texinfo tzdata ucf udev util-linux xz-utils zlib' - '{name}_build_build-essential': my_description: 'Reproducible build all packages build-essential depends on.' my_shell: '/srv/jenkins/bin/reproducible_build.sh eglibc gcc-defaults make-dfsg dpkg' |