Skip to contentSkip to conversation

RPM signing errors in Yocto master

DISCUSSION Böszörményi Zoltán 3 participants 8 messages Jan 28, 2025 – Jan 29, 2025

lore
Share & tools
lore
#0 lore raw

Hi,

After a new build host installation with Fedora 41, gnupg defaults to this configuration after creating or importing a (signing) key:

zozo@localhost:~$ cat ~/.gnupg/common.conf
use-keyboxd

RPM signing in Yocto stalls and eventually fails with:

warning: Could not set GPG_TTY to stdin: Inappropriate ioctl for device
gpg: waiting for lock (held by <pid>) ...
gpg: can't connect to the keyboxd: IPC connect call failed
gpg: error opening key DB: No Keybox daemon running
gpg: skipped "[email protected]": Input/output error
gpg: signing failed: Input/output error

With adding --with-keyboxd-pgm=/usr/libexec/keyboxd to the Yocto build of gnupg (otherwise it won't install keyboxd), RPM signing fails again. Now, gpg complains that the keyboxd version is different from gpg's own.

According to stackoverflow and blogs, the recommended way to fix "gpg: waiting for lock" issues is to disable use-keyboxd:

zozo@localhost:~$ cat ~/.gnupg/common.conf
#use-keyboxd

I then cleaned up the rest of ~/.gnupg and re-created / re-imported the key with the new configuration.

Still, RPM signing in Yocto master fails with:

warning: Could not set GPG_TTY to stdin: Inappropriate ioctl for device
error: Unsupported OpenPGP signature

With use-keyboxd disabled, I also tested a build with Yocto 5.1 (it ships gnupg 5.0) on the same Fedora 41 host, and RPM signing succeeded.

Also FWIW, I also tried to do a build with Yocto 4.3. To make it work, I had to backport ninja 1.12.1 (to be compatible with python 3.13 on the host) and the pseudo changes from Yocto master. With these, RPM signing succeeded with Yocto 4.3, too.

I also tried reverting these commits in openembedded-core master:

commit 2ab817c434ac443e29d66105056675d6256e8a2c
Author: Wang Mingyu <[email protected]>
Date:   Tue Dec 10 07:56:38 2024 +0800

    gnupg: upgrade 2.5.1 -> 2.5.2

commit 3a00465f4b0c01580fb27e0c462696bd4f840828
Author: hongxu <[email protected]>
Date:   Fri Nov 29 07:33:29 2024 -0800

    gnupg: upgrade 2.5.0 -> 2.5.1

but the same "Unsupported OpenPGP signature" error occurs.

For now, I disabled RPM signing in my distro layer:

-PACKAGE_CLASSES = "package_rpm sign_rpm"
+PACKAGE_CLASSES = "package_rpm"

It would be nice if Yocto 5.2 final can use RPM signing.

Best regards,
Zoltán Böszörményi

#1 lore raw
Quoted 1 line · Zoltan Boszormenyi via lists.openembedded.org

It would be nice if Yocto 5.2 final can use RPM signing.

It can't. Latest rpm release needs sequoia for rpm signing. Which is

- written in rust
- needs libclang.

https://sequoia-pgp.org/

So we ended up disabling the feature:
https://git.yoctoproject.org/poky/commit/?id=ea9c2cfb6901251b95e07e052616a512b91ea0c7

And that's the reason you are seeing "Unsupported OpenPGP signature" from rpm.

Alex

#2 lore raw

2025. 01. 28. 10:30 keltezéssel, Alexander Kanavin írta:

Quoted 6 lines
Quoted 1 line · Zoltan Boszormenyi via lists.openembedded.org

It would be nice if Yocto 5.2 final can use RPM signing.

It can't. Latest rpm release needs sequoia for rpm signing.

Thanks.

However,

Quoted 3 lines

Which is

- written in rust

rust is in core.

Quoted 1 line

- needs libclang.

There was a motion to merge meta-clang into core,
what happened to it?

Quoted 8 lines

https://sequoia-pgp.org/

So we ended up disabling the feature:
https://git.yoctoproject.org/poky/commit/?id=ea9c2cfb6901251b95e07e052616a512b91ea0c7

And that's the reason you are seeing "Unsupported OpenPGP signature" from rpm.

Alex

#3 lore raw
Quoted 10 lines · Böszörményi Zoltán
Quoted 3 lines

Which is

- written in rust

rust is in core.

Quoted 1 line

- needs libclang.

There was a motion to merge meta-clang into core,
what happened to it?

The effort to move clang to core is ongoing. Patches were posted and reviewed, with a significant number of issues to be addressed. If you want it to happen sooner, please do help out with them.

Even once clang lands, we likely won't re-enable signing by default, as having both rust and clang on the way to do_package (which uses bits of rpm) will lengthen build times to unacceptable levels. I just posted some unfortunate benchmarks for rust-native in particular. But you might get the rpm signing oe-selftest working again.

Alex

#4 lore raw

2025. 01. 28. 12:57 keltezéssel, Alexander Kanavin írta:

Quoted 7 lines · Böszörményi Zoltán
Quoted 6 lines
Quoted 3 lines

Which is

- written in rust

rust is in core.

Quoted 1 line

- needs libclang.

Quoted 8 lines
Quoted 2 lines

There was a motion to merge meta-clang into core,
what happened to it?

The effort to move clang to core is ongoing. Patches were posted and reviewed, with a significant number of issues to be addressed. If you want it to happen sooner, please do help out with them.

Even once clang lands, we likely won't re-enable signing by default, as having both rust and clang on the way to do_package

That's bad. This would make some packages in my meta-clang-revival layer non-buildable:

* older versions of intel-graphics-compiler/intel-compute-runtime from meta-intel need llvm/clang 14
* python3-llvmlite (dependency of python3-numba) needs llvm/clang 15

With Yocto 5.1 and older, all 3 libLLVM versions (14, 15 and the default version from meta-clang) can be packaged / signed and the library packages can be installed in parallel.

But clang and e.g. clang14 can't be both pulled in as build dependencies, since they conflict.

Quoted 6 lines

(which uses
bits of rpm) will lengthen build times to unacceptable levels. I just posted some unfortunate benchmarks for rust-native in particular. But you might get the rpm signing oe-selftest working again.

Alex

#5 lore raw
Quoted 25 lines · Zoltan Boszormenyi via lists.openembedded.org

2025. 01. 28. 12:57 keltezéssel, Alexander Kanavin írta:

Quoted 7 lines · Böszörményi Zoltán
Quoted 6 lines
Quoted 3 lines

   Which is

- written in rust

rust is in core.

Quoted 1 line

- needs libclang.

Quoted 8 lines
Quoted 2 lines

There was a motion to merge meta-clang into core,
what happened to it?

The effort to move clang to core is ongoing. Patches were posted and reviewed, with a significant number of issues to be addressed. If you want it to happen sooner, please do help out with them.

Even once clang lands, we likely won't re-enable signing by default, as having both rust and clang on the way to do_package

That's bad. This would make some packages in my meta-clang-revival layer non-buildable:

* older versions of intel-graphics-compiler/intel-compute-runtime from meta-intel need llvm/clang 14
* python3-llvmlite (dependency of python3-numba) needs llvm/clang 15

Quoted 6 lines

With Yocto 5.1 and older, all 3 libLLVM versions (14, 15 and the default version from meta-clang) can be packaged / signed and the library packages can be installed in parallel.

But clang and e.g. clang14 can't be both pulled in as build dependencies, since they conflict.

Zoltan,

A patch to enable the signing using  a PACKAGECONFIG for rpm would likely be accepted. Off by default of course and a test would be ideal.

../Randy

Quoted 17 lines
Quoted 7 lines

  (which uses
bits of rpm) will lengthen build times to unacceptable levels. I just posted some unfortunate benchmarks for rust-native in particular. But you might get the rpm signing oe-selftest working again.

Alex

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#210322):https://lists.openembedded.org/g/openembedded-core/message/210322 Mute This Topic:https://lists.openembedded.org/mt/110856095/3616765
Group Owner:[email protected] Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 2 lines
# Randy MacLeod
# Wind River Linux
#6 lore raw
Quoted 2 lines · Randy MacLeod

A patch to enable the signing using a PACKAGECONFIG for rpm would likely be accepted. Off by default of course and a test would be ideal.

We already have this in rpm recipe:

# has replaced openpgp support and is written in rust:
https://fedoraproject.org/wiki/Changes/RpmSequoia
PACKAGECONFIG[sequoia] = "-DWITH_SEQUOIA=ON,-DWITH_SEQUOIA=OFF,rpm-sequoia"

I also have a half-baked sequoia recipe:
https://git.yoctoproject.org/poky-contrib/tree/meta/recipes-devtools/rpm/rpm-sequoia_1.5.0.bb?h=akanavin/package-version-updates-later

And there's a currently disabled selftest:
https://git.yoctoproject.org/poky/tree/meta/lib/oeqa/selftest/cases/signing.py#n62

So someone needs to take all these, add meta-clang, and make it all work.

Alex

#7 lore raw

2025. 01. 29. 6:36 keltezéssel, Alexander Kanavin írta:

Quoted 11 lines · Randy MacLeod
Quoted 2 lines

A patch to enable the signing using a PACKAGECONFIG for rpm would likely be accepted. Off by default of course and a test would be ideal.

We already have this in rpm recipe:

# has replaced openpgp support and is written in rust:
https://fedoraproject.org/wiki/Changes/RpmSequoia
PACKAGECONFIG[sequoia] = "-DWITH_SEQUOIA=ON,-DWITH_SEQUOIA=OFF,rpm-sequoia"

I also have a half-baked sequoia recipe:
https://git.yoctoproject.org/poky-contrib/tree/meta/recipes-devtools/rpm/rpm-sequoia_1.5.0.bb?h=akanavin/package-version-updates-later

FWIW, I have created an rpm-sequoia 1.6.0 recipe that builds now. 1.7.0 has some dependencies that need rust 1.83 but Yocto master has 1.81 at the moment.

Some ideas were taken from Fedora 41 and the dependencies do not include clang, only openssl. The librpm_sequoia.so.1 library is only about 2.5MB large, so rpm may re-enable signing either unconditionally, or automatically / conditionally based on PACKAGE_CLASSES.

I had to slightly modify cargo.bbclass, though, because "cargo build" complained about the --frozen flag because it wanted to make some changes to Cargo.lock. It also recommended using --offline instead, which also avoids looking for the network. So I created a conditional in cargo.bbclass for this, maybe other recipes need it, too, that previously didn't build.

I will post the patchset after testing that I can actually build signed rpms.

Quoted 6 lines

And there's a currently disabled selftest:
https://git.yoctoproject.org/poky/tree/meta/lib/oeqa/selftest/cases/signing.py#n62

So someone needs to take all these, add meta-clang, and make it all work.

Alex