diff mbox series

rpm-sequoia-crypto-policy: add nativesdk to BBCLASSEXTEND

Message ID a5b379d1-88b8-499c-bfe6-d741e508ca84@gmail.com
State New
Headers show
Series rpm-sequoia-crypto-policy: add nativesdk to BBCLASSEXTEND | expand

Commit Message

Clayton Casciato Sept. 28, 2025, 8:32 p.m. UTC
Prerequisite for nativesdk-rpm.
Would be required by nativesdk-rpm-sequoia

ERROR: Nothing RPROVIDES 'nativesdk-rpm-sequoia-crypto-policy'
(but virtual:nativesdk:
[...]/meta/recipes-devtools/rpm-sequoia/rpm-sequoia_1.9.0.bb
RDEPENDS on or otherwise requires it)

Reproduce:
1. Add "sequoia" to rpm's default PACKAGECONFIG [1]
2. Add "nativesdk" to rpm-sequoia's BBCLASSEXTEND
3. Configure local.conf [2]
4. Attempt to build "core-image-minimal"

[1] This is seen when directly modifying the weak default.
This does not occur with "PACKAGECONFIG:append:pn-rpm".

[2]
INHERIT += "sign_rpm"

RPM_GPG_NAME = "[...]"
RPM_GPG_PASSPHRASE = "[...]"
GPG_PATH = "[...]"

Signed-off-by: Clayton Casciato <majortomtosourcecontrol@gmail.com>
---
 .../rpm-sequoia/rpm-sequoia-crypto-policy_git.bb                | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alexander Kanavin Sept. 29, 2025, 9:40 a.m. UTC | #1
On Sun, 28 Sept 2025 at 22:32, Clayton Casciato via
lists.openembedded.org
<majortomtosourcecontrol=gmail.com@lists.openembedded.org> wrote:
>
> Prerequisite for nativesdk-rpm.
> Would be required by nativesdk-rpm-sequoia
>
> ERROR: Nothing RPROVIDES 'nativesdk-rpm-sequoia-crypto-policy'
> (but virtual:nativesdk:
> [...]/meta/recipes-devtools/rpm-sequoia/rpm-sequoia_1.9.0.bb
> RDEPENDS on or otherwise requires it)
>
> Reproduce:
> 1. Add "sequoia" to rpm's default PACKAGECONFIG [1]
> 2. Add "nativesdk" to rpm-sequoia's BBCLASSEXTEND
> 3. Configure local.conf [2]
> 4. Attempt to build "core-image-minimal"
>
> [1] This is seen when directly modifying the weak default.
> This does not occur with "PACKAGECONFIG:append:pn-rpm".

...

> -BBCLASSEXTEND = "native"
> +BBCLASSEXTEND = "native nativesdk"

There has to be an actual use case for doing this, and some standard
build path where nativesdk variant is tested. Otherwise, it's a
workaround, and you need to add sequoia option such that it's enabled
only for native and target.

Alex
Clayton Casciato Sept. 29, 2025, 1:47 p.m. UTC | #2
>> On Sun, 28 Sept 2025 at 22:32, Clayton Casciato via 
>> lists.openembedded.org
>> <majortomtosourcecontrol=gmail.com@lists.openembedded.org> wrote:
>>>
>>> This does not occur with "PACKAGECONFIG:append:pn-rpm".
>>@
>> ... 
>>@
>>> -BBCLASSEXTEND = "native"
>>> +BBCLASSEXTEND = "native nativesdk"
>>@
>> There has to be an actual use case for doing this, and some standard
>> build path where nativesdk variant is tested. Otherwise, it's a
>> workaround, and you need to add sequoia option such that it's enabled
>> only for native and target.
>>@
>> Alex
>@
Hi, Alex

I understand the pushback against unnecessary functionality.

I would still like to resolve the case where "sequoia" is in the ??. 

What are your thoughts on this alternative?

PACKAGECONFIG:remove:class-nativesdk = "sequoia"

Thank you!

Clayton Casciato
Alexander Kanavin Sept. 29, 2025, 2:47 p.m. UTC | #3
On Mon, 29 Sept 2025 at 15:47, Clayton Casciato
<majortomtosourcecontrol@gmail.com> wrote:
> I understand the pushback against unnecessary functionality.
>
> I would still like to resolve the case where "sequoia" is in the ??.
>
> What are your thoughts on this alternative?
>
> PACKAGECONFIG:remove:class-nativesdk = "sequoia"

I would rather add it separately like the signing selftest does:

meta/lib/oeqa/selftest/cases/signing.py:        feature +=
'PACKAGECONFIG:append:pn-rpm-native = " sequoia"\n'
meta/lib/oeqa/selftest/cases/signing.py:        feature +=
'PACKAGECONFIG:append:pn-rpm = " sequoia"\n'

_remove works 'after the fact' and complicates understanding how the
configuration ends up with the final values. It also cannot be undone
with any other statement.

Alex
Clayton Casciato Sept. 29, 2025, 3:40 p.m. UTC | #4
> On Mon, 29 Sept 2025 at 15:47, Clayton Casciato
> <majortomtosourcecontrol@gmail.com> wrote:
>> I understand the pushback against unnecessary functionality.
>>
>> I would still like to resolve the case where "sequoia" is in the ??. 
>>
>> What are your thoughts on this alternative?
>>
>> PACKAGECONFIG:remove:class-nativesdk = "sequoia"
>@
> I would rather add it separately like the signing selftest does:
>@
> meta/lib/oeqa/selftest/cases/signing.py:        feature +=
> 'PACKAGECONFIG:append:pn-rpm-native = " sequoia"\n'
> meta/lib/oeqa/selftest/cases/signing.py:        feature +=
> 'PACKAGECONFIG:append:pn-rpm = " sequoia"\n'
>@
> _remove works 'after the fact' and complicates understanding how the 
> configuration ends up with the final values. It also cannot be undone
> with any other statement.
>@
> Alex
I will reconsider for the future, but I typically manipulate the 
non-specific PACKAGECONFIG as suggested by the documentation:
https://docs.yoctoproject.org/dev/ref-manual/variables.html#term-PACKAGECONFIG

This was a frustrating issue to encounter as I had not come across this
behavior before for other recipes.

I see the downside to using a remove operation.
With that said, it is discoverable via bitbake-getvar.

While this does seem like a bug, I plan to drop this issue for now.

Thanks again!

Clayton Casciato
diff mbox series

Patch

diff --git a/meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crypto-policy_git.bb b/meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crypto-policy_git.bb
index 19b86ae391..c602bb4b5a 100644
--- a/meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crypto-policy_git.bb
+++ b/meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crypto-policy_git.bb
@@ -34,4 +34,4 @@  do_install () {
 
 FILES:${PN} = "${datadir}/crypto-policies/back-ends/*"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"