5

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.


Added: affected distro and package versions.

Legacy code written in Delphi on Windows using the BDE hence ODBC to PostgreSQL may result in an error "column d.adsrc does not exist" if connecting to a server later than v11, this is due to an internal table change in v12.

Windows up to at least W2K running in Qemu and accessed over VNC has a problem where its mouse will "go crazy", particularly if the host computer is relatively underpowered. This definitely affects Qemu v5, it appears not to affect v10 but- as ever- "it is impossible to prove a negative".

Leaving aside the possibilities of containerisation etc., the most recent Debian to provide PostgreSQL v11 is "Buster":

postgresql | 11+200+deb10u5           | debian/buster
postgresql | 13+225+deb11u1           | debian/bullseye

Similarly, the earliest Debian to provide Qemu v10 is either "Trixie" or possibly "Bookworm Backports":

qemu | 1:3.1+dfsg-8+deb10u8          | debian/buster
qemu | 1:5.2+dfsg-9~bpo10+1          | debian/buster-backports
qemu | 1:5.2+dfsg-11+deb11u3         | debian/bullseye
qemu | 1:7.2+dfsg-7+deb12u2~bpo11+1  | debian/bullseye-backports
qemu | 1:5.2+dfsg-11+deb11u3         | bullseye
qemu | 1:7.2+dfsg-7+deb12u16         | bookworm
qemu | 1:10.0.2+ds-2+deb13u1~bpo12+1 | bookworm-backports
qemu | 1:10.0.6+ds-0+deb13u2         | trixie

There's no viable overlap between a compatible Postgres backend and a reliable Qemu frontend interface, but even if there were one should take into account the desirability of sticking with the most recent host OS hence putting PostgreSQL into a container is undoubtedly the optimum solution.

2
  • Not the question, but using the latest host OS with a Docker container for the old PostgreSQL sounds very much like the best (quickest, safest, simplest) solution. Commented 2 days ago
  • That's what "I believe I have a solution..." means in the Common Tongue :-) The major part of the job though was working through the various potential combinations of host OS, Qemu and PostgreSQL, although I've still got to mess around a bit making sure that the data files end up properly raided and so on. Commented 8 hours ago

2 Answers 2

7

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
  • 1
    ooooooh that is a neat tool that I would have needed knowledge of years ago! Commented Dec 8 at 13:10
  • Thanks Stephen, undoubtedly the best approach. I actually got there myself yesterday, and note in particular that something like $ rmadison -u archive postgresql && rmadison -u qa postgresql works well since it ensures that "now-relative" names like stable, oldstable and so on aren't used. Commented 8 hours ago
  • @MarcusMüller apt-file is another good one. Commented 8 hours ago
5

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
  • The problem with that is that it very largely relies on either an external "monitoring" website (repology.org) on on trial installations. Thanks for the PostgreSQL link which is confirmation that I'm looking in the right place, although I've apparently got to go back to the final v11 which I think is 11.13... possibly 11.22. Commented 8 hours ago
  • no trial installations involved at all! You're just asking apt whether it knows of a package of that name. 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.