Re: [PATCH] readutmp: load libsystemd with dlopen instead of linking

Eli Schwartz <[email protected]> Tue, 21 Jul 2026 01:10:39 -0400
Newsgroups gmane.comp.lib.gnulib.bugs
Message-ID <[email protected]>
On 7/15/26 12:08 PM, Bruno Haible via Gnulib discussion list wrote:

> Your argument is, AFAIU:
>   (1) There is only one 'coreutils' package, and it must be usable for
>       all situations.
>   (2) Distros should not need to split the 'coreutils' package.
>   (3) Creation of a chroot environment uses the package manager.
>   (4) (3) is not tailorable: There is no way to modify the chroot
>       environment after the package manager has run.
> 
> (3) is indeed correct: The typical way to create a chroot environment is
> a shell command:


Hi,

For Gentoo Linux, there is only one coreutils package, but the package
manager sets dependency flags on it. So, some people install
coreutils[selinux] -- the brackets is a feature flag -- and get their
binaries linked to libselinux because their current system is fully
selinux-native. Everyone else gets a different coreutils[-selinux] build
which never links to selinux.

The package manager enforces all dependencies; chroot users simply
disable feature flags they don't want (globally for all packages):


# /etc/portage/make.conf

USE="-systemd -selinux"


As for (2), it is unsupported, since (1) is false so (2) isn't needed.
Since (1) is false, (3) is both true and offtopic, and (4) is unnecessary.


Switching to dlopen would be very bad for us. Hopefully if coreutils
enables it, it would only be via an optional ./configure choice so we
can disable dlopen.


-- 
Eli Schwartz
OpenPGP_signature.asc (application/pgp-signature, 236 B)
-----BEGIN PGP SIGNATURE-----

wnsEABYIACMWIQTnFNnmK0TPZHnXm3qEp9ErcA0vVwUCal7/TwUDAAAAAAAKCRCEp9ErcA0vVx9L
AQCweHy621jsOfFpWuYCLTOdhDWqRSy3dd62UewYkav85wD9H6FKIjIwqazzW0+ydjpU64MfrrtR
tUlrlFAqFA1Vkwo=
=WawN
-----END PGP SIGNATURE-----