Skip to contentSkip to conversation

dropbear: fix build issues with system libtom libs

PATCH New Andre McCurdy 1 participant 3 messages Sep 16, 2016

lore
Share & tools
lore
#0 lore raw

cover dropbear: fix build issues with system libtom libs

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
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/2 dropbear: fix -ltomcrypt -ltommath order when using system libtom libs

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.

---
 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
meta/recipes-core/dropbear/dropbear.inc +1 -0
index 923d31c..cdac7ec 100644
@@ -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://[email protected] \
meta/recipes-core/dropbear/dropbear/fix-libtomcrypt-libtommath-ordering.patch new file +48 -0

48 lines not on this page · raw message

Signature · 1 line
1.9.1
#2 lore raw

PATCH 2/2 dropbear: deterministic selection of system -vs- bundled libtom libs

In reply to Andre McCurdy

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.

---
 meta/recipes-core/dropbear/dropbear.inc | 4 ++++
 1 file changed, 4 insertions(+)
meta/recipes-core/dropbear/dropbear.inc +4 -0
index cdac7ec..bda7eb8 100644
@@ -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)}"
 
Signature · 1 line
1.9.1