You are not logged in.
Hello !
I just adopt apt-cacher-ng on AUR, because I'm using it for APT (I use debootstrap and chrooted environments) and it help me saving a lot of bandwith (531Mb today).
So here is the package if you are insterested :
http://aur.archlinux.org/packages.php?ID=40662
I've seen in the main configuration file that it can be used for Archlinux. So I did it
I will share my configuration in this topic.
The main file is /etc/apt-cacher-ng/acng.conf
I'm using apt-cacher-ng only on my laptop :
BindAddress: localhost
Here are some Remap lines for Debian repositories (including security) :
Remap-debrep: file:deb_mirror*.gz /debian ; file:backends_debian
Remap-debsec: /security ; http://ftp.fr.debian.org/debian-security
This is the line for Archlinux
Remap-alxrep: file:archlx_mirrors /archlinux ; file:backend_archlx # incomplete, please create this file or specify preferred mirrors here
Here is a very permissive addition to the VfilePattern regex to allow the *db files (needed for pacman -Sy)
VfilePattern = (^|.*?/)(Index|Packages\.bz2|Packages\.gz|Packages|Release|Release\.gpg|Sources\.bz2|Sources\.gz|Sources|release|index\.db-.*\.gz|Contents-[^/]*\.gz|pkglist[^/]*\.bz2|rclist[^/]*\.bz2|/meta-release[^/]*|Translation[^/]*\.bz2|.*\.db)$
Just put in the file /etc/apt-cacher-ng/backend_archlx your nearest mirror without the "$repo/os/$arch" part :
In my case :
echo http://mir.archlinux.fr/ > /etc/apt-cacher-ng/backend_archlx
You can now restart apt-cacher-ng
rc.d restart apt-cacher-ng
Here is your new /etc/pacman.d/mirrorlist !
Server = http://localhost:3142/archlinux/$repo/os/$arch
Just in case, here is a minimal /etc/apt/sources.list for Debian :
deb http://localhost:3142/debian squeeze main contrib
deb http://localhost:3142/security squeeze/updates main contrib
If you want to use the very last synced archlinux repositories, with reflector, you can do something like that
rc.d stop apt-cacher-ng
reflector -p http -l 1 --sort rate | grep -o -e 'http://[^\$]*' > /etc/apt-cacher-ng/backend_archlx
rc.d start apt-cacher-ng
Offline
Hi, thx for info. Just checking with file:archlx_mirrors
that file needs to be created as well? Can I leave it
out and just have -> Remap-alxrep: /archlinux ; file:backend_archlx
I suppose I can just test it. I read the docs, but they are a bit confusing :-)
Last edited by psi.neamf (2011-07-12 21:35:57)
Offline
Hi, thx for info. Just checking with file:archlx_mirrors
that file needs to be created as well? Can I leave it
out and just have -> Remap-alxrep: /archlinux ; file:backend_archlxI suppose I can just test it. I read the docs, but they are a bit confusing :-)
I'm not sure and I'm not a master of apt-cacher-ng Precise documentation is here :
http://www.unix-ag.uni-kl.de/~bloch/acn … tml#repmap
The file archlx_mirrors is in the package, and contains a list of mirrors.
The second part of Remap- line, TargetURLs, is optional.
Just try and give your results here please
Offline
Hi,
I was configuring an existing apt-cacher-ng on an Ubuntu server, so I didn't make use of your package.
I ended up with this in /etc/apt-cacher-ng/acng.conf :
Remap-alxrep: /archlinux ; file:backends_archlx
I used your change to VfilePattern.
I then created this file in /etc/apt-cacher-ng/ :
backends_archlx
with this content. (I suppose one can put more mirrors in here) :
http://archlinux.mirror.ac.za/
I think I got it a bit mixed up, but it's working. I should maybe move the line in backends_archlx that actually refers to a download mirror to where you have file:archlx_mirrors so that multiple mirrors can go in there. As you said, the TargetURLs is optional.
Offline
Sorry for digging up this old thread. Could some kind person point me to the right solution? I would like to install apt-cacher-ng on a Pogoplug (armv6l) and stumbled upon this thread.
I downloaded the package from AUR and added 'arm' as architecture to PKGBUILD file. Continuing with makepkg -s it fails:
-> Extracting apt-cacher-ng_0.7.12.orig.tar.xz with xz
xz: apt-cacher-ng_0.7.12.orig.tar.xz: Cannot allocate memory
==> ERROR: Failed to extract apt-cacher-ng_0.7.12.orig.tar.xz
Aborting...
This is my first try with AUR, so please bear with me. Thanks for your help.
Offline
I think it's not related to AUR or this specific package but to xz, look here:
https://bbs.archlinux.org/viewtopic.php … 76#p831476
Short answer: Older xz versions have a memory usage limiter that is
enabled by default. Newer version still have it, but it is disabled by
default. You can get close to the old behavior by puttingXZ_DEFAULTS=--memlimit=40%
export XZ_DEFAULTSinto your shell's initialization script (e.g. .bashrc).
I never had this problem, so it's all I can do
Offline