Skip to contentSkip to conversation

coreutils over uutils-coreutils when selinux in DISTRO_FEATURES

DISCUSSION Vincent Davis Jr 4 participants 6 messages Dec 31, 2023 – Mar 26

lore
Share & tools
lore
#0 lore raw

Hello all,

Currently using coreutils over busybox and systemd over sysvinit via:

Quoted 4 lines
Quoted 17 lines

SKIP_RECIPE[busybox] = "Don't build this" DISTRO_FEATURES_BACKFILL_CONSIDERED:append = " sysvinit" VIRTUAL-RUNTIME_syslog = ""
VIRTUAL-RUNTIME_initscripts = "" VIRTUAL-RUNTIME_init_manager = "systemd" VIRTUAL-RUNTIME_dev_manager = "udev" VIRTUAL-RUNTIME_login_manager = "shadow-base" VIRTUAL-RUNTIME_base-utils = "packagegroup-core-base-utils" VIRTUAL-RUNTIME_base-utils-hwclock = "util-linux-hwclock" VIRTUAL-RUNTIME_base-utils-syslog = ""
VIRTUAL-RUNTIME_vim = "vim"
PREFERRED_PROVIDER_udev = "systemd" PREFERRED_PROVIDER_udev-utils = "systemd" PREFERRED_PROVIDER_virtual/base-utils = "packagegroup-core-base-utils" PREFERRED_PROVIDER_coreutils = "coreutils"

Need help determining how to use coreutils over uutils-coreutils? uutils-coreutils only gets built when I include "selinux" in *DISTRO_FEATURES.
* Thus it leads me to

ERROR: Nothing PROVIDES 'clang-native'
ERROR: Nothing RPROVIDES 'uutils-coreutils'

Of course happens because I'm not including meta-clang.

I've bypassed error by including:

SKIP_RECIPE[uutils-coreutils] = "Don't build this" BBMASK += "/meta-oe/recipes-core/uutils-coreutils"

Which builds, but doesn't include required tools into target system image sed,which.

I have tried removing SKIP_RECIPE,BBMASK and set

PREFERRED_PROVIDER_coreutils = "coreutils"

Still wants to build uutils-coreutils over coreutils.

I would like to not include meta-clang and of course not use uutils-coreutils over coreutils.

#1 lore raw

Hello for future readers,

Issue with target system not containing coreutils was fixed via

SKIP_RECIPE[uutils-coreutils] = "Don't build this"

IMAGE_INSTALL:append = " packagegroup-selinux-minimal"

#2 lore raw

Thanks for posting this, Vincent!

I solved this in a uutils-coreutils-%.bbappend:
PROVIDES:remove = "coreutils"
RPROVIDES:${PN}:remove = "coreutils"

#3 lore raw

Hey Clayton, Thanks for post append! Forgot I wanted to append more info to post. I added bellow into distro config

# Replaces busybox,uutils-coreutils with coreutils SKIP_RECIPE[uutils-coreutils] = "Don't build this" SKIP_RECIPE[busybox] = "Don't build this" VIRTUAL-RUNTIME_syslog = ""
VIRTUAL-RUNTIME_login_manager = "shadow-base" VIRTUAL-RUNTIME_base-utils = "packagegroup-core-base-utils" VIRTUAL-RUNTIME_base-utils-hwclock = "util-linux-hwclock" VIRTUAL-RUNTIME_base-utils-syslog = ""
VIRTUAL-RUNTIME_vim = "vim" PREFERRED_PROVIDER_virtual/base-utils = "packagegroup-core-base-utils" PREFERRED_PROVIDER_coreutils = "coreutils" PREFERRED_PROVIDER_uutils-coreutils = "coreutils" RDEPENDS:packagegroup-core-base-utils:remove = " parted"

#4 lore raw

Vincent-
I changed my workaround to BBMASK "meta-openembedded/meta-oe/recipes-core/uutils-coreutils/".

Raj/all-

This is an issue at parse time:
uutils-coreutils has a conditional dependency ("selinux") on "clang-native" [1], which is provided by meta-clang [2]

This issue could likely be resolved via BBFILES_DYNAMIC[3].

[1] https://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils_0.0.28.bb?h=scarthgap&id=cc425a989b68fc9b52ab37d5178d13d21ee92f39#n32
[2] https://github.com/kraj/meta-clang/blob/b9ef02282197380ef05edbd0eb852e1934ceb59b/recipes-devtools/clang/clang_git.bb#L306
[3] https://docs.yoctoproject.org/scarthgap/ref-manual/variables.html#term-BBFILES_DYNAMIC

Clayton Casciato

#5 lore raw
Quoted 4 lines · Clayton Casciato

Vincent-
I changed my workaround to BBMASK "meta-openembedded/meta-oe/recipes-core/uutils-coreutils/".

Quoted 8 lines

Raj/all-

This is an issue at parse time:
uutils-coreutils has a conditional dependency ("selinux") on "clang-native" [1], which is provided by meta-clang [2]

This issue could likely be resolved via BBFILES_DYNAMIC[3].

I think we can also disable selinux packageconfig by default. I think if you do not need selinux then I Would suggest to toggle this packageconfig

Quoted 10 lines

[1]
https://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils_0.0.28.bb?h=scarthgap&id=cc425a989b68fc9b52ab37d5178d13d21ee92f39#n32
[2]
https://github.com/kraj/meta-clang/blob/b9ef02282197380ef05edbd0eb852e1934ceb59b/recipes-devtools/clang/clang_git.bb#L306
[3]
https://docs.yoctoproject.org/scarthgap/ref-manual/variables.html#term-BBFILES_DYNAMIC

Clayton Casciato