Merge autopkgtest-cloud:bionic-install-gpg-agent into autopkgtest-cloud:master

Proposed by Brian Murray
Status: Merged
Merged at revision: 79cfbd554c9e5484c08a82248c238e4a3e393824
Proposed branch: autopkgtest-cloud:bionic-install-gpg-agent
Merge into: autopkgtest-cloud:master
Diff against target: 18 lines (+7/-0)
1 file modified
charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker-config-production/setup-canonical.sh (+7/-0)
Reviewer Review Type Date Requested Status
Tim Andersson Approve
Review via email: mp+461658@code.launchpad.net

Description of the change

Running autopkgtests with packages from PPAs on Bionic is failing with the following messages (seen in logs on the cloud workers).

55s Warning: apt-key output should not be parsed (stdout is not a terminal)
55s Executing: /tmp/apt-key-gpghome.JSxai74dnJ/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-key 7CA1F5946D641569F6169DA6185BA77D9DB344C3
55s gpg: key 185BA77D9DB344C3: public key "Launchpad PPA for The FIPS-CC-STIG" imported
55s gpg: failed to start agent '/usr/bin/gpg-agent': No such file or directory
55s gpg: can't connect to the agent: No such file or directory

It's unclear why gpg-agent isn't available but this will resolve the immediate problem of the tests not being able to run.

Before merging (or cowboy'ing) this I think a worth while test would be to remote the adt/ubuntu-bionic-*.img from the available images and recreate it using build-adt-image.

To post a comment you must log in.
Revision history for this message
Brian Murray (brian-murray) wrote :

I ended up removing the adt/ubuntu-bionic-amd64-server-20240301.img and recreating it and that did not help.

Revision history for this message
Brian Murray (brian-murray) wrote :

I've cowboy'ed this on both autopkgtest-cloud-workers.

Revision history for this message
Tim Andersson (andersson123) wrote :

LGTM

review: Approve
Revision history for this message
Paride Legovini (paride) wrote :

I know the reason for this: to prevent the Noble images from breaking because the new gpg-wks-server was pulling in postfix, I made setup-testbed remove it. Of course this in turn removes gnupg. I didn't expect breakage because right after the removal setup-testbed does:

  chroot "$root" apt-get install -y gpg

if needed, but maybe that doesn't automatically pull in gpg-agent in Bionic.

Let's remember drop drop this workaround once we restart building Noble images with good base images (not having the gnupg -> gpg-wks-server -> postfix issue).

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker-config-production/setup-canonical.sh b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker-config-production/setup-canonical.sh
2index 0f60575..d7fe9a7 100644
3--- a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker-config-production/setup-canonical.sh
4+++ b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker-config-production/setup-canonical.sh
5@@ -39,6 +39,13 @@ if [ "${RELEASE}" != "trusty" ]; then
6 fi
7 rm /etc/apt/preferences.d/force-downgrade-to-release.pref
8
9+# 2024-03-01 The adt image for bionic is somehow missing gpg-agent and
10+# subsequently we cannot test packages from PPAs which is critical for
11+# security-britney.
12+if [ "${RELEASE}" = "bionic" ]; then
13+ DEBIAN_FRONTEND=noninteractive eatmydata apt-get install -y gpg-agent
14+fi
15+
16 # Remove packages not available from any configured repository, e.g.
17 # packages fully removed from the archive. This requires the analyze-pattern
18 # feature, which has been introduced in apt 2.0.1 (>= Focal).

Subscribers

People subscribed via source and target branches