apt-proxy etc

Florian Lohoff flo at rfc822.org
Sat Jan 25 22:10:02 CET 2003


Hi,
ich habe mal mit apt-proxy in verbindung mit einem transparenten squid
rumgespielt. Im prinzip redirecte ich bestimmten traffic aus dem
transparenten proxy auf den apt-proxy was das Packages file handling
nett macht. Jetzt sind 2 sachen komisch. Zum einen schreibt der
apt-proxy in seine logfiles 

mkdir: cannot create directory `/var/cache/apt-proxy/security///pool': File exists
mkdir: cannot create directory `/var/cache/apt-proxy/security///pool/updates': File exists
mkdir: cannot create directory `/var/cache/apt-proxy/security///pool/updates/main': File exists
mkdir: cannot create directory `/var/cache/apt-proxy/security///pool/updates/main/p': File exists
mkdir: cannot create directory `/var/cache/apt-proxy/security///pool/updates/main/p/perl': File exists

Was ja irgendwie drauf hindeutet das der nicht sooo sauber programmiert ist.
Ausserdem ist der progress indikator mit dem apt de-fakto 
hinfaellig. Alle 2-3 Minuten (Bei ISDN) mal nen update.

Gibts da irgendwie neuheiten ?

Ach ja - Setup ist wie folgt - ich habe einen transparenten squid der
dieses redirekt script hat:


#!/usr/bin/perl

use strict;

$|=1;

my $debext="(\.deb|\.dsc|Packages|Packages\.gz|Release|\.tar\.gz|\.diff\.gz|Sources|Source\.gz)";
my $mainurl="(http|ftp):\/\/((source|ftp).rfc822.org|ftp2.de.debian.org)\/debian\/+";
my $nonusurl="(http|ftp):\/\/((source|ftp).rfc822.org|ftp2.de.debian.org)\/debian-non-US\/+";
my $securl="(http|ftp):\/\/((source|ftp).rfc822.org|ftp2.de.debian.org)\/debian-security\/+";

while(<STDIN>) {
        chomp();

        #http://source.rfc822.org/debian-non-US/dists/sid/non-US/contrib/source/Sources.gz 195.71.97.211/- - GET
        #
        if (/$mainurl\S+$debext\s/) {
                s/$mainurl/http:\/\/localhost:9999\/main\//;
        } elsif (/$nonusurl\S+$debext\s/) {
                s/$nonusurl/http:\/\/localhost:9999\/non-US\//;
        } elsif (/$securl\S+$debext\s/) {
                s/$securl/http:\/\/localhost:9999\/security\//;
        }

        printf("%s\n", $_);
}


Und in der squid config cache ich nichts was ueber localhost:9999 kommt:

acl QUERY urlpath_regex cgi-bin \?
acl DEB urlpath_regex localhost:9999
no_cache deny QUERY DEB

Scheint auch so weit alles zu tun - jetzt muss ich noch die gebraeuchlichsten 
debian server der region eintragen und die Besucher mit ihren laptops
holen schoen automagisch ueber den apt-proxy ohne was aendern zu muessen.

Noch die installationsdefaultdinger eintragen und schon muss ich bei
ner cd installation nichts mehr aendern sondern nur durchklicken.

Flo
-- 
Florian Lohoff                  flo at rfc822.org             +49-5201-669912
                        Heisenberg may have been here.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://lug-owl.de/pipermail/linux/attachments/20030125/ce383ce4/attachment.sig>


More information about the Linux mailing list