* [PATCH 0/2] dropbear: fix build issues with system libtom libs
@ 2016-09-16 22:29 Andre McCurdy
2016-09-16 22:29 ` [PATCH 1/2] dropbear: fix -ltomcrypt -ltommath order when using " Andre McCurdy
2016-09-16 22:29 ` [PATCH 2/2] dropbear: deterministic selection of system -vs- bundled " Andre McCurdy
0 siblings, 2 replies; 3+ messages in thread
From: Andre McCurdy @ 2016-09-16 22:29 UTC (permalink / raw)
To: openembedded-core
There are currently no libtommath or libtomcrypt recipes in oe-core,
but they may be present in other layers.
Andre McCurdy (2):
dropbear: fix -ltomcrypt -ltommath order when using system libtom libs
dropbear: deterministic selection of system -vs- bundled libtom libs
meta/recipes-core/dropbear/dropbear.inc | 5 +++
.../fix-libtomcrypt-libtommath-ordering.patch | 48 ++++++++++++++++++++++
2 files changed, 53 insertions(+)
create mode 100644 meta/recipes-core/dropbear/dropbear/fix-libtomcrypt-libtommath-ordering.patch
--
1.9.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] dropbear: fix -ltomcrypt -ltommath order when using system libtom libs
2016-09-16 22:29 [PATCH 0/2] dropbear: fix build issues with system libtom libs Andre McCurdy
@ 2016-09-16 22:29 ` Andre McCurdy
2016-09-16 22:29 ` [PATCH 2/2] dropbear: deterministic selection of system -vs- bundled " Andre McCurdy
1 sibling, 0 replies; 3+ messages in thread
From: Andre McCurdy @ 2016-09-16 22:29 UTC (permalink / raw)
To: openembedded-core
To prevent build failures when using system libtom libraries and
linking with --as-needed, LIBTOM_LIBS should be in the order
-ltomcrypt -ltommath, not the other way around, ie libs should be
prepended to LIBTOM_LIBS as they are found, not appended.
Note that LIBTOM_LIBS is not used when linking with the bundled
libtom libs.
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
---
meta/recipes-core/dropbear/dropbear.inc | 1 +
.../fix-libtomcrypt-libtommath-ordering.patch | 48 ++++++++++++++++++++++
2 files changed, 49 insertions(+)
create mode 100644 meta/recipes-core/dropbear/dropbear/fix-libtomcrypt-libtommath-ordering.patch
diff --git a/meta/recipes-core/dropbear/dropbear.inc b/meta/recipes-core/dropbear/dropbear.inc
index 923d31c..cdac7ec 100644
--- a/meta/recipes-core/dropbear/dropbear.inc
+++ b/meta/recipes-core/dropbear/dropbear.inc
@@ -17,6 +17,7 @@ SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.bz2 \
file://0003-configure.patch \
file://0004-fix-2kb-keys.patch \
file://0007-dropbear-fix-for-x32-abi.patch \
+ file://fix-libtomcrypt-libtommath-ordering.patch \
file://init \
file://dropbearkey.service \
file://dropbear@.service \
diff --git a/meta/recipes-core/dropbear/dropbear/fix-libtomcrypt-libtommath-ordering.patch b/meta/recipes-core/dropbear/dropbear/fix-libtomcrypt-libtommath-ordering.patch
new file mode 100644
index 0000000..de930f2
--- /dev/null
+++ b/meta/recipes-core/dropbear/dropbear/fix-libtomcrypt-libtommath-ordering.patch
@@ -0,0 +1,48 @@
+From 2fd8d2aedad0c50cdf1e43edd2387874b720ad4c Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Fri, 16 Sep 2016 12:18:23 -0700
+Subject: [PATCH] fix libtomcrypt/libtommath ordering
+
+To prevent build failures when using system libtom libraries and
+linking with --as-needed, LIBTOM_LIBS should be in the order
+-ltomcrypt -ltommath, not the other way around, ie libs should be
+prepended to LIBTOM_LIBS as they are found, not appended.
+
+Note that LIBTOM_LIBS is not used when linking with the bundled
+libtom libs.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ configure.ac | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index b6abe4c..85bb8bc 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -390,16 +390,16 @@ AC_ARG_ENABLE(bundled-libtom,
+ AC_MSG_NOTICE(Forcing bundled libtom*)
+ else
+ BUNDLED_LIBTOM=0
+- AC_CHECK_LIB(tommath, mp_exptmod, LIBTOM_LIBS="$LIBTOM_LIBS -ltommath",
++ AC_CHECK_LIB(tommath, mp_exptmod, LIBTOM_LIBS="-ltommath $LIBTOM_LIBS",
+ [AC_MSG_ERROR([Missing system libtommath and --disable-bundled-libtom was specified])] )
+- AC_CHECK_LIB(tomcrypt, register_cipher, LIBTOM_LIBS="$LIBTOM_LIBS -ltomcrypt",
++ AC_CHECK_LIB(tomcrypt, register_cipher, LIBTOM_LIBS="-ltomcrypt $LIBTOM_LIBS",
+ [AC_MSG_ERROR([Missing system libtomcrypt and --disable-bundled-libtom was specified])] )
+ fi
+ ],
+ [
+ BUNDLED_LIBTOM=0
+- AC_CHECK_LIB(tommath, mp_exptmod, LIBTOM_LIBS="$LIBTOM_LIBS -ltommath", BUNDLED_LIBTOM=1)
+- AC_CHECK_LIB(tomcrypt, register_cipher, LIBTOM_LIBS="$LIBTOM_LIBS -ltomcrypt", BUNDLED_LIBTOM=1)
++ AC_CHECK_LIB(tommath, mp_exptmod, LIBTOM_LIBS="-ltommath $LIBTOM_LIBS", BUNDLED_LIBTOM=1)
++ AC_CHECK_LIB(tomcrypt, register_cipher, LIBTOM_LIBS="-ltomcrypt $LIBTOM_LIBS", BUNDLED_LIBTOM=1)
+ ]
+ )
+
+--
+1.9.1
+
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] dropbear: deterministic selection of system -vs- bundled libtom libs
2016-09-16 22:29 [PATCH 0/2] dropbear: fix build issues with system libtom libs Andre McCurdy
2016-09-16 22:29 ` [PATCH 1/2] dropbear: fix -ltomcrypt -ltommath order when using " Andre McCurdy
@ 2016-09-16 22:29 ` Andre McCurdy
1 sibling, 0 replies; 3+ messages in thread
From: Andre McCurdy @ 2016-09-16 22:29 UTC (permalink / raw)
To: openembedded-core
Dropbear will use system versions of libtommath and libtomcrypt if
available. To make builds deterministic, add a PACKAGECONFIG option
to choose system libs or force use of the bundled versions.
Note that currently there are no libtommath or libtomcrypt recipes
in oe-core, so default to using the bundled versions.
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
---
meta/recipes-core/dropbear/dropbear.inc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/meta/recipes-core/dropbear/dropbear.inc b/meta/recipes-core/dropbear/dropbear.inc
index cdac7ec..bda7eb8 100644
--- a/meta/recipes-core/dropbear/dropbear.inc
+++ b/meta/recipes-core/dropbear/dropbear.inc
@@ -45,6 +45,10 @@ SYSTEMD_SERVICE_${PN} = "dropbear.socket"
SBINCOMMANDS = "dropbear dropbearkey dropbearconvert"
BINCOMMANDS = "dbclient ssh scp"
EXTRA_OEMAKE = 'MULTI=1 SCPPROGRESS=1 PROGRAMS="${SBINCOMMANDS} ${BINCOMMANDS}"'
+
+PACKAGECONFIG ?= ""
+PACKAGECONFIG[system-libtom] = "--disable-bundled-libtom,--enable-bundled-libtom,libtommath libtomcrypt"
+
EXTRA_OECONF += "\
${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)}"
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-09-16 22:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-16 22:29 [PATCH 0/2] dropbear: fix build issues with system libtom libs Andre McCurdy
2016-09-16 22:29 ` [PATCH 1/2] dropbear: fix -ltomcrypt -ltommath order when using " Andre McCurdy
2016-09-16 22:29 ` [PATCH 2/2] dropbear: deterministic selection of system -vs- bundled " Andre McCurdy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox