All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] cryptsetup: Only recommend kernel modules when building for target
@ 2021-06-18 17:28 Peter Kjellerstedt
  0 siblings, 0 replies; only message in thread
From: Peter Kjellerstedt @ 2021-06-18 17:28 UTC (permalink / raw
  To: openembedded-devel

Otherwise cryptsetup-native depends on the target kernel and thus the
target compiler, as can be seen by:

  $ bitbake -g cryptsetup-native
  $ grep 'cryptsetup.*linux-yocto' task-depends.dot
  "cryptsetup-native.do_build" -> "linux-yocto.do_deploy"
  "cryptsetup-native.do_build" -> "linux-yocto.do_package_write_rpm"
  "cryptsetup-native.do_populate_sysroot" -> "linux-yocto.do_populate_sysroot"
  $ grep 'linux-yocto.*gcc-cross' task-depends.dot
  "linux-yocto.do_kernel_configme" -> "gcc-cross-x86_64.do_populate_sysroot"
  "linux-yocto.do_prepare_recipe_sysroot" -> "gcc-cross-x86_64.do_populate_sysroot"

This also moves the runtime dependencies to near the end of the recipe,
which is more customary.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 .../cryptsetup/cryptsetup_2.3.6.bb            | 25 ++++++++++---------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.3.6.bb b/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.3.6.bb
index 562ac83fb..9e83b90ea 100644
--- a/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.3.6.bb
+++ b/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.3.6.bb
@@ -16,10 +16,6 @@ DEPENDS = " \
     util-linux-libuuid \
 "
 
-RDEPENDS_${PN} = " \
-    libdevmapper \
-"
-
 SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/v${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}/${BP}.tar.xz"
 SRC_URI[md5sum] = "504d1ab22cbc4d1a59a8d8c7ee5ed3bf"
 SRC_URI[sha256sum] = "b296b7a21ea576c2b180611ccb19d06aec8dddaedf7c704b0c6a81210c25635f"
@@ -71,14 +67,6 @@ PACKAGECONFIG[kernel] = "--with-crypto_backend=kernel"
 PACKAGECONFIG[nettle] = "--with-crypto_backend=nettle,,nettle"
 PACKAGECONFIG[luks2] = "--with-default-luks-format=LUKS2,--with-default-luks-format=LUKS1"
 
-RRECOMMENDS_${PN} = "kernel-module-aes-generic \
-                     kernel-module-dm-crypt \
-                     kernel-module-md5 \
-                     kernel-module-cbc \
-                     kernel-module-sha256-generic \
-                     kernel-module-xts \
-"
-
 EXTRA_OECONF = "--enable-static"
 # Building without largefile is not supported by upstream
 EXTRA_OECONF += "--enable-largefile"
@@ -89,4 +77,17 @@ EXTRA_OECONF += "--disable-libargon2"
 
 FILES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES','systemd','${exec_prefix}/lib/tmpfiles.d/cryptsetup.conf', '', d)}"
 
+RDEPENDS_${PN} = " \
+    libdevmapper \
+"
+
+RRECOMMENDS_${PN}_class-target = " \
+    kernel-module-aes-generic \
+    kernel-module-dm-crypt \
+    kernel-module-md5 \
+    kernel-module-cbc \
+    kernel-module-sha256-generic \
+    kernel-module-xts \
+"
+
 BBCLASSEXTEND = "native nativesdk"

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-18 17:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-18 17:28 [meta-oe][PATCH] cryptsetup: Only recommend kernel modules when building for target Peter Kjellerstedt

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.