diff mbox series

[v2,1/1] keepalived: fix systemd build with pkgconf 1.5.3

Message ID 20181215194158.2351-1-fontaine.fabrice@gmail.com
State Superseded
Headers show
Series [v2,1/1] keepalived: fix systemd build with pkgconf 1.5.3 | expand

Commit Message

Fabrice Fontaine Dec. 15, 2018, 7:41 p.m. UTC
Since the bump to 1.5.3, pkgconf prepends the sysroot to all absolute
paths found in the .pc file. This is correct when the paths refer to
something in STAGING_DIR (e.g. libdir, includedir), but not when it
refers to something used for the target.

keepalived uses the systemdsystemunitdir variable from systemd.pc to
decide where to install things. Since DESTDIR is prepended to the
install destination, this will end up in the wrong location.

Until a better solution is found in pkgconf, pass the
systemdsystemunitdir to use explicitly instead of relying on systemd.pc.

Fixes:
 - http://autobuild.buildroot.org/results/34690fd724332c154971d5363a4c84e97a5e9ae9

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
Changes v1 -> v2 (after review of Baruch Siach):
 - Fix typo in commit log (alsa-utils -> keepalived)

 package/keepalived/keepalived.mk | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/package/keepalived/keepalived.mk b/package/keepalived/keepalived.mk
index 584da6bb48..10711cac49 100644
--- a/package/keepalived/keepalived.mk
+++ b/package/keepalived/keepalived.mk
@@ -46,4 +46,10 @@  else
 KEEPALIVED_CONF_OPTS += --disable-libiptc
 endif
 
+ifeq ($(BR2_INIT_SYSTEMD),y)
+KEEPALIVED_CONF_OPTS += \
+	--with-init=systemd \
+	--with-systemdsystemunitdir=/usr/lib/systemd/system
+endif
+
 $(eval $(autotools-package))