sign_rpm.bbclass: force rpm serial signing
PATCH 1/2 sign_rpm.bbclass: force rpm serial signing
From: Leonardo Sandoval <[email protected]>
Newer versions of gpg (at least 2.1.5 and 2.2.1) have issues when signing occurs in parallel so (unfortunately) the signing must be done serially. Once the upstream problem is fixed, this patch must be reverted, otherwise we loose all the intrinsic parallelism from bitbake.
[YOCTO #12022]
--- meta/classes/sign_rpm.bbclass | 6 ++++++ 1 file changed, 6 insertions(+)
meta/classes/sign_rpm.bbclass +6 -0
@@ -67,3 +67,9 @@ python sign_rpm () { do_package_index[depends] += "signing-keys:do_deploy" do_rootfs[depends] += "signing-keys:do_populate_sysroot" + +# Newer versions of gpg (at least 2.1.5 and 2.2.1) have issues when signing occurs in parallel +# so unfortunately the signing must be done serially. Once the upstream problem is fixed, +# the following line must be removed otherwise we loose all the intrinsic parallelism from +# bitbake. For more information, check https://bugzilla.yoctoproject.org/show_bug.cgi?id=12022. +do_package_write_rpm[lockfiles] += "${TMPDIR}/gpg.lock"
Signature · 1 line
2.12.3
PATCH 2/2 selftest/cases/runtime_test: ignore removal errors when cleaning temporary gpg directory
From: Leonardo Sandoval <[email protected]>
The high-level method tempfile.TemporaryDirectory give us no way to ignore erros on removal thus use tempfile.mkdtemp instead. Ignoring possible issues on removal is neccesary because it contains gpg sockets that are automatically removed by the system once the process terminates, otherwise the following log is observed:
File "/usr/lib/python3.5/shutil.py", line 436, in _rmtree_safe_fd
os.unlink(name, dir_fd=topfd)
FileNotFoundError: [Errno 2] No such file or directory: 'S.gpg-agent.browser'
This is the same fix as 7e3a7cd2426feac757def81850dc44156cd0f33e, but this applies to runtime (instead of signing).
[YOCTO #11821]
--- meta/lib/oeqa/selftest/cases/runtime_test.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
meta/lib/oeqa/selftest/cases/runtime_test.py +7 -3
@@ -4,6 +4,7 @@ from oeqa.core.decorator.oeid import OETestID import os import re import tempfile +import shutil class TestExport(OESelftestTestCase):
@@ -147,19 +148,22 @@ class TestImage(OESelftestTestCase): features += 'PACKAGE_CLASSES = "package_rpm"\n' # Enable package feed signing - self.gpg_home = tempfile.TemporaryDirectory(prefix="oeqa-feed-sign-") + self.gpg_home = tempfile.mkdtemp(prefix="oeqa-feed-sign-") signing_key_dir = os.path.join(self.testlayer_path, 'files', 'signing') - runCmd('gpg --batch --homedir %s --import %s' % (self.gpg_home.name, os.path.join(signing_key_dir, 'key.secret'))) + runCmd('gpg --batch --homedir %s --import %s' % (self.gpg_home, os.path.join(signing_key_dir, 'key.secret'))) features += 'INHERIT += "sign_package_feed"\n' features += 'PACKAGE_FEED_GPG_NAME = "testuser"\n' features += 'PACKAGE_FEED_GPG_PASSPHRASE_FILE = "%s"\n' % os.path.join(signing_key_dir, 'key.passphrase') - features += 'GPG_PATH = "%s"\n' % self.gpg_home.name + features += 'GPG_PATH = "%s"\n' % self.gpg_home self.write_config(features) # Build core-image-sato and testimage bitbake('core-image-full-cmdline socat') bitbake('-c testimage core-image-full-cmdline') + # remove the oeqa-feed-sign temporal directory + shutil.rmtree(self.gpg_home, ignore_errors=True) + class Postinst(OESelftestTestCase): @OETestID(1540) def test_verify_postinst(self):
Signature · 1 line
2.12.3
✗ patchtest: failure for "sign_rpm.bbclass: force rpm se..." and 1 more
In reply to [email protected]== Series Details ==
Series: "sign_rpm.bbclass: force rpm se..." and 1 more
Revision: 1
URL : https://patchwork.openembedded.org/series/9126/
State : failure
== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:
* Issue Series does not apply on top of target branch [test_series_merge_on_head]
Suggested fix Rebase your series on top of targeted branch
Targeted branch master (currently at abf2e9526a)
If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).
---
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe