Package: autopkgtest Version: 5.6 Severity: important File: /usr/bin/autopkgtest-build-qemu Tags: patch
There seems to be some sort of interoperability issue between autopkgtest and recent versions of APT which leads the build to completely fail: $ sudo autopkgtest-build-qemu stretch autopkgtest-stretch.qcow /usr/bin/autopkgtest-build-qemu: 61: /usr/bin/autopkgtest-build-qemu: proxy_cmd: parameter not set This is on a recent buster system. The offending code is: RES=`apt-config shell proxy_cmd Acquire::http::Proxy-Auto-Detect` eval $RES if [ -n "$proxy_cmd" ]; then ... and probably fails because of `set -eu` in the script. I can confirm the RES variable is empty and therefore proxy_cmd never gets initialized. The attached patch fixes the issue, but it might be a little naive and should be reviewed correctly to see why this failure occurs now. It might be the variable changed on APT's side or something similarly fishy. I don't have a proxy setup here, so the patch fixes my own itch. A. -- System Information: Debian Release: buster/sid APT prefers testing APT policy: (500, 'testing'), (1, 'experimental'), (1, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 4.18.0-2-amd64 (SMP w/4 CPU cores) Locale: LANG=fr_CA.UTF-8, LC_CTYPE=fr_CA.UTF-8 (charmap=UTF-8), LANGUAGE=fr_CA.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages autopkgtest depends on: ii apt-utils 1.7.0 ii libdpkg-perl 1.19.2 ii procps 2:3.3.15-2 ii python3 3.6.6-1 ii python3-debian 0.1.33 Versions of packages autopkgtest recommends: ii autodep8 0.14 Versions of packages autopkgtest suggests: ii lxc 1:2.0.9-6.1 pn lxd <none> pn ovmf <none> ii qemu-efi-aarch64 0~20180812.cb5f4f45-1 pn qemu-efi-arm <none> ii qemu-system 1:2.12+dfsg-3+b1 ii qemu-utils 1:2.12+dfsg-3+b1 ii schroot 1.6.10-5 ii vmdb2 0.13.2-1 -- debconf-show failed
>From e495a975b158879d676a48d05415939d1057b095 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= <anar...@debian.org> Date: Fri, 26 Oct 2018 13:44:25 -0400 Subject: [PATCH] fix uninitialized variable usage In my configuration, on Debian buster, none of those apt-config commands return anything. Presumably because I do not have a proxy configured. It's unclear why: presumably there was some change in configuration which made the script work when released but broke since then. Or this was never tested without a proxy configuration. Who knows! In any case, the (rather naive) initialization fixes the problem for my particular case. --- tools/autopkgtest-build-qemu | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/autopkgtest-build-qemu b/tools/autopkgtest-build-qemu index 97fec6d..81532ad 100755 --- a/tools/autopkgtest-build-qemu +++ b/tools/autopkgtest-build-qemu @@ -56,6 +56,7 @@ if [ -z "$AUTOPKGTEST_APT_PROXY" ]; then if [ -n "$RES" ]; then eval $RES else + proxy_cmd="" RES=`apt-config shell proxy_cmd Acquire::http::Proxy-Auto-Detect` eval $RES if [ -n "$proxy_cmd" ]; then -- 2.19.1