summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-08-05 23:59:03 -0600
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-08-05 23:59:03 -0600
commitd4731a373ca665d4547eb0e89cdf270d41c44243 (patch)
tree41dbfb57e5f6745ad6ac3acd5de8c4d9788c950c
parentc8d979b8a48805d162ab46cdc4e493da0aa1595c (diff)
parent803ba89841468bcf088ea79ea981a849ca159682 (diff)
Merge branch 'archweb' into archweb-generic
-rw-r--r--devel/management/commands/generate_keyring.py2
-rw-r--r--devel/management/commands/pgp_import.py2
-rw-r--r--devel/management/commands/rematch_developers.py2
-rw-r--r--devel/management/commands/reporead.py2
-rw-r--r--devel/management/commands/reporead_inotify.py2
-rw-r--r--mirrors/management/commands/mirrorcheck.py7
-rw-r--r--mirrors/management/commands/mirrorresolv.py7
-rw-r--r--packages/management/commands/populate_signoffs.py13
-rw-r--r--packages/management/commands/signoff_report.py2
-rw-r--r--packages/views/__init__.py2
-rw-r--r--public/tests.py8
-rw-r--r--public/views.py2
-rw-r--r--requirements.txt10
-rw-r--r--requirements_prod.txt14
-rw-r--r--sitemaps.py7
-rw-r--r--sitestatic/archweb.css13
-rw-r--r--templates/base.html14
-rw-r--r--templates/todolists/view.html23
-rw-r--r--todolists/models.py4
19 files changed, 89 insertions, 47 deletions
diff --git a/devel/management/commands/generate_keyring.py b/devel/management/commands/generate_keyring.py
index 34bcd2f8..9c52dadc 100644
--- a/devel/management/commands/generate_keyring.py
+++ b/devel/management/commands/generate_keyring.py
@@ -32,7 +32,7 @@ class Command(BaseCommand):
logger.level = logging.ERROR
elif v == 1:
logger.level = logging.INFO
- elif v == 2:
+ elif v >= 2:
logger.level = logging.DEBUG
if len(args) < 2:
diff --git a/devel/management/commands/pgp_import.py b/devel/management/commands/pgp_import.py
index 3f557fe9..7a124f77 100644
--- a/devel/management/commands/pgp_import.py
+++ b/devel/management/commands/pgp_import.py
@@ -38,7 +38,7 @@ class Command(BaseCommand):
logger.level = logging.ERROR
elif v == 1:
logger.level = logging.INFO
- elif v == 2:
+ elif v >= 2:
logger.level = logging.DEBUG
if len(args) < 1:
diff --git a/devel/management/commands/rematch_developers.py b/devel/management/commands/rematch_developers.py
index 7a06e084..bbb43df0 100644
--- a/devel/management/commands/rematch_developers.py
+++ b/devel/management/commands/rematch_developers.py
@@ -37,7 +37,7 @@ class Command(NoArgsCommand):
logger.level = logging.ERROR
elif v == 1:
logger.level = logging.INFO
- elif v == 2:
+ elif v >= 2:
logger.level = logging.DEBUG
finder = UserFinder()
diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py
index 1945469f..c76b5011 100644
--- a/devel/management/commands/reporead.py
+++ b/devel/management/commands/reporead.py
@@ -70,7 +70,7 @@ class Command(BaseCommand):
logger.level = logging.ERROR
elif v == 1:
logger.level = logging.INFO
- elif v == 2:
+ elif v >= 2:
logger.level = logging.DEBUG
return read_repo(arch, filename, options)
diff --git a/devel/management/commands/reporead_inotify.py b/devel/management/commands/reporead_inotify.py
index e3c720bc..1422ae26 100644
--- a/devel/management/commands/reporead_inotify.py
+++ b/devel/management/commands/reporead_inotify.py
@@ -45,7 +45,7 @@ class Command(BaseCommand):
logger.level = logging.ERROR
elif v == 1:
logger.level = logging.INFO
- elif v == 2:
+ elif v >= 2:
logger.level = logging.DEBUG
if not path_template:
diff --git a/mirrors/management/commands/mirrorcheck.py b/mirrors/management/commands/mirrorcheck.py
index 1f16a375..1a33073a 100644
--- a/mirrors/management/commands/mirrorcheck.py
+++ b/mirrors/management/commands/mirrorcheck.py
@@ -18,6 +18,7 @@ from optparse import make_option
from pytz import utc
import re
import socket
+import ssl
import subprocess
import sys
import time
@@ -57,7 +58,7 @@ class Command(NoArgsCommand):
logger.level = logging.ERROR
elif v == 1:
logger.level = logging.WARNING
- elif v == 2:
+ elif v >= 2:
logger.level = logging.DEBUG
timeout = options.get('timeout')
@@ -146,6 +147,10 @@ def check_mirror_url(mirror_url, location, timeout):
log.is_success = False
log.error = "Exception in processing HTTP request."
logger.debug("failed: %s, %s", url, log.error)
+ except ssl.CertificateError as e:
+ log.is_success = False
+ log.error = str(e)
+ logger.debug("failed: %s, %s", url, log.error)
except socket.timeout:
log.is_success = False
log.error = "Connection timed out."
diff --git a/mirrors/management/commands/mirrorresolv.py b/mirrors/management/commands/mirrorresolv.py
index 85a3c654..0e71894b 100644
--- a/mirrors/management/commands/mirrorresolv.py
+++ b/mirrors/management/commands/mirrorresolv.py
@@ -32,7 +32,7 @@ class Command(NoArgsCommand):
logger.level = logging.ERROR
elif v == 1:
logger.level = logging.WARNING
- elif v == 2:
+ elif v >= 2:
logger.level = logging.DEBUG
return resolve_mirrors()
@@ -54,6 +54,11 @@ def resolve_mirrors():
if newvals != oldvals:
logger.debug("values changed for %s", mirrorurl)
mirrorurl.save(update_fields=('has_ipv4', 'has_ipv6'))
+ except socket.gaierror, e:
+ if e.errno == socket.EAI_NONAME:
+ logger.debug("gaierror resolving %s: %s", mirrorurl.hostname, e)
+ else:
+ logger.warn("gaierror resolving %s: %s", mirrorurl.hostname, e)
except socket.error, e:
logger.warn("error resolving %s: %s", mirrorurl.hostname, e)
diff --git a/packages/management/commands/populate_signoffs.py b/packages/management/commands/populate_signoffs.py
index a9c1c81c..8a025f4e 100644
--- a/packages/management/commands/populate_signoffs.py
+++ b/packages/management/commands/populate_signoffs.py
@@ -38,7 +38,7 @@ is signoff-eligible and does not have an existing comment attached"""
logger.level = logging.ERROR
elif v == 1:
logger.level = logging.INFO
- elif v == 2:
+ elif v >= 2:
logger.level = logging.DEBUG
return add_signoff_comments()
@@ -95,9 +95,12 @@ def add_signoff_comments():
continue
logger.debug("getting SVN log for %s (%s)", group.pkgbase, group.repo)
- log = cached_svn_log(group.pkgbase, group.repo)
- logger.info("creating spec with SVN message for %s", group.pkgbase)
- spec = create_specification(group.packages[0], log, finder)
- spec.save()
+ try:
+ log = cached_svn_log(group.pkgbase, group.repo)
+ logger.info("creating spec with SVN message for %s", group.pkgbase)
+ spec = create_specification(group.packages[0], log, finder)
+ spec.save()
+ except:
+ logger.exception("error getting SVN log for %s", group.pkgbase)
# vim: set ts=4 sw=4 et:
diff --git a/packages/management/commands/signoff_report.py b/packages/management/commands/signoff_report.py
index d104288a..9724e562 100644
--- a/packages/management/commands/signoff_report.py
+++ b/packages/management/commands/signoff_report.py
@@ -45,7 +45,7 @@ class Command(BaseCommand):
logger.level = logging.ERROR
elif v == 1:
logger.level = logging.INFO
- elif v == 2:
+ elif v >= 2:
logger.level = logging.DEBUG
if len(args) != 2:
diff --git a/packages/views/__init__.py b/packages/views/__init__.py
index 6b44206a..7941a265 100644
--- a/packages/views/__init__.py
+++ b/packages/views/__init__.py
@@ -27,7 +27,7 @@ from .signoff import signoffs, signoff_package, signoff_options, signoffs_json
@require_safe
@cache_control(public=True, max_age=86400)
def opensearch(request):
- domain = "%s://%s" % (request.scheme, request.META['HTTP_HOST'])
+ domain = "%s://%s" % (request.scheme, request.META.get('HTTP_HOST'))
return render(request, 'packages/opensearch.xml',
{'domain': domain},
diff --git a/public/tests.py b/public/tests.py
index 565d57ec..aaf5f847 100644
--- a/public/tests.py
+++ b/public/tests.py
@@ -19,13 +19,13 @@ class PublicTest(TestCase):
response = self.client.get('/svn/')
self.assertEqual(response.status_code, 200)
- def test_developers(self):
+ def test_developers_old(self):
response = self.client.get('/developers/')
- self.assertEqual(response.status_code, 200)
+ self.assertEqual(response.status_code, 301)
- def test_fellows(self):
+ def test_fellows_old(self):
response = self.client.get('/fellows/')
- self.assertEqual(response.status_code, 200)
+ self.assertEqual(response.status_code, 301)
def test_donate(self):
response = self.client.get('/donate/')
diff --git a/public/views.py b/public/views.py
index 7dd0528c..910b6c2d 100644
--- a/public/views.py
+++ b/public/views.py
@@ -25,10 +25,12 @@ def index(request):
else:
def updates():
return get_recent_updates()
+ domain = "%s://%s" % (request.scheme, request.META.get('HTTP_HOST'))
context = {
'news_updates': News.objects.order_by('-postdate', '-id')[:15],
'pkg_updates': updates,
'staff_groups': StaffGroup.objects.all(),
+ 'domain': domain,
}
return render(request, 'public/index.html', context)
diff --git a/requirements.txt b/requirements.txt
index 7b8c4822..6ca63480 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,12 +1,12 @@
-e git+git://github.com/fredj/cssmin.git@master#egg=cssmin
-Django==1.7.7
-IPy==0.81
+Django==1.7.8
+IPy==0.83
Jinja2==2.7.3
-Markdown==2.6.1
+Markdown==2.6.2
MarkupSafe==0.23
bencode==1.0
django-countries==3.3
-django-jinja==1.3.2
+django-jinja==1.3.3
jsmin==2.1.1
pgpdump==1.5
-pytz>=2015.2
+pytz>=2015.4
diff --git a/requirements_prod.txt b/requirements_prod.txt
index 3396ebdb..bcb30f3e 100644
--- a/requirements_prod.txt
+++ b/requirements_prod.txt
@@ -1,15 +1,15 @@
-e git+git://github.com/fredj/cssmin.git@master#egg=cssmin
-Django==1.7.7
-IPy==0.81
+Django==1.7.8
+IPy==0.83
Jinja2==2.7.3
-Markdown==2.6.1
+Markdown==2.6.2
MarkupSafe==0.23
bencode==1.0
django-countries==3.3
-django-jinja==1.3.2
+django-jinja==1.3.3
jsmin==2.1.1
pgpdump==1.5
-psycopg2==2.6
-pyinotify==0.9.5
+psycopg2==2.6.1
+pyinotify==0.9.6
python-memcached==1.54
-pytz>=2015.2
+pytz>=2015.4
diff --git a/sitemaps.py b/sitemaps.py
index 7746ecab..03ad9254 100644
--- a/sitemaps.py
+++ b/sitemaps.py
@@ -37,17 +37,12 @@ class PackagesSitemap(Sitemap):
class PackageFilesSitemap(PackagesSitemap):
changefreq = "weekly"
priority = "0.1"
- # we fixed a bug on the package files page on this day, force modification
- lastmod_min = datetime(2015, 4, 12).replace(tzinfo=utc)
def location(self, obj):
return PackagesSitemap.location(self, obj) + 'files/'
def lastmod(self, obj):
- update = obj.files_last_update
- if update is None:
- return None
- return max(update, self.lastmod_min)
+ return obj.files_last_update
class PackageGroupsSitemap(Sitemap):
diff --git a/sitestatic/archweb.css b/sitestatic/archweb.css
index cc3b9742..2ea582fb 100644
--- a/sitestatic/archweb.css
+++ b/sitestatic/archweb.css
@@ -1047,7 +1047,18 @@ ul.admin-actions {
/* todo lists (public and private) */
.todo-info {
- margin: 0; color: #999;
+ color: #999;
+ border-bottom: 1px dotted #bbb;
+}
+
+.todo-description {
+ margin-top: 1em;
+ padding-left: 2em;
+ max-width: 900px;
+}
+
+.todo-pkgbases {
+ border-top: 1px dotted #bbb;
}
.todo-list h4 {
diff --git a/templates/base.html b/templates/base.html
index 5702c8e0..c981f02c 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -69,7 +69,7 @@
</div>
{% endblock %}
<div id="footer">
- <p>Copyright &copy; 2002-{% now "Y" %} <a href="mailto:jvinet@zeroflux.org"
+ <p>Copyright © 2002-{% now "Y" %} <a href="mailto:jvinet@zeroflux.org"
title="Contact Judd Vinet">Judd Vinet</a> and <a href="mailto:aaron@archlinux.org"
title="Contact Aaron Griffin">Aaron Griffin</a>.</p>
@@ -81,6 +81,18 @@
the exclusive licensee of Linus Torvalds, owner of the mark on a world-wide basis.</p>
</div>
</div>
+ <script type="application/ld+json">
+ {
+ "@context": "http://schema.org",
+ "@type": "WebSite",
+ "url": "{{ domain }}/",
+ "potentialAction": {
+ "@type": "SearchAction",
+ "target": "{{ domain }}/packages/?q={search_term}",
+ "query-input": "required name=search_term"
+ }
+ }
+ </script>
{% block script_block %}{% endblock %}
</body>
</html>
diff --git a/templates/todolists/view.html b/templates/todolists/view.html
index c3ee57f8..4ae25fb0 100644
--- a/templates/todolists/view.html
+++ b/templates/todolists/view.html
@@ -22,16 +22,18 @@
{% endif %}
</ul>
- <p class="todo-info">{{ list.created|date }} - {{ list.creator.get_full_name }}</p>
+ <div class="todo-info">{{ list.created|date }} - {{ list.creator.get_full_name }}</div>
- <div>{{list.description|urlize|linebreaks}}</div>
-
- <p>Link to lists of pkgbase values:</p>
- <ul>{% for svn_root in svn_roots %}
- <li><a href="pkgbases/{{ svn_root }}/">{{ svn_root }}</a></li>
- {% endfor %}</ul>
+ <div class="todo-description">
+ {{list.stripped_description|default:'(no description)'|urlize|linebreaks}}
+ </div>
- <p>{{ list.packages|length }} total todo list package{{ list.packages|pluralize }} found.</p>
+ <div class="todo-pkgbases">
+ <p>Link to lists of pkgbase values:</p>
+ <ul>{% for svn_root in svn_roots %}
+ <li><a href="pkgbases/{{ svn_root }}/">{{ svn_root }}</a></li>
+ {% endfor %}</ul>
+ </div>
<div class="box filter-criteria">
<h3>Filter Todo List Packages</h3>
@@ -54,7 +56,10 @@
<input type="checkbox" name="incomplete" id="id_incomplete" value="incomplete"/></div>
<div ><label>&nbsp;</label><input title="Reset search criteria" type="button" id="criteria_reset" value="Reset"/></div>
<div class="clear"></div>
- <div id="filter-info"><span id="filter-count">{{ list.packages|length }}</span> todo list packages displayed.</div>
+ <div id="filter-info">
+ <span id="filter-count">{{ list.packages|length }}</span> packages displayed out of
+ {{ list.packages|length }} total package{{ list.packages|pluralize }}.
+ </div>
</fieldset>
</form>
</div>
diff --git a/todolists/models.py b/todolists/models.py
index 59b14616..92ca5839 100644
--- a/todolists/models.py
+++ b/todolists/models.py
@@ -35,6 +35,10 @@ class Todolist(models.Model):
def __unicode__(self):
return self.name
+ @property
+ def stripped_description(self):
+ return self.description.strip()
+
def get_absolute_url(self):
return '/todo/%s/' % self.slug