rpm-sequoia: upgrade 1.7.0 -> 1.9.0
PATCH 1/2 rpm-sequoia: upgrade 1.7.0 -> 1.9.0
The upstream project has extended the tests slightly, by adding a cargo command to ensure that the library is built before the tests would be executed. This doesn't really work for ptests, since it rebuilds the library from scratch on the target. As an attempt to solve this issue, introduce an environment variable with a patch, which, if present, will skip building the library before executing the test.
Changelog:
https://github.com/rpm-software-management/rpm-sequoia/compare/v1.7.0...v1.9.0
---
...-lib-for-symbols-tests-conditionally.patch | 41 ++
.../rpm-sequoia/rpm-sequoia-crates.inc | 522 ++++++++++--------
...-sequoia_1.7.0.bb => rpm-sequoia_1.9.0.bb} | 13 +-
3 files changed, 333 insertions(+), 243 deletions(-)
create mode 100644 meta/recipes-devtools/rpm-sequoia/files/0001-tests-build-lib-for-symbols-tests-conditionally.patch
rename meta/recipes-devtools/rpm-sequoia/{rpm-sequoia_1.7.0.bb => rpm-sequoia_1.9.0.bb} (86%)meta/recipes-devtools/rpm-sequoia/files/0001-tests-build-lib-for-symbols-tests-conditionally.patch new file +41 -0
@@ -0,0 +1,41 @@ +From aaae1cc05c906b1d413e02f9da0b908e4cf9456d Mon Sep 17 00:00:00 2001 +From: Gyorgy Sarvari <[email protected]> +Date: Fri, 8 Aug 2025 18:17:39 +0200 +Subject: [PATCH] tests: build lib for symbols tests conditionally + +When the tests are executed, cargo might not be available, +however the library could be built already. + +An example of when this could happen is cross-compiling for +embedded systems: when the library is compiled for a different +(potentially low powered) system, then at runtime frequently +there is no rust toolchain available to build the library; +however the library is usually already built and installed. + +To be able to run the test on pre-built artifacts, introduce +an environment variable, "DONT_BUILD_TEST_LIB", which, if +present with any value, will skip building the library. + +Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm-sequoia/pull/99] + +Signed-off-by: Gyorgy Sarvari <[email protected]> +--- + tests/symbols.rs | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/tests/symbols.rs b/tests/symbols.rs +index c532a15..0c4d268 100644 +--- a/tests/symbols.rs ++++ b/tests/symbols.rs +@@ -9,7 +9,10 @@ use assert_cmd::assert::OutputAssertExt; + #[test] + fn symbols() -> anyhow::Result<()> { + // Make sure the library is built. +- Command::new("cargo").arg("build").ok()?; ++ let skip_build_library = env::var("TEST_DONT_BUILD_LIB").is_ok(); ++ if ! skip_build_library { ++ Command::new("cargo").arg("build").ok()?; ++ } + + // We want the location of the build directory (e.g., + // `/tmp/rpm-sequoia/debug`).
meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crates.inc +284 -238
757 lines not on this page · raw message
meta/recipes-devtools/rpm-sequoia/rpm-sequoia_1.9.0.bb renamed from meta/recipes-devtools/rpm-sequoia/rpm-sequoia_1.7.0.bb +8 -5
@@ -12,11 +12,10 @@ DEPENDS = "openssl" inherit pkgconfig rust cargo cargo-update-recipe-crates ptest-cargo -SRC_URI = "git://github.com/rpm-software-management/rpm-sequoia.git;protocol=https;branch=main \ - file://0001-Use-optional-env-vars-to-force-runtime-paths-in-test.patch \ -" - -SRCREV = "0667e04ae7fb8cf0490919978d69883d16400e41" +SRC_URI = "git://github.com/rpm-software-management/rpm-sequoia.git;protocol=https;branch=main;tag=v${PV} \ + file://0001-Use-optional-env-vars-to-force-runtime-paths-in-test.patch \ + file://0001-tests-build-lib-for-symbols-tests-conditionally.patch" +SRCREV = "cd090b02119565c6d171fa9a892790c966cf10ef" require ${BPN}-crates.inc
@@ -64,6 +63,10 @@ do_install:append () { do_install_ptest:append () { install -d ${D}${PTEST_PATH}/src install -m 644 ${S}/src/symbols.txt ${D}${PTEST_PATH}/src/symbols.txt + + echo "#!/bin/sh" > ${D}${PTEST_PATH}/run-ptest + echo "rc=0" >> ${D}${PTEST_PATH}/run-ptest + echo "export TEST_DONT_BUILD_LIB=1" >> ${D}${PTEST_PATH}/run-ptest } # Tests need objdump
PATCH 2/2 rpm-sequoia-crypto-policy: update to latest revision
0001-libreswan-Allow-skipping-test_config-for-old-ipsec.patch patch was dropped, as it is included in this revision.
--- ...w-skipping-test_config-for-old-ipsec.patch | 29 ------------------- .../rpm-sequoia-crypto-policy_git.bb | 7 ++--- 2 files changed, 2 insertions(+), 34 deletions(-) delete mode 100644 meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crypto-policy/0001-libreswan-Allow-skipping-test_config-for-old-ipsec.patch
meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crypto-policy/0001-libreswan-Allow-skipping-test_config-for-old-ipsec.patch deleted +0 -29
@@ -1,29 +0,0 @@ -From f7a8e2c049c2c3e2bfcb801d7b65214c0a5bad77 Mon Sep 17 00:00:00 2001 -From: Yoann Congal <[email protected]> -Date: Tue, 15 Apr 2025 17:27:20 +0200 -Subject: [PATCH] libreswan: Allow skipping test_config for old ipsec - -In some case, /usr/sbin/ipsec does not handle the readwriteconf command. -e.g. on Debian 12 with strongswan installed. -As with the other OLD_* variables, add an OLD_LIBRESWAN environment -variable to skip configuration testing on those systems. - -Signed-off-by: Yoann Congal <[email protected]> -Upstream-Status: Backport [https://gitlab.com/redhat-crypto/fedora-crypto-policies/-/merge_requests/237] ---- - python/policygenerators/libreswan.py | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/python/policygenerators/libreswan.py b/python/policygenerators/libreswan.py -index a2b02f5..d81ec0c 100644 ---- a/python/policygenerators/libreswan.py -+++ b/python/policygenerators/libreswan.py -@@ -227,6 +227,8 @@ class LibreswanGenerator(ConfigGenerator): - - @classmethod - def test_config(cls, config): -+ if os.getenv('OLD_LIBRESWAN') == '1': -+ return True - if not os.access('/usr/sbin/ipsec', os.X_OK): - return True -
meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crypto-policy_git.bb +2 -5
@@ -8,12 +8,9 @@ LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=a6f89e2100d9b6cdffcea4f398e37343" # Python 3.11+ is needed to build fedora-crypto-policies inherit allarch python3native -SRC_URI = " \ - git://gitlab.com/redhat-crypto/fedora-crypto-policies.git;protocol=https;branch=master \ - file://0001-libreswan-Allow-skipping-test_config-for-old-ipsec.patch \ -" +SRC_URI = "git://gitlab.com/redhat-crypto/fedora-crypto-policies.git;protocol=https;branch=master" -SRCREV = "032b418a6db842f0eab330eb5909e4604e888728" +SRCREV = "ae1df75b1155294ebbd3c84fd206ffb55414c3ec" UPSTREAM_CHECK_COMMITS = "1" do_compile () {