-
Notifications
You must be signed in to change notification settings - Fork 820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integration tests fail for gpg 2.4.4 #4989
Comments
Confirmed with the following procedure on lxd noble images with builddate 20240220: test script
test output
debug-level 9 with use-keyboxd
debug-level 9 without use-keyboxd
|
OK I haven't played with keyboxd yet, it's a bit new and fancy (and IMO useless), but this seems to be documented in the
I'm not sure this makes a whole lot of sense for your tests to use the host configuration; when doing stuff with gpg in a program, you should usually:
See apt-key for example or I believe livecd-rootfs too |
I'll go patch out |
gnupg2 patched in https://launchpad.net/ubuntu/+source/gnupg2/2.4.4-2ubuntu9 to no longer write common.conf on fresh installs. But please ensure your test suite doesn't rely on host config and home dirs. |
Use ephemeral GNUPGHOME in gpg commands. Make a gpg context manager to manage daemon and gpg tempdir lifetimes. Bring back process shutdown via gpgconf (fallback to killing when not present) Add relevant tests and update existing tests. Fixes several failing tests due to keyboxd changes in Noble. Fixes GH-4989
Bug report
When running integration tests on Ubuntu 24.04 images containing gpg 2.4.4 (up from 2.2.40 on previous releases), TestApt integrations tests:
All fail with
assert TEST_PPA_KEY in self.get_keys(class_client)
.Steps to reproduce the problem
Create a VM with gpg 2.4.4 (Ubuntu 24.04 dailies after 20240227 all cause it) and the following userdata:
SSH into the VM and run:
This returns no output. On earlier versions of gpg we would see the key printed, e.g.
Environment details
Additional Details
The underlying issue appears to be related to gpg2 using keybox as the default format. When gpg is called for the first time it initializes
~/.gnupg
including a config file that specifies the use of keybox. If I runrm .gnupg/common.conf
and then rerun the list keys command, it works as it did in prior versions.The text was updated successfully, but these errors were encountered: