When the option --enable-systemd was introduced in August 2023, it was
experimental, because the code that uses it (readutmp in gnulib) was new
and not widely tested. Things have changed now: Ubuntu 25.04 ships
with no /var/run/utmp support and thus requires the use of the systemd
libraries; without it, the 'who' program prints nothing. So, I don't
think it's experimental any more.

There are two problem with this configure option:

1) Users are not aware that it is ineffective if the package 'libsystemd-dev'
has not been installed. Witnesses:
  - Comment #11 in 
https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/2103489
  - I tried to build coreutils-9.7 on Ubuntu 25.04. I used the option
    --enabled-systemd and was then surprised to see that 'who' produced
    no output and 'ldd src/who' did not show any systemd library.

There is no mention of this build dependency anywhere in coreutils. Only
gnulib/DEPENDENCIES has it documented, and the comments of m4/systemd.m4.

2) The option --enable-systemd is off by default. On systems like Ubuntu 25.04
(without /var/run/utmp support) this leads to a dysfunctional 'who' program
by default.

What can be done about this?

Ad 1)
(a) One should add a coreutils/DEPENDENCIES file that contains the relevant
    subset of gnulib/DEPENDENCIES, and coreutils/README-install should
    reference it.
(b) If --enable-systemd is specified by the user and libsystemd-dev is not
    installed, the configuration should err out.
(c) The configuration should, at the end, print a summary of which features
    are enabled and which are not. Like QEMU's configure does, or the one
    of many of Simon Josefsson's packages.

Opinions?

Ad 2)
(a) The option --enable-systemd should be enabled by default on systems
    that have systemd and where /var/run/utmp does not exist.
(b) The option --enable-systemd should be enabled by default on systems
    which have libsystemd-dev installed.

Opinions?

My preferences would be 1(a) + 1(c) + 2(a). And yours (with rationale)?

Bruno




Reply via email to