diff options
author | Peter Kjellerstedt <pkj@axis.com> | 2022-08-09 16:17:29 +0200 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2022-08-09 09:51:57 -0700 |
commit | acbe74879807fc6f82b62525d32c823899e19036 (patch) | |
tree | 7394c88341bc92df2a835ad4b57af5e944499294 | |
parent | ce74ad4b5167f4430cbe8e123df3e5f64810aa3a (diff) | |
download | meta-openembedded-kirtstone-next.tar.gz |
cryptsetup: Add support for building without SSH tokenskirtstone-next
Cryptsetup SSH tokens is the only feature that has a dependency on
libssh. Add a packageconfig to control this dependency.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r-- | meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.4.3.bb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.4.3.bb b/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.4.3.bb index 8f9f663a3..4f8bbf035 100644 --- a/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.4.3.bb +++ b/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.4.3.bb | |||
@@ -14,7 +14,6 @@ DEPENDS = " \ | |||
14 | libdevmapper \ | 14 | libdevmapper \ |
15 | popt \ | 15 | popt \ |
16 | util-linux-libuuid \ | 16 | util-linux-libuuid \ |
17 | libssh \ | ||
18 | " | 17 | " |
19 | 18 | ||
20 | DEPENDS:append:libc-musl = " argp-standalone" | 19 | DEPENDS:append:libc-musl = " argp-standalone" |
@@ -39,6 +38,7 @@ PACKAGECONFIG ??= " \ | |||
39 | blkid \ | 38 | blkid \ |
40 | luks-adjust-xts-keysize \ | 39 | luks-adjust-xts-keysize \ |
41 | openssl \ | 40 | openssl \ |
41 | ssh-token \ | ||
42 | " | 42 | " |
43 | PACKAGECONFIG:append:class-target = " \ | 43 | PACKAGECONFIG:append:class-target = " \ |
44 | udev \ | 44 | udev \ |
@@ -69,6 +69,7 @@ PACKAGECONFIG[nss] = "--with-crypto_backend=nss,,nss" | |||
69 | PACKAGECONFIG[kernel] = "--with-crypto_backend=kernel" | 69 | PACKAGECONFIG[kernel] = "--with-crypto_backend=kernel" |
70 | PACKAGECONFIG[nettle] = "--with-crypto_backend=nettle,,nettle" | 70 | PACKAGECONFIG[nettle] = "--with-crypto_backend=nettle,,nettle" |
71 | PACKAGECONFIG[luks2] = "--with-default-luks-format=LUKS2,--with-default-luks-format=LUKS1" | 71 | PACKAGECONFIG[luks2] = "--with-default-luks-format=LUKS2,--with-default-luks-format=LUKS1" |
72 | PACKAGECONFIG[ssh-token] = "--enable-ssh-token,--disable-ssh-token,libssh" | ||
72 | 73 | ||
73 | EXTRA_OECONF = "--enable-static" | 74 | EXTRA_OECONF = "--enable-static" |
74 | # Building without largefile is not supported by upstream | 75 | # Building without largefile is not supported by upstream |
@@ -78,6 +79,14 @@ EXTRA_OECONF += "--disable-static-cryptsetup" | |||
78 | # There's no recipe for libargon2 yet | 79 | # There's no recipe for libargon2 yet |
79 | EXTRA_OECONF += "--disable-libargon2" | 80 | EXTRA_OECONF += "--disable-libargon2" |
80 | 81 | ||
82 | do_install:append() { | ||
83 | # The /usr/lib/cryptsetup directory is always created, even when ssh-token | ||
84 | # is disabled. In that case it is empty and causes a packaging error. Since | ||
85 | # there is no reason to distribute the empty directory, the easiest solution | ||
86 | # is to remove it if it is empty. | ||
87 | rmdir -p --ignore-fail-on-non-empty ${D}${libdir}/${BPN} | ||
88 | } | ||
89 | |||
81 | FILES:${PN} += "${@bb.utils.contains('DISTRO_FEATURES','systemd','${exec_prefix}/lib/tmpfiles.d/cryptsetup.conf', '', d)}" | 90 | FILES:${PN} += "${@bb.utils.contains('DISTRO_FEATURES','systemd','${exec_prefix}/lib/tmpfiles.d/cryptsetup.conf', '', d)}" |
82 | 91 | ||
83 | RDEPENDS:${PN} = " \ | 92 | RDEPENDS:${PN} = " \ |