Re: [OE-core] [PATCH v7 1/7] package_rpm.bbclass: Drop external dependency generator to support rpm 6

Robert Yang
2026-03-10T10:21:30Z

On 3/9/26 15:26, Robert Yang wrote:
>
>
> On 3/9/26 15:04, Mathieu Dubois-Briand wrote:
>> On Sat Mar 7, 2026 at 4:22 PM CET, Robert Yang via lists.openembedded.org wrote:
>>> Hi Mathieu,
>>>
>>> On 3/5/26 01:52, Mathieu Dubois-Briand wrote:
>>>> On Tue Mar 3, 2026 at 1:01 PM CET, Robert Yang via lists.openembedded.org
>>>> wrote:
>>>>> I've updated it in the pull (patch 7). @Mathieu, would you please help to
>>>>> re-test it if RP has no objections on the external generator?
>>>>>
>>>>>      https://github.com/robertlinux/yocto rbt/rpm
>>>>>      https://github.com/robertlinux/yocto/tree/rbt/rpm
>>>>>
>>>>> for you to fetch changes up to f8fa3090196bae3e12ad76f12f101722d84ca20a:
>>>>>
>>>>>      rpm: 4.20.1 -> 6.0.1 (2026-03-03 11:29:07 +0000)
>>>>>
>>>>> ----------------------------------------------------------------
>>>>>
>>>>> Robert Yang (7):
>>>>>      package_rpm.bbclass: Drop external dependency generator to support rpm
>>>>>        6
>>>>>      package_rpm.bbclass: Define _lib and _libdir for rpmbuild
>>>>>      lib/oe/package.py: Don't add ldconfig_postinst_fragment for glibc or
>>>>>        musl
>>>>>      glib/python3/acl: Add pkgconfig to RDEPENDS
>>>>>      lib/oe/package.py: Don't redirect stderr
>>>>>      target-sdk-provides-dummy: Add pkg-config to DUMMYPROVIDES
>>>>>      rpm: 4.20.1 -> 6.0.1
>>>>>
>>>>> // Robert
>>>>
>>>> Hi Robert,
>>>>
>>>> I did pick these commits.
>>>
>>> Thank you very much for your great patience.
>>>
>>>>
>>>> We have some different errors now.
>>>>
>>>> ERROR: core-image-sato-1.0-r0 do_rootfs: Could not invoke dnf. Command '/
>>>> srv/pokybuild/yocto-worker/qa-extras2/build/build/tmp/work/qemux86_64-poky-
>>>> linux/core-image-sato/1.0/recipe-sysroot-native/usr/bin/dnf -v --
>>>> rpmverbosity=info -y -c /srv/pokybuild/yocto-worker/qa-extras2/build/build/
>>>> tmp/work/qemux86_64-poky-linux/core-image-sato/1.0/rootfs/etc/dnf/dnf.conf
>>>> --setopt=reposdir=/srv/pokybuild/yocto-worker/qa-extras2/build/build/tmp/
>>>> work/qemux86_64-poky-linux/core-image-sato/1.0/rootfs/etc/yum.repos.d --
>>>> installroot=/srv/pokybuild/yocto-worker/qa-extras2/build/build/tmp/work/
>>>> qemux86_64-poky-linux/core-image-sato/1.0/rootfs --setopt=logdir=/srv/
>>>> pokybuild/yocto-worker/qa-extras2/build/build/tmp/work/qemux86_64-poky-
>>>> linux/core-image-sato/1.0/temp --repofrompath=oe-repo,/srv/pokybuild/yocto-
>>>> worker/qa-extras2/build/build/tmp/work/qemux86_64-poky-linux/core-image-
>>>> sato/1.0/oe-rootfs-repo --nogpgcheck install dnf packagegroup-base-extended
>>>> packagegroup-core-boot packagegroup-core-ssh-dropbear packagegroup-core-x11-
>>>> base packagegroup-core-x11-sato psplash rpm run-postinsts locale-base-c
>>>> locale-base-en-us locale-base-en-gb' returned 1:
>>>
>>> It looks that something is wrong with the storage.
>>>
>>>> ...
>>>> ++ tr -d '[:space:]'
>>>> /var/tmp/rpm-tmp.U4iaJX: line 98: tr: command not found
>>>> + test x '!=' x
>>>> ++ echo --system --home /var/lib/dbus --no-create-home --shell /bin/false --
>>>> user-group messagebus
>>>> ++ tr -d '[:space:]'
>>>> /var/tmp/rpm-tmp.U4iaJX: line 114: tr: command not found
>>>> + test x '!=' x
>>>> ++ echo
>>>> ++ tr -d '[:space:]'
>>>> /var/tmp/rpm-tmp.U4iaJX: line 130: tr: command not found
>>>> ...
>>>>
>>>>     Installing       : dbus-common-1.16.2-r0.x86_64_v3
>>>> 682/790Error: Cannot open file /srv/pokybuild/yocto-worker/qa-extras2/build/
>>>> build/tmp/work/qemux86_64-poky-linux/core-image-sato/1.0/oe-rootfs-repo/rpm/
>>>> x86_64_v3/dbus-1-1.16.2-r0.x86_64_v3.rpm: [Errno 2] No such file or
>>>> directory: '/srv/pokybuild/yocto-worker/qa-extras2/build/build/tmp/work/
>>>> qemux86_64-poky-linux/core-image-sato/1.0/oe-rootfs-repo/rpm/x86_64_v3/
>>>> dbus-1-1.16.2-r0.x86_64_v3.rpm'
>>>> TypeError: 'NoneType' object cannot be interpreted as an integer
>>>> FATAL ERROR: python callback ??? failed, aborting!
>>>>
>>>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/26/builds/3271
>>>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/40/builds/3276
>>>>
>>>> I'm a bit surprise by tr errors here, as it looks a bit unrelated. There
>>>> is a small probability it's related to something else in my branch, but
>>>> this series is clearly the best candidate. I will keep you updated if it
>>>> finally looks related to something else.
>>>>
>>>> I also got some more traditional "nothing provides" errors:
>>>>
>>>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/78/builds/3317
>>>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/8/builds/3321
>>>   > > Can you have a look at these?
>>>
>>> For the above two errors, it is because the sstate cache had been polluted. I
>>> moved pkgconfig-native from do_package to do_package_write_rpm, the
>>> do_package_write_rpm still can be mirrored from the old (but bad) sstate-cache.
>>> It woudl work when the old sstate cache are invalid. So I've sent a
>>> gettext update patch:
>>>
>>> [OE-core] [PATCH 0/1] gettext: 0.26 -> 1.0
>>>
>>> It would make nearly all the sstate cache invalid, and re-built from sources,
>>> then this should be fixed.
>>>
>>> What I'm worried about is that gettext is very basic package, I hope it won't
>>> cause more troubles. I've done world build on qemux86-64 and qemuarm64.
>>>
>>> Other reipes' upgrading may also can make the sstate cache invalid.
>>>
>>> // Robert
>>>
>>
>> Hi Robert,
>>
>> I ran a build, not with your gettext patch, but with the one from the
>> glibc upgrade by Hemanth. We still had similar errors.
>>
>> Any opinion?
>
> It seems that now the failed ones are related to 'tr ', at least, the pkgconfig
> issues are gone.
>
> I will look into it, sorry about that.

It is failed to build with systemd, the rpm's sysuser creation doesn't work with
cross build, and we don't need rpm to create the users since we have
useradd.bbclass. The fix is:

diff --git a/meta/classes-global/package_rpm.bbclass
b/meta/classes-global/package_rpm.bbclass
index 1b86cb52cd..e85644995a 100644
--- a/meta/classes-global/package_rpm.bbclass
+++ b/meta/classes-global/package_rpm.bbclass
@@ -636,6 +636,7 @@ python do_package_rpm () {
cmd = cmd + " --define '_unpackaged_files_terminate_build 0'"
cmd = cmd + " --define 'debug_package %{nil}'"
cmd = cmd + " --define '_tmppath " + workdir + "'"
+ cmd = cmd + " --define '__sysusers_path %{nil}'"
cmd = cmd + " --define '_use_weak_usergroup_deps 1'"
cmd = cmd + " --define '_passwd_path " + "/completely/bogus/path" + "'"
cmd = cmd + " --define '_group_path " + "/completely/bogus/path" + "'"

I will send a V8 after more testing.

// Robert

>
> // Robert
>
>>
>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/3/builds/3378
>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/25/builds/3330
>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/26/builds/3302
>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/40/builds/3307
>>
>> Thanks,
>> Mathieu
>>
>