[OE-core] [PATCH] oeqa/selftest/runtime_test: Ensure we build/use gnupg-native

Richard Purdie richard.purdie at linuxfoundation.org
Mon Sep 17 10:54:07 UTC 2018


On Sun, 2018-09-16 at 10:20 +0100, Burton, Ross wrote:
> Doesn't quite work:
> 
> 2018-09-14 23:53:16,527 - oe-selftest - INFO - 7: 13/14 281/332
> (10.67s) (runtime_test.TestImage.test_testimage_dnf)
> 2018-09-14 23:53:16,527 - oe-selftest - INFO -
> testtools.testresult.real._StringException: Traceback (most recent
> call last):
> File "/home/pokybuild/yocto-worker/nightly-oe-
> selftest/build/meta/lib/oeqa/core/decorator/__init__.py",
> line 32, in wrapped_f
> return func(*args, **kwargs)
> File "/home/pokybuild/yocto-worker/nightly-oe-
> selftest/build/meta/lib/oeqa/selftest/cases/runtime_test.py",
> line 157, in test_testimage_dnf
> runCmd('gpg --batch --homedir %s --import %s' % (self.gpg_home,
> os.path.join(signing_key_dir, 'key.secret')),
> native_sysroot=get_bb_var("RECIPE_SYSROOT_NATIVE", "gnupg-native"))
> File "/home/pokybuild/yocto-worker/nightly-oe-
> selftest/build/meta/lib/oeqa/utils/commands.py",
> line 191, in runCmd
> raise AssertionError("Command '%s' returned non-zero exit status
> %d:\n%s" % (command, result.status, exc_output))
> AssertionError: Command 'gpg --batch --homedir
> /tmp/oeqa-feed-sign-gqt86zv_ --import
> /home/pokybuild/yocto-worker/nightly-oe-selftest/build/build-st-
> 50002/meta-selftest/files/signing/key.secret'
> returned non-zero exit status 2:
> gpg: keybox '/tmp/oeqa-feed-sign-gqt86zv_/pubring.kbx' created
> gpg: /tmp/oeqa-feed-sign-gqt86zv_/trustdb.gpg: trustdb created
> gpg: key 7B31316B5D64AD52: public key "testuser (nocomment)
> <testuser at testemail.com>" imported
> gpg: failed to start agent
> '/home/pokybuild/yocto-worker/nightly-oe-selftest/build/build-st-
> 104600/tmp/work/x86_64-linux/gnupg-native/2.2.9-r0/recipe-sysroot-
> native/usr/bin/gpg-agent':
> No such file or directory
> gpg: can't connect to the agent: No such file or directory
> gpg: error getting the KEK: No agent running
> gpg: Total number processed: 1
> gpg: imported: 1
> gpg: secret keys read: 1

A quick poke at this on a plane confirmed its an sstate relocation
issue. gnupg-native does not relocate safely. common/homedir.c has
gnupg_bindir() which isn't configurable and hardcodes the binary
locations. There are other functions in there which probably have the
same issue. Options:

a) Revert my selftest fix and require gpg on the machine running the
selftests (opens us up to gpg version issues). Clearly not all YP
autobuilder workers have it.
b) Patch gnupg to relocate properly

Cheers,

Richard



More information about the Openembedded-core mailing list