rpm-sequoia-crypto-policy: New recipe
PATCH v12 1/5 rpm-sequoia-crypto-policy: New recipe
This ships a crypto policy file for rpm-sequoia.
--- meta/conf/distro/include/maintainers.inc | 1 + .../rpm-sequoia-crypto-policy_git.bb | 34 +++++++++++++++++++ 2 files changed, 35 insertions(+) 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_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" + +SRCREV = "032b418a6db842f0eab330eb5909e4604e888728" +UPSTREAM_CHECK_COMMITS = "1" + +S = "${UNPACKDIR}/git" + +do_compile () { + # Remove most policy 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 v12 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 v12 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 v12 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 v12 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 4 lines · Zoltán Böszörményi
This ships a crypto policy file for rpm-sequoia.
Signed-off-by Zoltán Böszörményi <[email protected]>---
Hi Zoltán,
I believe we have a new issue with this version:
| python/build-crypto-policies.py --reloadcmds policies output | /tmp/tmpqvyryz80: line 5: Bad configuration option: pubkeyacceptedalgorithms | /tmp/tmpqvyryz80: line 6: Bad configuration option: hostbasedacceptedalgorithms | /tmp/tmpqvyryz80: line 8: Bad configuration option: requiredrsasize | /tmp/tmpqvyryz80: terminating, 3 bad configuration options | There is an error in OpenSSH server generated policy
https://autobuilder.yoctoproject.org/valkyrie/?#/builders/3/builds/1027/steps/11/logs/stdio
Can you have a look at this error please?
Signature · 3 lines
Mathieu Dubois-Briand, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
2025. 02. 13. 14:36 keltezéssel, Mathieu Dubois-Briand írta:
Quoted 16 lines · Zoltán Böszörményi
Quoted 4 lines
This ships a crypto policy file for rpm-sequoia.
Signed-off-by Zoltán Böszörményi <[email protected]>---
Hi Zoltán,
I believe we have a new issue with this version:
| python/build-crypto-policies.py --reloadcmds policies output | /tmp/tmpqvyryz80: line 5: Bad configuration option: pubkeyacceptedalgorithms | /tmp/tmpqvyryz80: line 6: Bad configuration option: hostbasedacceptedalgorithms | /tmp/tmpqvyryz80: line 8: Bad configuration option: requiredrsasize | /tmp/tmpqvyryz80: terminating, 3 bad configuration options | There is an error in OpenSSH server generated policy
Quoted 3 lines
https://autobuilder.yoctoproject.org/valkyrie/?#/builders/3/builds/1027/steps/11/logs/stdio
Can you have a look at this error please?
I tested the recipe on Fedora 41 with:
* nss 3.107.0 installed with /usr/bin/nss-policy-check present, and
* faking uninstalling it by renaming /usr/bin/nss-policy-check
Both worked.
Some of your build hosts where nss was not installed complained about executing nss-policy-check unconditionally, which is now fixed.
I think this is on a build host with a very old nss version installed. Can you uninstall it?
Quoted 28 lines · Böszörményi Zoltán
2025. 02. 13. 14:36 keltezéssel, Mathieu Dubois-Briand írta:
Quoted 19 lines · Zoltán Böszörményi
Quoted 4 lines
This ships a crypto policy file for rpm-sequoia.
Signed-off-by Zoltán Böszörményi <[email protected]>---
Hi Zoltán,
I believe we have a new issue with this version:
Quoted 9 lines
python/build-crypto-policies.py--reloadcmds policies output/tmp/tmpqvyryz80: line 5: Bad configuration option:
pubkeyacceptedalgorithms/tmp/tmpqvyryz80: line 6: Bad configuration option:
hostbasedacceptedalgorithms/tmp/tmpqvyryz80: line 8: Bad configuration option:
requiredrsasize/tmp/tmpqvyryz80: terminating, 3 bad configuration options There is an error in OpenSSH server generated policyQuoted 3 lines
https://autobuilder.yoctoproject.org/valkyrie/?#/builders/3/builds/1027/steps/11/logs/stdio
Can you have a look at this error please?
I tested the recipe on Fedora 41 with:
* nss 3.107.0 installed with/usr/bin/nss-policy-checkpresent, and
* faking uninstalling it by renaming/usr/bin/nss-policy-check
Quoted 8 lines
Both worked.
Some of your build hosts where nss was not installed complained about executing nss-policy-check unconditionally, which is now fixed.
I think this is on a build host with a very old nss version installed.
Can you uninstall it?
We aim to filter the environment and work the same way in all cases so this sounds like host contamination.
I think we may have to just stop it using it from the host unconditionally.
Cheers,
Richard
2025. 02. 13. 15:32 keltezéssel, Richard Purdie írta:
Quoted 32 lines · Böszörményi Zoltán
Quoted 31 lines
2025. 02. 13. 14:36 keltezéssel, Mathieu Dubois-Briand írta:
Quoted 18 lines · Zoltán Böszörményi
Quoted 4 lines
This ships a crypto policy file for rpm-sequoia.
Signed-off-by Zoltán Böszörményi <[email protected]>---
Hi Zoltán,
I believe we have a new issue with this version:
Quoted 9 lines
python/build-crypto-policies.py--reloadcmds policies output/tmp/tmpqvyryz80: line 5: Bad configuration option:
pubkeyacceptedalgorithms/tmp/tmpqvyryz80: line 6: Bad configuration option:
hostbasedacceptedalgorithms/tmp/tmpqvyryz80: line 8: Bad configuration option:
requiredrsasize/tmp/tmpqvyryz80: terminating, 3 bad configuration options There is an error in OpenSSH server generated policyQuoted 3 lines
https://autobuilder.yoctoproject.org/valkyrie/?#/builders/3/builds/1027/steps/11/logs/stdio
Can you have a look at this error please?
I tested the recipe on Fedora 41 with:
* nss 3.107.0 installed with/usr/bin/nss-policy-checkpresent, and
* faking uninstalling it by renaming/usr/bin/nss-policy-checkBoth worked.
Some of your build hosts where nss was not installed complained about executing nss-policy-check unconditionally, which is now fixed.
Quoted 8 lines
Quoted 3 lines
I think this is on a build host with a very old nss version installed.
Can you uninstall it?We aim to filter the environment and work the same way in all cases so this sounds like host contamination.
I think we may have to just stop it using it from the host unconditionally.
It's not used unconditionally from the host anymore.
It's detected via shutil.which() so if it's in PATH, it is used. See:
https://gitlab.com/redhat-crypto/fedora-crypto-policies/-/commit/032b418a6db842f0eab330eb5909e4604e888728
A message that is not in the archive (sent off-list or not yet received): [email protected]
2025. 02. 13. 15:20 keltezéssel, Zoltan Boszormenyi via lists.openembedded.org írta:
Quoted 26 lines
2025. 02. 13. 14:36 keltezéssel, Mathieu Dubois-Briand írta:
Quoted 16 lines · Zoltán Böszörményi
Quoted 4 lines
This ships a crypto policy file for rpm-sequoia.
Signed-off-by Zoltán Böszörményi <[email protected]>---
Hi Zoltán,
I believe we have a new issue with this version:
| python/build-crypto-policies.py --reloadcmds policies output | /tmp/tmpqvyryz80: line 5: Bad configuration option: pubkeyacceptedalgorithms | /tmp/tmpqvyryz80: line 6: Bad configuration option: hostbasedacceptedalgorithms | /tmp/tmpqvyryz80: line 8: Bad configuration option: requiredrsasize | /tmp/tmpqvyryz80: terminating, 3 bad configuration options | There is an error in OpenSSH server generated policyQuoted 4 lines
https://autobuilder.yoctoproject.org/valkyrie/?#/builders/3/builds/1027/steps/11/logs/stdio
Can you have a look at this error please?
I tested the recipe on Fedora 41 with:
* nss 3.107.0 installed with/usr/bin/nss-policy-checkpresent, and
* faking uninstalling it by renaming/usr/bin/nss-policy-check
Quoted 7 lines
Both worked.
Some of your build hosts where nss was not installed complained about executing nss-policy-check unconditionally, which is now fixed.
I think this is on a build host with a very old nss version installed. Can you uninstall it?
I found an alternative solution but it involves patching out most of the policy generators:
================================================
$ git diff python/policygenerators/__init__.py
python/policygenerators/__init__.py +0 -0
@@ -3,34 +3,8 @@
# Copyright (c) 2019 Red Hat, Inc.
# Copyright (c) 2019 Tomáš Mráz <[email protected]>
-from .bind import BindGenerator
-from .gnutls import GnuTLSGenerator
-from .java import JavaGenerator
-from .krb5 import KRB5Generator
-from .libreswan import LibreswanGenerator
-from .libssh import LibsshGenerator
-from .nss import NSSGenerator
-from .openssh import OpenSSHClientGenerator, OpenSSHServerGenerator -from .openssl import (
- OpenSSLConfigGenerator,
- OpenSSLFIPSGenerator,
- OpenSSLGenerator,
-)
-from .sequoia import RPMSequoiaGenerator, SequoiaGenerator +from .sequoia import RPMSequoiaGenerator
__all__ = [
- 'BindGenerator',
- 'GnuTLSGenerator',
- 'JavaGenerator',
- 'KRB5Generator',
- 'LibreswanGenerator',
- 'LibsshGenerator',
- 'NSSGenerator',
- 'OpenSSHClientGenerator',
- 'OpenSSHServerGenerator',
- 'OpenSSLConfigGenerator',
- 'OpenSSLFIPSGenerator',
- 'OpenSSLGenerator',
'RPMSequoiaGenerator',
- 'SequoiaGenerator',
]
================================================
That should work with this old nss version according to the log.do_compile output.
I can't see an easy way to make these imports and list conditional, so the patch would be "Upstream-Status: Inappropriate".
Since it should only happen for the native build, the patch can be
SRC_URI:append:class-native = "..."
As far as I know, /usr/bin is filtered from target builds but not from native builds.
Quoted 96 lines · Böszörményi Zoltán
2025. 02. 13. 15:20 keltezéssel, Zoltan Boszormenyi via lists.openembedded.org írta:
Quoted 32 lines
2025. 02. 13. 14:36 keltezéssel, Mathieu Dubois-Briand írta:
Quoted 19 lines · Zoltán Böszörményi
Quoted 4 lines
This ships a crypto policy file for rpm-sequoia.
Signed-off-by Zoltán Böszörményi <[email protected]>---
Hi Zoltán,
I believe we have a new issue with this version:
Quoted 9 lines
python/build-crypto-policies.py--reloadcmds policies output/tmp/tmpqvyryz80: line 5: Bad configuration option:
pubkeyacceptedalgorithms/tmp/tmpqvyryz80: line 6: Bad configuration option:
hostbasedacceptedalgorithms/tmp/tmpqvyryz80: line 8: Bad configuration option:
requiredrsasize/tmp/tmpqvyryz80: terminating, 3 bad configuration options There is an error in OpenSSH server generated policyQuoted 5 lines
https://autobuilder.yoctoproject.org/valkyrie/?#/builders/3/builds/1027/steps/11/logs/stdio
Can you have a look at this error please?
I tested the recipe on Fedora 41 with:
* nss 3.107.0 installed with/usr/bin/nss-policy-checkpresent, and
* faking uninstalling it by renaming/usr/bin/nss-policy-checkBoth worked.
Quoted 7 lines
Some of your build hosts where nss was not installed complained about executing nss-policy-check unconditionally, which is now fixed.
I think this is on a build host with a very old nss version installed.
Can you uninstall it?I found an alternative solution but it involves patching out most of the policy generators:
================================================
$ git diff python/policygenerators/__init__.pypython/policygenerators/__init__.py +1
-14@@ -3,34 +3,8 @@ # Copyright (c) 2019 Red Hat, Inc. # Copyright (c) 2019 Tomáš Mráz <[email protected]> -from .bind import BindGenerator -from .gnutls import GnuTLSGenerator -from .java import JavaGenerator -from .krb5 import KRB5Generator -from .libreswan import LibreswanGenerator -from .libssh import LibsshGenerator -from .nss import NSSGenerator -from .openssh import OpenSSHClientGenerator, OpenSSHServerGenerator -from .openssl import ( - OpenSSLConfigGenerator, - OpenSSLFIPSGenerator, - OpenSSLGenerator, -) -from .sequoia import RPMSequoiaGenerator, SequoiaGenerator +from .sequoia import RPMSequoiaGenerator__all__ = [
- 'BindGenerator',
- 'GnuTLSGenerator',
- 'JavaGenerator',
- 'KRB5Generator',
- 'LibreswanGenerator',
- 'LibsshGenerator',
- 'NSSGenerator',
- 'OpenSSHClientGenerator',
- 'OpenSSHServerGenerator',
- 'OpenSSLConfigGenerator',
- 'OpenSSLFIPSGenerator',
- 'OpenSSLGenerator',
'RPMSequoiaGenerator',
- 'SequoiaGenerator',
]
================================================That should work with this old nss version according to the log.do_compile output.
I can't see an easy way to make these imports and list conditional, so the patch would be "Upstream-Status: Inappropriate".
Quoted 6 lines
Since it should only happen for the native build, the patch can be
SRC_URI:append:class-native = "..."
As far as I know,
/usr/binis filtered from target builds but not from native builds.
We only allow access to things from HOSTTOOLS, nothing else is meant to be used, even for native builds.
Cheers,
Richard
2025. 02. 13. 16:06 keltezéssel, Richard Purdie írta:
Quoted 94 lines · Böszörményi Zoltán
Quoted 93 lines
2025. 02. 13. 15:20 keltezéssel, Zoltan Boszormenyi via lists.openembedded.org írta:
Quoted 30 lines
2025. 02. 13. 14:36 keltezéssel, Mathieu Dubois-Briand írta:
Quoted 18 lines · Zoltán Böszörményi
Quoted 4 lines
This ships a crypto policy file for rpm-sequoia.
Signed-off-by Zoltán Böszörményi <[email protected]>---
Hi Zoltán,
I believe we have a new issue with this version:
Quoted 9 lines
python/build-crypto-policies.py--reloadcmds policies output/tmp/tmpqvyryz80: line 5: Bad configuration option:
pubkeyacceptedalgorithms/tmp/tmpqvyryz80: line 6: Bad configuration option:
hostbasedacceptedalgorithms/tmp/tmpqvyryz80: line 8: Bad configuration option:
requiredrsasize/tmp/tmpqvyryz80: terminating, 3 bad configuration options There is an error in OpenSSH server generated policyQuoted 5 lines
https://autobuilder.yoctoproject.org/valkyrie/?#/builders/3/builds/1027/steps/11/logs/stdio
Can you have a look at this error please?
I tested the recipe on Fedora 41 with:
* nss 3.107.0 installed with/usr/bin/nss-policy-checkpresent, and
* faking uninstalling it by renaming/usr/bin/nss-policy-checkBoth worked.
Quoted 7 lines
Some of your build hosts where nss was not installed complained about executing nss-policy-check unconditionally, which is now fixed.
I think this is on a build host with a very old nss version installed.
Can you uninstall it?I found an alternative solution but it involves patching out most of the policy generators:
================================================
$ git diff python/policygenerators/__init__.pypython/policygenerators/__init__.py +1
-27@@ -3,34 +3,8 @@ # Copyright (c) 2019 Red Hat, Inc. # Copyright (c) 2019 Tomáš Mráz <[email protected]> -from .bind import BindGenerator -from .gnutls import GnuTLSGenerator -from .java import JavaGenerator -from .krb5 import KRB5Generator -from .libreswan import LibreswanGenerator -from .libssh import LibsshGenerator -from .nss import NSSGenerator -from .openssh import OpenSSHClientGenerator, OpenSSHServerGenerator -from .openssl import ( - OpenSSLConfigGenerator, - OpenSSLFIPSGenerator, - OpenSSLGenerator, -) -from .sequoia import RPMSequoiaGenerator, SequoiaGenerator +from .sequoia import RPMSequoiaGenerator __all__ = [ - 'BindGenerator', - 'GnuTLSGenerator', - 'JavaGenerator', - 'KRB5Generator', - 'LibreswanGenerator', - 'LibsshGenerator', - 'NSSGenerator', - 'OpenSSHClientGenerator', - 'OpenSSHServerGenerator', - 'OpenSSLConfigGenerator', - 'OpenSSLFIPSGenerator', - 'OpenSSLGenerator', 'RPMSequoiaGenerator', - 'SequoiaGenerator', ]================================================
That should work with this old nss version according to the log.do_compile output.
I can't see an easy way to make these imports and list conditional, so the patch would be "Upstream-Status: Inappropriate".
Quoted 8 lines
Quoted 6 lines
Since it should only happen for the native build, the patch can be
SRC_URI:append:class-native = "..."
As far as I know,
/usr/binis filtered from target builds but not from native builds.We only allow access to things from HOSTTOOLS, nothing else is meant to be used, even for native builds.
As I wrote, I misdiagnosed it. There's no problem with nss-policy-check.
Does HOSTTOOLS include /usr/bin/ssh and /usr/bin/sshd?
Because the test_config() class method only fails for openssh and opensshserver. They can be ignored with an envvar.
Generally it's best to resend the whole patchset, as sending individual follow up patches doesn't scale for maintainers, they can easily lose track of how to combine everything into a non-broken set of commits if many people start sending partial patches at the same time.
Alex
Quoted 111 lines · Böszörményi Zoltán
2025. 02. 13. 16:06 keltezéssel, Richard Purdie írta:
Quoted 94 lines · Böszörményi Zoltán
Quoted 93 lines
2025. 02. 13. 15:20 keltezéssel, Zoltan Boszormenyi via lists.openembedded.org írta:
Quoted 30 lines
2025. 02. 13. 14:36 keltezéssel, Mathieu Dubois-Briand írta:
Quoted 18 lines · Zoltán Böszörményi
Quoted 4 lines
This ships a crypto policy file for rpm-sequoia.
Signed-off-by Zoltán Böszörményi <[email protected]>---
Hi Zoltán,
I believe we have a new issue with this version:
Quoted 9 lines
python/build-crypto-policies.py--reloadcmds policies output/tmp/tmpqvyryz80: line 5: Bad configuration option:
pubkeyacceptedalgorithms/tmp/tmpqvyryz80: line 6: Bad configuration option:
hostbasedacceptedalgorithms/tmp/tmpqvyryz80: line 8: Bad configuration option:
requiredrsasize/tmp/tmpqvyryz80: terminating, 3 bad configuration options There is an error in OpenSSH server generated policyQuoted 5 lines
https://autobuilder.yoctoproject.org/valkyrie/?#/builders/3/builds/1027/steps/11/logs/stdio
Can you have a look at this error please?
I tested the recipe on Fedora 41 with:
* nss 3.107.0 installed with/usr/bin/nss-policy-checkpresent, and
* faking uninstalling it by renaming/usr/bin/nss-policy-checkBoth worked.
Quoted 7 lines
Some of your build hosts where nss was not installed complained about executing nss-policy-check unconditionally, which is now fixed.
I think this is on a build host with a very old nss version installed.
Can you uninstall it?I found an alternative solution but it involves patching out most of the policy generators:
================================================
$ git diff python/policygenerators/__init__.pypython/policygenerators/__init__.py +1
-27@@ -3,34 +3,8 @@ # Copyright (c) 2019 Red Hat, Inc. # Copyright (c) 2019 Tomáš Mráz <[email protected]> -from .bind import BindGenerator -from .gnutls import GnuTLSGenerator -from .java import JavaGenerator -from .krb5 import KRB5Generator -from .libreswan import LibreswanGenerator -from .libssh import LibsshGenerator -from .nss import NSSGenerator -from .openssh import OpenSSHClientGenerator, OpenSSHServerGenerator -from .openssl import ( - OpenSSLConfigGenerator, - OpenSSLFIPSGenerator, - OpenSSLGenerator, -) -from .sequoia import RPMSequoiaGenerator, SequoiaGenerator +from .sequoia import RPMSequoiaGenerator __all__ = [ - 'BindGenerator', - 'GnuTLSGenerator', - 'JavaGenerator', - 'KRB5Generator', - 'LibreswanGenerator', - 'LibsshGenerator', - 'NSSGenerator', - 'OpenSSHClientGenerator', - 'OpenSSHServerGenerator', - 'OpenSSLConfigGenerator', - 'OpenSSLFIPSGenerator', - 'OpenSSLGenerator', 'RPMSequoiaGenerator', - 'SequoiaGenerator', ]================================================
That should work with this old nss version according to the log.do_compile output.
I can't see an easy way to make these imports and list conditional, so the patch would be "Upstream-Status: Inappropriate".
Quoted 8 lines
Quoted 6 lines
Since it should only happen for the native build, the patch can be
SRC_URI:append:class-native = "..."
As far as I know,
/usr/binis filtered from target builds but not from native builds.We only allow access to things from HOSTTOOLS, nothing else is meant to be used, even for native builds.
As I wrote, I misdiagnosed it. There's no problem with nss-policy-check.
Does HOSTTOOLS include
/usr/bin/sshand/usr/bin/sshd?
Because thetest_config()class method only fails for openssh and opensshserver. They can be ignored with an envvar.
2025. 02. 13. 16:16 keltezéssel, Alexander Kanavin írta:
Quoted 5 lines
Generally it's best to resend the whole patchset, as sending individual follow up patches doesn't scale for maintainers, they can easily lose track of how to combine everything into a non-broken set of commits if many people start sending partial patches at the same time.
Got it. I re-sent the whole series with this small fix included.
Quoted 113 lines
Alex
Quoted 109 lines · Böszörményi Zoltán
2025. 02. 13. 16:06 keltezéssel, Richard Purdie írta:
Quoted 94 lines · Böszörményi Zoltán
Quoted 93 lines
2025. 02. 13. 15:20 keltezéssel, Zoltan Boszormenyi via lists.openembedded.org írta:
Quoted 30 lines
2025. 02. 13. 14:36 keltezéssel, Mathieu Dubois-Briand írta:
Quoted 18 lines · Zoltán Böszörményi
Quoted 4 lines
This ships a crypto policy file for rpm-sequoia.
Signed-off-by Zoltán Böszörményi <[email protected]>---
Hi Zoltán,
I believe we have a new issue with this version:
Quoted 9 lines
python/build-crypto-policies.py--reloadcmds policies output/tmp/tmpqvyryz80: line 5: Bad configuration option:
pubkeyacceptedalgorithms/tmp/tmpqvyryz80: line 6: Bad configuration option:
hostbasedacceptedalgorithms/tmp/tmpqvyryz80: line 8: Bad configuration option:
requiredrsasize/tmp/tmpqvyryz80: terminating, 3 bad configuration options There is an error in OpenSSH server generated policyQuoted 5 lines
https://autobuilder.yoctoproject.org/valkyrie/?#/builders/3/builds/1027/steps/11/logs/stdio
Can you have a look at this error please?
I tested the recipe on Fedora 41 with:
* nss 3.107.0 installed with/usr/bin/nss-policy-checkpresent, and
* faking uninstalling it by renaming/usr/bin/nss-policy-checkBoth worked.
Quoted 7 lines
Some of your build hosts where nss was not installed complained about executing nss-policy-check unconditionally, which is now fixed.
I think this is on a build host with a very old nss version installed.
Can you uninstall it?I found an alternative solution but it involves patching out most of the policy generators:
================================================
$ git diff python/policygenerators/__init__.pypython/policygenerators/__init__.py +1
-27@@ -3,34 +3,8 @@ # Copyright (c) 2019 Red Hat, Inc. # Copyright (c) 2019 Tomáš Mráz <[email protected]> -from .bind import BindGenerator -from .gnutls import GnuTLSGenerator -from .java import JavaGenerator -from .krb5 import KRB5Generator -from .libreswan import LibreswanGenerator -from .libssh import LibsshGenerator -from .nss import NSSGenerator -from .openssh import OpenSSHClientGenerator, OpenSSHServerGenerator -from .openssl import ( - OpenSSLConfigGenerator, - OpenSSLFIPSGenerator, - OpenSSLGenerator, -) -from .sequoia import RPMSequoiaGenerator, SequoiaGenerator +from .sequoia import RPMSequoiaGenerator __all__ = [ - 'BindGenerator', - 'GnuTLSGenerator', - 'JavaGenerator', - 'KRB5Generator', - 'LibreswanGenerator', - 'LibsshGenerator', - 'NSSGenerator', - 'OpenSSHClientGenerator', - 'OpenSSHServerGenerator', - 'OpenSSLConfigGenerator', - 'OpenSSLFIPSGenerator', - 'OpenSSLGenerator', 'RPMSequoiaGenerator', - 'SequoiaGenerator', ]================================================
That should work with this old nss version according to the log.do_compile output.
I can't see an easy way to make these imports and list conditional, so the patch would be "Upstream-Status: Inappropriate".
Quoted 8 lines
Quoted 6 lines
Since it should only happen for the native build, the patch can be
SRC_URI:append:class-native = "..."
As far as I know,
/usr/binis filtered from target builds but not from native builds.We only allow access to things from HOSTTOOLS, nothing else is meant to be used, even for native builds.
As I wrote, I misdiagnosed it. There's no problem with nss-policy-check.
Does HOSTTOOLS include
/usr/bin/sshand/usr/bin/sshd?
Because thetest_config()class method only fails for openssh and opensshserver. They can be ignored with an envvar.
Quoted 110 lines · Böszörményi Zoltán
2025. 02. 13. 16:06 keltezéssel, Richard Purdie írta:
Quoted 101 lines · Böszörményi Zoltán
Quoted 100 lines
2025. 02. 13. 15:20 keltezéssel, Zoltan Boszormenyi via lists.openembedded.org írta:
Quoted 32 lines
2025. 02. 13. 14:36 keltezéssel, Mathieu Dubois-Briand írta:
Quoted 19 lines · Zoltán Böszörményi
Quoted 4 lines
This ships a crypto policy file for rpm-sequoia.
Signed-off-by Zoltán Böszörményi <[email protected]>---
Hi Zoltán,
I believe we have a new issue with this version:
Quoted 10 lines
python/build-crypto-policies.py--reloadcmds policies output/tmp/tmpqvyryz80: line 5: Bad configuration option:
pubkeyacceptedalgorithms/tmp/tmpqvyryz80: line 6: Bad configuration option:
hostbasedacceptedalgorithms/tmp/tmpqvyryz80: line 8: Bad configuration option:
requiredrsasize/tmp/tmpqvyryz80: terminating, 3 bad configuration options There is an error in OpenSSH server generated policyQuoted 5 lines
https://autobuilder.yoctoproject.org/valkyrie/?#/builders/3/builds/1027/steps/11/logs/stdio
Can you have a look at this error please?
I tested the recipe on Fedora 41 with:
* nss 3.107.0 installed with/usr/bin/nss-policy-checkpresent, and
* faking uninstalling it by renaming/usr/bin/nss-policy-checkBoth worked.
Quoted 7 lines
Some of your build hosts where nss was not installed complained about executing nss-policy-check unconditionally, which is now fixed.
I think this is on a build host with a very old nss version installed.
Can you uninstall it?I found an alternative solution but it involves patching out most of the policy generators:
================================================
$ git diff python/policygenerators/__init__.pypython/policygenerators/__init__.py +0
-8@@ -3,34 +3,8 @@ # Copyright (c) 2019 Red Hat, Inc. # Copyright (c) 2019 Tomáš Mráz <[email protected]> -from .bind import BindGenerator -from .gnutls import GnuTLSGenerator -from .java import JavaGenerator -from .krb5 import KRB5Generator -from .libreswan import LibreswanGenerator -from .libssh import LibsshGenerator -from .nss import NSSGenerator -from .openssh import OpenSSHClientGenerator,OpenSSHServerGenerator
python/policygenerators/__init__.py +1
-6-from .openssl import ( - OpenSSLConfigGenerator, - OpenSSLFIPSGenerator, - OpenSSLGenerator, -) -from .sequoia import RPMSequoiaGenerator, SequoiaGenerator +from .sequoia import RPMSequoiaGenerator__all__ = [
- 'BindGenerator',
- 'GnuTLSGenerator',
- 'JavaGenerator',
- 'KRB5Generator',
- 'LibreswanGenerator',
- 'LibsshGenerator',
- 'NSSGenerator',
- 'OpenSSHClientGenerator',
- 'OpenSSHServerGenerator',
- 'OpenSSLConfigGenerator',
- 'OpenSSLFIPSGenerator',
- 'OpenSSLGenerator',
'RPMSequoiaGenerator',
- 'SequoiaGenerator',
]
================================================That should work with this old nss version according to the log.do_compile output.
I can't see an easy way to make these imports and list conditional,
so the patch would be "Upstream-Status: Inappropriate".Since it should only happen for the native build, the patch can be
Quoted 7 lines
Quoted 4 lines
SRC_URI:append:class-native = "..."
As far as I know,
/usr/binis filtered from target builds but not from native builds.We only allow access to things from HOSTTOOLS, nothing else is meant to
be used, even for native builds.
Quoted 7 lines
As I wrote, I misdiagnosed it. There's no problem with nss-policy- check.
Does HOSTTOOLS include
/usr/bin/sshand/usr/bin/sshd? Because thetest_config()class method only fails for openssh and opensshserver.
They can be ignored with an envvar.
Yes, those could be pulled in as we use them in qemu testing so we should probably set the envvar...
Cheers,
Richard
A message that is not in the archive (sent off-list or not yet received): [email protected]
2025. 02. 13. 15:43 keltezéssel, Zoltan Boszormenyi via lists.openembedded.org írta:
Quoted 32 lines
2025. 02. 13. 15:20 keltezéssel, Zoltan Boszormenyi via lists.openembedded.org írta:
Quoted 31 lines
2025. 02. 13. 14:36 keltezéssel, Mathieu Dubois-Briand írta:
Quoted 16 lines · Zoltán Böszörményi
Quoted 4 lines
This ships a crypto policy file for rpm-sequoia.
Signed-off-by Zoltán Böszörményi <[email protected]>---
Hi Zoltán,
I believe we have a new issue with this version:
| python/build-crypto-policies.py --reloadcmds policies output | /tmp/tmpqvyryz80: line 5: Bad configuration option: pubkeyacceptedalgorithms | /tmp/tmpqvyryz80: line 6: Bad configuration option: hostbasedacceptedalgorithms | /tmp/tmpqvyryz80: line 8: Bad configuration option: requiredrsasize | /tmp/tmpqvyryz80: terminating, 3 bad configuration options | There is an error in OpenSSH server generated policyQuoted 4 lines
https://autobuilder.yoctoproject.org/valkyrie/?#/builders/3/builds/1027/steps/11/logs/stdio
Can you have a look at this error please?
I tested the recipe on Fedora 41 with:
* nss 3.107.0 installed with/usr/bin/nss-policy-checkpresent, and
* faking uninstalling it by renaming/usr/bin/nss-policy-checkBoth worked.
Some of your build hosts where nss was not installed complained about executing nss-policy-check unconditionally, which is now fixed.
Quoted 7 lines
Quoted 2 lines
I think this is on a build host with a very old nss version installed. Can you uninstall it?
I found an alternative solution but it involves patching out 0 most of the policy generators:
<bad patch>
Wrong diagnosis.
It only happens for openssh and openssh server configs. And it should be with with export OLD_OPENSSH=1.
Is it okay if I re-send only the first patch in the series?
PATCH 1/5 rpm-sequoia-crypto-policy: New recipe
In reply to Zoltán BöszörményiThis ships a crypto policy file for rpm-sequoia.
--- meta/conf/distro/include/maintainers.inc | 1 + .../rpm-sequoia-crypto-policy_git.bb | 38 +++++++++++++++++++ 2 files changed, 39 insertions(+) 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_git.bb new file +38 -0
@@ -0,0 +1,38 @@ +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" + +SRCREV = "032b418a6db842f0eab330eb5909e4604e888728" +UPSTREAM_CHECK_COMMITS = "1" + +S = "${UNPACKDIR}/git" + +do_compile () { + # Remove most policy 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 + + # Don't validate openssh policy variants. + # Validation may fail and these variants are not needed. + export OLD_OPENSSH=1 + + 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
meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crypto-policy_git.bb line 10
Quoted 3 lines · Zoltan Boszormenyi via lists.openembedded.org
meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crypto-policy_git.bb new file +3
-0+DEPENDS = "coreutils-native openssl-native make-native" + +inherit allarch python3native
These dependencies seem unexpected, and if they’re needed then they should be explained.
We assume make on the host, so why do you need make-native? If there’s a good reason, please comment why.
Ditto for coreutils-native: presumably there’s a tool that isn’t in HOSTTOOLS? What tool?
Typically there’s no need to inherit python3native unless you’re also depending on python3-something-native modules, as by definition there’s a capable python interpreter as it’s running bitbake.
Thanks,
Ross
2025. 02. 20. 15:43 keltezéssel, Ross Burton írta:
Quoted 11 lines · Zoltan Boszormenyi via lists.openembedded.org
meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crypto-policy_git.bb line 10
Quoted 3 lines
meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crypto-policy_git.bb new file +3
-0+DEPENDS = "coreutils-native openssl-native make-native" + +inherit allarch python3nativeThese dependencies seem unexpected, and if they’re needed then they should be explained.
We assume make on the host, so why do you need make-native? If there’s a good reason, please comment why.
Ditto for coreutils-native: presumably there’s a tool that isn’t in HOSTTOOLS? What tool?
Typically there’s no need to inherit python3native unless you’re also depending on python3-something-native modules, as by definition there’s a capable python interpreter as it’s running bitbake.
Thanks, I will send a followup patch after testing the dependency changes.
Quoted 3 lines
Thanks,
Ross