Re: [PATCH] maint: Allow gnulib's readutmp module to use systemd.

Simon Josefsson via Bug reports for the GNU Internet utilities <[email protected]> Fri, 22 Mar 2024 20:51:21 +0100
Newsgroups gmane.comp.gnu.inetutils.bugs
Message-ID <[email protected]>
Collin Funk <[email protected]> writes:

> When building on GNU/Linux with:
>
> ./configure --enable-systemd
>
> there are linker errors due to '-lsystemd' not being passed to the
> linker. This is used by Gnulib's readutmp module.

Hi.  Nice catch, thank you.  I have added a CI/CD job to catch -lsystemd
regressions in the future:

https://gitlab.com/jas/inetutils-cicd/-/commit/fc57115442098c0b31b1d947f01566680c49b943
https://gitlab.com/jas/inetutils-cicd/-/commit/bddc52c89cf4d25c6cfb71b3ffc3653fcc8ff3ec

> $ gnulib-tool --extract-link-directive readutmp
> $(READUTMP_LIB)
>
> This patch adds this to the 'LDADD' variable of the necessary
> Makefiles. 
>
> It has been a while since I used Automake, so I am unsure
> if these belong in <program-name>_LDADD instead. It seems 
> that readutmp is only used by 'syslogd', 'talkd', and
> 'tests/readutmp.c' if that is any help.

Thank you for details -- I think this is somewhat subjective, but I do
prefer to augment as specific LDADD's as possible when it is known how
to do so.  If the library was used by 75% of the binaries, I wouldn't
had bothered, but I think this is a small enough subset to care about.

I pushed the following patch in your name, adding a NEWS entry and the
moniker 'tiny patch' to indicate that signing copyright papers are not
necessary.  I appreciate you taking the time to prepare a patch, though,
and would be happy if you continued to do so, and then copyright papers
will be required at some point so let me know off-list and I'll send you
the proper form to fill out.

https://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=a172b7689899a304ebb1c5061d3520a2414f8c6f

/Simon
signature.asc (application/pgp-signature, 255 B)
-----BEGIN PGP SIGNATURE-----

iIoEARYIADIWIQSjzJyHC50xCrrUzy9RcisI/kdFogUCZf3hORQcc2ltb25Aam9z
ZWZzc29uLm9yZwAKCRBRcisI/kdFoqoGAPwLuMTcUsFpMPQNdQDArdnyFzAp2fo1
73jfRGEhWrsgCgD/Qt8VahM/jbMjD6YnzqSNmYVSI2nVfSMfPM5n8BEFxAQ=
=KK9a
-----END PGP SIGNATURE-----