On 10/01/2026 01:53, Bruno Haible via Gnulib discussion list wrote:
Hi Michael,
This patch has two problems:
1) It very much looks like it has not been tested.
If you submit a patch, by default, we assume that we can trust it because
you have tested it. You can, alternatively, submit an untested patch,
but then _say_so_, that it is untested.
The && and in the wrong place yes,
but the patch is reviewable.
2) The patch confuses two functionalities:
- (a) whether to interface with libselinux,
- (b) whether to build the chcon, runcon programs.
By the GNU Coding Standards [1], (a) should be triggered by a --with-*
configure option; whereas (b) should be triggered by a --enable-*
configure option.
So, instead of changing the meaning of the --with-selinux /
--without-selinux options, what we would need is a patch that
enables the build of the chcon, runcon programs conditionally based
on some --enable-* option.
Bruno
[1] https://www.gnu.org/prep/standards/html_node/Configuration.html
runcon and chcon do link with libselinux on my Fedora system,
but yes the stubs don't need libselinux.
The idea with the coreutils 9.9 change¹ was to not bother
building stub chcon and runcon on systems without libselinux,
though you could override that default and force building those utils
with the --with-selinux option. I didn't think adding another
config variable was warranted for this.
Also buildilng of those utils can be controlled directly with the
./configure --enable-install-program=runcon,chcon
(and vice versa with --enable-no-install-program=PROG_LIST).
We just thought this was better default behavior,
but we can revert that change if it's problematic.
But yes in testing now without libselinux and --with-selinux
the stubs are not built because without Michael's change
with_selinux is forced to no, which impacts the
coreutils configure logic. I'll think a bit more about all this tomorrow.
BTW that `test -d /selinux` should be updated to
also check for the "/sys/fs/selinux" dir.
cheers,
Padraig
¹ https://github.com/coreutils/coreutils/commit/8ba47d09a