Bug#859152: libsystemd-dev: Dependency error, lib-dev should not depend on systemd

Arthur Gautier baloo at gandi.net
Fri Mar 31 00:16:41 BST 2017

Package: libsystemd-dev
Version: 232-22
Severity: normal

Dear maintainer,

One should be able to install libsystemd and libsystemd-dev without having

When using a build machine with sysvinit instead of systemd, we can't build
packages depending on libsystemd-dev without installing first systemd.

libsystemd-dev is only headers for the library and should not depend
on the binary itself. I believe this is an error. Would it be possible
to avoid such dependency?

I believe it to be caused by files shipped with libsystemd-dev in the
/usr/lib/x86_64-linux-gnu/systemd/tests/ directory, some of them depends on
libsystemd-shared.so which is shipped by systemd package.

A patch like:
diff --git a/debian/rules b/debian/rules
index aabe69e13401e..f1b76684cc765 100755
--- a/debian/rules
+++ b/debian/rules
@@ -324,6 +324,7 @@ override_dh_installinit:
 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=753589
        dh_shlibdeps -psystemd -- -dPre-Depends -edebian/systemd/bin/systemctl -dDepends
+       dh_shlibdeps -plibsystemd-dev -Xtests
        dh_shlibdeps --remaining-packages -Lsystemd

Would ignore the directory from being scanned by dh_shlibdeps.
One would not be able to launch tests without systemd, I'm
not sure this is okay or not.

Let me know what you think,

Thank you,

-- System Information:
Debian Release: 9.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.10.0 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

More information about the Pkg-systemd-maintainers mailing list