Commit Graph

290 Commits

Author SHA1 Message Date
Dan McGee
3f0c024754 PGP key handling updates
* Import signatures for all known keys, not just active developers
* Ensure we are only showing and accounting for active developers on the
  master keys page
* Add a new table showing signatures between developers

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-31 18:37:30 -05:00
Dan McGee
0cc369e985 Update several bits and pieces for staging packages
This will prevent [staging] packages from cluttering normal user's view
on the website, but allow us to still import everything from this
repository for developer use.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-31 00:09:28 -05:00
Dan McGee
2a221fa72f Upgrade to jQuery 1.7.2 and a maintained tablesorter
This touches a wide variety of files as well as makes updates to some of
our own code to be fully compatible. We also use some of the newer
locale/accent sorting features of tablesorter to make tables with
developer names sort in a more sane fashion.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-28 17:52:52 -05:00
Dan McGee
c0bf9e2066 Remove custom utc_now() function, use django.utils.timezone.now()
This was around from the time when we handled timezones sanely and
Django did not; now that we are on 1.4 we no longer need our own code to
handle this.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-24 19:57:20 -05:00
Dan McGee
8383a07160 Add a new jquery_tablesorter CDN template tag
And use it everywhere we were including the file before. This should
make updating the version a heck of a lot easier.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-08 23:33:44 -05:00
Dan McGee
26a00cadce Don't log package updates in Python when we have DB trigger support
This adds a helper method to find the database engine in use, and then
skips code we shouldn't execute if we are doing this another way.

Note that this helper method could be useful for backend-specific code
paths elsewhere, such as custom SQL being called or lack of StdDev() in
sqlite3 out of the box.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-08 21:08:04 -05:00
Dan McGee
d685d51e8c Ensure we use last_modified date from News in headers
We were actually using the postdate attribute rather than last_modified,
which means any News objects that get edited would not trigger an update
of the feed.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-20 13:21:59 -05:00
Dan McGee
e1f9a3c44a Drop old PackageDepend model
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-18 21:36:11 -05:00
Dan McGee
72a92102df Switch to usage of new Depend object
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-18 21:36:11 -05:00
Dan McGee
f6c2bc6c33 Simplify get_best_satisfier and get_providers
We always passed values in that came off the containing package object;
we can access these directly in the methods themselves.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-18 19:58:27 -05:00
Dan McGee
badc535aeb Ensure order_by default value is cleared when using distinct()
Otherwise the queryset returns nonsensical results. I find the design of
this less than obvious but so be it; we can ensure the results work
regardless of a default ordering on the model.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-02 09:37:46 -05:00
Dan McGee
e35ad5dd8e Convert old index addition migration to new format
This moves it to the new class-based extending SchemaMigration format,
in hopes that it will play nicer when starting and migrating from
scratch.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-26 11:55:18 -05:00
Dan McGee
206000df73 Add an index on packages last update column
Not sure why we don't have this already, given both the home page, the
packages page when ordered by last update, and the generated feeds would
see immediate benefit from it.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-21 17:02:44 -05:00
Dan McGee
c3a5f8a4e8 Fix ContentType related migrations
This should fix the issues reported in FS#23228 for the most part.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-20 11:15:03 -05:00
Dan McGee
d21d8be018 UserProfile model and fields shuffle
Move this model into the devel/ application, and move the PGPKeyField
which is used only by these models into the application as well. This
involves updating some old migrations along the way to ensure we don't
reference a field class that no longer exists.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-20 11:15:03 -05:00
Dan McGee
31f9d3fc0f Add migrations for on_delete attributes
I don't think these end up doing anything at the database level, but
since South insists on generating alter_column() calls for these
changes, do them once so they don't keep reappearing in auto-generated
future migrations.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-08 14:08:45 -05:00
Dan McGee
b1a9818dde Include category when linking to bug reports
Also change the default category to something legit.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-03 14:44:16 -05:00
Dan McGee
ef88f3d5ef Add developer status table to master keys page
This shows the cross-product of each master key with each developer key
so you can see who has been signed, where signatures are missing, etc.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-29 11:37:07 -05:00
Dan McGee
611e30172a Rename 'packagedepend_set' attribute to 'depends'
We do this for every other related package attribute, so do it here too.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-26 12:33:28 -05:00
Dan McGee
48aec15343 Revert "Add some dev dashboard info regarding signed package count"
This reverts commit 797185faed. Now that
all packages in the Arch repos are signed, this column isn't very useful
as it just reflects the total package count.

Conflicts:

	packages/views.py -> packages/views/search.py

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-24 17:10:22 -05:00
Dan McGee
5888bdf0db Use staticfiles_storage in jQuery tag
To get the local URL to the jQuery JS file.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-24 13:12:02 -05:00
Dan McGee
024fd1b284 Remove cdnprefix template tag
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-24 12:32:38 -05:00
Dan McGee
90e08b4863 Make all datetime objects fully timezone aware
This is most of the transition to Django 1.4 `USE_TZ = True`. We need to
ensure we don't mix aware and non-aware datetime objects when dealing
with datetimes in the code. Add a utc_now() helper method that we can
use most places, and ensure there is always a timezone attached when
necessary.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-23 19:54:40 -05:00
Dan McGee
bc1ba4e95a PEP8 cleanup with blank lines
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-23 19:54:40 -05:00
Dan McGee
6218ccc570 Use python hashlib directly
Django hashcompat is now deprecated.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-23 19:54:40 -05:00
Dan McGee
7edc58c89c Show signature data on package details page
Now that we have a way to decode and process the signature data, we can
match the key_id to a known developer if possible and show this data on
the package page.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-08 11:36:18 -06:00
Dan McGee
314608aee3 Allow more flexibility in pgp_key_link
Allow key_id to be a large integer value that gets converted to hex, and
allow overriding of the default link text.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-08 00:37:07 -06:00
Dan McGee
0ad6a96019 Tabs to spaces conversion
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-07 23:46:21 -06:00
Dan McGee
b2cfd30094 Show the latest flag request on package details if out of date
This only shows up for logged in users, but might be helpful for
developers browsing around the site, especially if they did not receive
the email themselves, or in the case of orphan packages.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-02-07 00:47:21 -06:00
Dan McGee
6b16b9487a Adjust page and content caching lengths and decorators
Remove never_cache from many places now that we don't actually need it
since we aren't caching by default. Adjust our cache_function decorator
times be shorter values, and also randomize them a bit to make cache
invalidations not all line up.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-05 13:03:00 -06:00
Dan McGee
5a91a246a8 Remove all cache middleware
It's time to stop serving up stale pages. Remove this middleware caching
and start pushing it down to spots where we can actually control it more
appropriately (and only cache things that are expensive anyway).

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-03 14:22:01 -06:00
Dan McGee
a60801bb7d PyLint suggested cleanups
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-11 19:52:27 -06:00
Dan McGee
3e094a548f Add a new FlagRequest model
This will be used to store all of the submitted data we get via flag out
of date forms on the website.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-08 15:02:11 -06:00
Dan McGee
c2e84a787a Various small admin touchups
* Don't capitalize things in verbose_name, Django does this
  automatically and uses title case
* Add overrides for IP, URL, ISO, etc.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-07 13:11:52 -06:00
Dan McGee
943ef2e8e4 Convert to and enable staticfiles contrib application
This moves our site static files into the sitestatic directory if they
are shared resources, and also moves a handful of things (such as the
artwork logos) into application-specific static/ directories. This
allows the staticfiles contrib app to work after a few settings tweaks,
a run of collectstatic, and massaging the hardcoded '/media/' prefix out
of our templates.

Django 1.4 is going to make this a lot easier to move things to a CDN
and provides better template tags; for now this is setting the stage
before we can move to that.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-05 23:06:10 -06:00
Dan McGee
20e9a83e05 Update groups fixture
Fix up permissions surrounding signoff objects.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-05 16:48:53 -06:00
Dan McGee
6b8ef446bc Add master key overview page
And a bunch of text that may suck, but is better than nothing.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-30 13:55:36 -06:00
Dan McGee
0afedf606f Move main fields to separate module
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-30 13:24:41 -06:00
Dan McGee
85657db05d Better support for non-latin full names
Add a 'latin_name' field to the user profile so we can better support
those developers with names in non-Latin scripts, and yet still show a
Latin name as necessary on the developer profile page. This field only
shows up if populated.

Also, use consistent sorting everywhere- rather than using username,
always use first_name and last_name fields.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-21 10:08:23 -06:00
Dan McGee
3a0e55a1de Change package description to a text field
No need to have length restrictions on this. Although long descriptions
are frowned upon, we shouldn't truncate them if someone really wants
one.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-17 12:50:14 -06:00
Dan McGee
a9819e3d71 Ensure reporead is protected against simultaneous runs
This adds a bunch of transaction magic and SELECT FOR UPDATE stuff to
reporead to cope with the now-concurrent runs of reporead we get when
invoked from our inotify-based updater. The collision occurs with 'any'
architecture packages as both repo databases contain the new version,
and the updates occur at exactly the same time.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-17 12:49:10 -06:00
Dan McGee
5b63c29fe1 Show full names on developer user list pages
The old display format doesn't really make sense. Also fix the invalid
HTML generated by the PGP tag link- we need to escape using &amp; inside
the generated URLs.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-15 14:04:39 -06:00
Dan McGee
886630dd4e Always use same URL for both secure and non-secure CDN requests
Use a scheme-relative URL rather than serving different content to
users based on HTTP or HTTPS. Should prevent mismatched certificate
errors.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-08 13:55:38 -06:00
Dan McGee
0db2830b8f Make maintainer lookup on todo lists fast
This is rather sick to look at. Sorry, Django gives me no other choice.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-03 23:30:16 -05:00
Dan McGee
19c2841f20 Add new attach_maintainers() utility method
This allows us to alleviate the N+1 query problem when we want
maintainer data for a queryset of packages. We use it on signoffs here;
we should also be able to apply this to the todolist section where this
problem has existed for some time.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-03 23:04:16 -05:00
Dan McGee
e3e3e49876 Add URL to todolist email
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-03 17:33:40 -05:00
Dan McGee
ac2278423a Many signoff page improvements
Add a new 'SignoffSpecification' model which will capture metadata
regarding a specific package if it differs from the norm- e.g. more or
less than 2 required signoffs, is known to be bad, a comment from the
maintainer, etc. The groundwork is laid here; much of this will still
need to be wired up in the future.

Enhance the view with a lot more JS prettiness and add revoking of
signoffs. The signoff page can be filtered and the links and all the fun
stuff are totally dynamic now.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-03 17:19:26 -05:00
Dan McGee
bc0e9d3e85 Add created column to Donor model
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-01 16:56:40 -05:00
Dan McGee
2d5777b11d Add a generate_keyring command
This grabs all the PGP keys from the developer profiles and adds them to
the keyrings. Obviously we may want to do more in the future such as
filter by groups, active status, etc. but this is just a first
iteration.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-10-21 18:49:00 -05:00
Dan McGee
002574cce1 Accept 40 hex char PGP key signatures only
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-10-21 18:18:49 -05:00