diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2023-07-19 01:38:40 +0200 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2023-07-20 19:08:57 -0700 |
commit | 3a91bdb9cb6e43b337343b40fb36d9ed0c7f288e (patch) | |
tree | f1589a1ec119efeb762bbd4acaed764952ef9666 /meta-oe/recipes-crypto | |
parent | d449d72c4bf54f70c1f8253ee47d32441de01b3f (diff) | |
download | meta-openembedded-3a91bdb9cb6e43b337343b40fb36d9ed0c7f288e.tar.gz |
libtomcrypt: add PACKAGECONFIG for ltm enabled by default
* enabled by default, because that's what dropbear expects and fails
without as shown in:
http://errors.yoctoproject.org/Errors/Details/720460/
dropbear/2022.83-r0/crypto_desc.c:72: undefined reference to `ltm_desc'
* add comment about the LICENSE
* use EXTRA_OEMAKE
* FYI: if you need to use this in dunfell (for whatever reason e.g. to
avoid CVE-2019-17362 in dropbear which contains bundled libtomcrypt),
then you need to add:
# Only needed for dunfell, fixed in kirkstone with:
# https://git.openembedded.org/openembedded-core/commit/?h=kirkstone&id=4b308773eca7570ce5007e8f953b56252c17fdb1
DEPENDS += "libtool-cross"
EXTRA_OEMAKE += "'LIBTOOL=${HOST_SYS}-libtool'"
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-crypto')
-rw-r--r-- | meta-oe/recipes-crypto/libtomcrypt/libtomcrypt_1.18.2.bb | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/meta-oe/recipes-crypto/libtomcrypt/libtomcrypt_1.18.2.bb b/meta-oe/recipes-crypto/libtomcrypt/libtomcrypt_1.18.2.bb index 8b73cdda8..5479007d9 100644 --- a/meta-oe/recipes-crypto/libtomcrypt/libtomcrypt_1.18.2.bb +++ b/meta-oe/recipes-crypto/libtomcrypt/libtomcrypt_1.18.2.bb | |||
@@ -1,10 +1,19 @@ | |||
1 | SUMMARY = "LibTomCrypt is a public domain open source cryptographic toolkit" | 1 | SUMMARY = "LibTomCrypt is a public domain open source cryptographic toolkit" |
2 | HOMEPAGE = "https://www.libtom.net/LibTomCrypt" | 2 | HOMEPAGE = "https://www.libtom.net/LibTomCrypt" |
3 | SECTION = "libs" | 3 | SECTION = "libs" |
4 | # Unlicense isn't very accurate for this revision, it was WTFPL in 0.18.0-rc1: | ||
5 | # https://github.com/libtom/libtomcrypt/commit/77e31fb6a980212e90b9a50f116dc5a7bd91e527 | ||
6 | # then updated to dual license PD and WTFPL also in 0.18.0-rc1: | ||
7 | # https://github.com/libtom/libtomcrypt/commit/412b2ee1fccc3a0df58f93f372c90d6d0f93bfc9 | ||
8 | # and then updated again to Unlicense after the 0.18.2 tag (it's only in develop branch): | ||
9 | # https://github.com/libtom/libtomcrypt/commit/3630bee6fc0f73dd9c7923fd43f8ae15a2c0fb70 | ||
10 | # but keep using Unlicense to avoid triggering people with WTFPL license: | ||
11 | # https://groups.google.com/g/libtom/c/17Z7xkECULM | ||
12 | # and this comment can be removed next time libtomcrypt is updated | ||
4 | LICENSE = "Unlicense" | 13 | LICENSE = "Unlicense" |
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=71baacc459522324ef3e2b9e052e8180" | 14 | LIC_FILES_CHKSUM = "file://LICENSE;md5=71baacc459522324ef3e2b9e052e8180" |
6 | 15 | ||
7 | DEPENDS += "libtool-cross" | 16 | DEPENDS = "libtool-cross" |
8 | 17 | ||
9 | SRC_URI = "git://github.com/libtom/libtomcrypt.git;protocol=https;branch=master \ | 18 | SRC_URI = "git://github.com/libtom/libtomcrypt.git;protocol=https;branch=master \ |
10 | file://CVE-2019-17362.patch \ | 19 | file://CVE-2019-17362.patch \ |
@@ -14,10 +23,19 @@ SRCREV = "7e7eb695d581782f04b24dc444cbfde86af59853" | |||
14 | 23 | ||
15 | S = "${WORKDIR}/git" | 24 | S = "${WORKDIR}/git" |
16 | 25 | ||
26 | inherit pkgconfig | ||
27 | |||
28 | PACKAGECONFIG ??= "ltm" | ||
29 | PACKAGECONFIG[ltm] = ",,libtommath" | ||
30 | |||
31 | CFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'ltm', '-DUSE_LTM -DLTM_DESC', '', d)}" | ||
32 | |||
33 | EXTRA_OEMAKE = "'PREFIX=${prefix}' 'DESTDIR=${D}' 'LIBPATH=${libdir}' 'CFLAGS=${CFLAGS}'" | ||
34 | |||
17 | do_compile() { | 35 | do_compile() { |
18 | oe_runmake -f makefile.shared | 36 | oe_runmake -f makefile.shared |
19 | } | 37 | } |
20 | 38 | ||
21 | do_install() { | 39 | do_install() { |
22 | oe_runmake -f makefile.shared 'PREFIX=${prefix}' 'DESTDIR=${D}' 'LIBPATH=${libdir}' install | 40 | oe_runmake -f makefile.shared install |
23 | } | 41 | } |