removing dependencies on systemd compat libs

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Sat Jul 26 01:55:49 UTC 2014


Hi,

a few versions ago, systemd provided libraries
libsystemd-{journal,id128,daemon,login}.so were merged into single
libsystemd.so. To provide backwards compatibility, libsystemd.so is
provided under each of the old names. This is done (*) by essentially
duplicating the code. A bunch of rpm still link to the old names, and
the time has come to move them over to the new name.

I split out systemd-compat-libs from systemd-libs today. If your
package depends on systemd-compat-libs then you should update your
linking options. It should be enough to

- when providing build flags directly, replace -lsystemd-daemon,
  -lsystemd-journal, -lsystemd-id128, -lsystemd-login (or any
  combination) by -lsystemd.

- when using pkg-config the systemd.so will be used automatically on
  rebuild, because libsystemd-{journal,daemon,id128,login}.pc files
  point as -lsystemd already. So a cosmetic fix is to use libsystemd
  name for pkg-config instead of the old names.

Those are small libraries, but removing the dependency will save
~.3 MB and make things slightly simpler. This is low priority, since
the compatibility libraries will continue be provided for the
forseeable future. IMHO both rawhide and F21 should be fixed.

$ rpm -q --provides systemd-compat-libs|xargs -i repoquery --whatrequires {}|sort -u

erlang-asn1-0:R16B-03.7.fc21.x86_64
erlang-dialyzer-0:R16B-03.7.fc21.x86_64
erlang-erts-0:R16B-03.7.fc21.x86_64
erlang-runtime_tools-0:R16B-03.7.fc21.x86_64
erlang-tools-0:R16B-03.7.fc21.x86_64
erlang-typer-0:R16B-03.7.fc21.x86_64
httpd-0:2.4.10-1.fc21.x86_64
httpd-tools-0:2.4.10-1.fc21.x86_64
ocserv-0:0.8.1-1.fc21.x86_64
openslp-server-0:2.0.0-3.fc21.x86_64
php-fpm-0:5.6.0-0.3.RC2.fc21.x86_64
rusers-0:0.17-78.fc21.x86_64
rusers-server-0:0.17-78.fc21.x86_64
samba-libs-2:4.1.9-3.fc21.x86_64
scsi-target-utils-0:1.0.48-2.fc21.x86_64
ypbind-3:1.37.1-10.fc21.x86_64
ypserv-0:2.32-3.fc21.x86_64

I intend to file bugs in a few days.

Zbyszek

(*) Initially, ifuncs were used to map old names to the new names,
which exposed many bugs both in ld.bfd and ld.gold, but was made to
work on i386 and amd64. Unfortunately some other archs don't have
adequate tooling support, so this turned out to be unworkable. Since
the compat libs should be used only temporarily, the brute-force
approach of compiling multiple times under different names was chosen.


More information about the devel mailing list