package/cryptsetup: fix tmpfiles.d setup
authorJohn Keeping <john@metanate.com>
Mon, 14 Jun 2021 10:42:10 +0000 (11:42 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Tue, 20 Jul 2021 21:48:42 +0000 (23:48 +0200)
The configure script uses pkg-config to detect the location of
tmpfiles.d but imposes an unspecified ordering dependency with systemd.
Instead of relying on systemd being built before cryptsetup, set the
directory path explcitly, and ensure it is not set when systemd-tmpfiles
is disabled.

Signed-off-by: John Keeping <john@metanate.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/cryptsetup/cryptsetup.mk

index cd5883d0b43c7a848cf40e474ae845677d7d4cf8..b816dc2f22ff766235ba61f61d171a63a83946fb 100644 (file)
@@ -33,6 +33,12 @@ else
 CRYPTSETUP_CONF_OPTS += --with-crypto_backend=kernel
 endif
 
+ifeq ($(BR2_PACKAGE_SYSTEMD_TMPFILES),y)
+CRYPTSETUP_CONF_OPTS += --with-tmpfilesdir=/usr/lib/tmpfiles.d
+else
+CRYPTSETUP_CONF_OPTS += --without-tmpfilesdir
+endif
+
 HOST_CRYPTSETUP_DEPENDENCIES = \
        host-pkgconf \
        host-lvm2 \