Archive for August, 2009

Debian Mirror and GPG issues

So I had a mirror up and running beautifully, and then after running the update scripts I lost the GPG authentication.

I was getting the following errors:
WARNING: The following packages cannot be authenticated!
foo bar baz
Install these packages without verification [y/N]?

I struggled for a while to get this to work, and then gave up, but I finally got this sorted out :)

Firstly as the user running the mirror script:
gpg --no-default-keyring --keyring ~/.gnupg/trustedkeys.gpg --keyserver hkp://subkeys.pgp.net --recv-keys

I needed to add the following keys:
16BA136C – Backports.org Archive Key
55BE302B – Debian Archive Automatic Signing Key (5.0/lenny)
F42584E6 – Lenny Stable Release Key
55BE302B – Debian Archive Automatic Signing Key (5.0/lenny)
0C5A2783 – Medibuntu Packaging Team
1F41B907 – Christian Marillat
437D05B5 – Ubuntu Archive Automatic Signing Key
6DFBCBAE – Sun Microsystems, Inc. (xVM VirtualBox archive signing key)
BBE55AB3 – Debian-Volatile Archive Automatic Signing Key (4.0/etch)

The Medibuntu key was a little strange to get as noted on this post: How To: Make Your Own Ubuntu Repository DVDs

Also removed the “–ignore-release-gpg” option from the scripts, this will at least warn me the next time something like this happens… ;)

And then run the mirror scripts again and voila

Tech Support Cheat Sheet

Tech Support Cheat Sheet
Taken from xkcd

Apache mod_rewrite tips and tricks

So I was trying to solve a weird redirect issue: Request exceeded the limit of 10 internal redirects due to probable configuration error.

I found this site, which had quite alot of info.

One tip I really liked was:

Cache-Friendly File Names

This is probably my favorite, and I use it on every site I work on. It allows me to update my javascript and css files in my visitors cache’s simply by naming them differently in the html, on the server they stay the same name. This rewrites all files for /zap/j/anything-anynumber.js to /zap/j/anything.js and /zap/c/anything-anynumber.css to /zap/c/anything.css

RewriteRule ^zap/(j|c)/([a-z]+)-([0-9]+)\.(js|css)$ /zap/$1/$2.$4 [L]