Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "Manage plain dm-crypt and LUKS encrypted volumes" |
| 2 | DESCRIPTION = "Cryptsetup is used to conveniently setup dm-crypt managed \ |
| 3 | device-mapper mappings. These include plain dm-crypt volumes and \ |
| 4 | LUKS volumes. The difference is that LUKS uses a metadata header \ |
| 5 | and can hence offer more features than plain dm-crypt. On the other \ |
| 6 | hand, the header is visible and vulnerable to damage." |
| 7 | HOMEPAGE = "https://gitlab.com/cryptsetup/cryptsetup" |
| 8 | SECTION = "console" |
| 9 | LICENSE = "GPL-2.0-with-OpenSSL-exception" |
| 10 | LIC_FILES_CHKSUM = "file://COPYING;md5=32107dd283b1dfeb66c9b3e6be312326" |
| 11 | |
| 12 | DEPENDS = " \ |
| 13 | json-c \ |
| 14 | libdevmapper \ |
| 15 | popt \ |
| 16 | util-linux \ |
| 17 | " |
| 18 | |
| 19 | RDEPENDS_${PN} = " \ |
| 20 | libdevmapper \ |
| 21 | " |
| 22 | |
| 23 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/v${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}/${BP}.tar.xz" |
Andrew Geissler | 2ee498a | 2020-05-29 15:52:06 -0500 | [diff] [blame^] | 24 | SRC_URI[md5sum] = "6e4ffb6d35a73f7539a5d0c1354654cd" |
| 25 | SRC_URI[sha256sum] = "a89e13dff0798fd0280e801d5f0cc8cfdb2aa5b1929bec1b7322e13d3eca95fb" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 26 | |
| 27 | inherit autotools gettext pkgconfig |
| 28 | |
| 29 | # Use openssl because libgcrypt drops root privileges |
| 30 | # if libgcrypt is linked with libcap support |
| 31 | PACKAGECONFIG ??= " \ |
| 32 | keyring \ |
| 33 | cryptsetup \ |
| 34 | veritysetup \ |
| 35 | cryptsetup-reencrypt \ |
| 36 | integritysetup \ |
| 37 | ${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)} \ |
| 38 | kernel_crypto \ |
| 39 | internal-argon2 \ |
| 40 | blkid \ |
| 41 | luks-adjust-xts-keysize \ |
| 42 | openssl \ |
| 43 | " |
| 44 | PACKAGECONFIG_append_class-target = " \ |
| 45 | udev \ |
| 46 | " |
| 47 | |
| 48 | PACKAGECONFIG[keyring] = "--enable-keyring,--disable-keyring" |
| 49 | PACKAGECONFIG[fips] = "--enable-fips,--disable-fips" |
| 50 | PACKAGECONFIG[pwquality] = "--enable-pwquality,--disable-pwquality,libpwquality" |
| 51 | PACKAGECONFIG[passwdqc] = "--enable-passwdqc,--disable-passwdqc,passwdqc" |
| 52 | PACKAGECONFIG[cryptsetup] = "--enable-cryptsetup,--disable-cryptsetup" |
| 53 | PACKAGECONFIG[veritysetup] = "--enable-veritysetup,--disable-veritysetup" |
| 54 | PACKAGECONFIG[cryptsetup-reencrypt] = "--enable-cryptsetup-reencrypt,--disable-cryptsetup-reencrypt" |
| 55 | PACKAGECONFIG[integritysetup] = "--enable-integritysetup,--disable-integritysetup" |
| 56 | PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux" |
| 57 | PACKAGECONFIG[udev] = "--enable-udev,--disable-udev,,udev" |
| 58 | PACKAGECONFIG[kernel_crypto] = "--enable-kernel_crypto,--disable-kernel_crypto" |
| 59 | # gcrypt-pkbdf2 requries --with-crypto_backend=gcrypt or the flag isn't |
| 60 | # recognized. |
| 61 | PACKAGECONFIG[gcrypt-pbkdf2] = "--enable-gcrypt-pbkdf2" |
| 62 | PACKAGECONFIG[internal-argon2] = "--enable-internal-argon2,--disable-internal-argon2" |
| 63 | PACKAGECONFIG[internal-sse-argon2] = "--enable-internal-sse-argon2,--disable-internal-sse-argon2" |
| 64 | PACKAGECONFIG[blkid] = "--enable-blkid,--disable-blkid,util-linux" |
| 65 | PACKAGECONFIG[dev-random] = "--enable-dev-random,--disable-dev-random" |
| 66 | PACKAGECONFIG[luks-adjust-xts-keysize] = "--enable-luks-adjust-xts-keysize,--disable-luks-adjust-xts-keysize" |
| 67 | PACKAGECONFIG[openssl] = "--with-crypto_backend=openssl,,openssl" |
| 68 | PACKAGECONFIG[gcrypt] = "--with-crypto_backend=gcrypt,,libgcrypt" |
| 69 | PACKAGECONFIG[nss] = "--with-crypto_backend=nss,,nss" |
| 70 | PACKAGECONFIG[kernel] = "--with-crypto_backend=kernel" |
| 71 | PACKAGECONFIG[nettle] = "--with-crypto_backend=nettle,,nettle" |
| 72 | PACKAGECONFIG[luks2] = "--with-default-luks-format=LUKS2,--with-default-luks-format=LUKS1" |
| 73 | |
| 74 | RRECOMMENDS_${PN} = "kernel-module-aes-generic \ |
| 75 | kernel-module-dm-crypt \ |
| 76 | kernel-module-md5 \ |
| 77 | kernel-module-cbc \ |
| 78 | kernel-module-sha256-generic \ |
| 79 | kernel-module-xts \ |
| 80 | " |
| 81 | |
| 82 | EXTRA_OECONF = "--enable-static" |
| 83 | # Building without largefile is not supported by upstream |
| 84 | EXTRA_OECONF += "--enable-largefile" |
| 85 | # Requires a static popt library |
| 86 | EXTRA_OECONF += "--disable-static-cryptsetup" |
| 87 | # There's no recipe for libargon2 yet |
| 88 | EXTRA_OECONF += "--disable-libargon2" |
| 89 | |
| 90 | FILES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES','systemd','${exec_prefix}/lib/tmpfiles.d/cryptsetup.conf', '', d)}" |
| 91 | |
| 92 | BBCLASSEXTEND = "native nativesdk" |