summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-07-14 12:08:36 -0600
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-07-14 12:08:36 -0600
commitf6b335b268f5f47e5c48f84f5994f7bdcd8b7e5a (patch)
tree5f7c5ea574a88a4bc1d825e0c7ea829ddedbf9aa
parent0aa246b85159bf627873308868cf169868cba569 (diff)
parentffaa2cfb254a238ba0eb704115b95360305d1ae7 (diff)
Merge branch 'archweb' into archweb-generic2
-rw-r--r--devel/migrations/0010_auto__add_index_pgpsignature_signee__add_index_pgpsignature_signer.py119
-rw-r--r--devel/models.py10
-rw-r--r--feeds.py8
-rw-r--r--main/templatetags/pgp.py2
-rw-r--r--mirrors/management/commands/mirrorcheck.py5
-rw-r--r--mirrors/models.py1
-rw-r--r--mirrors/utils.py2
-rw-r--r--mirrors/views.py2
-rw-r--r--public/views.py2
-rw-r--r--requirements_prod.txt4
-rw-r--r--sitemaps.py3
-rw-r--r--templates/feeds/news_title.html1
-rw-r--r--templates/feeds/packages_description.html1
-rw-r--r--templates/mirrors/mirror_details.html4
-rw-r--r--templates/public/index.html2
15 files changed, 149 insertions, 17 deletions
diff --git a/devel/migrations/0010_auto__add_index_pgpsignature_signee__add_index_pgpsignature_signer.py b/devel/migrations/0010_auto__add_index_pgpsignature_signee__add_index_pgpsignature_signer.py
new file mode 100644
index 00000000..55f8c800
--- /dev/null
+++ b/devel/migrations/0010_auto__add_index_pgpsignature_signee__add_index_pgpsignature_signer.py
@@ -0,0 +1,119 @@
+# -*- coding: utf-8 -*-
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ db.create_index(u'devel_pgpsignature', ['signee'])
+ db.create_index(u'devel_pgpsignature', ['signer'])
+
+ def backwards(self, orm):
+ db.delete_index(u'devel_pgpsignature', ['signer'])
+ db.delete_index(u'devel_pgpsignature', ['signee'])
+
+
+ models = {
+ u'auth.group': {
+ 'Meta': {'object_name': 'Group'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ u'auth.permission': {
+ 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ u'auth.user': {
+ 'Meta': {'object_name': 'User'},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+ },
+ u'contenttypes.contenttype': {
+ 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ u'devel.developerkey': {
+ 'Meta': {'object_name': 'DeveloperKey'},
+ 'created': ('django.db.models.fields.DateTimeField', [], {}),
+ 'expires': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'key': ('devel.fields.PGPKeyField', [], {'unique': 'True', 'max_length': '40'}),
+ 'owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'all_keys'", 'null': 'True', 'to': u"orm['auth.User']"}),
+ 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['devel.DeveloperKey']", 'null': 'True', 'on_delete': 'models.SET_NULL'}),
+ 'revoked': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'})
+ },
+ u'devel.masterkey': {
+ 'Meta': {'ordering': "('created',)", 'object_name': 'MasterKey'},
+ 'created': ('django.db.models.fields.DateField', [], {}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'masterkey_owner'", 'to': u"orm['auth.User']"}),
+ 'pgp_key': ('devel.fields.PGPKeyField', [], {'max_length': '40'}),
+ 'revoked': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
+ 'revoker': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'masterkey_revoker'", 'to': u"orm['auth.User']"})
+ },
+ u'devel.pgpsignature': {
+ 'Meta': {'ordering': "('signer', 'signee')", 'object_name': 'PGPSignature'},
+ 'created': ('django.db.models.fields.DateField', [], {}),
+ 'expires': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'signee': ('devel.fields.PGPKeyField', [], {'max_length': '40', 'db_index': 'True'}),
+ 'signer': ('devel.fields.PGPKeyField', [], {'max_length': '40', 'db_index': 'True'}),
+ 'valid': ('django.db.models.fields.BooleanField', [], {'default': 'True'})
+ },
+ u'devel.userprofile': {
+ 'Meta': {'object_name': 'UserProfile', 'db_table': "'user_profiles'"},
+ 'alias': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'allowed_repos': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['main.Repo']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}),
+ 'favorite_distros': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'interests': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
+ 'languages': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
+ 'last_modified': ('django.db.models.fields.DateTimeField', [], {}),
+ 'latin_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
+ 'location': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
+ 'notify': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'occupation': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
+ 'other_contact': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'pgp_key': ('devel.fields.PGPKeyField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
+ 'picture': ('django.db.models.fields.files.FileField', [], {'default': "'devs/silhouette.png'", 'max_length': '100'}),
+ 'public_email': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'roles': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
+ 'time_zone': ('django.db.models.fields.CharField', [], {'default': "'UTC'", 'max_length': '100'}),
+ 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'userprofile'", 'unique': 'True', 'to': u"orm['auth.User']"}),
+ 'website': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
+ 'yob': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
+ },
+ u'main.repo': {
+ 'Meta': {'ordering': "('name',)", 'object_name': 'Repo', 'db_table': "'repos'"},
+ 'bugs_category': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}),
+ 'bugs_project': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
+ 'staging': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'svn_root': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'testing': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
+ }
+ }
+
+ complete_apps = ['devel']
diff --git a/devel/models.py b/devel/models.py
index 4354e0f2..bf979338 100644
--- a/devel/models.py
+++ b/devel/models.py
@@ -88,9 +88,9 @@ class MasterKey(models.Model):
class DeveloperKey(models.Model):
owner = models.ForeignKey(User, related_name='all_keys', null=True,
- help_text="The developer this key belongs to")
+ help_text="The developer this key belongs to")
key = PGPKeyField(max_length=40, verbose_name="PGP key fingerprint",
- unique=True)
+ unique=True)
created = models.DateTimeField()
expires = models.DateTimeField(null=True, blank=True)
revoked = models.DateTimeField(null=True, blank=True)
@@ -101,8 +101,10 @@ class DeveloperKey(models.Model):
class PGPSignature(models.Model):
- signer = PGPKeyField(max_length=40, verbose_name="Signer key fingerprint")
- signee = PGPKeyField(max_length=40, verbose_name="Signee key fingerprint")
+ signer = PGPKeyField(max_length=40, verbose_name="Signer key fingerprint",
+ db_index=True)
+ signee = PGPKeyField(max_length=40, verbose_name="Signee key fingerprint",
+ db_index=True)
created = models.DateField()
expires = models.DateField(null=True, blank=True)
valid = models.BooleanField(default=True)
diff --git a/feeds.py b/feeds.py
index e96c2ca4..8a9c59d1 100644
--- a/feeds.py
+++ b/feeds.py
@@ -50,7 +50,6 @@ class PackageFeed(Feed):
link = '/packages/'
title_template = 'feeds/packages_title.html'
- description_template = 'feeds/packages_description.html'
def __call__(self, request, *args, **kwargs):
wrapper = condition(etag_func=package_etag, last_modified_func=package_last_modified)
@@ -113,6 +112,9 @@ class PackageFeed(Feed):
def item_pubdate(self, item):
return item.last_update
+ def item_description(self, item):
+ return item.pkgdesc
+
def item_categories(self, item):
return (item.repo.name, item.arch.name)
@@ -134,7 +136,6 @@ class NewsFeed(Feed):
link = '/news/'
description = 'The latest and greatest news from the '+settings.BRANDING_DISTRONAME+' distribution.'
subtitle = description
- title_template = 'feeds/news_title.html'
description_template = 'feeds/news_description.html'
def __call__(self, request, *args, **kwargs):
@@ -156,6 +157,9 @@ class NewsFeed(Feed):
def item_author_name(self, item):
return item.author.get_full_name()
+ def item_title(self, item):
+ return item.title
+
class ReleaseFeed(Feed):
feed_type = GuidNotPermalinkFeed
diff --git a/main/templatetags/pgp.py b/main/templatetags/pgp.py
index afad9df2..e93e5bca 100644
--- a/main/templatetags/pgp.py
+++ b/main/templatetags/pgp.py
@@ -15,7 +15,7 @@ def format_key(key_id):
# normal display format is 5 groups of 4 hex chars seperated by spaces,
# double space, then 5 more groups of 4 hex chars
split = tuple(key_id[i:i+4] for i in range(0, 40, 4))
- return u'%s&nbsp; %s' % (' '.join(split[0:5]), ' '.join(split[5:10]))
+ return u'%s\u00a0 %s' % (' '.join(split[0:5]), ' '.join(split[5:10]))
return u'0x%s' % key_id
@register.simple_tag
diff --git a/mirrors/management/commands/mirrorcheck.py b/mirrors/management/commands/mirrorcheck.py
index 6faf294a..3f026c36 100644
--- a/mirrors/management/commands/mirrorcheck.py
+++ b/mirrors/management/commands/mirrorcheck.py
@@ -179,10 +179,11 @@ def check_rsync_url(mirror_url, location, timeout):
rsync_cmd.append(lastsync_path)
try:
with open(os.devnull, 'w') as devnull:
- logger.debug("rsync cmd: %s", ' '.join(rsync_cmd))
+ if logger.isEnabledFor(logging.DEBUG):
+ logger.debug("rsync cmd: %s", ' '.join(rsync_cmd))
+ start = time.time()
proc = subprocess.Popen(rsync_cmd, stdout=devnull,
stderr=subprocess.PIPE)
- start = time.time()
_, errdata = proc.communicate()
end = time.time()
log.duration = end - start
diff --git a/mirrors/models.py b/mirrors/models.py
index 975ead39..da3d8c0d 100644
--- a/mirrors/models.py
+++ b/mirrors/models.py
@@ -116,6 +116,7 @@ class MirrorRsync(models.Model):
class Meta:
verbose_name = 'mirror rsync IP'
+ ordering = ('ip',)
class CheckLocation(models.Model):
diff --git a/mirrors/utils.py b/mirrors/utils.py
index e98b5c9f..bba8e36b 100644
--- a/mirrors/utils.py
+++ b/mirrors/utils.py
@@ -21,7 +21,7 @@ def dictfetchall(cursor):
for row in cursor.fetchall()
]
-
+@cache_function(178)
def status_data(cutoff_time, mirror_id=None):
if mirror_id is not None:
params = [cutoff_time, mirror_id]
diff --git a/mirrors/views.py b/mirrors/views.py
index 6f4ad838..ec056696 100644
--- a/mirrors/views.py
+++ b/mirrors/views.py
@@ -161,7 +161,7 @@ def mirror_details(request, name):
status_info = get_mirror_statuses(mirror_id=mirror.id)
checked_urls = {url for url in status_info['urls'] \
if url.mirror_id == mirror.id}
- all_urls = set(mirror.urls.select_related('protocol'))
+ all_urls = set(mirror.urls.filter(active=True).select_related('protocol'))
# Add dummy data for URLs that we haven't checked recently
other_urls = all_urls.difference(checked_urls)
for url in other_urls:
diff --git a/public/views.py b/public/views.py
index 71098c95..7a1e2788 100644
--- a/public/views.py
+++ b/public/views.py
@@ -80,7 +80,7 @@ def _mirror_urls():
'''In order to ensure this is lazily evaluated since we can't do
sorting at the database level, make it a callable.'''
urls = MirrorUrl.objects.select_related('mirror').filter(
- protocol__default=True,
+ active=True, protocol__default=True,
mirror__public=True, mirror__active=True, mirror__isos=True)
sort_by = attrgetter('country.name', 'mirror.name')
return sorted(urls, key=sort_by)
diff --git a/requirements_prod.txt b/requirements_prod.txt
index 1c331cf9..425a6576 100644
--- a/requirements_prod.txt
+++ b/requirements_prod.txt
@@ -7,7 +7,7 @@ bencode==1.0
django-countries==1.5
jsmin==2.0.3
pgpdump==1.4
-psycopg2==2.5
+psycopg2==2.5.1
pyinotify==0.9.4
-python-memcached==1.51
+python-memcached==1.53
pytz>=2013b
diff --git a/sitemaps.py b/sitemaps.py
index d206a1b6..42b08922 100644
--- a/sitemaps.py
+++ b/sitemaps.py
@@ -136,7 +136,8 @@ class BaseSitemap(Sitemap):
'mirror-status',
'mirrorlist',
'packages-differences',
- 'releng-test-overview',
+ ('releng-test-overview', 0.3, 'monthly'),
+ 'releng-release-list',
'visualize-index',
)
diff --git a/templates/feeds/news_title.html b/templates/feeds/news_title.html
deleted file mode 100644
index 7899fce3..00000000
--- a/templates/feeds/news_title.html
+++ /dev/null
@@ -1 +0,0 @@
-{{ obj.title }} \ No newline at end of file
diff --git a/templates/feeds/packages_description.html b/templates/feeds/packages_description.html
deleted file mode 100644
index cfc42616..00000000
--- a/templates/feeds/packages_description.html
+++ /dev/null
@@ -1 +0,0 @@
-{{ obj.pkgdesc }} \ No newline at end of file
diff --git a/templates/mirrors/mirror_details.html b/templates/mirrors/mirror_details.html
index f2202e38..a06b81c1 100644
--- a/templates/mirrors/mirror_details.html
+++ b/templates/mirrors/mirror_details.html
@@ -49,6 +49,10 @@
<td>{% if mirror.admin_email %}<a href="mailto:{{ mirror.admin_email }}">{{ mirror.admin_email }}</a>{% else %}None{% endif %}</td>
</tr>
<tr>
+ <th>Alternate Email:</th>
+ <td>{% if mirror.alternate_email %}<a href="mailto:{{ mirror.alternate_email }}">{{ mirror.alternate_email }}</a>{% else %}None{% endif %}</td>
+ </tr>
+ <tr>
<th>Notes:</th>
<td>{{ mirror.notes|linebreaks }}</td>
</tr>
diff --git a/templates/public/index.html b/templates/public/index.html
index 8a7913cd..566308b8 100644
--- a/templates/public/index.html
+++ b/templates/public/index.html
@@ -171,6 +171,8 @@
title="View the available package groups">Package Groups</a></li>
<li><a href="/todo/"
title="Developer Todo Lists">Todo Lists</a></li>
+ <li><a href="{% url 'releng-release-list' %}"
+ title="Release Engineering ISO listing">ISO Release List</a></li>
<li><a href="{% url 'visualize-index' %}"
title="View visualizations">Visualizations</a></li>
</ul>