From ec7d8f8d5ea8a2690cdd8251943cd5e1372682e0 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Wed, 18 May 2016 23:04:49 +0200 Subject: reproducible debian: right align table cells by default, provide css classes for left and center alignment --- TODO | 1 - bin/reproducible_html_dashboard.sh | 60 +++++++++++++------------- bin/reproducible_html_live_status.py | 14 +++--- bin/reproducible_html_notes.py | 22 +++++----- bin/reproducible_html_packages.py | 2 +- bin/reproducible_html_repository_comparison.sh | 4 +- userContent/reproducible/static/style.css | 12 +++++- 7 files changed, 62 insertions(+), 53 deletions(-) diff --git a/TODO b/TODO index e82aadc1..4b420231 100644 --- a/TODO +++ b/TODO @@ -150,7 +150,6 @@ The plan is to run a jenkins.d.o host, which is maintained by DSA, but we are ma ** check that cleanup of old diffscope schroots on armhf+amd64 nodes works.... ** check that /srv/workspace/pbuilder/ is cleaned up properly ** rewrite bin/schroot-create.sh from scratch, with little sudo. -** right align all numbers in table in the dashboard ** pkg sets related: *** add new pkg set: torbrowser-build-depends *** fix essential set: currently it only has the ones explicitly marked Essential:yes; they and their dependencies make up the full "essential closure set" (sometimes also called pseudo-essential) diff --git a/bin/reproducible_html_dashboard.sh b/bin/reproducible_html_dashboard.sh index 96a3155a..43c8b39c 100755 --- a/bin/reproducible_html_dashboard.sh +++ b/bin/reproducible_html_dashboard.sh @@ -278,7 +278,7 @@ write_usertag_table() { let "REPRODUCIBLE_TTOTAL=REPRODUCIBLE_TOPEN+REPRODUCIBLE_TDONE" write_page "Sum of bugs with usertags related to reproducible builds, excluding those tagged 'ftbfs'$REPRODUCIBLE_TOPEN$REPRODUCIBLE_TDONE$REPRODUCIBLE_TTOTAL" write_page "Sum of all bugs with usertags related to reproducible builds$TOPEN$TDONE$TTOTAL" - write_page "Stats are from $DATE.
The sums of usertags shown are not equivalent to the sum of bugs as a single bug can have several tags." + write_page "Stats are from $DATE.
The sums of usertags shown are not equivalent to the sum of bugs as a single bug can have several tags." write_page "" fi } @@ -292,7 +292,7 @@ write_build_performance_stats() { for ARCH in ${ARCHS} ; do write_page " $ARCH" done - write_page "oldest build result in testing / unstable / experimental" + write_page "oldest build result in testing / unstable / experimental" for ARCH in ${ARCHS} ; do PERF_STATS[$ARCH]=$(mktemp -t reproducible-dashboard-perf-XXXXXXXX) AGE_UNSTABLE=$(sqlite3 -init ${INIT} ${PACKAGES_DB} "SELECT CAST(max(oldest_reproducible, oldest_unreproducible, oldest_FTBFS) AS INTEGER) FROM ${TABLE[2]} WHERE suite='unstable' AND architecture='$ARCH' AND datum='$DATE'") @@ -300,7 +300,7 @@ write_build_performance_stats() { AGE_TESTING=$(sqlite3 -init ${INIT} ${PACKAGES_DB} "SELECT CAST(max(oldest_reproducible, oldest_unreproducible, oldest_FTBFS) AS INTEGER) FROM ${TABLE[2]} WHERE suite='testing' AND architecture='$ARCH' AND datum='$DATE'") write_page "$AGE_TESTING / $AGE_UNSTABLE / $AGE_EXPERIMENTAL days" done - write_page "average test duration (on $DATE)" + write_page "average test duration (on $DATE)" for ARCH in ${ARCHS} ; do RESULT=$(sqlite3 -init ${INIT} ${PACKAGES_DB} "SELECT CAST(AVG(r.build_duration) AS INTEGER) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE r.build_duration!='' AND r.build_duration!='0' AND r.build_date LIKE '%$DATE%' AND s.architecture='$ARCH'") MIN=$(echo $RESULT/60|bc) @@ -309,24 +309,24 @@ write_build_performance_stats() { done local TIMESPAN_VERBOSE="4 weeks" local TIMESPAN_RAW="28" - write_page "average test duration (in the last $TIMESPAN_VERBOSE)" + write_page "average test duration (in the last $TIMESPAN_VERBOSE)" for ARCH in ${ARCHS} ; do RESULT=$(sqlite3 -init ${INIT} ${PACKAGES_DB} "SELECT CAST(AVG(r.build_duration) AS INTEGER) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE r.build_duration!='' AND r.build_duration!='0' AND r.build_date > datetime('$DATE', '-$TIMESPAN_RAW days') AND s.architecture='$ARCH'") MIN=$(echo $RESULT/60|bc) SEC=$(echo "$RESULT-($MIN*60)"|bc) write_page "$MIN minutes, $SEC seconds" done - write_page "packages tested on $DATE" + write_page "packages tested on $DATE" for ARCH in ${ARCHS} ; do RESULT=$(sqlite3 -init ${INIT} ${PACKAGES_DB} "SELECT COUNT(r.build_date) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE r.build_date LIKE '%$DATE%' AND s.architecture='$ARCH'") write_page "$RESULT" done - write_page "packages tested in the last 24h" + write_page "packages tested in the last 24h" for ARCH in ${ARCHS} ; do RESULT=$(sqlite3 -init ${INIT} ${PACKAGES_DB} "SELECT COUNT(r.build_date) FROM stats_build AS r WHERE r.build_date > datetime('$(date -u '+%Y-%m-%d %H:%m')', '-24 hours') AND r.architecture='$ARCH'") write_page "$RESULT" done - write_page "packages tested on average per day in the last $TIMESPAN_VERBOSE" + write_page "packages tested on average per day in the last $TIMESPAN_VERBOSE" for ARCH in ${ARCHS} ; do RESULT=$(sqlite3 -init ${INIT} ${PACKAGES_DB} "SELECT COUNT(r.build_date) FROM stats_build AS r WHERE r.build_date > datetime('$DATE', '-$TIMESPAN_RAW days') AND r.architecture='$ARCH'") RESULT="$(echo $RESULT/$TIMESPAN_RAW|bc)" @@ -334,7 +334,7 @@ write_build_performance_stats() { done local TIMESPAN_VERBOSE="3 months" local TIMESPAN_RAW="91.5" - write_page "packages tested on average per day in the last $TIMESPAN_VERBOSE" + write_page "packages tested on average per day in the last $TIMESPAN_VERBOSE" for ARCH in ${ARCHS} ; do if [ "$ARCH" = "i386" ] ; then RESULT=" " @@ -354,29 +354,29 @@ write_suite_arch_table() { local SUITE="" local ARCH="" write_page "

" - write_page "
suiteall sources packages" + write_page "" for SUITE in $SUITES ; do for ARCH in ${ARCHS} ; do gather_suite_arch_stats - write_page "
suiteall sources packages" set_icon reproducible write_icon - write_page "reproducible packages" + write_page "reproducible packages" set_icon unreproducible write_icon - write_page "unreproducible packages" + write_page "unreproducible packages" set_icon FTBFS write_icon - write_page "packages failing to build" + write_page "packages failing to build" set_icon depwait write_icon - write_page "packages in depwait state" + write_page "packages in depwait state" set_icon not_for_us write_icon - write_page "not for this architecture" + write_page "not for this architecture" set_icon blacklisted write_icon write_page "blacklisted
$SUITE/$ARCH$AMOUNT" + write_page "
$SUITE/$ARCH$AMOUNT" if [ $(echo $PERCENT_TOTAL/1|bc) -lt 99 ] ; then write_page "($PERCENT_TOTAL% tested)" fi @@ -480,23 +480,23 @@ create_dashboard_page() { done write_page "

" # write inventory table - write_page "

" + write_page "

Various reproducibility statisticssource based
" AC=0 for ARCH in ${ARCHS} ; do - write_page "" + write_page "" let AC+=1 done write_page "" ARCH="amd64" - write_page "" - write_page "" - write_page "" + write_page "" + write_page "" + write_page "" - local TD_PKG_NOISSUES="" - local TD_PKG_FTBR="" - local TD_PKG_FTBFS="" - local TD_PKG_SID="" - local TD_PKG_TESTING="" + local TD_PKG_NOISSUES="" + local TD_PKG_FTBR="" + local TD_PKG_FTBFS="" + local TD_PKG_SID="" + local TD_PKG_TESTING="" for ARCH in ${ARCHS} ; do SUITE="unstable" gather_suite_arch_stats @@ -523,20 +523,20 @@ create_dashboard_page() { # insane grep to filter people who committed with several # usernamesā€¦ if [ -f ${NOTES_GIT_PATH}/packages.yml ] && [ -f ${NOTES_GIT_PATH}/issues.yml ] ; then - write_page "" - write_page "" fi RESULT=$(cat /srv/reproducible-results/modified_in_sid.txt || echo "unknown") # written by reproducible_html_repository_comparison.sh - write_page "" + write_page "" RESULT=$(cat /srv/reproducible-results/modified_in_exp.txt || echo "unknown") # written by reproducible_html_repository_comparison.sh - write_page "" + write_page "" RESULT=$(cat /srv/reproducible-results/binnmus_needed.txt || echo "unknown") # written by reproducible_html_repository_comparison.sh if [ "$RESULT" != "0" ] ; then - write_page "" + write_page "" fi write_page "
Various reproducibility statisticssource based$ARCH$ARCH
identified distinct and categorized issues$ISSUES
total number of identified issues in packages$COUNT_ISSUES
packages with notes about these issues$NOTES
identified distinct and categorized issues$ISSUES
total number of identified issues in packages$COUNT_ISSUES
packages with notes about these issues$NOTES
packages in unstable with issues but without identified ones
  - unreproducible ones
  - failing to build
packages in unstable which need to be fixed
  - in testing
packages in unstable with issues but without identified ones
  - unreproducible ones
  - failing to build
packages in unstable which need to be fixed
  - in testing
committers to notes.git (in the last three months)$(cd ${NOTES_GIT_PATH} ; git log --since="3 months ago"|grep Author|sort -u | \ + write_page "
committers to notes.git (in the last three months)$(cd ${NOTES_GIT_PATH} ; git log --since="3 months ago"|grep Author|sort -u | \ grep -v alexis@passoire.fr | grep -v christoph.berg@credativ.de | grep -v d.s@daniel.shahaf.name | grep -v dhole@openmailbox.com | grep -v jelmer@jelmer.uk | grep -v mattia@mapreri.org | grep -v micha@lenk.info | grep -v mail@sandroknauss.de | grep -v sanvila@unex.es | \ wc -l)
committers to notes.git (in total)$(cd ${NOTES_GIT_PATH} ; git log |grep Author|sort -u | \ + write_page "
committers to notes.git (in total)$(cd ${NOTES_GIT_PATH} ; git log |grep Author|sort -u | \ grep -v alexis@passoire.fr | grep -v christoph.berg@credativ.de | grep -v d.s@daniel.shahaf.name | grep -v dhole@openmailbox.com | grep -v jelmer@jelmer.uk | grep -v mattia@mapreri.org | grep -v micha@lenk.info | grep -v mail@sandroknauss.de | grep -v sanvila@unex.es | \ wc -l)
packages modified in our toolchain (in unstable)$(echo $RESULT)
packages modified in our toolchain (in unstable)$(echo $RESULT)
  - (in experimental)$(echo $RESULT)
  - (in experimental)$(echo $RESULT)
  - which need to be build on some archs$(echo $RESULT)
  - which need to be build on some archs$(echo $RESULT)
" # write bugs with usertags table diff --git a/bin/reproducible_html_live_status.py b/bin/reproducible_html_live_status.py index cea570d5..07224d95 100755 --- a/bin/reproducible_html_live_status.py +++ b/bin/reproducible_html_live_status.py @@ -15,7 +15,7 @@ import glob def convert_into_status_html(status): if status != 'None': status, icon, spokenstatus = get_status_icon(status) - return '' + status + ' ' + status + return status + ' ' + status + '' else: return '' @@ -36,8 +36,8 @@ def generate_schedule(arch): html += build_leading_text_section({'text': text}, rows, defaultsuite, arch) html += generate_live_status_table(arch) html += '

\n' + tab - html += '' - html += '\n' + html += '' + html += 'n' bugs = get_bugs() for row in rows: # 0: date_scheduled, 1: suite, 2: arch, 3: pkg name 4: previous status 5: previous build duration 6. avg build duration @@ -66,10 +66,10 @@ def generate_live_status_table(arch): html = '' rows = query_db(query.format(arch=arch)) html += '

#scheduled atsuitearchsource packageprevious build statusprevious build durationaverage build duration
#scheduled atsuitearchsource packageprevious build statusprevious build durationaverage build duration
\n' + tab - html += '' - html += '' - html += '' - html += '' + html += '' + html += '' + html += '' + html += '' html += '\n' counter = 0 # the path should probably not be hard coded hereā€¦ diff --git a/bin/reproducible_html_notes.py b/bin/reproducible_html_notes.py index 6bd1551e..94b95b46 100755 --- a/bin/reproducible_html_notes.py +++ b/bin/reproducible_html_notes.py @@ -45,7 +45,7 @@ note_issues_html = Template((tab*3).join(""" - """.splitlines(True))) @@ -55,7 +55,7 @@ note_bugs_html = Template((tab*4).join(""" - """.splitlines(True))) @@ -65,7 +65,7 @@ note_comments_html = Template((tab*3).join(""" - """.splitlines(True))) @@ -75,7 +75,7 @@ note_issue_html_url = Template((tab*6).join(""" - """.splitlines(True))) @@ -85,7 +85,7 @@ note_issue_html_desc = Template((tab*6).join(""" - """.splitlines(True))) @@ -96,7 +96,7 @@ note_issue_html = Template((tab*5).join((""" - @@ -109,7 +109,7 @@ issue_html_url = Template((tab*4).join(""" - """.splitlines(True))) @@ -120,7 +120,7 @@ issue_html = Template((tab*3).join(""" - @@ -128,7 +128,7 @@ issue_html = Template((tab*3).join(""" - @@ -137,7 +137,7 @@ issue_html = Template((tab*3).join(""" - @@ -145,7 +145,7 @@ issue_html = Template((tab*3).join(""" - diff --git a/bin/reproducible_html_packages.py b/bin/reproducible_html_packages.py index ce01db6d..7c55a266 100755 --- a/bin/reproducible_html_packages.py +++ b/bin/reproducible_html_packages.py @@ -220,7 +220,7 @@ def gen_history_page(package): record['node2'] = shorten_if_debiannet(record['node2']) # add icon to result status, icon, spokenstatus = get_status_icon(record['result']) - result_html = '{spokenstatus} ' + spokenstatus + result_html = spokenstatus + ' {spokenstatus}' record['result'] = result_html.format(icon=icon, spokenstatus=spokenstatus) # human formatting of build duration record['build duration'] = convert_into_hms_string( diff --git a/bin/reproducible_html_repository_comparison.sh b/bin/reproducible_html_repository_comparison.sh index db6a40ac..c3ee6742 100755 --- a/bin/reproducible_html_repository_comparison.sh +++ b/bin/reproducible_html_repository_comparison.sh @@ -44,7 +44,7 @@ write_page "

These source packages (and their binaries packages) are different write_page "deb http://reproducible.alioth.debian.org/debian/ ./" write_page "deb-src http://reproducible.alioth.debian.org/debian/ ./" write_page "

" -write_page "

#src pkg idsuitearchsource packageversionbuild startedprevious build statusprevious build durationaverage build durationbuilder job
#src pkg idsuitearchsource packageversionbuild startedprevious build statusprevious build durationaverage build durationbuilder job
Identified issues: + $issues
Bugs noted: + $bugs
Comments: + $comments
URL + $url
Description + $description
Identifier: + $issue
URL: + $url
Identifier: + $issue
Suites: + $suite_links
Description: + $description
Packages in '$suite' known to be affected by this issue: + $affected_pkgs
" +write_page "

packagegit repoPTS linkusertagged bugold versions in our repo
(needed for reproducing old builds)
version in our repo
(available binary packages per architecture)
version in 'testing'version in 'unstable'version in 'experimental'
" custom_curl http://reproducible.alioth.debian.org/debian/Sources $SOURCES custom_curl http://reproducible.alioth.debian.org/debian/Packages $PACKAGES @@ -234,7 +234,7 @@ for PKG in $SOURCEPKGS ; do done cat $TABLE_TODO >> $PAGE write_page "
packagegit repoPTS linkusertagged bugold versions in our repo
(needed for reproducing old builds)
version in our repo
(available binary packages per architecture)
version in 'testing'version in 'unstable'version in 'experimental'

" -write_page "

" +write_page "

package (obsolete in our repo)git repoPTS linkusertagged bugold versions in our repo
(needed for reproducing old builds)
version in our repo
(available binary packages per architecture)
version in 'testing'version in 'unstable'version in 'experimental'
" cat $TABLE_DONE >> $PAGE write_page "
obsoleted package,
version in sid higher than in our repo
git repoPTS linkusertagged bugold version(s) in our repo
(needed for reproducing old builds)
version in our repo
(available binary packages per architecture)
version in 'testing'version in 'unstable'version in 'experimental'

" write_page_footer diff --git a/userContent/reproducible/static/style.css b/userContent/reproducible/static/style.css index e2e0f3b2..3d775a13 100644 --- a/userContent/reproducible/static/style.css +++ b/userContent/reproducible/static/style.css @@ -281,13 +281,23 @@ span.bug-done { } td, th { - text-align: left; + text-align: right; padding: 0.25em 0.5em; border-bottom: 1px solid #ddd; border-collapse: collapse; vertical-align: top; } +td.left, th.left { + text-align: left; +} + +td.center, th.center { + text-align: center; +} + + + table tr:last-child td { border: none; } -- cgit v1.2.3-70-g09d2