#1013248 libseat-dev: libseat.pc contains unnecessary Requires.private: libsystemd

Package:
libseat-dev
Source:
seatd
Description:
flexible user, seat and session management library (development files)
Submitter:
Braiam Peguero
Date:
2022-06-24 11:45:03 UTC
Severity:
grave
#1013248#5
Date:
2022-06-20 00:32:22 UTC
From:
To:
Dear Maintainer,

Using pkg-config to find headers fails for libseat-dev with
the following output:

    $ /usr/bin/pkg-config --cflags libseat
    Package libsystemd was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libsystemd.pc'
    to the PKG_CONFIG_PATH environment variable
    Package 'libsystemd', required by 'libseat', not found

pkgconfig/libseat.pc includes dependency on libsystemd:

    $ cat /usr/lib/x86_64-linux-gnu/pkgconfig/libseat.pc
    prefix=/usr
    includedir=${prefix}/include
    libdir=${prefix}/lib/x86_64-linux-gnu

    have_seatd=true
    have_logind=true
    have_builtin=true

    Name: libseat
    Description: Seat management library
    Version: 0.7.0
    Requires.private: libsystemd
    Libs: -L${libdir} -lseat
    Libs.private: -lrt
    Cflags: -I${includedir}

Please include libsystemd-dev as a dependency of libseat-dev.

Also, if I'm not mistaken, seatd is trying not to have hard
dependencies on systemd, but couldn't find from where
the .pc file is generated.

#1013248#8
Date:
2022-06-24 11:01:58 UTC
From:
To:
Braiam,

Thanks for this.

I think this is unecessary. I have been investigating where it comes from and
why it is there.

In short, src:seatd upstream also build libseat as a static library. If you were
to link against that you would also require libsystemd as the logind backend in
built-in in our configuration.

However, the Debian package does not include the static library and my
perception is that static libraries are, at best, optional and generally
discouraged in Debian.

The pkg-config syntax appears inadequate to cover the case where a static
version of a library has a dependency additional to the shared. There is a long
and unresolved discussion about this[1].

Meson generates libseat.pc and there is another, also unresolved, meson
discussion[2] that Requires.private should be omitted when building shared
libraries. This also contains the suggestion that is my chosen fix[2]: namely to
patch meson.build to use shared_library() rather than library().

Mark

[1]  https://bugs.freedesktop.org/105572.

[2]  https://github.com/mesonbuild/meson/issues/3970

[3]  https://github.com/mesonbuild/meson/issues/3970#issuecomment-410224556

#1013248#17
Date:
2022-06-24 11:40:10 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
seatd, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1013248@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Mark Hindley <leepen@debian.org> (supplier of updated seatd package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Fri, 24 Jun 2022 12:08:37 +0100
Source: seatd
Architecture: source
Version: 0.7.0-5
Distribution: unstable
Urgency: medium
Maintainer: Mark Hindley <leepen@debian.org>
Changed-By: Mark Hindley <leepen@debian.org>
Closes: 1013248
Changes:
 seatd (0.7.0-5) unstable; urgency=medium
 .
   * meson.build: use shared_library() rather than library() to avoid
     unnecessary Requires.private in libseat.pc (Closes: #1013248).
Checksums-Sha1:
 008e8ac4a05fcf20adc794c1359f06e417764c4c 1982 seatd_0.7.0-5.dsc
 ba909448cf61e0da048cd441d1a05a32361174ed 7980 seatd_0.7.0-5.debian.tar.xz
 739592b84396d2eaf354c76fd0e8587eaf1b25dc 8139 seatd_0.7.0-5_amd64.buildinfo
Checksums-Sha256:
 23c4104ac1138c95d1a26e9aa6a8a5d6decd9a6d66426a83fc56df5e8753a224 1982 seatd_0.7.0-5.dsc
 2cf3eceb33169cab86cf4d7abd989edf3ef28cfb13a0658146da7aeb7d390afb 7980 seatd_0.7.0-5.debian.tar.xz
 114923e79044a7bbbba0fe79a451ff523de424139f1ff6d43130374c165e455a 8139 seatd_0.7.0-5_amd64.buildinfo
Files:
 44f64b36e59e98edc3911ce25bd3b959 1982 admin optional seatd_0.7.0-5.dsc
 765ed2b50c3d1fe3c118859619241ca5 7980 admin optional seatd_0.7.0-5.debian.tar.xz
 10a4e392de2603e47221c8fff5ab10be 8139 admin optional seatd_0.7.0-5_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEUGwVpCsK9aCoVCPu0opFvzKH1kkFAmK1nSMACgkQ0opFvzKH
1kl7QQ//XGta5nTfh7jvf/58Ss+Nnwzk0jueo1CQcpKuVSKlB4lqUjUZTljlJXRh
9ESdYRAmmY/Xfh6HQAhhDEYZNaueOjNhqpmoE8YagxDXpP1NM1+VL79IBhDGtxTb
LGS9NGv+jSVsxsKIkkwjiuR1SQRFO5MYhFUp4MQUslTMztFrTRSEEm9kKH9TqBcO
3T+wOsB3W/2n1FyWTLkDjrZa/J0Wp9uJuT8TpcW4bOoUyePFwkm+Rlb8l5WTqpXU
SXS2wF/kTlgyX2V0T4A1SRtXhnZhZMzMIpKAXHc+Zn0CSrHipnkULrW7PlD+W5Vp
h2Ke1lM1l6piFX0YAQQ1SiP8FM87WDVd8gP80ToucB10t2mflao9FVwlBgON6h+g
maC7HISHubI5SC5v2wnb3YrvOLQHVdMQEtbiq6e38TV52h2Lq3jotlhOrZF7Kh51
wOI4RIoJPlN0HwHMohJ8gjWKR+iHsdnGp6BeyqhF1dJnDPzUJ6uRWHwQb5tP9gI6
nyBf7I3P8/lOlmMoIbjbmT7W2YHFjCBGohAMxWfa1QTKsfxhJbcmHRZhXXyD5ysg
WIPAEW01htSOAEoP4MixYI3fW5Wy+f6j10cE23rVRP1lHfdSe5UtI2GfxbHMIVYl
5LW4DbNYlTn9IVJiwjHhsATVEXmVGkfafEEuVCpHXpZGc0AuD/s=
=hqQW
-----END PGP SIGNATURE-----