[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] 2 commits: fix typo

Holger Levsen (@holger) gitlab at salsa.debian.org
Thu Jul 7 10:47:38 BST 2022



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


Commits:
ca7d37d2 by Holger Levsen at 2022-07-07T11:14:14+02:00
fix typo

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

- - - - -
10be55df by Holger Levsen at 2022-07-07T11:47:19+02:00
reproducible Debian: create graphs about existing .buildinfo files per suite/arch

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

- - - - -


4 changed files:

- bin/reproducible_common.sh
- bin/reproducible_db_maintenance.py
- bin/reproducible_html_builtin-pho.sh
- bin/reproducible_html_dashboard.sh


Changes:

=====================================
bin/reproducible_common.sh
=====================================
@@ -1,7 +1,7 @@
 #!/bin/bash
 # vim: set noexpandtab:
 
-# Copyright 2014-2021 Holger Levsen <holger at layer-acht.org>
+# Copyright 2014-2022 Holger Levsen <holger at layer-acht.org>
 #         © 2015-2018 Mattia Rizzolo <mattia at mapreri.org>
 # released under the GPLv2
 #
@@ -101,6 +101,7 @@ TABLE[6]=stats_meta_pkg_state
 TABLE[7]=stats_bugs_state
 TABLE[8]=stats_bugs_sin_ftbfs
 TABLE[9]=stats_bugs_sin_ftbfs_state
+TABLE[10]=stats_buildinfo
 
 # package sets defined in meta_pkgsets.csv
 # csv file columns: (pkgset_group, pkgset_name)


=====================================
bin/reproducible_db_maintenance.py
=====================================
@@ -2,7 +2,7 @@
 # -*- coding: utf-8 -*-
 #
 # Copyright © 2015-2018 Mattia Rizzolo <mattia at mapreri.org>
-# Copyright © 2015-2021 Holger Levsen <holger at layer-acht.org>
+# Copyright © 2015-2022 Holger Levsen <holger at layer-acht.org>
 # Based on various reproducible_* files © 2014-2015 Holger Levsen <holger at layer-acht.org>
 # Licensed under GPL-2
 #
@@ -601,7 +601,7 @@ schema_updates = {
         "CREATE SEQUENCE results_id_seq",
         "ALTER TABLE results ALTER id SET DEFAULT NEXTVAL('results_id_seq')",
     ],
-    30: [  # Add new table to track diffoscope breake
+    30: [  # Add new table to track diffoscope breakage
         '''CREATE TABLE stats_breakages
                      (datum TEXT,
                       diffoscope_timeouts INTEGER,
@@ -795,6 +795,15 @@ schema_updates = {
                 FROM bookworm AS b JOIN sr ON b.name=sr.name
                     AND b.architecture=sr.architecture""",
     ],
+    56: [  # new table to track .buildinfo files per suite and architecture
+        '''CREATE TABLE stats_buildinfo
+                     (datum TEXT NOT NULL,
+                      suite TEXT NOT NULL,
+                      architecture TEXT NOT NULL,
+                      with_buildinfo INTEGER,
+                      without_buildinfo INTEGER,
+                      PRIMARY KEY (datum, suite, architecture))''',
+    ],
 }
 
 


=====================================
bin/reproducible_html_builtin-pho.sh
=====================================
@@ -15,8 +15,7 @@ common_init "$@"
 # common code for tests.reproducible-builds.org
 . /srv/jenkins/bin/reproducible_common.sh
 
-# 2 things to be done/FIXME:
-# - create graphs
+# 1 thing to be done/FIXME:
 # - include security updates (needs to be fixed in builtin-pho.git)
 
 get_localsuite() {
@@ -84,6 +83,7 @@ create_buildinfos_page() {
 	write_page "<p>"
 	write_page "$HITS sources with .buildinfo files found:"
 	write_page "<br/><small>(While we also know about $MISSES sources without .buildinfo files in $SUITE/$ARCH.)</small></p>"
+	write_page " <a href=\"/debian/$SUITE/$ARCH/${TABLE[10]}.png\"><img src=\"/debian/$SUITE/$ARCH/${TABLE[10]}.png\" alt=\"${MAINLABEL[10]}\"></a>"
 	write_page "<pre>"
 	cat $HTML_HITS >> $PAGE
 	write_page "</pre>"
@@ -106,6 +106,7 @@ create_no_buildinfos_page() {
 	write_page "<p>"
 	write_page "$MISSES sources without .buildinfo files found:"
 	write_page "<br/><small>(While we also know about $HITS sources with .buildinfo files in $SUITE/$ARCH.)</small></p>"
+	write_page " <a href=\"/debian/$SUITE/$ARCH/${TABLE[10]}.png\"><img src=\"/debian/$SUITE/$ARCH/${TABLE[10]}.png\" alt=\"${MAINLABEL[10]}\"></a>"
 	write_page "<pre>"
 	cat $HTML_MISSES >> $PAGE
 	write_page "</pre>"


=====================================
bin/reproducible_html_dashboard.sh
=====================================
@@ -1,7 +1,7 @@
 #!/bin/bash
 # vim: set noexpandtab:
 
-# Copyright 2014-2021 Holger Levsen <holger at layer-acht.org>
+# Copyright 2014-2022 Holger Levsen <holger at layer-acht.org>
 #         © 2015 Mattia Rizzolo <mattia at mapreri.org>
 # released under the GPLv2
 
@@ -77,6 +77,7 @@ for TAG in $USERTAGS ; do
 done
 REPRODUCIBLE_DONE="$REPRODUCIBLE_DONE)"
 REPRODUCIBLE_OPEN="$REPRODUCIBLE_OPEN)"
+FIELDS[9]="datum, with_buildinfo, without_buildinfo"
 COLOR[0]=5
 COLOR[1]=20
 COLOR[2]=1
@@ -86,12 +87,14 @@ COLOR[5]=1
 COLOR[7]=2
 COLOR[8]=30
 COLOR[9]=2
+COLOR[10]=2
 MAINLABEL[3]="Bugs (with all usertags) for user reproducible-builds at lists.alioth.debian.org"
 MAINLABEL[4]="Packages which have notes"
 MAINLABEL[5]="Identified issues"
 MAINLABEL[7]="Open and closed bugs (with all usertags)"
 MAINLABEL[8]="Bugs (with all usertags except 'ftbfs') for user reproducible-builds at lists.alioth.debian.org"
 MAINLABEL[9]="Open and closed bugs (with all usertags except tagged 'ftbfs')"
+MAINLABEL[10]="Packages with and without .buildinfo files"
 YLABEL[0]="Amount (total)"
 YLABEL[1]="Amount (per day)"
 YLABEL[2]="Age in days"
@@ -101,6 +104,7 @@ YLABEL[5]="Amount of issues"
 YLABEL[7]="Amount of bugs open / closed"
 YLABEL[8]="Amount of bugs"
 YLABEL[9]="Amount of bugs open / closed"
+YLABEL[10]="Amount of packages"
 
 #
 # update package + build stats
@@ -147,7 +151,7 @@ update_suite_arch_stats() {
 			if [ $i -eq 0 ] || [ $i -eq 2 ] ; then
 				PREFIX=$SUITE/$ARCH
 			fi
-			# force regeneration of the image if it exists
+			# force regeneration of existing image
 			if [ -f $DEBIAN_BASE/$PREFIX/${TABLE[$i]}.png ] ; then
 				echo "Touching $PREFIX/${TABLE[$i]}.png..."
 				touch -d "$FORCE_DATE 00:00 UTC" $DEBIAN_BASE/$PREFIX/${TABLE[$i]}.png
@@ -245,7 +249,7 @@ update_bug_stats() {
 		if $GOT_BTS_RESULTS ; then
 			echo "Updating database with bug stats for $DATE."
 			query_db "$SQL"
-			# force regeneration of the image
+			# force regeneration of existing image
 			local i=0
 			for i in 3 7 8 9 ; do
 				echo "Touching ${TABLE[$i]}.png..."
@@ -293,7 +297,32 @@ write_usertag_table() {
 	fi
 }
 
+##
+# update buildinfo stats
 #
+update_buildinfo_stats() {
+	RESULT=$(query_db "SELECT datum,suite from ${TABLE[10]} WHERE datum = '$DATE' AND suite = '$SUITE' AND architecture = '$ARCH'")
+	if [ -z $RESULT ] ; then
+		PREFIX=$DEBIAN_BASE/$SUITE/$ARCH
+		STATS=$PREFIX/builtin-pho_stats.txt
+		echo "Updating .buildinfo stats for $SUITE/$ARCH in $DATE."
+		HITS=$( grep $DATE $STATS | awk -F',' '{print $2}')
+		MISSING=$( grep $DATE $STATS | awk -F',' '{print $3}')
+		# only if we have results…
+		if [ -n "HITS" ] ; then
+			query_db "INSERT INTO ${TABLE[10]} VALUES ('$DATE', '$SUITE', '$ARCH', $HITS, $MISSING)"
+		fi
+		# force regeneration of existing image
+		PNG=$PREFIX/${TABLE[10]}.png
+		if [ -f $PNG ] ; then
+			echo "Touching $PNG..."
+			touch -d "$FORCE_DATE 00:00 UTC" $PNG
+		fi
+	fi
+	create_debian_png_from_table 10 $SUITE/$ARCH/${TABLE[10]}.png
+
+}
+
 # write build performance stats
 #
 _average_builds_per_day() {
@@ -776,6 +805,7 @@ update_notes_stats
 for ARCH in ${ARCHS} ; do
 	for SUITE in $SUITES ; do
 		update_suite_arch_stats
+		update_buildinfo_stats
 		gather_suite_arch_stats
 		# stretch, buster and bullseye pages are only updated every 12h
 		if ( [ "$SUITE" = "stretch" ] || [ "$SUITE" = "buster" ] || [ "$SUITE" = "bullseye" ] ) && [[ $(($(date +%k) % 12)) -ne 0 ]]; then



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/53f21e87fbd28d94a32363b8b07eb940ccb06f8f...10be55df9d445afaacbaa5357b137fbbc3d2c4bb

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/53f21e87fbd28d94a32363b8b07eb940ccb06f8f...10be55df9d445afaacbaa5357b137fbbc3d2c4bb
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/20220707/1ecec4b0/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list