Commit Graph

1819 Commits

Author SHA1 Message Date
Dan McGee
1457f78594 Package sitemap adjustments
Adjust changefreq and priority based on the repository the package is
in. Testing and staging have quick turnover so set the changefreq to
'daily'. Additionally, give staging packages a super low priority of 0.1
and testing a slightly lowered priority of 0.4.

We didn't include staging packages before, but since search engines are
finding them anyway, we might as well. This gives us a chance to share
how important the page is as well, which they could only guess before.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-20 18:58:35 -06:00
Dan McGee
0491bdb245 Fix some fallout with moving page to query params
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-20 00:19:12 -06:00
Dan McGee
d53a848cdb Update Django version
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-19 18:52:33 -06:00
Dan McGee
746023d529 Make page a query string parameter on package search
This is a bit silly to encode in the URL, or at least makes it much
harder to screen out via robots.txt and other such things.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-16 15:39:23 -06:00
Dan McGee
e3837b5a87 Remove configurable pagination for package search
Switch it to a hardcoded value of 100 for all searches instead. It
didn't make much sense having a page number be part of the URL and a
limit value being part of the query string.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-16 15:39:23 -06:00
Dan McGee
adc2775059 Paginator template cleanup 2013-02-16 15:39:23 -06:00
Dan McGee
d7f849afe4 Move all red/green/orange styles into single declaration
We use these all over the place and can express them in a much shorter
fashion.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-16 14:09:01 -06:00
Dan McGee
1b323ed9b2 Fix missing template variable
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-16 14:08:49 -06:00
Dan McGee
51a6669c3c Defer loading of some JS on public index page
We don't need typeahead and easter eggs working right away, so defer
them into a onload event.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-16 13:54:11 -06:00
Dan McGee
5bc8524428 Fix split packages sitemap
We had a ton of duplicate entries included due to the query implicitly
including a 'GROUP BY' clause on the default sorting by pkgname. Fix it
and cut the sitemap down to the correct size without duplicate entries.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-10 12:45:24 -06:00
Dan McGee
bec4e798cb Update Konami JS
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-09 13:19:20 -06:00
Dan McGee
ca4106a7c0 Ensure todolists are consistently sorted
This is for the public view page; we had no order_by() call so lists
could be displayed in seemingly random order.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-08 22:17:02 -06:00
Dan McGee
82947873d6 Upgrade D3 to 3.0.6
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-08 21:19:17 -06:00
Dan McGee
445c242dac Add a releases model sitemap
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-08 21:12:46 -06:00
Dan McGee
e65c780554 Remove package seach by 'Last Updated After'
It is a lot easier to just sort the list rather than mess with this
particular field, which didn't even allow you to specify a range or
direction to search in.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-08 21:09:47 -06:00
Dan McGee
8d79a1ea84 Minify static files when running collectstatic
This doesn't do any super optimizations, but does run the very basic
cssmin and jsmin Python tools over the static resources we serve up.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-08 21:03:52 -06:00
Dan McGee
f98ff8cd22 Add './' hack to generate_keyring as well
If you specify a relative path to gpg without a slash character, it
interprets as relative to ~/.gnupg, which is stupid.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-04 20:02:00 -06:00
Dan McGee
cfa2798880 Update exception to DeveloperKey.DoesNotExist
We aren't looking up users; we are looking up developer keys.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-04 17:01:58 -06:00
Dan McGee
508d06af81 Use DeveloperKey model on package page and reports
This introduces the new model to the package page so subkey signings
show up as attributed to the original developer. We also teach the
mismatched signatures report to recognize all keys and subkeys of a
given developer, cutting down on some of the bogus results.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-03 15:08:21 -06:00
Dan McGee
d63a800348 Update user_pgp_key_link template tag to use DeveloperKey model
The first of several small updates to use the new data we have
available.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-03 14:40:41 -06:00
Dan McGee
7e6279057a Add new pgp_import command; replaces import_signatures
This command now imports keys, subkeys, and signatures of those keys &
subkeys. This will allow us to actually match developers with their
packages signed by subkeys rather than the primary key.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-03 14:26:10 -06:00
Dan McGee
9da8a63dd4 Add DeveloperKey model
We're starting to see developers use subkeys of their primary key to
sign packages, which we aren't handling well in the web interface. These
subkeys show up as unknown, which isn't strictly true. Start the process
of being able to handle these keys by adding a model that will store all
known keys and subkeys and the relationships among them, as well as
which developer owns each.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-03 13:56:35 -06:00
Dan McGee
844ed81093 Move the home page script block further down the page
Put it after every bit of HTML content, including the page footer. Right
now this was the only page using this block in the main template; we
should move some other pages using a lot of JS to this format as well.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-03 13:39:08 -06:00
Dan McGee
26d6fba089 Fix spacing issues in signoffs 'Show More' links
When we had a simple multi-line message here, we would end up with too
much spacing wherever the link had planted itself due to the div adding
visual whitespace. Remove the div completely when the link is clicked to
remedy this.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-03 13:38:39 -06:00
Dan McGee
b82c7b6a3a Remove some whitespace from index template
We had a lot going on here in the news section as far as Django template
tags go, so remove some whitespace to prevent so many empty lines from
being ommitted. This doesn't remove all of it from the generated HTML,
but does cut it down significantly.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-03 13:38:39 -06:00
Dan McGee
e969da2d40 Run pngcrush and optipng over most static content
The programs have improved a bit and found some room for optimization,
especially in the static logo content. Some files were reduced in size
by 50% or more.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-03 13:38:39 -06:00
Dan McGee
014b27b392 Merge branch 'release' 2013-01-28 23:56:30 -06:00
Dan McGee
839371f3f8 Fix missing template variable for removed todolist packages
When there was no longer an attached package, running in template debug
mode showed we were trying to dereference a variable that didn't exist.
Fix the issue by adding a bit more to the if conditional block.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-28 23:00:18 -06:00
Dan McGee
6cf98552f1 Slight reorginization in the download page template
Move things up that don't belong to the torrent section; make magnet
link more prominent by using a bulleted list.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-28 14:48:37 -07:00
Dan McGee
a471316a58 Use torrent view and checksums where appropriate
We no longer need to link externally to these items since we have all
the data available in the web application now.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-28 14:27:44 -07:00
Dan McGee
bc539b6ed1 Extract torrent trackers into a settings variable
This allows them to be overridden and changed in a central location,
like we do with the SVN URL, PXE boot URL, etc.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-28 14:13:53 -07:00
Dan McGee
7d4a8b9adf Add MD5 and SHA1 fields for releases
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-28 14:06:41 -07:00
Dan McGee
1a55c0f0bc Don't error on empty torrent data
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-28 13:50:33 -07:00
Dan McGee
44dde6f02f Fix todolist maintainer sorting
And also fix up a place where we dereferenced a variable in a template
that doesn't exist.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-27 09:44:38 -06:00
Dan McGee
4244ff7a42 Merge branch 'on-the-plane' 2013-01-25 09:54:24 -07:00
Dan McGee
dc6cc49f6f Use more modern verison of string template formatting
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-23 09:20:19 -07:00
Dan McGee
a10798b756 Use querysets for calls to get_object_or_404(Package)
This works better in most cases since we need the architecture and
repository objects at some point during the view process.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-23 09:18:59 -07:00
Dan McGee
be49f26a81 Slight optimization when searching for removed package
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-22 20:58:50 -07:00
Dan McGee
69fd83df03 Spice up the release listing page a bit
Add JS tablesorter code and add some style to the yesno column.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-22 20:21:40 -07:00
Dan McGee
85dc9d6df9 Override the default admin queryset for some models
Because some attributes are optional or otherwise not auto-magically
picked up by Django, we can help the performance of loading these pages
a lot by forcing a select_related() on the queryset used by the admin.
For something like signoff_specifications, this drops the query count
from ~107 to 9 queries.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-22 17:20:41 -07:00
Dan McGee
2c958511c4 Use a subquery rather than two queries in attach_maintainers
Now that we are using a database that doesn't stink, it makes more sense
to do all of the stuff we need to do down at the database level. This
helps a lot when 500+ packages are in play at a given time, such as
some of our larger rebuild todo lists.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-22 16:48:49 -06:00
Dan McGee
e9e1c07165 Show staging version on todolist view page
If one exists, it is easy enough to show it here so in-progress
todolists can easily be cross-checked with the current state of the
repository.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-22 16:47:43 -06:00
Dan McGee
f9252df113 Switch to using the cached STATICFILES_STORAGE backend
This should finally let us crank up the Expires: header to far-future
values in production since updates to JS and CSS files will take effect
immediately.

Some minor removals were made from retro stylesheets as they were
referencing files that don't actually exist because they were missing
from the web archive.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-21 15:14:44 -06:00
Dan McGee
a15d0850af Slight reorganization of urls.py
Move some of the not-so-frequently used resources further down in the
list of URLs, which will ever so slightly speed up the resolver.
Sitemaps don't need to be checked near as often, for instance.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-21 11:08:35 -06:00
Dan McGee
53484c45ea Fix error in get_requiredby() when checking provides
The query refactor in commit 1b1b516bd removed a queryset I didn't
realize was getting used elsewhere in the function.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-20 15:28:17 -06:00
Dan McGee
45108ea497 Remove AlwaysCommitMiddleware
Let's just go with the Django database option for PostreSQL autocommit
mode instead.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-20 15:09:18 -06:00
Dan McGee
1b1b516bd8 Query performance enhancements in get_requiredby()
For packages with particularly long lists of provides (e.g. perl), the
query was getting a bit out of control with the list of names passed in.
However, changing it to simply do a subquery resulted in some really
poor planning by PostgreSQL. Doing this as a custom 'WHERE' clause
utilizing the 'UNION ALL' SQL operator works very well.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-20 15:01:13 -06:00
Dan McGee
dd8e94f697 Lengthen the mirror rsync IP address field
Make it long enough to support a full-form IPv6 address with a subnet.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-20 15:01:13 -06:00
Dan McGee
b642c93aff Add a view to download the torrent available for a given release
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-19 17:40:26 -06:00
Dan McGee
4d52242f4b Mark release version string as unique
It should be unique anyway, but it is especially important now that we
are using it in URL patterns for lookup.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-19 17:19:27 -06:00