Coral Cache and Debian packages
I just tried creating a Debian package repository that uses the Coral Content Distribution Network. If you're not familiar with it, it's an instant-temporary-mirror service that you can use by append “.nyud.net:8090″ to any URL.
Let me give a little background: My web server (asheesh.org) is on a slow cable modem uplink. Serving big files that are Debian packages to the Internet sucks from it. But if I download the files from Coral instead, they're fast:
- http://www.asheesh.org/debian/dyna_0.3.8-1_i386.deb: 45 KB/s
- http://www.asheesh.org.nyud.net:8090/debian/dyna_0.3.8-1_i386.deb: 501 KB/s
As I said, Coral is fast. So it would be great if I could hack a .htaccess to redirect access for the package files through Coral CDN but first have them hit my server so I can count package downloads. Alas, apt-get does not follow redirects:
paulproteus@hawking:/tmp/apt-0.6.35ubuntu2$ sudo apt-get source dyna
Reading package lists… Done
Building dependency tree… Done
Need to get 13.3MB of source archives.
Get:1 http://www.asheesh.org ./ dyna 0.3.8-1 (dsc) [317B]
Err http://www.asheesh.org ./ dyna 0.3.8-1 (tar)
302 Found
Get:2 http://www.asheesh.org ./ dyna 0.3.8-1 (diff) [7834B]
Fetched 8151B in 0s (74.0kB/s)
Failed to fetch http://www.asheesh.org/debian/./dyna_0.3.8.orig.tar.gz 302 Found
E: Failed to fetch some archives.
Unfortunately, the Debian apt program doesn't handle HTTP redirects at all. I have filed Bug 12378 with Ubuntu to see if they'll support it.