diff options
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-core/dropbear')
7 files changed, 106 insertions, 9 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear.inc b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear.inc index 1dce2a5ff..bda7eb847 100644 --- a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear.inc +++ b/import-layers/yocto-poky/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 \ @@ -44,9 +45,12 @@ 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)}" -CFLAGS += "-DSFTPSERVER_PATH=\\"${libdir}/openssh/sftp-server\\"" do_install() { install -d ${D}${sysconfdir} \ diff --git a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/0007-dropbear-fix-for-x32-abi.patch b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/0007-dropbear-fix-for-x32-abi.patch index b4501211c..60b302b5c 100644 --- a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/0007-dropbear-fix-for-x32-abi.patch +++ b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/0007-dropbear-fix-for-x32-abi.patch @@ -10,7 +10,7 @@ undesired size, when compiled with the x32 abi toolchain. 2013/05/23 Received this fix from H J Lu. -Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> +Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> # HG changeset patch # User H.J. Lu <hjl.tools@gmail.com> diff --git a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/fix-libtomcrypt-libtommath-ordering.patch b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/fix-libtomcrypt-libtommath-ordering.patch new file mode 100644 index 000000000..de930f29d --- /dev/null +++ b/import-layers/yocto-poky/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 + diff --git a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/init b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/init index e8fed3f94..434bd6b97 100755 --- a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/init +++ b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/init @@ -62,13 +62,13 @@ for t in $DROPBEAR_KEYTYPES; do if [ -f "$DROPBEAR_RSAKEY" -a ! -s "$DROPBEAR_RSAKEY" ]; then rm $DROPBEAR_RSAKEY || true fi - test -f $DROPBEAR_RSAKEY || dropbearkey -t rsa -f $DROPBEAR_RSAKEY + test -f $DROPBEAR_RSAKEY || dropbearkey -t rsa -f $DROPBEAR_RSAKEY $DROPBEAR_RSAKEY_ARGS ;; dsa) if [ -f "$DROPBEAR_DSSKEY" -a ! -s "$DROPBEAR_DSSKEY" ]; then rm $DROPBEAR_DSSKEY || true fi - test -f $DROPBEAR_DSSKEY || dropbearkey -t dss -f $DROPBEAR_DSSKEY + test -f $DROPBEAR_DSSKEY || dropbearkey -t dss -f $DROPBEAR_DSSKEY $DROPBEAR_DSSKEY_ARGS ;; esac done diff --git a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/support-out-of-tree-builds.patch b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/support-out-of-tree-builds.patch new file mode 100644 index 000000000..df6efb453 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/support-out-of-tree-builds.patch @@ -0,0 +1,43 @@ +From: =?UTF-8?q?Henrik=20Nordstr=C3=B6m?= <henrik@knc.nu> +Date: Wed, 11 May 2016 12:35:06 +0200 +Subject: [PATCH] Support out-of-tree builds usign bundled libtom + +When building out-of-tree we need both source and generated +folders in include paths to find both distributed and generated +headers. + + + +Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> +Upstream-Status: Backport +--- + libtomcrypt/Makefile.in | 2 +- + libtommath/Makefile.in | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libtomcrypt/Makefile.in b/libtomcrypt/Makefile.in +index 3056ef0..7970700 100644 +--- a/libtomcrypt/Makefile.in ++++ b/libtomcrypt/Makefile.in +@@ -19,7 +19,7 @@ srcdir=@srcdir@ + + # Compilation flags. Note the += does not write over the user's CFLAGS! + # The rest of the flags come from the parent Dropbear makefile +-CFLAGS += -c -I$(srcdir)/src/headers/ -I$(srcdir)/../ -DLTC_SOURCE -I$(srcdir)/../libtommath/ ++CFLAGS += -c -Isrc/headers/ -I$(srcdir)/src/headers/ -I../ -I$(srcdir)/../ -DLTC_SOURCE -I../libtommath/ -I$(srcdir)/../libtommath/ + + # additional warnings (newer GCC 3.4 and higher) + ifdef GCC_34 +diff --git a/libtommath/Makefile.in b/libtommath/Makefile.in +index 06aba68..019c50b 100644 +--- a/libtommath/Makefile.in ++++ b/libtommath/Makefile.in +@@ -9,7 +9,7 @@ VPATH=@srcdir@ + srcdir=@srcdir@ + + # So that libtommath can include Dropbear headers for options and m_burn() +-CFLAGS += -I$(srcdir)/../libtomcrypt/src/headers/ -I$(srcdir)/../ ++CFLAGS += -I. -I$(srcdir) -I../libtomcrypt/src/headers/ -I$(srcdir)/../libtomcrypt/src/headers/ -I../ -I$(srcdir)/../ + + ifndef IGNORE_SPEED + diff --git a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear_2015.71.bb b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear_2015.71.bb deleted file mode 100644 index 6332579e7..000000000 --- a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear_2015.71.bb +++ /dev/null @@ -1,5 +0,0 @@ -require dropbear.inc - -SRC_URI[md5sum] = "2ccc0a2f3e37ca221db12c5af6a88137" -SRC_URI[sha256sum] = "376214169c0e187ee9f48ae1a99b3f835016ad5b98ede4bfd1cf581deba783af" - diff --git a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear_2016.74.bb b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear_2016.74.bb new file mode 100644 index 000000000..a7020978a --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear_2016.74.bb @@ -0,0 +1,7 @@ +require dropbear.inc + +SRC_URI += "file://support-out-of-tree-builds.patch" + +SRC_URI[md5sum] = "9ad0172731e0f16623937804643b5bd8" +SRC_URI[sha256sum] = "2720ea54ed009af812701bcc290a2a601d5c107d12993e5d92c0f5f81f718891" + |