3

The setup

I run a Debian Squeeze host that I use to build a multilanguage project (python, java, php...) and generate custom packages (debian and RPM) automatically (through jenkins)

The problem

The target distributions of those Debian packages are Etch, Lenny and Squeeze. But our project has some native dependencies that are available only through the DebianRelease + 1 repository (i.e Lenny + 1 == Squeeze, Squeeze + 1 == Wheezy). We for example, need the jetty packages from Squeeze in Lenny, and the cyrus-imapd-2.4 packages from Wheezy in Squeeze. Some additional info :

  • Some package we can simply 'backport by hand' by mirroring the DebianRelease + 1 packages to our own repositories. For instance, the jetty package from Squeeze will run fine on Lenny because it doesn't need an s**tload of additional dependencies

  • However we do need to rebuild some packages. For instance, cyrus-imapd-2.4 from Wheezy has a lot of unsatisfied dependencies on Squeeze. So we need to rebuild it in Squeeze and then upload it to our repo.

The question

I need to have a simple way of knowing if they are any updates on those extra packages (both "normal" and "security" updates). I could write a simple script that runs weekly, get some parameters from a file, and generate an update report. Let's say the file looks like this:

jetty:squeeze
cyrus-imapd-2.4:wheezy

The script should run as normal user not to mess up the system apt configuration and issue the appropriate commands to generate that report.

Does Debian has some built-in apt-* commands/options dedicated to that kind of problem I could use to write this script ? If not, can someone think of another clean solution to achieve what I need ?

Erwan Queffélec
  • 397
  • 4
  • 11

1 Answers1

2

Yes. I use apt-show-versions for this. Installation is as easy as:

# apt-get install apt-show-versions

In my /etc/apt/apt.conf I have:

APT::Default-Release "unstable";

In /e/a/sources.list I have entries for unstable, experimental and at times other temporary repos such as the old emacs-snapshot archive.

Here is an example of a-s-v with an up to date package from experimental:

# apt-show-versions -a xmonad
xmonad 0.10.1~darcs20120707-1 install ok installed
xmonad 0.10-4+b2              unstable     192.168.10.1:3142
xmonad 0.10.1~darcs20120707-1 experimental 192.168.10.1:3142
xmonad/experimental uptodate 0.10.1~darcs20120707-1

Here is an example of a package that is in unstable and experimental but I only have the unstable version:

# apt-show-versions -a zsh
zsh 4.3.17-1 install ok installed
zsh 4.3.17-1 unstable     192.168.10.1:3142
zsh 5.0.0-2  experimental 192.168.10.1:3142
zsh/unstable uptodate 4.3.17-1

I can use apt-show-versions to see if there are upgrades in experimental:

# apt-show-versions |grep manually| head
autogen/experimental *manually* upgradeable from 1:5.16-2 to 1:5.16.2-2
iproute/experimental *manually* upgradeable from 20121001-1 to 20121001-2
iproute-doc/experimental *manually* upgradeable from 20121001-1 to 20121001-2

It is also nice because it will show you packages that are no longer available in any repo:

#apt-show-versions |grep -v uptodate |grep "No available"
brscan2 0.2.5-1 installed: No available version in archive
dfc-depends 1.0 installed: No available version in archive
google-chrome-unstable 24.0.1297.0-r162078 installed: No available version in archive
dfc
  • 1,341
  • 8
  • 16
  • Looks nice, I'll have a look and find out if I that does solve my problem. Thanks. – Erwan Queffélec Nov 11 '12 at 04:23
  • That's actually a solution that works, except that, for some reasons, the squeeze version of a-s-v output perl errors when I am messing to much with its CLI parameters. Might work better on versions above Squeeze. However a-s-v behaves as advertised, even if after some more search `rmadison` happened to be more suited for my usage. – Erwan Queffélec Nov 11 '12 at 22:12