2

I'm going through a somewhat painful exercise of updating an application server which, among other things, runs some legacy Windows code in a Qemu guest.

The legacy Windows code, which will be in use for no more than a few months hence is not economically fixable, is incompatible with the current version of database server (PostgreSQL) due to a query embedded in its system database libraries. However if I go back to a distro version with a sufficiently-old database, accessing the guest Windows systems over Qemu's VNC is unreliable.

I believe I have a solution with the database server running in a Docker container, but this has involved a lot of trial installs etc.

Considering Debian-style distreaux (i.e. including Ubuntu etc.), and noting that in some cases repos will be split into e.g. http://deb.debian.org and http://archive.debian.org, is there some way of using e.g. apt-cache showpkg to get a quick answer to questions like "what version of Qemu was installed on Debian Stretch" or for that matter "what was the complete timeline of Qemu across Debian versions"?

I am aware of List of default software versions for given Ubuntu Release which is superficially similar, but the answers assume that either the distro maintainers or some external website have a complete index, which is not the case for archived Debian versions.

2 Answers 2

3

what was the complete timeline of Qemu across Debian versions?

I'd probably just look it up on repology.org. Other than that, I'd just ask the individual debian versions?

# could be docker in your case, CLI is the same as podman
CONTAINER_TOOL=podman

for version in {11..13}; do
  echo "==== debian ${version} ===="
  $CONTAINER_TOOL pull -q debian:${version}-slim > /dev/null
  $CONTAINER_TOOL run \
    -t \
    --rm \
    debian:${version}-slim \
    sh -c \
      'apt-get update -q >/dev/null; apt-cache show qemu-system-x86|grep "^Version: "'
done

Note that I start querying from debian and not before 11, because, frankly, a solution that needs debian <= 10 at the end of 2025 is probably the worse workaround than finding some other way to run an old database in a somewhat modern container. Your best guess are probably the containers that your database project offers – postgres!

You can also query older debians, no problem, but you will have to include the sed script to replace deb.debian.org with archive.debian.org in the sh -c … invocation for these. (you'd typically just build your own set of images with Dockerfiles for that, if this wasn't such a one-shot thing.)

As Stephen points out (and I can't really put that into better words):

Older Debian releases can be used without the archive dance by pulling from debian/eol (which has the nice side-effect of making it obvious that a container image relies on an EOL base).

With that knowledge:

# could be docker in your case, CLI is the same as podman
CONTAINER_TOOL=podman

for version in {8..13}; do
  echo "==== debian ${version} ===="
  if [ $version = 4 ]; then
    CONTAINER=debian/eol:etch
  elif [ $version = 5 ]; then
    CONTAINER=debian/eol:lenny
  elif [ $version = 6 ]; then
    CONTAINER=debian/eol:squeeze
  elif [ $version = 7 ]; then
    CONTAINER=debian/eol:wheezy
  elif [ $version = 8 ]; then
    CONTAINER=debian/eol:jessie
  elif [ $version = 9 ]; then
    CONTAINER=debian/eol:stretch
  elif [ $version = 10 ]; then
    CONTAINER=debian/eol:buster
  else
    CONTAINER=debian:${version}-slim
  fi

  ${CONTAINER_TOOL} pull -q ${CONTAINER} > /dev/null
  ${CONTAINER_TOOL} run \
    -t \
    --rm \
    ${CONTAINER} \
    sh -c \
      'apt-get update -q >/dev/null; apt-cache show qemu-system-x86|grep "^Version: "'
done
2
  • 2
    Older Debian releases can be used without the archive dance by pulling from debian/eol (which has the nice side-effect of making it obvious that a container image relies on an EOL base). Commented 10 hours ago
  • @StephenKitt thanks! incorporated into script. Commented 6 hours ago
2

Marcus Müller’s answer shows how to get version information for any distribution release or container image.

For Debian (and Ubuntu), you can use rmadison instead (in the devscripts package):

$ rmadison qemu
qemu       | 1:5.2+dfsg-11+deb11u3         | oldoldstable                      | source, amd64, arm64, armhf, i386
qemu       | 1:5.2+dfsg-11+deb11u3         | oldoldstable-debug                | source
qemu       | 1:7.2+dfsg-7+deb12u16         | oldstable                         | source
qemu       | 1:7.2+dfsg-7+deb12u16         | oldstable-debug                   | source
qemu       | 1:7.2+dfsg-7+deb12u16         | oldstable-proposed-updates-debug  | source
qemu       | 1:7.2+dfsg-7+deb12u17         | buildd-oldstable-proposed-updates | source
qemu       | 1:7.2+dfsg-7+deb12u17         | oldstable-proposed-updates        | source
qemu       | 1:7.2+dfsg-7+deb12u17         | oldstable-proposed-updates-debug  | source
qemu       | 1:10.0.2+ds-2+deb13u1~bpo12+1 | oldstable-backports               | source
qemu       | 1:10.0.2+ds-2+deb13u1~bpo12+1 | oldstable-backports-debug         | source
qemu       | 1:10.0.6+ds-0+deb13u2         | stable                            | source
qemu       | 1:10.0.6+ds-0+deb13u2         | stable-debug                      | source
qemu       | 1:10.0.6+ds-0+deb13u2         | unstable                          | source
qemu       | 1:10.1.2+ds-1                 | testing                           | source
qemu       | 1:10.1.2+ds-3                 | unstable                          | source
qemu       | 1:10.1.2+ds-3                 | unstable-debug                    | source
qemu       | 1:10.2.0~rc1+ds-1             | experimental                      | source
qemu       | 1:10.2.0~rc1+ds-1             | experimental-debug                | source

On a Debian system (or similar), this will show results for currently-supported releases of Debian by default; on a Ubuntu system (or derivative), it will show results for Ubuntu. The -u option can be used to switch sources (-u debian or -u ubuntu).

One benefit of this approach is that it shows all available versions, including backports, regardless of the repositories configured on the querying system or in the container image.

For Debian specifically, you can get information on older releases as well by querying the archived releases instead:

$ rmadison -u archive qemu
 qemu | 0.6.1+20050407-1sarge1        | debian/sarge              | i386, powerpc
 qemu | 0.6.1+20050407-1sarge1        | debian/sarge-security     | source, i386, powerpc
 qemu | 0.8.2-4                       | debian/etch-m68k          | source
 qemu | 0.8.2-4etch3                  | debian/etch               | source, amd64, i386, powerpc
 qemu | 0.8.2-4etch3                  | debian/etch-security      | source, amd64, i386, powerpc
 qemu | 0.9.1-10lenny1~bpo40+1        | debian/etch-backports     | source, amd64, i386, powerpc, sparc
 qemu | 0.9.1-10lenny1                | debian/lenny              | source, amd64, i386, powerpc, sparc
 qemu | 0.9.1-10lenny1                | debian/lenny-security     | source, amd64, i386, powerpc, sparc
 qemu | 0.12.5+dfsg-3squeeze4         | debian/squeeze            | source, amd64, armel, i386, kfreebsd-amd64, kfreebsd-i386, mips, mipsel, powerpc, sparc   
 qemu | 0.12.5+dfsg-3squeeze4         | debian/squeeze-security   | source, amd64, armel, i386, kfreebsd-amd64, kfreebsd-i386, mips, mipsel, powerpc, sparc   
 qemu | 0.12.5+dfsg-3squeeze5         | debian/squeeze-lts        | source, amd64, i386
 qemu | 1.1.2+dfsg-2~bpo60+1          | debian/squeeze-backports  | source, armel, ia64, kfreebsd-amd64, kfreebsd-i386, mips, powerpc
 qemu | 1.1.2+dfsg-6a+deb7u7~bpo60+1  | debian/squeeze-backports  | source, amd64, i386, mipsel, sparc
 qemu | 1.1.2+dfsg-6a+deb7u12         | debian/wheezy             | source, amd64, armel, armhf, i386, ia64, kfreebsd-amd64, kfreebsd-i386, mips, mipsel, powerpc, s390x, sparc
 qemu | 1.1.2+dfsg-6+deb7u25          | debian/wheezy-security    | source, amd64, armel, armhf, i386
 qemu | 2.0.0+dfsg-4~bpo70+1          | debian/wheezy-backports   | source, s390x
 qemu | 2.1+dfsg-5~bpo70+1            | debian/wheezy-backports   | source, sparc
 qemu | 1:2.1+dfsg-11                 | debian/jessie-kfreebsd    | source, kfreebsd-amd64, kfreebsd-i386
 qemu | 1:2.1+dfsg-12+deb8u5a~bpo70+1 | debian/wheezy-backports   | source, amd64, armel, armhf, i386, ia64, kfreebsd-amd64, kfreebsd-i386, mips, mipsel, powerpc
 qemu | 1:2.1+dfsg-12+deb8u6          | debian/jessie             | source, amd64, arm64, armel, armhf, i386, mips, mipsel, powerpc, ppc64el, s390x
 qemu | 1:2.1+dfsg-12+deb8u15         | debian/jessie-security    | source, amd64, armel, armhf, i386
 qemu | 1:2.8+dfsg-3~bpo8+1           | debian/jessie-backports   | source, amd64, arm64, armel, armhf, i386, mips, mipsel, powerpc, ppc64el, s390x
 qemu | 1:2.8+dfsg-6+deb9u9           | debian/stretch            | source, amd64, arm64, armel, armhf, i386, mips, mipsel, ppc64el, s390x
 qemu | 1:2.8+dfsg-6+deb9u17          | debian/stretch-security   | source, amd64, arm64, armel, armhf, i386
 qemu | 1:3.1+dfsg-8+deb10u8          | debian/buster             | source, amd64, arm64, armel, armhf, i386, mips, mips64el, mipsel, ppc64el, s390x
 qemu | 1:3.1+dfsg-8+deb10u12         | debian/buster-security    | source, amd64, arm64, armhf, i386
 qemu | 1:5.2+dfsg-9~bpo10+1          | debian/buster-backports   | source, amd64, arm64, armel, armhf, i386, mips64el, mipsel, ppc64el, s390x
 qemu | 1:5.2+dfsg-11+deb11u3         | debian/bullseye           | source, amd64, arm64, armel, armhf, i386, mips64el, mipsel, ppc64el, s390x
 qemu | 1:7.2+dfsg-7+deb12u2~bpo11+1  | debian/bullseye-backports | source

The UDD can also be used as a source:

$ rmadison -u udd qemu
 qemu | 1:5.2+dfsg-11+deb11u3         | bullseye           | source, amd64, arm64, armhf, i386
 qemu | 1:5.2+dfsg-11+deb11u5         | bullseye-security  | source, amd64, arm64, armhf, i386
 qemu | 1:7.2+dfsg-7+deb12u15         | bookworm-security  | source
 qemu | 1:7.2+dfsg-7+deb12u16         | bookworm           | source
 qemu | 1:7.2+dfsg-7+deb12u17         | bookworm-p-u       | source
 qemu | 1:10.0.2+ds-2+deb13u1~bpo12+1 | bookworm-backports | source
 qemu | 1:10.0.2+ds-2+deb13u1         | trixie-security    | source
 qemu | 1:10.0.6+ds-0+deb13u2         | trixie             | source
 qemu | 1:10.0.6+ds-0+deb13u2         | sid                | source
 qemu | 1:10.1.2+ds-1                 | forky              | source
 qemu | 1:10.1.2+ds-3                 | sid                | source
 qemu | 1:10.2.0~rc1+ds-1             | experimental       | source
3
  • ooooooh that is a neat tool that I would have needed knowledge of years ago! Commented 8 hours ago
  • (and Ubuntu's web services being broken … sigh. One would think important services like packages.ubuntu.com would be more reliable than their run-by-volunteers packages.debian.org counterparts, seeing that Canonical's income depends on IT people with influence on company spending thinking it's an easy to use, low-frustration platform.) Commented 8 hours ago
  • To be fair, I don’t think there’s much that relies on Ubuntu’s Madison service; in any case it’s back up now. Commented 7 hours ago

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.