diff mbox series

[meta-core,v2] libgpg-error: inherit lib_package

Message ID 20250321151245.21227-1-mario.schuknecht@iris-sensing.com
State New
Headers show
Series [meta-core,v2] libgpg-error: inherit lib_package | expand

Commit Message

Mario Schuknecht March 21, 2025, 3:12 p.m. UTC
Inherit lib_package to create an extra libgpg-error-bin package for
executables. As a result, the gpg-error and yat2m executables are now in
this libgpg-error-bin package, and no longer in the libgpg-error
package.

Signed-off-by: Mario Schuknecht <mario.schuknecht@iris-sensing.com>
---
 meta/recipes-support/libgpg-error/libgpg-error_1.51.bb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

patchtest@automation.yoctoproject.org March 21, 2025, 3:21 p.m. UTC | #1
Thank you for your submission. Patchtest identified one
or more issues with the patch. Please see the log below for
more information:

---
Testing patch /home/patchtest/share/mboxes/meta-core-v2-libgpg-error-inherit-lib_package.patch

FAIL: test target mailing list: Series sent to the wrong mailing list or some patches from the series correspond to different mailing lists (test_mbox.TestMbox.test_target_mailing_list)

PASS: pretest src uri left files (test_metadata.TestMetadata.pretest_src_uri_left_files)
PASS: test CVE check ignore (test_metadata.TestMetadata.test_cve_check_ignore)
PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message presence (test_mbox.TestMbox.test_commit_message_presence)
PASS: test commit message user tags (test_mbox.TestMbox.test_commit_message_user_tags)
PASS: test lic files chksum modified not mentioned (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)
PASS: test max line length (test_metadata.TestMetadata.test_max_line_length)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)
PASS: test src uri left files (test_metadata.TestMetadata.test_src_uri_left_files)

SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint)
SKIP: test CVE tag format: No new CVE patches introduced (test_patch.TestPatch.test_cve_tag_format)
SKIP: test Signed-off-by presence: No new CVE patches introduced (test_patch.TestPatch.test_signed_off_by_presence)
SKIP: test Upstream-Status presence: No new CVE patches introduced (test_patch.TestPatch.test_upstream_status_presence_format)
SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum presence: No added recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test (test_metadata.TestMetadata.test_license_presence)
SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test summary presence: No added recipes, skipping test (test_metadata.TestMetadata.test_summary_presence)

---

Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this
email with an explanation of why the patch should be accepted. If you
believe these results are due to an error in patchtest, please submit a
bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category
under 'Yocto Project Subprojects'). For more information on specific
failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank
you!
Mathieu Dubois-Briand March 23, 2025, 5:44 p.m. UTC | #2
On Fri Mar 21, 2025 at 4:12 PM CET, Mario Schuknecht via lists.openembedded.org wrote:
> Inherit lib_package to create an extra libgpg-error-bin package for
> executables. As a result, the gpg-error and yat2m executables are now in
> this libgpg-error-bin package, and no longer in the libgpg-error
> package.
>
> Signed-off-by: Mario Schuknecht <mario.schuknecht@iris-sensing.com>
> ---

Hi Mario,

Thanks for the v2, but it looks like we still have a build error:

ERROR: core-image-full-cmdline-1.0-r0 do_rootfs: Unable to install packages. Command '/srv/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-1148269/tmp/work/qemux86_64-poky-linux/core-image-full-cmdline/1.0/recipe-sysroot-native/usr/bin/apt-get  install --allow-downgrades --allow-remove-essential --allow-change-held-packages --allow-unauthenticated --no-remove  apt dpkg gnupg packagegroup-core-boot packagegroup-core-full-cmdline packagegroup-core-ssh-openssh psplash run-postinsts signing-keys-packagefeed ssh-pregen-hostkeys' returned 100:
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 gnupg : Depends: gnupg-gpg but it is not going to be installed
         Depends: libgpg-error (>= 1.51)
         Recommends: pinentry but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

https://autobuilder.yoctoproject.org/valkyrie/#/builders/54/builds/1247
https://autobuilder.yoctoproject.org/valkyrie/#/builders/48/builds/1159

Best regards,
Mathieu
Mario Schuknecht March 24, 2025, 10:39 a.m. UTC | #3
Hi Mathieu,

thanks for your reply.

I have tried to reproduce the error but without success.

How do you set up the environment and what command do you run?

Regards,
Mario
Alexander Kanavin March 24, 2025, 10:45 a.m. UTC | #4
You can see in the error log that this selftest failed:

2025-03-23 17:20:09,617 - oe-selftest - INFO - RESULTS -
runtime_test.TestImage.test_testimage_apt: FAILED (69.22s)

You can find what it does here:
https://git.yoctoproject.org/poky/tree/meta/lib/oeqa/selftest/cases/runtime_test.py#n183

Alex

On Mon, 24 Mar 2025 at 11:39, Mario Schuknecht via
lists.openembedded.org
<Mario.Schuknecht=iris-sensing.com@lists.openembedded.org> wrote:
>
> Hi Mathieu,
>
> thanks for your reply.
>
> I have tried to reproduce the error but without success.
>
> How do you set up the environment and what command do you run?
>
> Regards,
> Mario
>
> ________________________________________
> Von: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
> Gesendet: Sonntag, 23. März 2025 18:44
> An: Mario Schuknecht <Mario.Schuknecht@iris-sensing.com>; openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org>
> Cc: Mario Schuknecht <mario.schuknecht@iris-sensing.com>
> Betreff: Re: [OE-core] [meta-core][PATCH v2] libgpg-error: inherit lib_package
>
> On Fri Mar 21, 2025 at 4:12 PM CET, Mario Schuknecht via lists.openembedded.org wrote:
> > Inherit lib_package to create an extra libgpg-error-bin package for
> > executables. As a result, the gpg-error and yat2m executables are now in
> > this libgpg-error-bin package, and no longer in the libgpg-error
> > package.
> >
> > Signed-off-by: Mario Schuknecht <mario.schuknecht@iris-sensing.com>
> > ---
>
> Hi Mario,
>
> Thanks for the v2, but it looks like we still have a build error:
>
> ERROR: core-image-full-cmdline-1.0-r0 do_rootfs: Unable to install packages. Command '/srv/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-1148269/tmp/work/qemux86_64-poky-linux/core-image-full-cmdline/1.0/recipe-sysroot-native/usr/bin/apt-get  install --allow-downgrades --allow-remove-essential --allow-change-held-packages --allow-unauthenticated --no-remove  apt dpkg gnupg packagegroup-core-boot packagegroup-core-full-cmdline packagegroup-core-ssh-openssh psplash run-postinsts signing-keys-packagefeed ssh-pregen-hostkeys' returned 100:
> Reading package lists...
> Building dependency tree...
> Reading state information...
> Some packages could not be installed. This may mean that you have
> requested an impossible situation or if you are using the unstable
> distribution that some required packages have not yet been created
> or been moved out of Incoming.
> The following information may help to resolve the situation:
>
> The following packages have unmet dependencies:
>  gnupg : Depends: gnupg-gpg but it is not going to be installed
>          Depends: libgpg-error (>= 1.51)
>          Recommends: pinentry but it is not going to be installed
> E: Unable to correct problems, you have held broken packages.
>
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/54/builds/1247
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/48/builds/1159
>
> Best regards,
> Mathieu
>
> --
> Mathieu Dubois-Briand, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com/
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#213524): https://lists.openembedded.org/g/openembedded-core/message/213524
> Mute This Topic: https://lists.openembedded.org/mt/111829729/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Richard Purdie March 24, 2025, 11:07 a.m. UTC | #5
On Mon, 2025-03-24 at 11:45 +0100, Alexander Kanavin via
lists.openembedded.org wrote:
> You can see in the error log that this selftest failed:
> 
> 2025-03-23 17:20:09,617 - oe-selftest - INFO - RESULTS -
> runtime_test.TestImage.test_testimage_apt: FAILED (69.22s)
> 
> You can find what it does here:
> https://git.yoctoproject.org/poky/tree/meta/lib/oeqa/selftest/cases/runtime_test.py#n183

Probably worth adding that the command to run this is:

oe-selftest -r runtime_test.TestImage.test_testimage_apt

Cheers,

Richard
Mario Schuknecht March 25, 2025, 7:18 a.m. UTC | #6
On Mon, 2025-03-24 at 11:45 +0100, Alexander Kanavin via
lists.openembedded.org wrote:
> You can see in the error log that this selftest failed:
>
> 2025-03-23 17:20:09,617 - oe-selftest - INFO - RESULTS -
> runtime_test.TestImage.test_testimage_apt: FAILED (69.22s)
>
> You can find what it does here:
> https://git.yoctoproject.org/poky/tree/meta/lib/oeqa/selftest/cases/runtime_test.py#n183

Probably worth adding that the command to run this is:

oe-selftest -r runtime_test.TestImage.test_testimage_apt



Hi,

unfortunately I cannot reproduce the bug that the do_rootfs task of core-image-full-cmdline fails.

I used the git poky/master branch, sourced the environment, applied the patch and startet the test.
oe-selftest -r runtime_test.TestImage.test_testimage_apt

The do_rootfs task runs fine.
NOTE: recipe core-image-full-cmdline-1.0-r0: task do_rootfs: Started
NOTE: recipe core-image-full-cmdline-1.0-r0: task do_rootfs: Succeeded

I see the error in your log file, but I do not see the reason for the error.
I am not sure if the gnupg-pg package exists or why it is not installed.
Are there more detailed log files?

Regards,
Mario
Alexander Kanavin March 25, 2025, 1:05 p.m. UTC | #7
On Tue, 25 Mar 2025 at 08:18, Mario Schuknecht
<Mario.Schuknecht@iris-sensing.com> wrote:
> unfortunately I cannot reproduce the bug that the do_rootfs task of core-image-full-cmdline fails.
>
> I used the git poky/master branch, sourced the environment, applied the patch and startet the test.
> oe-selftest -r runtime_test.TestImage.test_testimage_apt
>
> The do_rootfs task runs fine.
> NOTE: recipe core-image-full-cmdline-1.0-r0: task do_rootfs: Started
> NOTE: recipe core-image-full-cmdline-1.0-r0: task do_rootfs: Succeeded
>
> I see the error in your log file, but I do not see the reason for the error.
> I am not sure if the gnupg-pg package exists or why it is not installed.
> Are there more detailed log files?

I suspect the problem originates in 'debian renaming' (seen via buildhistory):

packages/core2-64-poky-linux/libgpg-error/libgpg-error: RPROVIDES:
added "libgpg-error (['= 1.51'])"
packages/core2-64-poky-linux/libgpg-error/libgpg-error: PKG changed
from libgpg-error [default] to libgpg-error0

It appears that somehow dependent packages (e.g. gnupg) aren't rebuilt
to use 'libgpg-error0', and at the same time apt isn't able to see the
newly added RPROVIDES that would satisfy the old dependency?

I don't have a local reproducer yet, trying to get to one. Plain
selftest passes for me too.

The easy way out is probably to set PR to force a repackaging?

Alex
Alexander Kanavin March 26, 2025, 8:48 a.m. UTC | #8
On Tue, 25 Mar 2025 at 14:05, Alexander Kanavin via
lists.openembedded.org <alex.kanavin=gmail.com@lists.openembedded.org>
wrote:

> It appears that somehow dependent packages (e.g. gnupg) aren't rebuilt
> to use 'libgpg-error0', and at the same time apt isn't able to see the
> newly added RPROVIDES that would satisfy the old dependency?
>
> I don't have a local reproducer yet, trying to get to one. Plain
> selftest passes for me too.

I have reproduced this. You need to build the image twice to see it.

1. Set up a plain yocto build, put this in local.conf (which
replicates the selftest, particularly in putting gnupg into the
image):

IMAGE_CLASSES += "testimage"
TEST_SUITES = "ping ssh apt.AptRepoTest.test_apt_install_from_repo"
PACKAGE_FEED_URIS = "http://bogus_ip:bogus_port"
EXTRA_IMAGE_FEATURES += "package-management"
PACKAGE_CLASSES = "package_deb"
IMAGE_INSTALL:append:pn-core-image-full-cmdline = " gnupg"

2. bitbake core-image-full-cmdline

3. Apply the patch.

4. bitbake core-image-full-cmdline ---> kaboom.

Alex
Mario Schuknecht March 26, 2025, 8:54 a.m. UTC | #9
> It appears that somehow dependent packages (e.g. gnupg) aren't rebuilt
> to use 'libgpg-error0', and at the same time apt isn't able to see the
> newly added RPROVIDES that would satisfy the old dependency?
>
> I don't have a local reproducer yet, trying to get to one. Plain
> selftest passes for me too.

I have reproduced this. You need to build the image twice to see it.

1. Set up a plain yocto build, put this in local.conf (which
replicates the selftest, particularly in putting gnupg into the
image):

IMAGE_CLASSES += "testimage"
TEST_SUITES = "ping ssh apt.AptRepoTest.test_apt_install_from_repo"
PACKAGE_FEED_URIS = "[http://bogus_ip:bogus_port]http://bogus_ip:bogus_port"
EXTRA_IMAGE_FEATURES += "package-management"
PACKAGE_CLASSES = "package_deb"
IMAGE_INSTALL:append:pn-core-image-full-cmdline = " gnupg"

2. bitbake core-image-full-cmdline

3. Apply the patch.

4. bitbake core-image-full-cmdline ---> kaboom.

Alex


Great. I'm going to test that.

Mario
Mario Schuknecht March 26, 2025, 3:17 p.m. UTC | #10
> It appears that somehow dependent packages (e.g. gnupg) aren't rebuilt
> to use 'libgpg-error0', and at the same time apt isn't able to see the
> newly added RPROVIDES that would satisfy the old dependency?
>
> I don't have a local reproducer yet, trying to get to one. Plain
> selftest passes for me too.

I have reproduced this. You need to build the image twice to see it.

1. Set up a plain yocto build, put this in local.conf (which
replicates the selftest, particularly in putting gnupg into the
image):

IMAGE_CLASSES += "testimage"
TEST_SUITES = "ping ssh apt.AptRepoTest.test_apt_install_from_repo"
PACKAGE_FEED_URIS = "[http://bogus_ip:bogus_port]http://bogus_ip:bogus_port"
EXTRA_IMAGE_FEATURES += "package-management"
PACKAGE_CLASSES = "package_deb"
IMAGE_INSTALL:append:pn-core-image-full-cmdline = " gnupg"

2. bitbake core-image-full-cmdline

3. Apply the patch.

4. bitbake core-image-full-cmdline ---> kaboom.

Alex


I was able to reproduce the problem now.
And as you mentioned, PR="r1" fixes the problem.
But setting the PR variable is rarely used. So I wonder if this solution is okay?

Mario
Alexander Kanavin March 26, 2025, 3:28 p.m. UTC | #11
On Wed, 26 Mar 2025 at 16:17, Mario Schuknecht
<Mario.Schuknecht@iris-sensing.com> wrote:

> I was able to reproduce the problem now.
> And as you mentioned, PR="r1" fixes the problem.
> But setting the PR variable is rarely used. So I wonder if this solution is okay?

Probably not. There seems to be a deeper issue here, and it's better
to get to the bottom of it. If you have a bit of time, I'd appreciate
if you narrrow it down: inspect the metadata of the .deb packages:
gnupg, and then gpg-error, before and after the change. In other
words, is the problem with apt, or with not repackaging gnupg
properly? How does it compare to when using rpm?

Alex
diff mbox series

Patch

diff --git a/meta/recipes-support/libgpg-error/libgpg-error_1.51.bb b/meta/recipes-support/libgpg-error/libgpg-error_1.51.bb
index 741969beb0..e0287d813b 100644
--- a/meta/recipes-support/libgpg-error/libgpg-error_1.51.bb
+++ b/meta/recipes-support/libgpg-error/libgpg-error_1.51.bb
@@ -24,7 +24,7 @@  SRC_URI[sha256sum] = "be0f1b2db6b93eed55369cdf79f19f72750c8c7c39fc20b577e7245454
 
 BINCONFIG = "${bindir}/gpg-error-config"
 
-inherit autotools binconfig-disabled pkgconfig gettext multilib_header multilib_script ptest
+inherit autotools lib_package binconfig-disabled pkgconfig gettext multilib_header multilib_script ptest
 
 RDEPENDS:${PN}-ptest:append = " make bash"
 
@@ -47,7 +47,6 @@  do_install_ptest() {
     install ${B}/tests/Makefile ${D}${PTEST_PATH}
 }
 
-FILES:${PN}-dev += "${bindir}/gpg-error"
 FILES:${PN}-doc += "${datadir}/libgpg-error/errorref.txt"
 
 BBCLASSEXTEND = "native nativesdk"