Adding --with-systemdsystemunitdir configure option

Enrico Tagliavini enrico.tagliavini at gmail.com
Fri Mar 20 03:20:08 PDT 2015


Hi there,

while packaging plymouth 0.9.2 for gentoo we got a minor issue in case
systemd is not installed on the building machine. I think this problem
can also happen where the machine where the package is built might
have a different init system / different configuration than the one
the package is installed to (like OBS, koji and the like). See [1].

In short there seems to be a shortcoming in the way the systemd unit
directory is detected in AC:

if test x$enable_systemd_integration = xyes; then
  AC_DEFINE(PLY_ENABLE_SYSTEMD_INTEGRATION, 1, [Coordinate boot up
with systemd])
  SYSTEMD_UNIT_DIR=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
  AC_SUBST(SYSTEMD_UNIT_DIR)
fi

if systemd is not installed the SYSTEMD_UNIT_DIR variable will be
empty, but the failure is not handled and unit files will be installed
under /.

Gentoo developer Yixun Lan developed the patch, available at [2], to
introduce the --with-systemdsystemunitdir configure argument. With
this patch the package can be built also in systems where systemd is
not installed or with a different path for the unit directory. This
same option is commonly used by other packages, for example lvm2,
udisk, firewalld, rsyslog, networkmanager, gdm,upower and many others.

Would you be interested to merge this patch or something along those lines?

Best regards.
Enrico Tagliavini


[1] https://bugs.gentoo.org/show_bug.cgi?id=543712
[2] https://543712.bugs.gentoo.org/attachment.cgi?id=399310


More information about the plymouth mailing list