public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Robert Yang <liezhi.yang@windriver.com>
To: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>,
	openembedded-core@lists.openembedded.org
Cc: alex.kanavin@gmail.com, richard.purdie@linuxfoundation.org,
	mark.hatle@kernel.crashing.org
Subject: Re: [OE-core] [PATCH v3 2/2] rpm: 4.20.1 -> 6.0.1
Date: Mon, 2 Feb 2026 21:01:29 +0800	[thread overview]
Message-ID: <495ad555-f9e8-496a-99ea-4b04702ac23d@windriver.com> (raw)
In-Reply-To: <DFZDD2VAMRIY.3LGF8BHLVYMLG@bootlin.com>

Hi Mathieu,

On 1/27/26 20:27, Mathieu Dubois-Briand wrote:
> On Fri Jan 23, 2026 at 7:13 AM CET, Robert Yang via lists.openembedded.org wrote:
>> From: Robert Yang <liezhi.yang@windriver.com>
>>
>> * Add a tag to SRC_URI so that there will be errors when only change the
>>    filename during upgrade it, as suggested by Alexander.
>>
>> * Rebase the following patch:
>>    - 0001-Add-a-color-setting-for-mips64_n32-binaries.patch
>>    - 0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
>>    - 0001-Do-not-read-config-files-from-HOME.patch
>>    - 0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch
>>    - 0001-When-cross-installing-execute-package-scriptlets-wit.patch
>>    - 0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch
>>    - 0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch
>>    - 0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch
>>    - 0002-rpmio-rpmglob.c-avoid-using-GLOB_BRACE-if-undefined-.patch
>>    - 0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch
>>
>> * Remove backported patch 0001-CMakeLists.txt-Fix-checking-for-CFLAGS.patch
>>
>> * Add the following 2 patches:
>>    - 0001-tools-elfdeps.cc-Remove-format-module.patch
>>      There is no format until gcc 13.1, so remove the format module to make it
>>      work on hosts such as Ubuntu 22.04.
>>
>>    - 0001-macros.in-Set-_pkgverify_level-to-digest-as-RCPM-4.2.patch
>>      Fixed:
>>      GPG check FAILED
>>
>> * Add scdoc-native to DEPENDS to fix do_configure error for both native and
>>    target:
>>    Could not find SCDOC using the following names: scdoc
>>
>>    Note, both target and native need scdoc-native, it is used for generating the
>>    manual, the man pages in *man/* are scdoc sources
>>
>> * Add /etc/rpm to nativesdk-rpm to fix:
>>    ERROR: nativesdk-rpm-1_6.0.1-r0 do_package: QA Issue: nativesdk-rpm:
>>    Files/directories were installed but not shipped in any package:
>>    /etc
>>    /etc/rpm
>>
>> * Test info:
>>    PACKAGE_CLASSES = "package_rpm"
>>    $ bitbake core-image-sato world
>>    $ bitbake core-image-sato -cpopulate_sdk
>>
>> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
>> ---
> 
> Hi Robert,
> 
> Thanks for your patch.
> 
> Some tests are failing after this upgrade, you can see them with
> "bitbake core-image-full-cmdline:do_testimage":
> 
> AssertionError: 1 != 0 : dnf --repofrompath=oe-testimage-repo-qemux86_64,http://192.168.7.1:41395/qemux86_64 --repofrompath=oe-testimage-repo-noarch,http://192.168.7.1:41395/noarch --repofrompath=oe-testimage-repo-x86_64_x32,http://192.168.7.1:41395/x86_64_x32 --nogpgcheck install --installroot=/home/root/chroot/test -v -y --rpmverbosity=debug busybox
> ...
> %post(busybox-1.37.0-r0.x86_64_x32): execv(/bin/sh) pid 624
> error: failed to exec scriptlet interpreter /bin/sh: No such file or directory
> %post(busybox-1.37.0-r0.x86_64_x32): waitpid(624) rc 624 status 7f00
> warning: %post(busybox-1.37.0-r0.x86_64_x32) scriptlet failed, exit status 127
> 
> Error in POSTIN scriptlet in rpm package busybox
>    Installing       : libc6-2.42+git0+453e6b8dba-r1.x86_64_x32               3/4

I found the root cause, it is because busybox and libc6 depends on each other,
busybox' elf files depends on libc6, and libc6's postin depends on busybox'
/bin/sh, the do_rootfs works well is because dnf-native has set
RPM_NO_CHROOT_FOR_SCRIPTS=1, but it would be failed for a fresh rootfs.

In rpm 4.20.1, it let the installed files' Requires win, so it installed busybox
firstly, but in rpm 6.0.1, it let the postin's Requires win since postin would
run immediately after the files are installed, this does make sense, so it
installed busybox (which provides /bin/sh required by libc6' postin) firstly,
then we got the errors. I couldn't find which commit made this change because
a lot of files and functions are refactored during 4.20.1 and 6.0.0 (not .1),
I also tried bisect, but failed because a lot of do_patch or
do_configure/do_compile failures for each build.

For libc6's the postin is:

#!/bin/sh
if [ x"$D" = "x" ]; then
     if [ -x /sbin/ldconfig ]; then /sbin/ldconfig ; fi
fi

This doesn't make sense for lib6 since there is no /bin/sh or ldconfig when
libc6 is not ready, so we can just remove libc6's postin to fix the problem.

I will send a V4 for it if no objections.

// Robert

> 
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/11/builds/3059
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/4/builds/3107
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/16/builds/3127
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/19/builds/3100
> 
> Can you have a look at these tests?
> 
> Thanks,
> Mathieu
> 



  reply	other threads:[~2026-02-02 13:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-23  6:13 [PATCH v3 0/2] rpm: 4.20.1 -> 6.0.1 liezhi.yang
2026-01-23  6:13 ` [PATCH v3 1/2] package_rpm.bbclass: Drop external dependency generator to support rpm 6 liezhi.yang
2026-01-23  6:13 ` [PATCH v3 2/2] rpm: 4.20.1 -> 6.0.1 liezhi.yang
2026-01-27 12:27   ` [OE-core] " Mathieu Dubois-Briand
2026-02-02 13:01     ` Robert Yang [this message]
2026-02-08 14:48       ` Robert Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=495ad555-f9e8-496a-99ea-4b04702ac23d@windriver.com \
    --to=liezhi.yang@windriver.com \
    --cc=alex.kanavin@gmail.com \
    --cc=mark.hatle@kernel.crashing.org \
    --cc=mathieu.dubois-briand@bootlin.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox