[Reproducible-commits] [misc] 01/01: Document how to create weekly reports

Jérémy Bobbio lunar at moszumanska.debian.org
Mon May 25 18:08:47 UTC 2015


This is an automated email from the git hooks/post-receive script.

lunar pushed a commit to branch master
in repository misc.

commit ea2a971fa8697659347c092541717f64dd91fa2f
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Mon May 25 20:08:38 2015 +0200

    Document how to create weekly reports
---
 reports/README                 | 102 +++++++++++++++++++++++++++++++++++++++++
 reports/bin/history            |   7 +++
 reports/bin/newly-reproducible |  45 ++++++++++++++++++
 reports/bin/review-bugs        |  14 ++++++
 reports/bin/review-stats       |  22 +++++++++
 reports/template.mdwn          |  41 +++++++++++++++++
 6 files changed, 231 insertions(+)

diff --git a/reports/README b/reports/README
new file mode 100644
index 0000000..09a5552
--- /dev/null
+++ b/reports/README
@@ -0,0 +1,102 @@
+Weekly reports
+==============
+
+The idea is to keep the project and everyone else who is curious about the
+progress we are making. Also highlight that it is a team effort and credit
+the many people who help toward our goals.
+
+Reports are from Sunday to Sunday.
+
+Template
+--------
+
+There's a template in `template.mdwn`. Feel free to adapt to what is
+relevant this week.
+
+Process
+-------
+
+1. Look at packages that became reproducible this week.
+
+   There's a script that will use the history in the
+   reproducible.debian.net database to figure this out. Usage:
+
+       $ wget https://reproducible.debian.net/reproducible.db
+       $ bin/newly-reproducible
+
+   The output needs to be manually verified. Some packages will
+   be fixed by a change in the toolchain and be marked as fixed in
+   a given version because of a timely upload. Also the script
+   might give some false positive: packages might have been
+   reproducible before, broken by a toolchain upload later fixed.
+
+   One can look at the history of the tests by typing:
+
+       $ bin/history ghc                # defaults to unstable
+       $ bin/history ghc experimental
+
+2. Look at all relevant bug reports that have been modified this week.
+
+   There's a script that will query UDD to bug reports that have been
+   updated in the past 7 days, then use the `bts` tool to cache
+   them, and finally display them using `mutt`.
+
+   Usage:
+
+       $ bin/review-bugs
+
+3. Look at all uploads for the past week.
+
+   Easiest way: log into `master.debian.org`, then:
+
+       $ mutt -R -f /srv/mail-archives/lists/debian-devel-changes/debian-devel-changes.$(date +%Y%m)
+
+   Once in `mutt`, filter all packages having `repro` in their
+   changelog by pressing `l`, and then `~b repro` following by
+   *enter*. Read all emails recent enough.
+
+   Otherwise, the archive is available on the web:
+   https://lists.debian.org/debian-devel-changes/
+
+4. Stats for reviews:
+
+   Make sure you get a recent copy of `notes.git`. Then:
+
+       $ ../misc/reports/bin/review-stats \
+              <(git show "master@{$(LC_ALL=C date --date='a week ago' +'%b %d')}":packages.yml) \
+              <(git show "master@{$(LC_ALL=C date +'%b %d')}":packages.yml)
+
+5. New and updated issues:
+
+   Make sure you get a recent copy of `notes.git`. Then:
+
+       $ git diff "master@{$(LC_ALL=C date --date='a week ago' +'%b %d')}..master@{$(LC_ALL=C date +'%b %d')}" issues.yml
+
+6. Manually reported:
+
+   Look at `/home/groups/reproducible/weekly-log.txt` on Alioth.
+
+7. Git repositories and custom toolchain:
+
+   Look for recent uploads in the package repository:
+   https://reproducible.alioth.debian.org/debian/
+
+   Complete with stuff in Git:
+   https://lists.alioth.debian.org/pipermail/reproducible-commits/
+   https://anonscm.debian.org/cgit/reproducible/
+
+   Also take a look at jenkins.debian.net:
+   https://lists.alioth.debian.org/pipermail/qa-jenkins-scm/
+   https://anonscm.debian.org/cgit/qa/jenkins.debian.net.git/
+
+8. Documentation updates:
+
+   Log in to `wiki.debian.org` and head to:
+   https://wiki.debian.org/RecentChanges?max_days=14
+
+   Look for changes in pages with “ReproducibleBuilds” in the name.
+
+9. Left-overs:
+
+   Look at the mailing list archive:
+   https://lists.alioth.debian.org/pipermail/reproducible-builds/
diff --git a/reports/bin/history b/reports/bin/history
new file mode 100755
index 0000000..1637d8a
--- /dev/null
+++ b/reports/bin/history
@@ -0,0 +1,7 @@
+#!/bin/sh
+# history: look at the history of reproducibly test for a package
+#
+# Copyright © 2015 Lunar <lunar at debian.org>
+# Licensed under WTFPL — http://www.wtfpl.net/txt/copying/
+
+sqlite3 reproducible.db "SELECT * FROM stats_build WHERE name = '$1' AND suite = '${2:-unstable}' ORDER BY build_date;"
diff --git a/reports/bin/newly-reproducible b/reports/bin/newly-reproducible
new file mode 100755
index 0000000..fb86fda
--- /dev/null
+++ b/reports/bin/newly-reproducible
@@ -0,0 +1,45 @@
+#!/usr/bin/python3
+# newly-reproducible: find packages that became reproducible in the past week
+#
+# Copyright © 2015 Lunar <lunar at debian.org>
+# Licensed under WTFPL — http://www.wtfpl.net/txt/copying/
+
+import sqlite3
+
+conn = sqlite3.connect('reproducible.db')
+
+c = conn.cursor()
+
+now_reproducible = {}
+for name, reproducible_version, suite, reproducible_build_time in c.execute('SELECT name, version, suite, strftime("%s", build_date) FROM stats_build WHERE status = "reproducible" AND build_date > DATE("now", "-7 day") AND suite = "unstable" ORDER BY build_date DESC'):
+    if name in now_reproducible:
+        continue
+    c2 = conn.cursor()
+    res = c2.execute('SELECT status FROM stats_build WHERE name = ? AND suite = ? AND build_date < DATETIME(?, "unixepoch") ORDER BY build_date DESC LIMIT 1', (name, suite, int(reproducible_build_time) - 1)).fetchone()
+    if res and res[0] == 'reproducible':
+        continue
+    res = c2.execute('SELECT status FROM stats_build WHERE name = ? AND suite = ? AND version = ? AND status = "reproducible" AND build_date < DATETIME(?, "unixepoch")', (name, suite, reproducible_version, int(reproducible_build_time) - 1)).fetchone()
+    if res:
+        continue
+    for version, status, build_time in c2.execute('SELECT version, status, strftime("%s", build_date) FROM stats_build WHERE name = ? AND suite = ? AND build_date < DATETIME(?, "unixepoch") ORDER BY build_date DESC', (name, suite, int(reproducible_build_time) - 1)):
+        if status in ('reproducible', 'FTBFS'):
+            if name in now_reproducible and 'toolchain' in now_reproducible[name]:
+                del now_reproducible[name]
+                continue
+        elif status == 'unreproducible':
+            if name in now_reproducible:
+                continue
+            if version == reproducible_version:
+                now_reproducible[name] = 'likely due to toolchain fixes'
+            else:
+                if name.startswith('lib'):
+                    prefix = name[0:4]
+                else:
+                    prefix = name[0]
+                changelog_url = 'https://tracker.debian.org/media/packages/%s/%s/changelog-%s' % (prefix, name, reproducible_version)
+                now_reproducible[name] = 'since %s over %s <%s>' % (reproducible_version, version, changelog_url)
+        else:
+            print('UNKNOWN STATUS %s' % status)
+
+for name in sorted(now_reproducible.keys()):
+    print("[%s](https://tracker.debian.org/%s) is reproducible %s" % (name, name, now_reproducible[name]))
diff --git a/reports/bin/review-bugs b/reports/bin/review-bugs
new file mode 100755
index 0000000..3f7f71a
--- /dev/null
+++ b/reports/bin/review-bugs
@@ -0,0 +1,14 @@
+#!/bin/sh
+# review-bugs: look at bugs modified in the past week
+#
+# Copyright © 2015 Lunar <lunar at debian.org>
+# Licensed under WTFPL — http://www.wtfpl.net/txt/copying/
+
+BUGS=$(echo "SELECT DISTINCT bugs.id FROM bugs_usertags, bugs WHERE email = 'reproducible-builds at lists.alioth.debian.org' AND bugs.id = bugs_usertags.id AND bugs.last_modified > NOW() - INTERVAL '7 DAY' ORDER BY bugs.id;" | ssh alioth.debian.org psql service=udd -t)
+
+for bug in $BUGS; do
+	bts cache --cache-mode=mbox "$bug"
+done
+for bug in $BUGS; do
+	bts -o show --mbox "$bug"
+done
diff --git a/reports/bin/review-stats b/reports/bin/review-stats
new file mode 100755
index 0000000..1c34d10
--- /dev/null
+++ b/reports/bin/review-stats
@@ -0,0 +1,22 @@
+#!/usr/bin/env python3
+# review-stats: compute stats about reviews between two packages.yml files
+#
+# Copyright © 2015 Lunar <lunar at debian.org>
+# Licensed under WTFPL — http://www.wtfpl.net/txt/copying/
+
+import sys
+import yaml
+
+old = yaml.safe_load(open(sys.argv[1]))
+new = yaml.safe_load(open(sys.argv[2]))
+
+removed = set(old.keys()) - set(new.keys())
+print("Removed: %s" % len(removed))
+added = set(new.keys()) - set(old.keys())
+print("Added: %s" % len(added))
+
+updated = 0
+for name in set(old.keys()).intersection(new.keys()):
+    if old[name] != new[name]:
+        updated += 1
+print("Updated: %d" % updated)
diff --git a/reports/template.mdwn b/reports/template.mdwn
new file mode 100644
index 0000000..92a7f25
--- /dev/null
+++ b/reports/template.mdwn
@@ -0,0 +1,41 @@
+[[!meta title="Reproducible builds: week XXX in Stretch cycle"]]
+[[!tag reproducible_builds]]
+
+What happened about the [reproducible
+builds](https://wiki.debian.org/ReproducibleBuilds) effort for this week:
+
+Media coverage
+--------------
+
+Toolchain fixes
+---------------
+
+ * Jane Hacker uploaded [XXX](https://tracker.debian.org/XXX)/0.42-1 which makes its output deterministic.
+
+Packages fixed
+--------------
+
+The following 549 packages became reproducible due to changes in their
+build dependencies:
+
+The following packages became reproducible after getting fixed:
+
+Some uploads fixed some reproducibility issues but not all of them:
+
+Patches submitted which did not make their way to the archive yet:
+
+reproducible.debian.net
+-----------------------
+
+debbindiff development
+----------------------
+
+Documentation update
+--------------------
+
+Package reviews
+---------------
+
+Misc.
+-----
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/misc.git



More information about the Reproducible-commits mailing list