oeqa: use WORKDIR/oe-testimage-repo to look for RPM packages
PATCH 1/3 oeqa: use WORKDIR/oe-testimage-repo to look for RPM packages
Using RPM deploy dir was causing errors when pre-built images were used with these steps:
https://wiki.yoctoproject.org/wiki/Quality_Assurance_yocto_project
[YOCTO #11173]
Signed-off-by Alexander Kanavin <[email protected]>
--- meta/lib/oeqa/runtime/cases/dnf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oeqa/runtime/cases/dnf.py +1 -1
@@ -98,7 +98,7 @@ class DnfRepoTest(DnfTest): @OETestDepends(['dnf.DnfRepoTest.test_dnf_install_from_disk']) def test_dnf_install_from_http(self): output = subprocess.check_output('%s %s -name run-postinsts-dev*' % (bb.utils.which(os.getenv('PATH'), "find"), - self.tc.td['DEPLOY_DIR_RPM']), shell=True).decode("utf-8") + os.path.join(self.tc.td['WORKDIR'], 'oe-testimage-repo')), shell=True).decode("utf-8") rpm_path = output.split("/")[-2] + "/" + output.split("/")[-1] url = 'http://%s:%s/%s' %(self.target.server_ip, self.repo_server.port, rpm_path) self.dnf_with_repo('remove -y run-postinsts-dev')
Signature · 1 line
2.11.0
PATCH 2/3 sign_rpm.bbclass: do not set/use RPM_GPG_PUBKEY
This is entirely unnecessary (we can ask the signer backend to export the key to a file when needed), and was causing confusing selftest failures due to the variable being set from two different places.
[YOCTO #11191]
Signed-off-by Alexander Kanavin <[email protected]>
--- meta/classes/sign_rpm.bbclass | 7 ------- meta/lib/oe/package_manager.py | 4 +++- meta/lib/oeqa/selftest/signing.py | 1 - 3 files changed, 3 insertions(+), 9 deletions(-)
meta/classes/sign_rpm.bbclass +0 -7
@@ -28,13 +28,6 @@ python () { for var in ('RPM_GPG_NAME', 'RPM_GPG_PASSPHRASE'): if not d.getVar(var): raise_sanity_error("You need to define %s in the config" % var, d) - - # Set the expected location of the public key - d.setVar('RPM_GPG_PUBKEY', os.path.join(d.getVar('STAGING_DIR_TARGET', False), - d.getVar('sysconfdir', False), - 'pki', - 'rpm-gpg', - 'RPM-GPG-KEY-${DISTRO_VERSION}')) } python sign_rpm () {
meta/lib/oe/package_manager.py +3 -1
@@ -520,7 +520,9 @@ class RpmPM(PackageManager): open(platformconfdir + "macros", 'a').write("%_prefer_color 7") if self.d.getVar('RPM_SIGN_PACKAGES') == '1': - pubkey_path = self.d.getVar('RPM_GPG_PUBKEY') + signer = get_signer(self.d, self.d.getVar('RPM_GPG_BACKEND')) + pubkey_path = oe.path.join(self.d.getVar('B'), 'rpm-key') + signer.export_pubkey(pubkey_path, self.d.getVar('RPM_GPG_NAME')) rpm_bin = bb.utils.which(os.getenv('PATH'), "rpmkeys") cmd = [rpm_bin, '--root=%s' % self.target_rootfs, '--import', pubkey_path] try:
meta/lib/oeqa/selftest/signing.py +0 -1
@@ -51,7 +51,6 @@ class Signing(oeSelfTest): feature = 'INHERIT += "sign_rpm"\n' feature += 'RPM_GPG_PASSPHRASE = "test123"\n' feature += 'RPM_GPG_NAME = "testuser"\n' - feature += 'RPM_GPG_PUBKEY = "%s"\n' % self.pub_key_path feature += 'GPG_PATH = "%s"\n' % self.gpg_dir self.write_config(feature)
Signature · 1 line
2.11.0
PATCH 3/3 rpm: add a "rpm-build" PROVIDES
In reply to Alexander Kanavinrpm 5.x was packaging build tools separately, so we need to unbreak things that relied on that.
[YOCTO #11167]
Signed-off-by Alexander Kanavin <[email protected]>
--- meta/recipes-devtools/rpm/rpm_git.bb | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-devtools/rpm/rpm_git.bb +2 -0
@@ -106,3 +106,5 @@ PACKAGES += "python-rpm" PROVIDES += "python-rpm" FILES_python-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm/*" +# rpm 5.x was packaging the rpm build tools separately +PROVIDES += "rpm-build"
Signature · 1 line
2.11.0