summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/dropbear
diff options
context:
space:
mode:
authorDaniel Gomez <daniel@qtec.com>2022-09-27 19:36:51 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-09-29 21:15:50 +0100
commit18393dc116f59340cd0b5b9315e3d05d461b6027 (patch)
tree80aae551569008aca75bb6a3bfbb9b3d7e9efff3 /meta/recipes-core/dropbear
parentd96f13c40343b99818dfc692e87351865d9c85ba (diff)
downloadpoky-18393dc116f59340cd0b5b9315e3d05d461b6027.tar.gz
dropbear: Add enable-x11-forwarding PACKAGECONFIG option
Add the option to enable X11 forwarding in dropbear with a new PACKAGECONFIG option ('enable-x11-forwarding'). Method uses localoption.h file for dropbear feature selection. Add backport patch to fix X11 forwarding in the current 2022.82 version. (From OE-Core rev: f09d94979fd98f160ef7157b517489a43086333f) Signed-off-by: Daniel Gomez <daniel@qtec.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/dropbear')
-rw-r--r--meta/recipes-core/dropbear/dropbear/0007-Fix-X11-build-failure-use-DROPBEAR_PRIO_LOWDELAY.patch28
-rw-r--r--meta/recipes-core/dropbear/dropbear_2022.82.bb11
2 files changed, 38 insertions, 1 deletions
diff --git a/meta/recipes-core/dropbear/dropbear/0007-Fix-X11-build-failure-use-DROPBEAR_PRIO_LOWDELAY.patch b/meta/recipes-core/dropbear/dropbear/0007-Fix-X11-build-failure-use-DROPBEAR_PRIO_LOWDELAY.patch
new file mode 100644
index 0000000000..042dccbb94
--- /dev/null
+++ b/meta/recipes-core/dropbear/dropbear/0007-Fix-X11-build-failure-use-DROPBEAR_PRIO_LOWDELAY.patch
@@ -0,0 +1,28 @@
1From 64292091fe3e8ea7c9bfe74af730b2ff5428bf10 Mon Sep 17 00:00:00 2001
2From: Matt Johnston <matt@ucc.asn.au>
3Date: Sat, 23 Apr 2022 22:33:31 +0800
4Subject: [PATCH] Fix X11 build failure, use DROPBEAR_PRIO_LOWDELAY
5
6Upstream-Status: Backport
7
8Signed-off-by: Daniel Gomez <daniel@qtec.com>
9---
10 svr-x11fwd.c | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/svr-x11fwd.c b/svr-x11fwd.c
14index 353cb12..5d9e6a9 100644
15--- a/svr-x11fwd.c
16+++ b/svr-x11fwd.c
17@@ -206,7 +206,7 @@ void x11cleanup(struct ChanSess *chansess) {
18 }
19
20 static int x11_inithandler(struct Channel *channel) {
21- channel->prio = DROPBEAR_CHANNEL_PRIO_INTERACTIVE;
22+ channel->prio = DROPBEAR_PRIO_LOWDELAY;
23 return 0;
24 }
25
26--
272.35.1
28
diff --git a/meta/recipes-core/dropbear/dropbear_2022.82.bb b/meta/recipes-core/dropbear/dropbear_2022.82.bb
index 2de243b889..41c14ff2f1 100644
--- a/meta/recipes-core/dropbear/dropbear_2022.82.bb
+++ b/meta/recipes-core/dropbear/dropbear_2022.82.bb
@@ -22,7 +22,8 @@ SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.bz2 \
22 file://dropbear.socket \ 22 file://dropbear.socket \
23 file://dropbear.default \ 23 file://dropbear.default \
24 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ 24 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
25 ${@bb.utils.contains('PACKAGECONFIG', 'disable-weak-ciphers', 'file://dropbear-disable-weak-ciphers.patch', '', d)} " 25 ${@bb.utils.contains('PACKAGECONFIG', 'disable-weak-ciphers', 'file://dropbear-disable-weak-ciphers.patch', '', d)} \
26 file://0007-Fix-X11-build-failure-use-DROPBEAR_PRIO_LOWDELAY.patch"
26 27
27SRC_URI[sha256sum] = "3a038d2bbc02bf28bbdd20c012091f741a3ec5cbe460691811d714876aad75d1" 28SRC_URI[sha256sum] = "3a038d2bbc02bf28bbdd20c012091f741a3ec5cbe460691811d714876aad75d1"
28 29
@@ -53,6 +54,7 @@ EXTRA_OEMAKE = 'MULTI=1 SCPPROGRESS=1 PROGRAMS="${SBINCOMMANDS} ${BINCOMMANDS}"'
53PACKAGECONFIG ?= "disable-weak-ciphers" 54PACKAGECONFIG ?= "disable-weak-ciphers"
54PACKAGECONFIG[system-libtom] = "--disable-bundled-libtom,--enable-bundled-libtom,libtommath libtomcrypt" 55PACKAGECONFIG[system-libtom] = "--disable-bundled-libtom,--enable-bundled-libtom,libtommath libtomcrypt"
55PACKAGECONFIG[disable-weak-ciphers] = "" 56PACKAGECONFIG[disable-weak-ciphers] = ""
57PACKAGECONFIG[enable-x11-forwarding] = ""
56 58
57EXTRA_OECONF += "\ 59EXTRA_OECONF += "\
58 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)}" 60 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)}"
@@ -64,6 +66,13 @@ EXTRA_OECONF += "--disable-harden"
64# musl does not implement wtmp/logwtmp APIs 66# musl does not implement wtmp/logwtmp APIs
65EXTRA_OECONF:append:libc-musl = " --disable-wtmp --disable-lastlog" 67EXTRA_OECONF:append:libc-musl = " --disable-wtmp --disable-lastlog"
66 68
69do_configure:append() {
70 echo "/* Dropbear features */" > ${B}/localoptions.h
71 if ${@bb.utils.contains('PACKAGECONFIG', 'enable-x11-forwarding', 'true', 'false', d)}; then
72 echo "#define DROPBEAR_X11FWD 1" >> ${B}/localoptions.h
73 fi
74}
75
67do_install() { 76do_install() {
68 install -d ${D}${sysconfdir} \ 77 install -d ${D}${sysconfdir} \
69 ${D}${sysconfdir}/init.d \ 78 ${D}${sysconfdir}/init.d \