* [Buildroot] [PATCH] package/cryptsetup: disable tmpfiles.d for host build
@ 2021-05-07 15:21 John Keeping
2021-05-08 16:23 ` Peter Korsgaard
2021-05-10 9:25 ` Peter Korsgaard
0 siblings, 2 replies; 4+ messages in thread
From: John Keeping @ 2021-05-07 15:21 UTC (permalink / raw)
To: buildroot
When building host-cryptsetup, if tmpfiles.d support is enabled then the
install step tries to install /usr/lib/tmpfiles.d/cryptsetup.conf
globally on the host system.
Even if the tmpfiles.d config were installed correctly in the host
directory, nothing would ever run these rules, so disable this feature
via configure.
Signed-off-by: John Keeping <john@metanate.com>
---
package/cryptsetup/cryptsetup.mk | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/package/cryptsetup/cryptsetup.mk b/package/cryptsetup/cryptsetup.mk
index 719885b59c..cd5883d0b4 100644
--- a/package/cryptsetup/cryptsetup.mk
+++ b/package/cryptsetup/cryptsetup.mk
@@ -43,7 +43,8 @@ HOST_CRYPTSETUP_DEPENDENCIES = \
HOST_CRYPTSETUP_CONF_OPTS = --with-crypto_backend=openssl \
--disable-kernel_crypto \
- --enable-blkid
+ --enable-blkid \
+ --with-tmpfilesdir=no
$(eval $(autotools-package))
$(eval $(host-autotools-package))
--
2.31.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] package/cryptsetup: disable tmpfiles.d for host build
2021-05-07 15:21 [Buildroot] [PATCH] package/cryptsetup: disable tmpfiles.d for host build John Keeping
@ 2021-05-08 16:23 ` Peter Korsgaard
2021-05-08 17:04 ` John Keeping
2021-05-10 9:25 ` Peter Korsgaard
1 sibling, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2021-05-08 16:23 UTC (permalink / raw)
To: buildroot
>>>>> "John" == John Keeping <john@metanate.com> writes:
> When building host-cryptsetup, if tmpfiles.d support is enabled then the
> install step tries to install /usr/lib/tmpfiles.d/cryptsetup.conf
> globally on the host system.
> Even if the tmpfiles.d config were installed correctly in the host
> directory, nothing would ever run these rules, so disable this feature
> via configure.
> Signed-off-by: John Keeping <john@metanate.com>
Committed, thanks.
I see we also don't pass that configure flag for the target variant?
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] package/cryptsetup: disable tmpfiles.d for host build
2021-05-08 16:23 ` Peter Korsgaard
@ 2021-05-08 17:04 ` John Keeping
0 siblings, 0 replies; 4+ messages in thread
From: John Keeping @ 2021-05-08 17:04 UTC (permalink / raw)
To: buildroot
On Sat, 08 May 2021 18:23:48 +0200
Peter Korsgaard <peter@korsgaard.com> wrote:
> >>>>> "John" == John Keeping <john@metanate.com> writes:
>
> > When building host-cryptsetup, if tmpfiles.d support is enabled then the
> > install step tries to install /usr/lib/tmpfiles.d/cryptsetup.conf
> > globally on the host system.
>
> > Even if the tmpfiles.d config were installed correctly in the host
> > directory, nothing would ever run these rules, so disable this feature
> > via configure.
>
> > Signed-off-by: John Keeping <john@metanate.com>
>
> Committed, thanks.
>
> I see we also don't pass that configure flag for the target variant?
Good point.
For the target, DESTDIR is applied to the path so there's no obvious
failure. But the location is discovered via pkg-config the behaviour
will change depending on whether cryptsetup is built before or after
systemd, so I think we need the patch below.
-- >8 --
Subject: [PATCH] package/cryptsetup: fix tmpfiles.d setup
The configure script uses pkg-config to detect the location of
tmpfiles.d but imposes an unspecified ordering dependency on 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>
---
package/cryptsetup/cryptsetup.mk | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/package/cryptsetup/cryptsetup.mk b/package/cryptsetup/cryptsetup.mk
index cd5883d0b4..eee84a7958 100644
--- a/package/cryptsetup/cryptsetup.mk
+++ b/package/cryptsetup/cryptsetup.mk
@@ -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 += --with-tmpfilesdir=no
+endif
+
HOST_CRYPTSETUP_DEPENDENCIES = \
host-pkgconf \
host-lvm2 \
--
2.31.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] package/cryptsetup: disable tmpfiles.d for host build
2021-05-07 15:21 [Buildroot] [PATCH] package/cryptsetup: disable tmpfiles.d for host build John Keeping
2021-05-08 16:23 ` Peter Korsgaard
@ 2021-05-10 9:25 ` Peter Korsgaard
1 sibling, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2021-05-10 9:25 UTC (permalink / raw)
To: buildroot
>>>>> "John" == John Keeping <john@metanate.com> writes:
> When building host-cryptsetup, if tmpfiles.d support is enabled then the
> install step tries to install /usr/lib/tmpfiles.d/cryptsetup.conf
> globally on the host system.
> Even if the tmpfiles.d config were installed correctly in the host
> directory, nothing would ever run these rules, so disable this feature
> via configure.
> Signed-off-by: John Keeping <john@metanate.com>
Committed to 2021.02.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-05-10 9:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-07 15:21 [Buildroot] [PATCH] package/cryptsetup: disable tmpfiles.d for host build John Keeping
2021-05-08 16:23 ` Peter Korsgaard
2021-05-08 17:04 ` John Keeping
2021-05-10 9:25 ` Peter Korsgaard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.