Hello Martin,
Am 2004-10-20 02:11:44, schrieb martin f krafft:
> Here's an idea I just had about apt-proxy/apt-cacher NG. Maybe this
> could be interesting, maybe it's just crap. Your call.
:-)
> Based on a normal mirror layout, the idea is to use apache's 404
> hook for packages. When an existing package is requested, it is
> served regularly. If the file is not found, a 404 is triggered,
> which can be served by a CGI-like thingie that goes to retrieve the
> package, returns 200 instead of 404 and streams the package as the
> 404 error document contents while writing it to the filesystem
> (tee(1) style).
Realy cool, I was thinking the same but for 2 years or something
like this.
Because in Apache you can manipulate Error-Messages, it is possibel.
The problem is only the TimeOut of 'apt-get' if the requested Server
is not fast enough.
I hve done this already in a php-Script, but unfortunatly my
apt-404-proxy-cgi does download the File and then forward it
to apt-get.
I was not able to stream it while downloading.
> For Release, Package, Sources, and Contents files, we need
> a RewriteRule. When one of these is is accessed, a call to a mirror
> should be made to check for updates. If there is one, download it
> and stream it.
Hmmm for those files I have a cronjob, so there are allways the
newest versions availlable.
> How do you send the newly retrieved file instead of the static file
> present on the filesystem? Essentially, this is the only need for
> a proxy, which could be implemented with a RewriteRule and a CGI. Or
> maybe apache can do this somehow?
??? - 'apache' allow to use CGI to serve Errors.
If an error occurs, the Refer URL is paste to the Error-404-CGI.
and while the CGI download the file from a Debian-Mirror, it can
stream the Error-404 as "application/x-debian-package" while
rewriting the HTTP-Header from 404 to 200.
> I think this would be an extremely simple implementation, using the
> proven apache for most of the work (and not the buggy twisted module
> that apt-proxy uses). Thus, the entire thing is reduced to a couple
> of httpd.conf entries and two extremely simple (?) CGIs.
Agreed
> In addition, a cronjob runs daily to purge all files in the
> filesystem space, which are not referenced from any of the
> Packages/Sources files.
Perfectly
> This is a braindump. Please comment. Am I missing something? Would
> someone like to try this? I really don't have the time right now...
Curently no time to work on it :-(
Greetings
Michelle
--
Linux-User #280138 with the Linux Counter, http://counter.li.org/
Michelle Konzack Apt. 917 ICQ #328449886
50, rue de Soultz MSM LinuxMichi
0033/3/88452356 67100 Strasbourg/France IRC #Debian (irc.icq.com)
Attachment:
signature.pgp
Description: Digital signature