diff mbox series

dropbear: Add enable-x11-forwarding PACKAGECONFIG option

Message ID 20220927102904.722281-1-daniel@qtec.com
State Superseded
Headers show
Series dropbear: Add enable-x11-forwarding PACKAGECONFIG option | expand

Commit Message

Daniel Gomez Sept. 27, 2022, 10:29 a.m. UTC
Add the option to enable X11 forwarding in dropbear with a new
PACKAGECONFIG option ('enable-x11-forwarding'). Method uses CFLAGS to
configure it.

Add backport patch to fix X11 forwarding in the current 2022.82
version.

Signed-off-by: Daniel Gomez <daniel@qtec.com>
---
 ...d-failure-use-DROPBEAR_PRIO_LOWDELAY.patch | 27 +++++++++++++++++++
 .../recipes-core/dropbear/dropbear_2022.82.bb |  7 ++++-
 2 files changed, 33 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-core/dropbear/dropbear/0007-Fix-X11-build-failure-use-DROPBEAR_PRIO_LOWDELAY.patch

--
2.35.1

Comments

Ross Burton Sept. 27, 2022, 10:32 a.m. UTC | #1
On 27 Sep 2022, at 11:29, Daniel Gomez via lists.openembedded.org <daniel=qtec.com@lists.openembedded.org> wrote:
> 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..994bbdd42a
> --- /dev/null
> +++ b/meta/recipes-core/dropbear/dropbear/0007-Fix-X11-build-failure-use-DROPBEAR_PRIO_LOWDELAY.patch
> @@ -0,0 +1,27 @@
> +From 0292aacdf0aa57d03f2a3ab7e53cf650e6f29389 Mon Sep 17 00:00:00 2001
> +From: Matt Johnston <matt@ucc.asn.au>
> +Date: Sat, 23 Apr 2022 22:33:31 +0800
> +Subject: [PATCH] Fix X11 build failure, use DROPBEAR_PRIO_LOWDELAY
> +
> +Upstream-Status: Backport

This patch also needs your S-o-b.

Thanks,
Ross
Daniel Gomez Sept. 27, 2022, 11:34 a.m. UTC | #2
On Tue, 27 Sept 2022 at 12:32, Ross Burton <Ross.Burton@arm.com> wrote:
>
> On 27 Sep 2022, at 11:29, Daniel Gomez via lists.openembedded.org <daniel=qtec.com@lists.openembedded.org> wrote:
> > 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..994bbdd42a
> > --- /dev/null
> > +++ b/meta/recipes-core/dropbear/dropbear/0007-Fix-X11-build-failure-use-DROPBEAR_PRIO_LOWDELAY.patch
> > @@ -0,0 +1,27 @@
> > +From 0292aacdf0aa57d03f2a3ab7e53cf650e6f29389 Mon Sep 17 00:00:00 2001
> > +From: Matt Johnston <matt@ucc.asn.au>
> > +Date: Sat, 23 Apr 2022 22:33:31 +0800
> > +Subject: [PATCH] Fix X11 build failure, use DROPBEAR_PRIO_LOWDELAY
> > +
> > +Upstream-Status: Backport
>
> This patch also needs your S-o-b.

Okay, thanks. I will then send a v2 with that. Although this should
have been the v2 already. Sorry for that.

Here the previous patch thread:
https://lore.kernel.org/all/20220720194416.89631-1-daniel@qtec.com/
>
> Thanks,
> Ross
>
diff mbox series

Patch

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..994bbdd42a
--- /dev/null
+++ b/meta/recipes-core/dropbear/dropbear/0007-Fix-X11-build-failure-use-DROPBEAR_PRIO_LOWDELAY.patch
@@ -0,0 +1,27 @@ 
+From 0292aacdf0aa57d03f2a3ab7e53cf650e6f29389 Mon Sep 17 00:00:00 2001
+From: Matt Johnston <matt@ucc.asn.au>
+Date: Sat, 23 Apr 2022 22:33:31 +0800
+Subject: [PATCH] Fix X11 build failure, use DROPBEAR_PRIO_LOWDELAY
+
+Upstream-Status: Backport
+
+---
+ svr-x11fwd.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/svr-x11fwd.c b/svr-x11fwd.c
+index 353cb12..5d9e6a9 100644
+--- a/svr-x11fwd.c
++++ b/svr-x11fwd.c
+@@ -206,7 +206,7 @@ void x11cleanup(struct ChanSess *chansess) {
+ }
+
+ static int x11_inithandler(struct Channel *channel) {
+-	channel->prio = DROPBEAR_CHANNEL_PRIO_INTERACTIVE;
++	channel->prio = DROPBEAR_PRIO_LOWDELAY;
+ 	return 0;
+ }
+
+--
+2.35.1
+
diff --git a/meta/recipes-core/dropbear/dropbear_2022.82.bb b/meta/recipes-core/dropbear/dropbear_2022.82.bb
index 2de243b889..dfb4e21a2c 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 \
            file://dropbear.socket \
            file://dropbear.default \
            ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
-           ${@bb.utils.contains('PACKAGECONFIG', 'disable-weak-ciphers', 'file://dropbear-disable-weak-ciphers.patch', '', d)} "
+           ${@bb.utils.contains('PACKAGECONFIG', 'disable-weak-ciphers', 'file://dropbear-disable-weak-ciphers.patch', '', d)} \
+           file://0007-Fix-X11-build-failure-use-DROPBEAR_PRIO_LOWDELAY.patch"

 SRC_URI[sha256sum] = "3a038d2bbc02bf28bbdd20c012091f741a3ec5cbe460691811d714876aad75d1"

@@ -53,10 +54,14 @@  EXTRA_OEMAKE = 'MULTI=1 SCPPROGRESS=1 PROGRAMS="${SBINCOMMANDS} ${BINCOMMANDS}"'
 PACKAGECONFIG ?= "disable-weak-ciphers"
 PACKAGECONFIG[system-libtom] = "--disable-bundled-libtom,--enable-bundled-libtom,libtommath libtomcrypt"
 PACKAGECONFIG[disable-weak-ciphers] = ""
+PACKAGECONFIG[enable-x11-forwarding] = ""

 EXTRA_OECONF += "\
  ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)}"

+CFLAGS += "\
+ ${@bb.utils.contains('PACKAGECONFIG', 'enable-x11-forwarding', '-DDROPBEAR_X11FWD=1', '', d)}"
+
 # This option appends to CFLAGS and LDFLAGS from OE
 # This is causing [textrel] QA warning
 EXTRA_OECONF += "--disable-harden"