Vasudev Kamath: Switching from approx to apt-cacher-ng
After a long ~5 years (from 2011) journey with approx I finally wanted
to switch to something new like apt-cacher-ng. And after a bit of
changes I finally managed to get apt-cacher-ng into my work flow.
Bit of History
I should first give you a brief on how I started using approx. It all
started in MiniDebconf 2011 which I organized at my Alma-mater. I met
Jonas Smedegaard here and from him I learned about approx. Jonas has a
bunch of machines at his home and he was active user of approx and he
showed it to me while explaining the Boxer project. I was quite
impressed with approx. Back then I was using a 230kbps slow INTERNET
connection and I was also maintaining a couple of packages in
Debian. Updating the pbuilder chroots was time consuming task for me
as I had to download multiple times over slow net. And approx largely
solved this problem and I started using it.
5 years fast forward I now have quite fast INTERNET with good
FUP. (About 50GB a month), but I still tend to use approx which makes
building packages quite faster. I also use couple of containers on my
laptop which all use my laptop as approx cache.
Why switch?
So why change to apt-cacher-ng?. Approx is a simple tool, it runs
mainly with inetd and sits between apt and the repository on
INTERNET. Where as apt-cacher-ng provides a lot of features. Below are
some listed from the apt-cacher-ng manual.
- use of TLS/SSL repositories (may be possible with approx but I'm notsure how to do it)
- Access control of who can access caching server
- Integration with debdelta (I've not tried, approx also supports debdelta)
- Avoiding use of apt-cacher-ng for some hosts
- Avoiding caching of some file types
- Partial mirroring for offline usage.
- Selection of ipv4 or ipv6 for connections.
Transition
Transition from approx to apt-cacher-ng was smoother than I
expected. There are 2 approaches you can use one is explicit routing
another is transparent routing. I prefer transparent routing and I
only had to change my /etc/apt/sources.list to use the actual
repository URL.
After above change I had to add a 01proxy configuration file to
/etc/apt/apt.conf.d/ with following content.
I use explicit routing only when using apt-cacher-ng with pbuilder and
debootstrap. Following snippet shows explicit routing through /etc/apt/sources.list.
deb http://deb.debian.org/debian unstable main contrib non-free
deb-src http://deb.debian.org/debian unstable main
deb http://deb.debian.org/debian experimental main contrib non-free
deb-src http://deb.debian.org/debian experimental main
Acquire::http::Proxy "http://localhost:3142/"
deb http://localhost:3142/deb.debian.org/debian unstable main
Usage with pbuilder and friends
To use apt-cacher-ng with pbuilder you need to modify /etc/pbuilderrc
to contain following line
MIRRORSITE=http://localhost:3142/deb.debian.org/debian
Usage with debootstrap
To use apt-cacher-ng with debootstrap, pass MIRROR argument of
debootstrap as http://localhost:3142/deb.debian.org/debian.
Conclusion
I've now completed full transition of my work flow to apt-cacher-ng
and purged approx and its cache.
Though it works fine I feel that there will be 2 caches created when
you use transparent and explicit proxy using localhost:3142 URL. I'm
sure it is possible to configure this to avoid duplication, but I've
not yet figured it. If you know how to fix this do let me know.
Update
Jonas told me that its not 2 caches but 2 routing paths, one for
transparent routing and another for explicit routing. So I guess there
is nothing here to fix :-).
2. Replace the bash code that produced the left navigation on the
)
3. Thought hard about navigation of the test website, and redesigned (by rearranging) links in the left hand navigation.
After code review, you will see these changes as well! Things to look forward to include:
Around a year ago, I started hacking together a machine readable version
of the OSI approved licenses list, and casually picking parts up until it
was ready to launch. A few weeks ago, we officially announced
the
Warning: This blog post includes instructions for a procedure that
can lead you to lock yourself out of your computer. Even if everything
goes well, you'll be hunted by dragons. Keep backups, have a rescue
system on a USB stick, and wear flameproof clothing. Also, have fun,
and tell your loved ones you love them.
I've recently gotten two
13 for 6.
Just finished my first book of
The story recounts the countless turns the life of Nombeko Mayeki, a black girl born in Soweto as latrine cleaner, who manages to save the Swedish king as well as most of the world from an atomic desaster by first getting driven over by a drunkard of South African nuclear bomb engineer, then meeting a clique of three Chinese sisters excelling in faking antiquities, and two Mossad agents. With the (unwilling) help of those agents she escapes to Sweden (including the atomic bomb) where she meets twins of a psychotic father who brought them up as one child so that the spare one can eradicate the Swedish monarchy. After many twists and setbacks, including several meetings with the Chinese premier Hu Jintao, she finally manages to get rid of the atomic bomb, get her undercover twin a real identity, and set up a proper life ah, and not to forget, save the King of Sweden!
A fast paced, surprisingly funny and lovely story about how little things can change our lives completely.
Michael K hlmeier s recently released book Zwei Herren am Strand tells the fictive story of Charlie Chaplin and Winston Churchill meeting and becoming friends, helping each other fighting depression and suicide thoughts. Based on a bunch of (fictive) letters of a (fictive) private secretary of Churchill, as well as (fictive) book on Chaplin, the first person narrator dives into the interesting time of the mid-20ies to about the Second World War.
Chaplin is having a hard time after the divorce from his wife Rita, paired with the difficulties at the production of
iPod with rockbox
open iPod with iFlash
Slightly later than on monthly schedule but
How to help
A good first step is simply looking over the
My monthly report covers what I have been doing for Debian. I write it for Debian s Long Term Support sponsors but also for the wider free software community in the hope that it might inspire people to get more involved with Debian or free software in general.
Debian Android
I had my strong doubts as to whether the shipment would be allowed through customs, and was happily surprised by a smiling Graham today before noon. He handed me a smallish box that arrived to his office, containing...