summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_common.py18
-rwxr-xr-xbin/reproducible_html_notes.py7
-rwxr-xr-xbin/reproducible_html_packages.py2
3 files changed, 19 insertions, 8 deletions
diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py
index d1004944..cc0c396a 100755
--- a/bin/reproducible_common.py
+++ b/bin/reproducible_common.py
@@ -161,18 +161,24 @@ html_head_page = Template((tab*2).join("""
</ul>
</header>""".splitlines(True)))
-html_foot_page = Template((tab*2).join("""
+html_foot_page_style_note = Template((tab*2).join("""
<p style="font-size:0.9em;">
A package name displayed with a bold font is an indication that this
package has a note. Visited packages are linked in green, those which
have not been visited are linked in blue.
+""".splitlines(True)))
+html_foot_page_buildinfo_note = Template((tab*2).join(""" <br />
+ A &beta; sign after a package which is unreproducible indicates that a
+ .buildinfo file was generated. And that means the
+ <a href="https://wiki.debian.org/ReproducibleBuilds#The_basics_for_making_packages_build_reproducible">
+ basics for building packages reproducibly are covered</a>.
</p>""".splitlines(True)))
url2html = re.compile(r'((mailto\:|((ht|f)tps?)\://|file\:///){1}\S+)')
-def write_html_page(title, body, destfile, noheader=False, nofooter=False, noendpage=False):
+def write_html_page(title, body, destfile, noheader=False, style_note=False, buildinfo_note=False, noendpage=False):
now = datetime.datetime.utcnow().strftime('%Y-%m-%d %H:%M UTC')
html = ''
html += html_header.substitute(page_title=title)
@@ -185,8 +191,12 @@ def write_html_page(title, body, destfile, noheader=False, nofooter=False, noend
count_good=count_good,
percent_good=percent_good)
html += body
- if not nofooter:
- html += html_foot_page.substitute()
+ if style_note:
+ html += html_foot_page_style_note.substitute()
+ if buildinfo_note:
+ html += html_foot_page_buildinfo_note.substitute()
+ else:
+ html += (tab*2) + '</p>'
if not noendpage:
html += html_footer.substitute(date=now)
else:
diff --git a/bin/reproducible_html_notes.py b/bin/reproducible_html_notes.py
index f86a2926..ce14c260 100755
--- a/bin/reproducible_html_notes.py
+++ b/bin/reproducible_html_notes.py
@@ -267,7 +267,7 @@ def iterate_over_notes(notes):
title = 'Notes for ' + package + ' - reproducible builds result'
destfile = NOTES_PATH + '/' + package + '_note.html'
write_html_page(title=title, body=html, destfile=destfile,
- noheader=True, nofooter=True)
+ noheader=True)
desturl = REPRODUCIBLE_URL + NOTES_URI + '/' + package + '_note.html'
log.info("you can now see your notes at " + desturl)
@@ -284,7 +284,8 @@ def iterate_over_issues(issues):
title = 'Notes about issue ' + issue
destfile = ISSUES_PATH + '/' + issue + '_issue.html'
- write_html_page(title=title, body=html, destfile=destfile)
+ write_html_page(title=title, body=html, destfile=destfile,
+ style_note=True)
desturl = REPRODUCIBLE_URL + ISSUES_URI + '/' + issue + '_issue.html'
log.info("you can now see the issue at " + desturl)
@@ -302,7 +303,7 @@ def index_issues(issues):
title = 'Overview of known issues related to reproducible builds'
destfile = BASE + '/index_issues.html'
desturl = REPRODUCIBLE_URL + '/index_issues.html'
- write_html_page(title=title, body=html, destfile=destfile, nofooter=True)
+ write_html_page(title=title, body=html, destfile=destfile)
log.info('Issues index now available at ' + desturl)
if __name__ == '__main__':
diff --git a/bin/reproducible_html_packages.py b/bin/reproducible_html_packages.py
index 3ce58166..f3f89244 100755
--- a/bin/reproducible_html_packages.py
+++ b/bin/reproducible_html_packages.py
@@ -139,7 +139,7 @@ def process_packages(packages, no_clean=False):
desturl = REPRODUCIBLE_URL + RB_PKG_URI + '/' + pkg + '.html'
title = pkg + ' - reproducible build results'
write_html_page(title=title, body=html, destfile=destfile,
- noheader=True, nofooter=True, noendpage=True)
+ noheader=True, noendpage=True)
log.info("Package page generated at " + desturl)
if not no_clean:
purge_old_pages() # housekeep is always good