rpm-sequoia-crypto-policy: New recipe
PATCH v9 1/5 rpm-sequoia-crypto-policy: New recipe
This ships a crypto policy file for rpm-sequoia.
--- meta/conf/distro/include/maintainers.inc | 1 + ...1-Make-xsltproc-settable-as-XSLTPROC.patch | 43 +++++++++++++++++++ ...002-Don-t-use-hardcoded-python3-path.patch | 41 ++++++++++++++++++ .../rpm-sequoia-crypto-policy_git.bb | 34 +++++++++++++++ 4 files changed, 119 insertions(+) create mode 100644 meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crypto-policy/0001-Make-xsltproc-settable-as-XSLTPROC.patch create mode 100644 meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crypto-policy/0002-Don-t-use-hardcoded-python3-path.patch create mode 100644 meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crypto-policy_git.bb
meta/conf/distro/include/maintainers.inc +1 -0
@@ -744,6 +744,7 @@ RECIPE_MAINTAINER:pn-rpcbind = "Hongxu Jia <[email protected]>" RECIPE_MAINTAINER:pn-rng-tools = "Anuj Mittal <[email protected]>" RECIPE_MAINTAINER:pn-rpcsvc-proto = "Khem Raj <[email protected]>" RECIPE_MAINTAINER:pn-rpm = "Robert Yang <[email protected]>" +RECIPE_MAINTAINER:pn-rpm-sequoia-crypto-policy = "Zoltán Böszörményi <[email protected]>" RECIPE_MAINTAINER:pn-rsync = "Yi Zhao <[email protected]>" RECIPE_MAINTAINER:pn-rt-tests = "Unassigned <[email protected]>" RECIPE_MAINTAINER:pn-ruby = "Ross Burton <[email protected]>"
meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crypto-policy/0001-Make-xsltproc-settable-as-XSLTPROC.patch new file +43 -0
43 lines not on this page · raw message
meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crypto-policy/0002-Don-t-use-hardcoded-python3-path.patch new file +41 -0
41 lines not on this page · raw message
meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crypto-policy_git.bb new file +34 -0
@@ -0,0 +1,34 @@ +SUMMARY = "Crypto policy for rpm-sequoia" +HOMEPAGE = "https://gitlab.com/redhat-crypto/fedora-crypto-policies/" + +LICENSE = "LGPL-2.1-or-later" + +LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=a6f89e2100d9b6cdffcea4f398e37343" + +DEPENDS = "coreutils-native openssl-native make-native" + +inherit allarch python3native + +SRC_URI = " \ + git://gitlab.com/redhat-crypto/fedora-crypto-policies.git;protocol=https;branch=master \ + file://0001-Make-xsltproc-settable-as-XSLTPROC.patch \ + file://0002-Don-t-use-hardcoded-python3-path.patch \ +" + +SRCREV = "445ecc87af202c8fc9249b453f41c3ac4553ffbd" +UPSTREAM_CHECK_COMMITS = "1" + +S = "${UNPACKDIR}/git" + +do_compile () { + make ASCIIDOC=echo XSLTPROC=echo +} + +do_install () { + mkdir -p ${D}${datadir}/crypto-policies/back-ends + install -m644 ${S}/output/DEFAULT/rpm-sequoia.txt ${D}${datadir}/crypto-policies/back-ends/rpm-sequoia.config +} + +FILES:${PN} = "${datadir}/crypto-policies/back-ends/*" + +BBCLASSEXTEND = "native"
Signature · 1 line
2.48.1
PATCH v9 2/5 rpm-sequoia: New recipe for version 1.7.0
rpm 4.20 removed the built-in code to handle signed packages and uses rpm-sequoia as a more feature complete library.
Runtime-depend on rpm-sequoia-crypto-policy.
--- meta/conf/distro/include/maintainers.inc | 1 + .../rpm-sequoia/rpm-sequoia-crates.inc | 486 ++++++++++++++++++ .../rpm-sequoia/rpm-sequoia_1.7.0.bb | 60 +++ 3 files changed, 547 insertions(+) create mode 100644 meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crates.inc create mode 100644 meta/recipes-devtools/rpm-sequoia/rpm-sequoia_1.7.0.bb
meta/conf/distro/include/maintainers.inc +1 -0
@@ -744,6 +744,7 @@ RECIPE_MAINTAINER:pn-rpcbind = "Hongxu Jia <[email protected]>" RECIPE_MAINTAINER:pn-rng-tools = "Anuj Mittal <[email protected]>" RECIPE_MAINTAINER:pn-rpcsvc-proto = "Khem Raj <[email protected]>" RECIPE_MAINTAINER:pn-rpm = "Robert Yang <[email protected]>" +RECIPE_MAINTAINER:pn-rpm-sequoia = "Zoltán Böszörményi <[email protected]>" RECIPE_MAINTAINER:pn-rpm-sequoia-crypto-policy = "Zoltán Böszörményi <[email protected]>" RECIPE_MAINTAINER:pn-rsync = "Yi Zhao <[email protected]>" RECIPE_MAINTAINER:pn-rt-tests = "Unassigned <[email protected]>"
meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crates.inc new file +486 -0
486 lines not on this page · raw message
meta/recipes-devtools/rpm-sequoia/rpm-sequoia_1.7.0.bb new file +60 -0
60 lines not on this page · raw message
Signature · 1 line
2.48.1
PATCH v9 3/5 rpm: Set SEQUOIA_CRYPTO_POLICY in wrapped tools
In reply to Zoltán BöszörményiPoint to the crypto policy file so RPM signing may work.
--- meta/recipes-devtools/rpm/rpm_4.20.0.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-devtools/rpm/rpm_4.20.0.bb +1 -0
@@ -100,6 +100,7 @@ WRAPPER_TOOLS = " \ do_install:append:class-native() { for tool in ${WRAPPER_TOOLS}; do test -x ${D}$tool && create_wrapper ${D}$tool \ + SEQUOIA_CRYPTO_POLICY=${STAGING_DATADIR_NATIVE}/crypto-policies/back-ends/rpm-sequoia.config \ RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \ RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \ MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
Signature · 1 line
2.48.1
PATCH v9 4/5 dnf: Set SEQUOIA_CRYPTO_POLICY in wrapped tools
In reply to Zoltán BöszörményiPoint to the crypto policy file so dnf can work with signed packages.
--- meta/recipes-devtools/dnf/dnf_4.22.0.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-devtools/dnf/dnf_4.22.0.bb +1 -0
@@ -69,6 +69,7 @@ do_install:append() { # Direct dnf-native to read rpm configuration from our sysroot, not the one it was compiled in do_install:append:class-native() { create_wrapper ${D}/${bindir}/dnf \ + SEQUOIA_CRYPTO_POLICY=${STAGING_DATADIR_NATIVE}/crypto-policies/back-ends/rpm-sequoia.config \ RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \ RPM_NO_CHROOT_FOR_SCRIPTS=1 }
Signature · 1 line
2.48.1
PATCH v9 5/5 oeqa/selftest/cases/signing.py: Re-enable self-test
In reply to Zoltán BöszörményiWith all the pieces in place, the self test can be re-enabled.
--- meta/lib/oeqa/selftest/cases/signing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/lib/oeqa/selftest/cases/signing.py +2 -1
@@ -71,7 +71,6 @@ class Signing(OESelftestTestCase): """ import oe.packagedata - self.skipTest('This test requires rpm-sequoia support in rpm') self.setup_gpg() package_classes = get_bb_var('PACKAGE_CLASSES')
@@ -84,6 +83,8 @@ class Signing(OESelftestTestCase): feature += 'RPM_GPG_PASSPHRASE = "test123"\n' feature += 'RPM_GPG_NAME = "testuser"\n' feature += 'GPG_PATH = "%s"\n' % self.gpg_dir + feature += 'PACKAGECONFIG:append:pn-rpm-native = " sequoia"\n' + feature += 'PACKAGECONFIG:append:pn-rpm = " sequoia"\n' self.write_config(feature)
Signature · 1 line
2.48.1
Quoted 8 lines · Zoltan Boszormenyi via lists.openembedded.org
This ships a crypto policy file for rpm-sequoia.
Signed-off-by Zoltán Böszörményi <[email protected]>---
meta/conf/distro/include/maintainers.inc | 1 + ...1-Make-xsltproc-settable-as-XSLTPROC.patch | 43 +++++++++++++++++++ ...002-Don-t-use-hardcoded-python3-path.patch | 41 ++++++++++++++++++ .../rpm-sequoia-crypto-policy_git.bb | 34 +++++++++++++++
Quoted 4 lines
4 files changed, 119 insertions(+)create mode 100644
meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crypto-policy/0001-Make-xsltproc-settable-as-XSLTPROC.patchcreate mode 100644meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crypto-policy/0002-Don-t-use-hardcoded-python3-path.patchcreate mode 100644 meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crypto-policy_git.bb
The new recipe doesn't seem to build on musl:
https://autobuilder.yoctoproject.org/valkyrie/#/builders/6/builds/969
https://autobuilder.yoctoproject.org/valkyrie/#/builders/3/builds/985/steps/11/logs/stdio
and the policy recipe is struggling in world builds such:
https://autobuilder.yoctoproject.org/valkyrie/#/builders/25/builds/958/steps/11/logs/stdio
https://autobuilder.yoctoproject.org/valkyrie/#/builders/59/builds/956/steps/11/logs/stdio
https://autobuilder.yoctoproject.org/valkyrie/#/builders/59/builds/956
https://autobuilder.yoctoproject.org/valkyrie/#/builders/17/builds/887/steps/11/logs/stdio
and in reproducibility testing as a build failure:
https://autobuilder.yoctoproject.org/valkyrie/#/builders/37/builds/993/steps/12/logs/stdio
Cheers,
Richard
2025. 02. 07. 11:25 keltezéssel, Richard Purdie írta:
Quoted 13 lines · Zoltan Boszormenyi via lists.openembedded.org
Quoted 9 lines
This ships a crypto policy file for rpm-sequoia.
Signed-off-by Zoltán Böszörményi <[email protected]>--- meta/conf/distro/include/maintainers.inc | 1 + ...1-Make-xsltproc-settable-as-XSLTPROC.patch | 43 +++++++++++++++++++ ...002-Don-t-use-hardcoded-python3-path.patch | 41 ++++++++++++++++++ .../rpm-sequoia-crypto-policy_git.bb | 34 +++++++++++++++ 4 files changed, 119 insertions(+)Quoted 3 lines
create mode 100644
meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crypto-policy/0001-Make-xsltproc-settable-as-XSLTPROC.patchcreate mode 100644meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crypto-policy/0002-Don-t-use-hardcoded-python3-path.patchcreate mode 100644 meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crypto-policy_git.bb
Quoted 4 lines
The new recipe doesn't seem to build on musl:
https://autobuilder.yoctoproject.org/valkyrie/#/builders/6/builds/969
https://autobuilder.yoctoproject.org/valkyrie/#/builders/3/builds/985/steps/11/logs/stdio
The problem is not musl per se, it's that one of the python scripts executes /usr/bin/nss-policy-check which is part of nss and does not exist on the build host.
This may be patched to be used from PATH.
However, nss is part of meta-openembedded.
Either rpm-sequoia-crypto-policy and rpm-sequoia should go into meta-openembedded (in which case the signing self test would rely on meta-openembedded or moved there, too) or nss must be moved to openembedded-core.
Alternatively, as the least intrusive change, testing the policy with nss-policy-check can be omitted as a Yocto specific patch (because we can trust Fedora's own CI for this repository that does check the validity of policy changes), in which case the current setup can stay.
What is the preferred way?
FWIW, I tested the last method (patching away testing the policy) with /usr/bin/nss-policy-check renamed, so executing it would fail. The recipe was built successfully, with setting TCLIBC to musl even. The generated policy file is identical to the one seen on Fedora 41.
I will send the v10 series with this change if that's acceptable.
All the other logs below seem to hit the same issue.
Quoted 14 lines
and the policy recipe is struggling in world builds such:
https://autobuilder.yoctoproject.org/valkyrie/#/builders/25/builds/958/steps/11/logs/stdio
https://autobuilder.yoctoproject.org/valkyrie/#/builders/59/builds/956/steps/11/logs/stdio
https://autobuilder.yoctoproject.org/valkyrie/#/builders/59/builds/956
https://autobuilder.yoctoproject.org/valkyrie/#/builders/17/builds/887/steps/11/logs/stdioand in reproducibility testing as a build failure:
https://autobuilder.yoctoproject.org/valkyrie/#/builders/37/builds/993/steps/12/logs/stdio
Cheers,
Richard