From: Martin Jansa <martin.jansa@gmail.com>
To: openembedded-devel@lists.openembedded.org
Cc: Martin Jansa <Martin.Jansa@gmail.com>
Subject: [meta-oe][PATCH 3/3] libtomcrypt: add PACKAGECONFIG for ltm enabled by default
Date: Tue, 18 Jul 2023 14:09:38 +0200 [thread overview]
Message-ID: <20230718120938.2048623-3-Martin.Jansa@gmail.com> (raw)
In-Reply-To: <20230718120938.2048623-1-Martin.Jansa@gmail.com>
* 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>
---
.../libtomcrypt/libtomcrypt_1.18.2.bb | 21 ++++++++++++++++---
1 file changed, 18 insertions(+), 3 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 8b73cdda85..274f94356f 100644
--- a/meta-oe/recipes-crypto/libtomcrypt/libtomcrypt_1.18.2.bb
+++ b/meta-oe/recipes-crypto/libtomcrypt/libtomcrypt_1.18.2.bb
@@ -1,11 +1,18 @@
SUMMARY = "LibTomCrypt is a public domain open source cryptographic toolkit"
HOMEPAGE = "https://www.libtom.net/LibTomCrypt"
SECTION = "libs"
+# Unlicense isn't very accurate for this revision, it was WTFPL in 0.18.0-rc1:
+# https://github.com/libtom/libtomcrypt/commit/77e31fb6a980212e90b9a50f116dc5a7bd91e527
+# then updated to dual license PD and WTFPL also in 0.18.0-rc1:
+# https://github.com/libtom/libtomcrypt/commit/412b2ee1fccc3a0df58f93f372c90d6d0f93bfc9
+# and then updated again to Unlicense after the 0.18.2 tag (it's only in develop branch):
+# https://github.com/libtom/libtomcrypt/commit/3630bee6fc0f73dd9c7923fd43f8ae15a2c0fb70
+# but keep using Unlicense to avoid triggering people with WTFPL license:
+# https://groups.google.com/g/libtom/c/17Z7xkECULM
+# and this comment can be removed next time libtomcrypt is updated
LICENSE = "Unlicense"
LIC_FILES_CHKSUM = "file://LICENSE;md5=71baacc459522324ef3e2b9e052e8180"
-DEPENDS += "libtool-cross"
-
SRC_URI = "git://github.com/libtom/libtomcrypt.git;protocol=https;branch=master \
file://CVE-2019-17362.patch \
"
@@ -14,10 +21,18 @@ SRCREV = "7e7eb695d581782f04b24dc444cbfde86af59853"
S = "${WORKDIR}/git"
+PACKAGECONFIG ??= "ltm"
+PACKAGECONFIG[ltm] = ",,libtommath"
+
+CFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'ltm', '-DUSE_LTM -DLTM_DESC', '', d)}"
+
+EXTRA_OEMAKE = "'PREFIX=${prefix}' 'DESTDIR=${D}' 'LIBPATH=${libdir}' 'CFLAGS=${CFLAGS}'"
+EXTRA_OEMAKE += "${@bb.utils.contains('PACKAGECONFIG', 'ltm', 'EXTRALIBS=${STAGING_LIBDIR}/libtommath.a', '', d)}"
+
do_compile() {
oe_runmake -f makefile.shared
}
do_install() {
- oe_runmake -f makefile.shared 'PREFIX=${prefix}' 'DESTDIR=${D}' 'LIBPATH=${libdir}' install
+ oe_runmake -f makefile.shared install
}
--
2.41.0
prev parent reply other threads:[~2023-07-18 12:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-18 12:09 [meta-oe][PATCH 1/3] libtommath: add recipe for LibTomMath used by dropbear Martin Jansa
2023-07-18 12:09 ` [meta-oe][PATCH 2/3] libtomcrypt: backport a fix for CVE-2019-17362 Martin Jansa
2023-07-18 12:09 ` Martin Jansa [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230718120938.2048623-3-Martin.Jansa@gmail.com \
--to=martin.jansa@gmail.com \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox