[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] 2 commits: reproducible Debian: add new, default mode: show results.

Holger Levsen gitlab at salsa.debian.org
Wed Feb 20 20:11:32 GMT 2019


Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
f77bd091 by Holger Levsen at 2019-02-20T19:56:50Z
reproducible Debian: add new, default mode: show results.

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -
5eff9cc1 by Holger Levsen at 2019-02-20T19:58:38Z
reproducible Debian: two more sha1-compare results fetching runners

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


2 changed files:

- bin/reproducible_compare_Debian_sha1sums.sh
- job-cfg/reproducible.yaml


Changes:

=====================================
bin/reproducible_compare_Debian_sha1sums.sh
=====================================
@@ -46,7 +46,8 @@ schroot --directory  $SHA1DIR -c chroot:jenkins-reproducible-${RELEASE}-diffosco
 case "$MODE" in
 	random)		SORT="sort -R";;
 	reverse)	SORT="sort -r" ;;
-	*)		SORT="sort" ;;
+	forward)	SORT="sort" ;;
+	*)		SORT="sort" ; MODE="results" ;;
 esac
 packages="$(grep ^Package: $PACKAGES| awk '{print $2}' | $SORT | xargs echo)"
 
@@ -54,26 +55,25 @@ reproducible_packages=
 unreproducible_packages=
 
 cleanup_all() {
-	reproducible_packages=$(awk '/ REPRODUCIBLE: /{print $9}' $log)
-	reproducible_count=$(echo $reproducible_packages | wc -w)
-	unreproducible_packages=$(awk '/ UNREPRODUCIBLE: /{print $9}' $log)
-	unreproducible_count=$(echo $unreproducible_packages | wc -w)
-
-	percent_repro=$(echo "scale=4 ; $reproducible_count / ($reproducible_count+$unreproducible_count) * 100" | bc)
-	percent_unrepro=$(echo "scale=4 ; $unreproducible_count / ($reproducible_count+$unreproducible_count) * 100" | bc)
-
-	echo "-------------------------------------------------------------"
-	echo "reproducible packages: $reproducible_count: $reproducible_packages"
-	echo
-	echo "unreproducible packages: $unreproducible_count: $unreproducible_packages"
-	echo
-	echo "reproducible packages: $reproducible_count: ($percent_repro%)"
-	echo
-	echo "unreproducible packages: $unreproducible_count: ($percent_unrepro%)"
-	echo
-	echo
-	echo "$(du -sch $SHA1DIR)"
-	echo
+	if [ "$MODE" = "results" ]; then
+		reproducible_packages=$(awk '/ REPRODUCIBLE: /{print $9}' $log)
+		reproducible_count=$(echo $reproducible_packages | wc -w)
+		unreproducible_packages=$(awk '/ UNREPRODUCIBLE: /{print $9}' $log)
+		unreproducible_count=$(echo $unreproducible_packages | wc -w)
+		percent_repro=$(echo "scale=4 ; $reproducible_count / ($reproducible_count+$unreproducible_count) * 100" | bc)
+		percent_unrepro=$(echo "scale=4 ; $unreproducible_count / ($reproducible_count+$unreproducible_count) * 100" | bc)
+		echo "-------------------------------------------------------------"
+		echo "reproducible packages: $reproducible_count: $reproducible_packages"
+		echo
+		echo "unreproducible packages: $unreproducible_count: $unreproducible_packages"
+		echo
+		echo "reproducible packages: $reproducible_count: ($percent_repro%)"
+		echo "unreproducible packages: $unreproducible_count: ($percent_unrepro%)"
+		echo
+		echo
+		echo "$(du -sch $SHA1DIR)"
+		echo
+	fi
 	rm $log $PACKAGES
 }
 
@@ -99,6 +99,18 @@ for package in $packages ; do
 	pool_dir="$(dirname $(grep-dctrl -X -P ${package} -s Filename -n $PACKAGES))"
 	mkdir -p $pool_dir
 	cd $pool_dir
+	if [ "$MODE" = "results" ] ; then
+	        if  [ -e ${package_file}.json ] ; then
+			echo "$(date -u) - generating result"
+			count=$(fmt ${package_file}.json | grep -c '\.buildinfo' || true)
+			if [ "${count}" -ge 2 ]; then
+				echo "$(date -u) - REPRODUCIBLE: $package_file: $SHA1SUM_PKG - reproduced $count times."
+			else
+				echo "$(date -u) - UNREPRODUCIBLE: $package_file: $SHA1SUM_PKG on ftp.debian.org, but nowhere else."
+			fi
+		fi
+		continue
+	fi
 	if [ ! -e ${package_file}.sha1output ] ; then
 		echo -n "$(date -u) - preparing to download $filename"
 		( schroot --directory  $SHA1DIR/$pool_dir -c chroot:jenkins-reproducible-${RELEASE}-diffoscope apt-get download ${package}/${RELEASE} 2>&1 |xargs echo ) || continue
@@ -115,13 +127,6 @@ for package in $packages ; do
 	else
 		echo "$(date -u) - reusing local copy of .json from buildinfo.debian.net"
 	fi
-	echo "$(date -u) - generating result"
-	count=$(fmt ${package_file}.json | grep -c '\.buildinfo' || true)
-	if [ "${count}" -ge 2 ]; then
-		echo "$(date -u) - REPRODUCIBLE: $package_file: $SHA1SUM_PKG - reproduced $count times."
-	else
-		echo "$(date -u) - UNREPRODUCIBLE: $package_file: $SHA1SUM_PKG on ftp.debian.org, but nowhere else."
-	fi
 	rm -f $LOCK
 done | tee $log
 


=====================================
job-cfg/reproducible.yaml
=====================================
@@ -584,11 +584,19 @@
                 - 'compare_Debian_sha1sums':
                     my_description: 'Compare sha1sums of Debian binary packages with rebuild ones'
                     my_timed: ''
+                - 'compare_Debian_sha1sums_forward_runner':
+                    my_description: 'Compare sha1sums of Debian binary packages (in reverse order) with rebuild ones'
+                    my_timed: ''
+                    my_shell: '/srv/jenkins/bin/reproducible_compare_Debian_sha1sums.sh forward'
                 - 'compare_Debian_sha1sums_reverse_runner':
                     my_description: 'Compare sha1sums of Debian binary packages (in reverse order) with rebuild ones'
                     my_timed: ''
                     my_shell: '/srv/jenkins/bin/reproducible_compare_Debian_sha1sums.sh reverse'
-                - 'compare_Debian_sha1sums_random_runner':
+                - 'compare_Debian_sha1sums_random_runner_1':
+                    my_description: 'Compare sha1sums of Debian binary packages (in random order) with rebuild ones'
+                    my_timed: ''
+                    my_shell: '/srv/jenkins/bin/reproducible_compare_Debian_sha1sums.sh random'
+                - 'compare_Debian_sha1sums_random_runner_2':
                     my_description: 'Compare sha1sums of Debian binary packages (in random order) with rebuild ones'
                     my_timed: ''
                     my_shell: '/srv/jenkins/bin/reproducible_compare_Debian_sha1sums.sh random'



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/compare/b8fd8b46ee624cdaa2e98ccc92673644a7136a12...5eff9cc17c88ecd96342e4d3396d0fc0cf0dea06

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/compare/b8fd8b46ee624cdaa2e98ccc92673644a7136a12...5eff9cc17c88ecd96342e4d3396d0fc0cf0dea06
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20190220/bbc2f311/attachment-0001.html>


More information about the Qa-jenkins-scm mailing list