squid-deb-proxy for Debian

April 11, 2013

I uploaded squid-deb-proxy into Debian unstable today and its in the NEW queue. I created it back in the days of Ubuntu 10.04 and some people voiced interest in having it in Debian as well so I spend a bit of time to get it customized for Debian.

Squid-deb-proxy uses the well known squid proxy with a custom configuration to cache deb package and Indexfiles (like Packages.gz) that will allow caching from the default archives and mirrors and reject anything else by default.

The basic philosophy is that “it just works”. You run on your server:

root@server# apt-get install squid-deb-proxy

and on your clients:

root@client# apt-get install squid-deb-proxy-client

and that’s it. It does not require any fiddling with configuration (unless you want to 😉 ). The default will let you connect to .debian.org and nothing else.

The server will announce itself via avahi as _apt_proxy._tcp and the
client will hook into apt to use Acquire::http::ProxyAutoDetect. The
client is useful for other servers that announce themself via avahi.

Packaging was a bit more work than anticipated because there is a bit of setup and teardown work in the initscript. For Debian as sysvinit script was needed, Ubuntu uses upstart so it took a bit of refactoring to extract the code into a common helper.

If you want to try it now, its available via:

$ bzr branch lp:squid-deb-proxy
$ cd squid-deb-proxy
$ bzr-buildpackage

and in unstable once it leaves the NEW queue.

Advertisements

Fun with sqlite/fts

March 27, 2013

A while ago I played with sqlite. Its pretty awesome. When using the full text search (fts) extension it also provides super fast full text searching. One of the things I was missing (compared to other engines) is the similar text suggestion (“Did you mean?”) support. Fortunately this is relatively easy to add via the fts4aux virtual table that sqlite supports.

I pushed a full example of to https://github.com/mvo5/sqlite-fts-did-you-mean. The way it works is that you build a set of similar words and use that to query for the “term” value from the fts4aux table.

Here is the output from the example:

$ ./fts_did_you_mean.py aptx
Did you mean:
 apex (rank: 2)
 apt (rank: 1)
time 0.024138927459716797

Using gdebi to install build-dependencies

March 22, 2013

I wrote gdebi a long time ago to make it really easy to install .deb package with proper dependency resolution from the commandline and via a gtk (and kde) UI. But another neat (but not very well known) feature of the gdebi-core cli tool is to install the build-dependencies of a debian source package. If you run:

$ gdebi debian/control

in a unpacked debian source package it will check for missing build-dependencies and offer to install them.

New unattended-upgrades for debian/experimental

March 16, 2013

There is a new 0.80~exp2 version of unattended-upgrades available. This would normally be fine for debian/sid but because of the freeze I decided to put it into experimental. Some nice features like adding a “–verbose” mode that shows the actual dpkg output when
running and codename based matching plus some nice fixes from Brian Murray (thanks!).

The codename based matching is interessting as it allows writing a matcher like “n=wheezy” (or more verbose “codename=wheezy”) in the config file. You can use “apt-cache policy” (without further arguments) to see what origins are available.

Enjoy and let me know if you find any issues issues!

Arduino MusicShield

January 8, 2013

I got a Music Shield from Seeedstudio a while ago. Its fun to play with but the example source did not quite work for me. So I ported it over to the the new SD library from arduino 1.0 and published a google plus post about it. Some people asked me about the source so I pushed the result to launchpad and github. I also filed a upstream request to include it.

mvo at ubuntu.com mail not working currently (hopefully back soon)

January 5, 2013

If you tried to reach me via my ubuntu.com mail in the last couple of days you got a 550 error. There seems to be some misconfiguration on the ubuntu.com mailserver, I hope it gets fixed soon. You can use my mvo at debian.org in the meantime.

sqlite3-debversions

August 16, 2011

I created a small extension for sqlite3 today to allow order by debian version easily. This allows writing:

.load "./debversions.so";
SELECT * FROM packages ORDER BY version COLLAT debversion_compare;

And it will do the right ordering. Its available on launchpad.

Software-center gtk3 edition

August 9, 2011

As OMGUbuntu already posted here the software-center team is working on a gtk3 version that implements a new GUI design. Thanks to the team and especially the wonderful Matthew McGowan we now have the gtk3 version mostly working. Its part of the normal software-center packages as of version 4.1.12. It installs alongside the current gtk2 software-center. For now gtk2 is still the default, but if you run “software-center-gtk3” on a oneiric system you will get the new UI (and all the new bugs) 😉

New apt hits oneiric

August 8, 2011

I just uploaded a new apt to oneiric. Its a ABI break so there will be short time that the archive is in a state of churn while the packages are rebuild against the new ABI. But the good news is that apt finally got dpointers so we will require less ABI breaks in the future. Plus we moved the library into a proper library package making the transitions much easier from now on.

apt-clone

May 7, 2011

In natty we got a new tool called “apt-clone”. Its a commandline application that can be used to clone the packages state of a system and restore it on another system. It will save the full state (sources.list, packages/versions installed, auto-installed inforrmation) and optionally using dpkg-repack in order to save not/no-longer downloadable package (like debs that got installed manually via e.g. gdebi or dpkg -i). The file is pretty small because it just stores references to the files in the archive. One nice feature of the restore is that it can be applied to a different root directory (creating a chroot). I use this to reproduce upgrade issues and its really handy for this. Whats missing currently is modified conffiles detection, but there is some work on this in trunk.