From 51526a44ef0ab586c6b2204aa0989a669dcf99a2 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 3 Apr 2012 14:52:42 -0500 Subject: Convert flaghelp page to HTML5 doctype Signed-off-by: Dan McGee --- templates/packages/flaghelp.html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'templates') diff --git a/templates/packages/flaghelp.html b/templates/packages/flaghelp.html index 2b5092d2..0fdf47ed 100644 --- a/templates/packages/flaghelp.html +++ b/templates/packages/flaghelp.html @@ -1,6 +1,5 @@ - - + + Flagging Packages -- cgit v1.2.3-54-g00ecf From ee2a587738f3e571f4e0e61153061ba6853475eb Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 3 Apr 2012 14:55:27 -0500 Subject: Use https:// links for all internal sites We already use HTTPS exclusively for wiki, bugs, forums, etc. and we have it available for our other sites, so link only to the https:// protocol locations when pointing users at other sites. Signed-off-by: Dan McGee --- packages/templatetags/package_extras.py | 2 +- templates/packages/flag.html | 2 +- templates/packages/flaghelp.html | 2 +- templates/public/download.html | 20 ++++++++++---------- templates/public/index.html | 8 ++++---- templates/public/svn.html | 4 ++-- 6 files changed, 19 insertions(+), 19 deletions(-) (limited to 'templates') diff --git a/packages/templatetags/package_extras.py b/packages/templatetags/package_extras.py index 975f59f1..9daecd96 100644 --- a/packages/templatetags/package_extras.py +++ b/packages/templatetags/package_extras.py @@ -93,7 +93,7 @@ def packager_link(user): def scm_link(package, operation): parts = (package.repo.svn_root, operation, package.pkgbase) linkbase = ( - "http://projects.archlinux.org/svntogit/%s.git/%s/trunk?" + "https://projects.archlinux.org/svntogit/%s.git/%s/trunk?" "h=packages/%s") return linkbase % tuple(urlquote(part) for part in parts) diff --git a/templates/packages/flag.html b/templates/packages/flag.html index 5fc9c91d..d1226295 100644 --- a/templates/packages/flag.html +++ b/templates/packages/flag.html @@ -23,7 +23,7 @@

Flag Package: {{ package.pkgname }} {{ package.full_version }} ({{ package.a

The message box portion of the flag utility is optional, and meant for short messages only. If you need more than 200 characters for your message, then file a bug report, email the maintainer directly, or send - an email to the arch-general mailing list with your additional text.

diff --git a/templates/packages/flaghelp.html b/templates/packages/flaghelp.html index 0fdf47ed..819a2f01 100644 --- a/templates/packages/flaghelp.html +++ b/templates/packages/flaghelp.html @@ -24,7 +24,7 @@

Flagging Packages

The message box portion of the flag utility is optional, and meant for short messages only. If you need more than 200 characters for your message, then file a bug report, email the maintainer directly, or send - an email to the arch-general mailing list with your additional text.

diff --git a/templates/public/download.html b/templates/public/download.html index a3ff2a37..67c70be1 100644 --- a/templates/public/download.html +++ b/templates/public/download.html @@ -26,7 +26,7 @@

Release Info

@@ -35,7 +35,7 @@

Release Info

Links and Instructions:

    -
  • Readme and Instructions
  • Arch Linux Install Guide
  • @@ -68,13 +68,13 @@

    BitTorrent Download (recommended)

    Netinstall Image - Download - Download - Download Downloads and installs packages versions via FTP for absolute freshness. @@ -83,13 +83,13 @@

    BitTorrent Download (recommended)

    Core Image - Download - Download - Download Core packages are included on the media. Good for basic off-line installation. @@ -143,9 +143,9 @@

    Checksums

    File integrity checksums for the latest releases can be found below:

    diff --git a/templates/public/index.html b/templates/public/index.html index 04c4795d..de77b47f 100644 --- a/templates/public/index.html +++ b/templates/public/index.html @@ -26,7 +26,7 @@

    A simple, lightweight distribution

    Our strong community is diverse and helpful, and we pride ourselves on the range of skillsets and uses for Arch that stem from it. Please check out our forums - and mailing lists to get your feet wet. Also glance through our wiki @@ -126,11 +126,11 @@

    Documentation

    Community

      -
    • Mailing Lists
    • IRC Channels
    • -
    • Planet Arch
    • International Communities
    • @@ -163,7 +163,7 @@

      Tools

      Development

        -
      • Projects in Git
      • SVN Repositories
      • diff --git a/templates/public/svn.html b/templates/public/svn.html index aedd9a73..0d067098 100644 --- a/templates/public/svn.html +++ b/templates/public/svn.html @@ -9,9 +9,9 @@

        SVN Repositories

        The SVN repositories have been cloned into git repositories and can be viewed via the cgit interface. - All + All packages are available here except for - community + community and multilib which are available in a different repository.

        You can also get individual PKGBUILDs directly from SVN. This can be -- cgit v1.2.3-54-g00ecf From 84f98e3e0b9ef319f501795099cc32bce1bf6a81 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 5 Apr 2012 09:48:24 -0500 Subject: Show and link key_id if signer was an unknown key Signed-off-by: Dan McGee --- templates/packages/details.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'templates') diff --git a/templates/packages/details.html b/templates/packages/details.html index a066969c..5c08bf11 100644 --- a/templates/packages/details.html +++ b/templates/packages/details.html @@ -151,7 +151,7 @@

        Versions Elsewhere

        {{ pkg.build_date|date:"DATETIME_FORMAT" }} UTC {% if pkg.signature %} Signed By: - {% with pkg.signer as signer %}{% if signer %}{% pgp_key_link pkg.signature.key_id signer.get_full_name %}{% else %}Unknown{% endif %}{% endwith %} + {% with pkg.signer as signer %}{% if signer %}{% pgp_key_link pkg.signature.key_id signer.get_full_name %}{% else %}Unknown ({% pgp_key_link pkg.signature.key_id %}){% endif %}{% endwith %} Signature Date: {{ pkg.signature.datetime|date:"DATETIME_FORMAT" }} UTC -- cgit v1.2.3-54-g00ecf From 1a2f117037fd8b01ec1e1e3cce5186d7bfac1a78 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 23 Mar 2012 17:33:55 -0500 Subject: Add a mismatched signatures developer report This finds odd signatures in our repositories, which includes signature times not matching with build dates, different signer and packager, etc. We enhance our user lookup helper class to look up users by PGP key. Signed-off-by: Dan McGee --- devel/utils.py | 17 +++++++++++++++++ devel/views.py | 23 +++++++++++++++++++++-- templates/devel/index.html | 9 ++++++--- 3 files changed, 44 insertions(+), 5 deletions(-) (limited to 'templates') diff --git a/devel/utils.py b/devel/utils.py index ec035d13..85b4e42f 100644 --- a/devel/utils.py +++ b/devel/utils.py @@ -49,6 +49,7 @@ def __init__(self): self.cache = {} self.username_cache = {} self.email_cache = {} + self.pgp_cache = {} @staticmethod def user_email(name, email): @@ -146,9 +147,25 @@ def find_by_email(self, email): self.email_cache[email] = user return user + def find_by_pgp_key(self, pgp_key): + if not pgp_key: + return None + if pgp_key in self.pgp_cache: + return self.pgp_cache[pgp_key] + + try: + user = User.objects.get( + userprofile__pgp_key__endswith=pgp_key) + except User.DoesNotExist: + user = None + + self.pgp_cache[pgp_key] = user + return user + def clear_cache(self): self.cache = {} self.username_cache = {} self.email_cache = {} + self.pgp_cache = {} # vim: set ts=4 sw=4 et: diff --git a/devel/views.py b/devel/views.py index 3a9be757..3ede54ab 100644 --- a/devel/views.py +++ b/devel/views.py @@ -1,4 +1,4 @@ -from datetime import datetime, timedelta +from datetime import date, datetime, timedelta import operator import pytz import random @@ -28,7 +28,7 @@ from packages.models import PackageRelation from packages.utils import get_signoff_groups from todolists.utils import get_annotated_todolists -from .utils import get_annotated_maintainers +from .utils import get_annotated_maintainers, UserFinder @login_required @@ -232,6 +232,25 @@ def report(request, report_name, username=None): # The two separate calls to exclude is required to do the right thing packages = packages.exclude(pkgbase__in=owned).exclude( pkgname__in=required) + elif report_name == 'mismatched-signature': + title = 'Packages with mismatched signatures' + names = [ 'Signature Date', 'Signed By', 'Packager' ] + attrs = [ 'sig_date', 'sig_by', 'packager' ] + cutoff = timedelta(hours=24) + finder = UserFinder() + filtered = [] + packages = packages.filter(pgp_signature__isnull=False) + for package in packages: + sig_date = package.signature.datetime.replace(tzinfo=pytz.utc) + package.sig_date = sig_date.date() + key_id = package.signature.key_id + signer = finder.find_by_pgp_key(key_id) + package.sig_by = signer or key_id + if signer is None or signer.id != package.packager_id: + filtered.append(package) + elif sig_date > package.build_date + cutoff: + filtered.append(package) + packages = filtered else: raise Http404 diff --git a/templates/devel/index.html b/templates/devel/index.html index 63d18193..7c26aab7 100644 --- a/templates/devel/index.html +++ b/templates/devel/index.html @@ -147,9 +147,6 @@

        Signoff Status

        Developer Reports

          -
        • Big: - All packages with compressed size > 50 MiB - (yours only)
        • Old: Packages last built more than two years ago (yours only)
        • @@ -162,6 +159,12 @@

          Developer Reports

        • Uncompressed Info Pages: Self-explanatory (yours only)
        • +
        • Mismatched Signatures: + Packages where 1) signing key is unknown, 2) signer != packager, or 3) signature timestamp more than 24 hours after build timestamp + (yours only)
        • +
        • Big: + All packages with compressed size > 50 MiB + (yours only)
        • Bad Compression: Packages with a compression ratio of less than 10% (yours only)
        • -- cgit v1.2.3-54-g00ecf From ec7130f6ac194ce7ad53d06e3169030b16da6fed Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 7 Apr 2012 14:50:26 -0500 Subject: Allow sorting of lower table on master keys page Add some styling for sortable pretty2 tables to the CSS, and convert the header row into a single row since that is all tablesorter seems to support correctly when assigning styles. Signed-off-by: Dan McGee --- sitestatic/archweb.css | 17 +++++++++++++++++ templates/public/keys.html | 23 ++++++++++++++--------- 2 files changed, 31 insertions(+), 9 deletions(-) (limited to 'templates') diff --git a/sitestatic/archweb.css b/sitestatic/archweb.css index ac0dff52..a7fe6cac 100644 --- a/sitestatic/archweb.css +++ b/sitestatic/archweb.css @@ -258,6 +258,23 @@ table.pretty2 { border: 1px solid #bbb; } + /* additional styles for JS sorting */ + table.pretty2 th.header { + padding-right: 20px; + background-image: url(nosort.gif); + background-repeat: no-repeat; + background-position: center right; + cursor: pointer; + } + + table.pretty2 th.headerSortDown { + background-image: url(desc.gif); + } + + table.pretty2 th.headerSortUp { + background-image: url(asc.gif); + } + table.pretty2 td { padding: 0.35em; border: 1px dotted #bbb; diff --git a/templates/public/keys.html b/templates/public/keys.html index a7c91c43..05524c48 100644 --- a/templates/public/keys.html +++ b/templates/public/keys.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% load static from staticfiles %} {% load pgp %} {% block title %}Arch Linux - Master Signing Keys{% endblock %} @@ -66,17 +67,11 @@

          Master Signing Keys

          - + {% for key in keys %} - - {% endfor %} - - - - - {% for key in keys %} - + {% endfor %} @@ -94,4 +89,14 @@

          Master Signing Keys

          Developer PGP Key{{ key.owner.get_full_name }}
          {% pgp_key_link key.pgp_key %}{{ key.owner.get_full_name }}
          + {% pgp_key_link key.pgp_key %}
          +{% load cdn %}{% jquery %} + + + {% endblock %} -- cgit v1.2.3-54-g00ecf