rpm-sequoia-crypto-policy: New recipe
PATCH v10 1/5 rpm-sequoia-crypto-policy: New recipe
This ships a crypto policy file for rpm-sequoia.
--- meta/conf/distro/include/maintainers.inc | 1 + .../0001-Don-t-test-crypto-policies.patch | 52 +++++++++++++++++++ ...1-Make-xsltproc-settable-as-XSLTPROC.patch | 43 +++++++++++++++ ...002-Don-t-use-hardcoded-python3-path.patch | 41 +++++++++++++++ .../rpm-sequoia-crypto-policy_git.bb | 39 ++++++++++++++ 5 files changed, 176 insertions(+) create mode 100644 meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crypto-policy/0001-Don-t-test-crypto-policies.patch 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-Don-t-test-crypto-policies.patch new file +52 -0
52 lines not on this page · raw message
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 +39 -0
@@ -0,0 +1,39 @@ +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 \ + file://0001-Don-t-test-crypto-policies.patch \ +" + +SRCREV = "445ecc87af202c8fc9249b453f41c3ac4553ffbd" +UPSTREAM_CHECK_COMMITS = "1" + +S = "${UNPACKDIR}/git" + +do_compile () { + # Remove most policie variants, leave DEFAULT.pol + # It speeds up the build and we only need DEFAULT/rpm-sequoia. + rm -f $(ls -1 policies/*.pol | grep -v DEFAULT.pol) || echo nothing to delete + + make ASCIIDOC=echo XSLTPROC=echo +} + +do_install () { + install -d -m755 ${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 v10 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 v10 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 v10 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 v10 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
meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crypto-policy/0001-Don-t-test-crypto-policies.patch line 13
Quoted 4 lines · Zoltán Böszörményi
meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crypto-policy/0001-Don-t-test-crypto-policies.patch new file +4
-0+Assume that the policies are good as they are committed. +The CI for fedora-crypto-policies ensures this. + +Upstream-Status: Inappropriate [Yocto specific]
The patch as it is is indeed not suitable, but perhaps you can open a ticket, describe the issue, and see if upstream would be willing to take a configuration option instead?
We generally ask that Inappropriate patches still come with ticket links, so upstreams are aware of the problems we face. Sometimes solutions come out of that, and if not
this documents their response.
Alex
2025. 02. 10. 10:03 keltezéssel, Alexander Kanavin írta:
Quoted 9 lines · Zoltán Böszörményi
meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crypto-policy/0001-Don-t-test-crypto-policies.patch line 13
Quoted 4 lines
meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crypto-policy/0001-Don-t-test-crypto-policies.patch new file +4
-0+Assume that the policies are good as they are committed. +The CI for fedora-crypto-policies ensures this. + +Upstream-Status: Inappropriate [Yocto specific]The patch as it is is indeed not suitable, but perhaps you can open a ticket, describe the issue, and see if upstream would be willing to take a configuration option instead?
Quoted 4 lines
We generally ask that Inappropriate patches still come with ticket links, so upstreams are aware of the problems we face. Sometimes solutions come out of that, and if not
this documents their response.
Ok, new approach, hopefully better.
The two new patches are also pushed to
https://gitlab.com/redhat-crypto/fedora-crypto-policies/-/merge_requests/226
and all the problems I faced are described at
https://gitlab.com/redhat-crypto/fedora-crypto-policies/-/issues/57
I just sent v11 with this change.
A message that is not in the archive (sent off-list or not yet received): [email protected]
2025. 02. 10. 12:17 keltezéssel, Zoltan Boszormenyi via lists.openembedded.org írta:
Quoted 14 lines
2025. 02. 10. 10:03 keltezéssel, Alexander Kanavin írta:
Quoted 13 lines · Zoltán Böszörményi
meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crypto-policy/0001-Don-t-test-crypto-policies.patch line 13
Quoted 4 lines
meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crypto-policy/0001-Don-t-test-crypto-policies.patch new file +4
-0+Assume that the policies are good as they are committed. +The CI for fedora-crypto-policies ensures this. + +Upstream-Status: Inappropriate [Yocto specific]The patch as it is is indeed not suitable, but perhaps you can open a ticket, describe the issue, and see if upstream would be willing to take a configuration option instead?
We generally ask that Inappropriate patches still come with ticket links, so upstreams are aware of the problems we face. Sometimes solutions come out of that, and if not
this documents their response.
The upstream discussion happened, my patches were merged into fedora-crypto-policies. v12 series is on its way.