All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] mosquitto: unbreak build with websockets and !libopenssl
@ 2018-03-03 10:15 Peter Korsgaard
  2018-03-03 16:17 ` Peter Korsgaard
  2018-04-10 20:51 ` Peter Korsgaard
  0 siblings, 2 replies; 6+ messages in thread
From: Peter Korsgaard @ 2018-03-03 10:15 UTC (permalink / raw)
  To: buildroot

Fixes:
http://autobuild.buildroot.net/results/d69/d693f3e3f1c73ccf54ac7076623e436355a9d901/b

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 ...01-websockets.c-unbreak-build-without-TLS.patch | 49 ++++++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 package/mosquitto/0001-websockets.c-unbreak-build-without-TLS.patch

diff --git a/package/mosquitto/0001-websockets.c-unbreak-build-without-TLS.patch b/package/mosquitto/0001-websockets.c-unbreak-build-without-TLS.patch
new file mode 100644
index 0000000000..e977fae56c
--- /dev/null
+++ b/package/mosquitto/0001-websockets.c-unbreak-build-without-TLS.patch
@@ -0,0 +1,49 @@
+From 4822aa97da80a86033ec6e4a8b2f4ad0911235cf Mon Sep 17 00:00:00 2001
+From: Peter Korsgaard <peter@korsgaard.com>
+Date: Sat, 3 Mar 2018 11:04:47 +0100
+Subject: [PATCH] websockets.c: unbreak build without TLS
+
+Commit 7943072b1f3b (Fix use_identity_as_username not working on websockets
+clients) added code which unconditionally accesses mosq-ssl, breaking the
+build when TLS support is disabled.
+
+Fix it by guarding this logic inside #ifdef WITH_TLS.
+
+[Upstream: https://dev.eclipse.org/mhonarc/lists/mosquitto-dev/msg01813.html]
+Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
+---
+ src/websockets.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/websockets.c b/src/websockets.c
+index d4d7961..a796f0a 100644
+--- a/src/websockets.c
++++ b/src/websockets.c
+@@ -201,12 +201,14 @@ static int callback_mqtt(struct libwebsocket_context *context,
+ 				mosq->ws_context = context;
+ #endif
+ 				mosq->wsi = wsi;
++#ifdef WITH_TLS
+ 				if(in){
+ 					mosq->ssl = (SSL *)in;
+ 					if(!mosq->listener->ssl_ctx){
+ 						mosq->listener->ssl_ctx = SSL_get_SSL_CTX(mosq->ssl);
+ 					}
+ 				}
++#endif
+ 				u->mosq = mosq;
+ 			}else{
+ 				return -1;
+@@ -240,7 +242,9 @@ static int callback_mqtt(struct libwebsocket_context *context,
+ 					mosq->pollfd_index = -1;
+ 				}
+ 				mosq->wsi = NULL;
++#ifdef WITH_TLS
+ 				mosq->ssl = NULL;
++#endif
+ 				do_disconnect(db, mosq);
+ 			}
+ 			break;
+-- 
+2.11.0
+
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] mosquitto: unbreak build with websockets and !libopenssl
  2018-03-03 10:15 [Buildroot] [PATCH] mosquitto: unbreak build with websockets and !libopenssl Peter Korsgaard
@ 2018-03-03 16:17 ` Peter Korsgaard
  2018-03-05  7:58   ` Alexander Dahl
  2018-04-10 20:51 ` Peter Korsgaard
  1 sibling, 1 reply; 6+ messages in thread
From: Peter Korsgaard @ 2018-03-03 16:17 UTC (permalink / raw)
  To: buildroot

>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:

 > Fixes:
 > http://autobuild.buildroot.net/results/d69/d693f3e3f1c73ccf54ac7076623e436355a9d901/b

 > Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] mosquitto: unbreak build with websockets and !libopenssl
  2018-03-03 16:17 ` Peter Korsgaard
@ 2018-03-05  7:58   ` Alexander Dahl
  2018-03-05  8:09     ` Peter Korsgaard
  0 siblings, 1 reply; 6+ messages in thread
From: Alexander Dahl @ 2018-03-05  7:58 UTC (permalink / raw)
  To: buildroot

Hello Peter,

On Sat, Mar 03, 2018 at 05:17:20PM +0100, Peter Korsgaard wrote:
> >>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:
> 
>  > Fixes:
>  > http://autobuild.buildroot.net/results/d69/d693f3e3f1c73ccf54ac7076623e436355a9d901/b
> 
>  > Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
> 
> Committed, thanks.

Do you thank yourself here? Doesn't that somehow circumvent a probably
desired review?

Curious.
Alex

-- 
?With the first link, the chain is forged. The first speech censured, 
the first thought forbidden, the first freedom denied, chains us all 
irrevocably.? (Jean-Luc Picard, quoting Judge Aaron Satie)
*** GnuPG-FP: C28E E6B9 0263 95CF 8FAF  08FA 34AD CD00 7221 5CC6 ***
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180305/e5e3ae5a/attachment.asc>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] mosquitto: unbreak build with websockets and !libopenssl
  2018-03-05  7:58   ` Alexander Dahl
@ 2018-03-05  8:09     ` Peter Korsgaard
  2018-03-05  8:42       ` Alexander Dahl
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Korsgaard @ 2018-03-05  8:09 UTC (permalink / raw)
  To: buildroot

>>>>> "Alexander" == Alexander Dahl <post@lespocky.de> writes:

 > Hello Peter,
 > On Sat, Mar 03, 2018 at 05:17:20PM +0100, Peter Korsgaard wrote:
 >> >>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:
 >> 
 >> > Fixes:
 >> > http://autobuild.buildroot.net/results/d69/d693f3e3f1c73ccf54ac7076623e436355a9d901/b
 >> 
 >> > Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
 >> 
 >> Committed, thanks.

 > Do you thank yourself here? Doesn't that somehow circumvent a probably
 > desired review?

It would certainly be nicer if other people would review the patch, but
given how obvious it is and how close we were to the release I opted to
apply it myself.

Are you interested in mosquitto? If so, please add an entry to
DEVELOPERS for it and I'll ensure I CC you on future patches to it.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] mosquitto: unbreak build with websockets and !libopenssl
  2018-03-05  8:09     ` Peter Korsgaard
@ 2018-03-05  8:42       ` Alexander Dahl
  0 siblings, 0 replies; 6+ messages in thread
From: Alexander Dahl @ 2018-03-05  8:42 UTC (permalink / raw)
  To: buildroot

Hello Peter,

On Mon, Mar 05, 2018 at 09:09:53AM +0100, Peter Korsgaard wrote:
> It would certainly be nicer if other people would review the patch, but
> given how obvious it is and how close we were to the release I opted to
> apply it myself.

Understood.

> Are you interested in mosquitto? If so, please add an entry to
> DEVELOPERS for it and I'll ensure I CC you on future patches to it.

In general I'm interested in mosquitto, I added a package for ptxdist
[1] last year, which is a requirement for a mosquitto based
mqtt-library [2] I'm working on in my spare time, but currently I have
no usecase to use it with buildroot. Maybe later, if I decide it would
be useful on the fli4l [3] router in the hackerspace I'm member of. I
can send a patch to add myself then. O:-)

Have a nice day.
Alex

[1] https://git.pengutronix.de/cgit/ptxdist/commit/?id=8201e3d29e950e713f755ec4e864ce0869bdd060
[2] https://github.com/penguineer/mqtt-tools
[3] https://www.fli4l.de/

-- 
?With the first link, the chain is forged. The first speech censured, 
the first thought forbidden, the first freedom denied, chains us all 
irrevocably.? (Jean-Luc Picard, quoting Judge Aaron Satie)
*** GnuPG-FP: C28E E6B9 0263 95CF 8FAF  08FA 34AD CD00 7221 5CC6 ***
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180305/e7dcd57c/attachment.asc>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] mosquitto: unbreak build with websockets and !libopenssl
  2018-03-03 10:15 [Buildroot] [PATCH] mosquitto: unbreak build with websockets and !libopenssl Peter Korsgaard
  2018-03-03 16:17 ` Peter Korsgaard
@ 2018-04-10 20:51 ` Peter Korsgaard
  1 sibling, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2018-04-10 20:51 UTC (permalink / raw)
  To: buildroot

>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:

 > Fixes:
 > http://autobuild.buildroot.net/results/d69/d693f3e3f1c73ccf54ac7076623e436355a9d901/b

 > Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

Committed to 2017.02.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-04-10 20:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-03 10:15 [Buildroot] [PATCH] mosquitto: unbreak build with websockets and !libopenssl Peter Korsgaard
2018-03-03 16:17 ` Peter Korsgaard
2018-03-05  7:58   ` Alexander Dahl
2018-03-05  8:09     ` Peter Korsgaard
2018-03-05  8:42       ` Alexander Dahl
2018-04-10 20:51 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.