[buildinfo.debian.net] 03/03: Show reproducible status of package.
Chris Lamb
chris at chris-lamb.co.uk
Sun Mar 5 13:25:44 UTC 2017
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository buildinfo.debian.net.
commit e64e321c298e1dfb4a7cd87055d5d95dc4656b5a
Author: Chris Lamb <lamby at debian.org>
Date: Sun Mar 5 13:13:23 2017 +0000
Show reproducible status of package.
Signed-off-by: Chris Lamb <lamby at debian.org>
---
bidb/packages/views.py | 31 ++++++++++++++++++++++++++-----
templates/packages/source_version.html | 19 ++++++++++++++++++-
2 files changed, 44 insertions(+), 6 deletions(-)
diff --git a/bidb/packages/views.py b/bidb/packages/views.py
index 27f865c..7bb3514 100644
--- a/bidb/packages/views.py
+++ b/bidb/packages/views.py
@@ -43,20 +43,41 @@ def source_version(request, name, version):
if not source.buildinfos.filter(version=version).exists():
raise Http404()
+ qs = source.buildinfos.filter(
+ version=version,
+ ).order_by(
+ 'architecture__name',
+ ).prefetch_related(
+ 'submissions__key',
+ )
+
buildinfos_by_arch = groupby(
- source.buildinfos.filter(
- version=version,
- ).order_by(
- 'architecture__name',
- ),
+ qs,
lambda x: x.architecture.name,
lambda x: x.created,
)
+ reproducible_by_arch = {}
+ for x, ys in buildinfos_by_arch:
+ checksums = {
+ z.filename: z.checksum_sha256
+ for y in ys
+ for z in y.checksums.all()
+ }
+
+ reproducible = True
+ for y in ys:
+ for z in y.checksums.all():
+ if checksums[z.filename] != z.checksum_sha256:
+ reproducible = False
+
+ reproducible_by_arch[x] = reproducible
+
return render(request, 'packages/source_version.html', {
'source': source,
'version': version,
'buildinfos_by_arch': buildinfos_by_arch,
+ 'reproducible_by_arch': reproducible_by_arch,
})
def binary(request, name):
diff --git a/templates/packages/source_version.html b/templates/packages/source_version.html
index 84126dc..b92666e 100644
--- a/templates/packages/source_version.html
+++ b/templates/packages/source_version.html
@@ -18,11 +18,28 @@
<ul>
{% for architecture,buildinfos in buildinfos_by_arch %}
<li>
- {{ architecture }}:
+ <code>{{ architecture }}</code>
+
+ {% if reproducible_by_arch|getitem:architecture %}
+ <span class="label label-success">Reproducible</span>
+ {% else %}
+ <span class="label label-danger">Unreproducible</span>
+ {% endif %}
+
<ul>
{% for buildinfo in buildinfos %}
<li>
<a href="{{ buildinfo.get_absolute_url }}"><code>{{ buildinfo.get_filename }}.buildinfo</code></a>
+ <ul>
+ {% for submission in buildinfo.submissions.all %}
+ <li>
+ <a href="https://keyserver.ubuntu.com/pks/lookup?op=index&search=0x{{ submission.key.uid|urlencode }}"><code>0x{{ submission.key.uid }}</code></a>
+ {% if submission.key.name %}
+ <em>{{ submission.key.name }}</em>
+ {% endif %}
+ </li>
+ {% endfor %}
+ </ul>
</li>
{% endfor %}
</ul>
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/buildinfo.debian.net.git
More information about the Reproducible-commits
mailing list