All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/3] Update package mosquitto
@ 2019-07-18 10:06 Titouan Christophe
  2019-07-18 10:06 ` [Buildroot] [PATCH 1/3] package/mosquitto: allow to build as static lib Titouan Christophe
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Titouan Christophe @ 2019-07-18 10:06 UTC (permalink / raw)
  To: buildroot

This patchset extend the mosquitto integration with Buildroot's
build system and other packages, thanks to configuration options
that have been introduced in mosquitto 1.5; and bump mosquitto
to the latest version (1.6.3).

Interesting new features in mosquitto 1.6 include:
* Explicit support for TLS v1.3 (and drop support for TLS v1.0)
* Support for new mqttv5 protocol
* Remove dependency on libuuid

Titouan Christophe (3):
  package/mosquitto: allow to build as static lib
  package/mosquitto: Switch systemd unit to Type=notify and depend on
    network
  package/mosquitto: bump to v1.6.3

 package/mosquitto/Config.in         |  4 ----
 package/mosquitto/mosquitto.hash    |  2 +-
 package/mosquitto/mosquitto.mk      | 19 +++++++++++--------
 package/mosquitto/mosquitto.service |  3 +++
 4 files changed, 15 insertions(+), 13 deletions(-)

-- 
2.21.0

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

* [Buildroot] [PATCH 1/3] package/mosquitto: allow to build as static lib
  2019-07-18 10:06 [Buildroot] [PATCH 0/3] Update package mosquitto Titouan Christophe
@ 2019-07-18 10:06 ` Titouan Christophe
  2019-08-01 10:23   ` Peter Korsgaard
  2019-07-18 10:06 ` [Buildroot] [PATCH 2/3] package/mosquitto: Switch systemd unit to Type=notify and depend on network Titouan Christophe
  2019-07-18 10:06 ` [Buildroot] [PATCH 3/3] package/mosquitto: bump to v1.6.3 Titouan Christophe
  2 siblings, 1 reply; 13+ messages in thread
From: Titouan Christophe @ 2019-07-18 10:06 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu>
---
 package/mosquitto/Config.in    | 4 ----
 package/mosquitto/mosquitto.mk | 6 ++++++
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/package/mosquitto/Config.in b/package/mosquitto/Config.in
index 11b6d7891b..7135e86e69 100644
--- a/package/mosquitto/Config.in
+++ b/package/mosquitto/Config.in
@@ -1,6 +1,5 @@
 config BR2_PACKAGE_MOSQUITTO
 	bool "mosquitto"
-	depends on !BR2_STATIC_LIBS # builds .so
 	help
 	  Mosquitto is an open source message broker that implements
 	  the MQ Telemetry Transport protocol versions 3.1 and
@@ -22,6 +21,3 @@ config BR2_PACKAGE_MOSQUITTO_BROKER
 
 comment "mosquitto broker needs a system with MMU"
 	depends on BR2_PACKAGE_MOSQUTTO && !BR2_USE_MMU
-
-comment "mosquitto needs a toolchain w/ dynamic library"
-	depends on BR2_STATIC_LIBS
diff --git a/package/mosquitto/mosquitto.mk b/package/mosquitto/mosquitto.mk
index 51c0abd0ba..ed72af754a 100644
--- a/package/mosquitto/mosquitto.mk
+++ b/package/mosquitto/mosquitto.mk
@@ -17,6 +17,12 @@ MOSQUITTO_MAKE_OPTS = \
 	WITH_WRAP=no \
 	WITH_DOCS=no
 
+ifeq ($(BR2_STATIC_LIBS),y)
+MOSQUITTO_MAKE_OPTS += WITH_STATIC_LIBRARIES=yes WITH_SHARED_LIBRARIES=no
+else
+MOSQUITTO_MAKE_OPTS += WITH_STATIC_LIBRARIES=no WITH_SHARED_LIBRARIES=yes
+endif
+
 # adns uses getaddrinfo_a
 ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
 MOSQUITTO_MAKE_OPTS += WITH_ADNS=yes
-- 
2.21.0

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

* [Buildroot] [PATCH 2/3] package/mosquitto: Switch systemd unit to Type=notify and depend on network
  2019-07-18 10:06 [Buildroot] [PATCH 0/3] Update package mosquitto Titouan Christophe
  2019-07-18 10:06 ` [Buildroot] [PATCH 1/3] package/mosquitto: allow to build as static lib Titouan Christophe
@ 2019-07-18 10:06 ` Titouan Christophe
  2019-08-01 10:27   ` Peter Korsgaard
  2019-07-18 10:06 ` [Buildroot] [PATCH 3/3] package/mosquitto: bump to v1.6.3 Titouan Christophe
  2 siblings, 1 reply; 13+ messages in thread
From: Titouan Christophe @ 2019-07-18 10:06 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu>
---
RFC: Would it be better to use the mosquitto.service file provided upstream ?
https://github.com/eclipse/mosquitto/blob/master/service/systemd/mosquitto.service.notify
---
 package/mosquitto/mosquitto.mk      | 4 ++++
 package/mosquitto/mosquitto.service | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/package/mosquitto/mosquitto.mk b/package/mosquitto/mosquitto.mk
index ed72af754a..333cce35c2 100644
--- a/package/mosquitto/mosquitto.mk
+++ b/package/mosquitto/mosquitto.mk
@@ -23,6 +23,10 @@ else
 MOSQUITTO_MAKE_OPTS += WITH_STATIC_LIBRARIES=no WITH_SHARED_LIBRARIES=yes
 endif
 
+ifeq ($(BR2_PACKAGE_SYSTEMD),y)
+MOSQUITTO_MAKE_OPTS += WITH_SYSTEMD=yes
+endif
+
 # adns uses getaddrinfo_a
 ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
 MOSQUITTO_MAKE_OPTS += WITH_ADNS=yes
diff --git a/package/mosquitto/mosquitto.service b/package/mosquitto/mosquitto.service
index 2d1939d1c7..24c9d8e948 100644
--- a/package/mosquitto/mosquitto.service
+++ b/package/mosquitto/mosquitto.service
@@ -1,7 +1,10 @@
 [Unit]
 Description=Mosquitto MQTT broker
+After=network-online.target
+Wants=network-online.target
 
 [Service]
+Type=notify
 ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
 ExecReload=/bin/kill -HUP $MAINPID
 Restart=always
-- 
2.21.0

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

* [Buildroot] [PATCH 3/3] package/mosquitto: bump to v1.6.3
  2019-07-18 10:06 [Buildroot] [PATCH 0/3] Update package mosquitto Titouan Christophe
  2019-07-18 10:06 ` [Buildroot] [PATCH 1/3] package/mosquitto: allow to build as static lib Titouan Christophe
  2019-07-18 10:06 ` [Buildroot] [PATCH 2/3] package/mosquitto: Switch systemd unit to Type=notify and depend on network Titouan Christophe
@ 2019-07-18 10:06 ` Titouan Christophe
  2019-08-01 10:48   ` Peter Korsgaard
  2 siblings, 1 reply; 13+ messages in thread
From: Titouan Christophe @ 2019-07-18 10:06 UTC (permalink / raw)
  To: buildroot

* Drop dependency on libuuid

Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu>
---
 package/mosquitto/mosquitto.hash | 2 +-
 package/mosquitto/mosquitto.mk   | 9 +--------
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/package/mosquitto/mosquitto.hash b/package/mosquitto/mosquitto.hash
index 25b9910138..c6efdabd2a 100644
--- a/package/mosquitto/mosquitto.hash
+++ b/package/mosquitto/mosquitto.hash
@@ -1,5 +1,5 @@
 # Locally calculated after checking gpg signature
-sha256 78d7e70c3794dc3a1d484b4f2f8d3addebe9c2da3f5a1cebe557f7d13beb0da4  mosquitto-1.5.8.tar.gz
+sha256 9ef5cc75f4fe31d7bf50654ddf4728ad9e1ae2e5609a4b42ecbbcb4a209ed17e  mosquitto-1.6.3.tar.gz
 
 # License files
 sha256 cc77e25bafd40637b7084f04086d606f0a200051b61806f97c93405926670bc1  LICENSE.txt
diff --git a/package/mosquitto/mosquitto.mk b/package/mosquitto/mosquitto.mk
index 333cce35c2..c6c0c04f38 100644
--- a/package/mosquitto/mosquitto.mk
+++ b/package/mosquitto/mosquitto.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-MOSQUITTO_VERSION = 1.5.8
+MOSQUITTO_VERSION = 1.6.3
 MOSQUITTO_SITE = https://mosquitto.org/files/source
 MOSQUITTO_LICENSE = EPL-1.0 or EDLv1.0
 MOSQUITTO_LICENSE_FILES = LICENSE.txt epl-v10 edl-v10
@@ -54,13 +54,6 @@ else
 MOSQUITTO_MAKE_OPTS += WITH_SRV=no
 endif
 
-ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y)
-MOSQUITTO_DEPENDENCIES += util-linux
-MOSQUITTO_MAKE_OPTS += WITH_UUID=yes
-else
-MOSQUITTO_MAKE_OPTS += WITH_UUID=no
-endif
-
 ifeq ($(BR2_PACKAGE_LIBWEBSOCKETS),y)
 MOSQUITTO_DEPENDENCIES += libwebsockets
 MOSQUITTO_MAKE_OPTS += WITH_WEBSOCKETS=yes
-- 
2.21.0

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

* [Buildroot] [PATCH 1/3] package/mosquitto: allow to build as static lib
  2019-07-18 10:06 ` [Buildroot] [PATCH 1/3] package/mosquitto: allow to build as static lib Titouan Christophe
@ 2019-08-01 10:23   ` Peter Korsgaard
  2019-08-01 10:41     ` Peter Korsgaard
  0 siblings, 1 reply; 13+ messages in thread
From: Peter Korsgaard @ 2019-08-01 10:23 UTC (permalink / raw)
  To: buildroot

>>>>> "Titouan" == Titouan Christophe <titouan.christophe@railnova.eu> writes:

 > Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu>
 > ---
 >  package/mosquitto/Config.in    | 4 ----
 >  package/mosquitto/mosquitto.mk | 6 ++++++
 >  2 files changed, 6 insertions(+), 4 deletions(-)

 > diff --git a/package/mosquitto/Config.in b/package/mosquitto/Config.in
 > index 11b6d7891b..7135e86e69 100644
 > --- a/package/mosquitto/Config.in
 > +++ b/package/mosquitto/Config.in
 > @@ -1,6 +1,5 @@
 >  config BR2_PACKAGE_MOSQUITTO
 >  	bool "mosquitto"
 > -	depends on !BR2_STATIC_LIBS # builds .so
 >  	help
 >  	  Mosquitto is an open source message broker that implements
 >  	  the MQ Telemetry Transport protocol versions 3.1 and
 > @@ -22,6 +21,3 @@ config BR2_PACKAGE_MOSQUITTO_BROKER
 
 >  comment "mosquitto broker needs a system with MMU"
 >  	depends on BR2_PACKAGE_MOSQUTTO && !BR2_USE_MMU
 > -
 > -comment "mosquitto needs a toolchain w/ dynamic library"
 > -	depends on BR2_STATIC_LIBS
 > diff --git a/package/mosquitto/mosquitto.mk b/package/mosquitto/mosquitto.mk
 > index 51c0abd0ba..ed72af754a 100644
 > --- a/package/mosquitto/mosquitto.mk
 > +++ b/package/mosquitto/mosquitto.mk
 > @@ -17,6 +17,12 @@ MOSQUITTO_MAKE_OPTS = \
 >  	WITH_WRAP=no \
 >  	WITH_DOCS=no
 
 > +ifeq ($(BR2_STATIC_LIBS),y)
 > +MOSQUITTO_MAKE_OPTS += WITH_STATIC_LIBRARIES=yes WITH_SHARED_LIBRARIES=no
 > +else
 > +MOSQUITTO_MAKE_OPTS += WITH_STATIC_LIBRARIES=no WITH_SHARED_LIBRARIES=yes
 > +endif

We actually have 3 variants:

- static only (BR2_STATIC_LIBS)
- shared only (BR2_SHARED_LIBS)
- shared and static (BR2_SHARED_STATIC_LIBS)

So I reworked it to take that into consideration and committed, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 2/3] package/mosquitto: Switch systemd unit to Type=notify and depend on network
  2019-07-18 10:06 ` [Buildroot] [PATCH 2/3] package/mosquitto: Switch systemd unit to Type=notify and depend on network Titouan Christophe
@ 2019-08-01 10:27   ` Peter Korsgaard
  2019-08-02  8:51     ` Titouan Christophe
  0 siblings, 1 reply; 13+ messages in thread
From: Peter Korsgaard @ 2019-08-01 10:27 UTC (permalink / raw)
  To: buildroot

>>>>> "Titouan" == Titouan Christophe <titouan.christophe@railnova.eu> writes:

 > Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu>

It would be great if your commit message would explain _WHY_ this is
done, not just _WHAT_ the change is - E.G. what is the advantage of type=notify?

 > ---
 > RFC: Would it be better to use the mosquitto.service file provided upstream ?
 > https://github.com/eclipse/mosquitto/blob/master/service/systemd/mosquitto.service.notify

Not knowing much about systemd, but I think so. The differences look
quite small.

> ---
 >  package/mosquitto/mosquitto.mk      | 4 ++++
 >  package/mosquitto/mosquitto.service | 3 +++
 >  2 files changed, 7 insertions(+)

 > diff --git a/package/mosquitto/mosquitto.mk b/package/mosquitto/mosquitto.mk
 > index ed72af754a..333cce35c2 100644
 > --- a/package/mosquitto/mosquitto.mk
 > +++ b/package/mosquitto/mosquitto.mk
 > @@ -23,6 +23,10 @@ else
 >  MOSQUITTO_MAKE_OPTS += WITH_STATIC_LIBRARIES=no WITH_SHARED_LIBRARIES=yes
 >  endif
 
 > +ifeq ($(BR2_PACKAGE_SYSTEMD),y)
 > +MOSQUITTO_MAKE_OPTS += WITH_SYSTEMD=yes

This is not mentioned in the commit message. I see this causes mosquitto
to link with -lsystemd, so you need to add systemd to
MOSQUITTO_DEPENDENCIES.

Care to send an updated patch with a more descriptive commit message,
reusing the upstream service file and adding systemd to _DEPENDENCIES?

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 1/3] package/mosquitto: allow to build as static lib
  2019-08-01 10:23   ` Peter Korsgaard
@ 2019-08-01 10:41     ` Peter Korsgaard
  2019-08-01 17:09       ` Titouan Christophe
  0 siblings, 1 reply; 13+ messages in thread
From: Peter Korsgaard @ 2019-08-01 10:41 UTC (permalink / raw)
  To: buildroot

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

Hi,

 >> +ifeq ($(BR2_STATIC_LIBS),y)
 >> +MOSQUITTO_MAKE_OPTS += WITH_STATIC_LIBRARIES=yes WITH_SHARED_LIBRARIES=no
 >> +else
 >> +MOSQUITTO_MAKE_OPTS += WITH_STATIC_LIBRARIES=no WITH_SHARED_LIBRARIES=yes
 >> +endif

 > We actually have 3 variants:

 > - static only (BR2_STATIC_LIBS)
 > - shared only (BR2_SHARED_LIBS)
 > - shared and static (BR2_SHARED_STATIC_LIBS)

 > So I reworked it to take that into consideration and committed, thanks.

Sorry, I will have to take that back. I did a test compilation with a
completely static (BR2_STATIC_LIBS) setup, which failed:

In file included from security.c:25:
lib_load.h:23:11: fatal error: dlfcn.h: No such file or directory
 # include <dlfcn.h>
           ^~~~~~~~~
compilation terminated.

The loadable plugin logic in security.c seems to be built
unconditionally, so that cannot work in a completely static setup.

Care to bring up this issue upstream?

In the mean time I have marked your patch as changes requested. For
reference, the changes I did in mosquitto.mk look like this:

feq ($(BR2_SHARED_LIBS),y)
MOSQUITTO_MAKE_OPTS += WITH_STATIC_LIBRARIES=no
else
MOSQUITTO_MAKE_OPTS += WITH_STATIC_LIBRARIES=yes
endif

ifeq ($(BR2_STATIC_LIBS),y)
MOSQUITTO_MAKE_OPTS += WITH_SHARED_LIBRARIES=no
else
MOSQUITTO_MAKE_OPTS += WITH_SHARED_LIBRARIES=yes
endif

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 3/3] package/mosquitto: bump to v1.6.3
  2019-07-18 10:06 ` [Buildroot] [PATCH 3/3] package/mosquitto: bump to v1.6.3 Titouan Christophe
@ 2019-08-01 10:48   ` Peter Korsgaard
  0 siblings, 0 replies; 13+ messages in thread
From: Peter Korsgaard @ 2019-08-01 10:48 UTC (permalink / raw)
  To: buildroot

>>>>> "Titouan" == Titouan Christophe <titouan.christophe@railnova.eu> writes:

 > * Drop dependency on libuuid

It would be good to explain why this can be removed.

Committed with an extended commit message, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 1/3] package/mosquitto: allow to build as static lib
  2019-08-01 10:41     ` Peter Korsgaard
@ 2019-08-01 17:09       ` Titouan Christophe
  2019-08-01 17:25         ` Peter Korsgaard
  0 siblings, 1 reply; 13+ messages in thread
From: Titouan Christophe @ 2019-08-01 17:09 UTC (permalink / raw)
  To: buildroot

Hello Peter,

Thank you for reviewing this series !

On 8/1/19 12:41 PM, Peter Korsgaard wrote:
>>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:
> 
> Hi,
> 
>   >> +ifeq ($(BR2_STATIC_LIBS),y)
>   >> +MOSQUITTO_MAKE_OPTS += WITH_STATIC_LIBRARIES=yes WITH_SHARED_LIBRARIES=no
>   >> +else
>   >> +MOSQUITTO_MAKE_OPTS += WITH_STATIC_LIBRARIES=no WITH_SHARED_LIBRARIES=yes
>   >> +endif
> 
>   > We actually have 3 variants:
> 
>   > - static only (BR2_STATIC_LIBS)
>   > - shared only (BR2_SHARED_LIBS)
>   > - shared and static (BR2_SHARED_STATIC_LIBS)
> 
>   > So I reworked it to take that into consideration and committed, thanks.
> 
> Sorry, I will have to take that back. I did a test compilation with a
> completely static (BR2_STATIC_LIBS) setup, which failed:

Could you share the defconfig you have used to obtain that result ?

When I run test-pkg with BR2_PACKAGE_MOSQUITTO=y (and 
BR2_PACKAGE_MOSQUITTO_BROKER defaults to y), I see: 
"""br-arm-full-static [5/6]: OK""".

> 
> In file included from security.c:25:
> lib_load.h:23:11: fatal error: dlfcn.h: No such file or directory
>   # include <dlfcn.h>
>             ^~~~~~~~~
> compilation terminated.
> 
> The loadable plugin logic in security.c seems to be built
> unconditionally, so that cannot work in a completely static setup.
> 
> Care to bring up this issue upstream?

As soon as I understand the conditions to reproduce, I will do so.

> 
> In the mean time I have marked your patch as changes requested. For
> reference, the changes I did in mosquitto.mk look like this:
> 
> feq ($(BR2_SHARED_LIBS),y)
> MOSQUITTO_MAKE_OPTS += WITH_STATIC_LIBRARIES=no
> else
> MOSQUITTO_MAKE_OPTS += WITH_STATIC_LIBRARIES=yes
> endif
> 
> ifeq ($(BR2_STATIC_LIBS),y)
> MOSQUITTO_MAKE_OPTS += WITH_SHARED_LIBRARIES=no
> else
> MOSQUITTO_MAKE_OPTS += WITH_SHARED_LIBRARIES=yes
> endif
> 

Thanks for sharing !

Best regards,
Titouan

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

* [Buildroot] [PATCH 1/3] package/mosquitto: allow to build as static lib
  2019-08-01 17:09       ` Titouan Christophe
@ 2019-08-01 17:25         ` Peter Korsgaard
  2019-08-02 13:18           ` Titouan Christophe
  0 siblings, 1 reply; 13+ messages in thread
From: Peter Korsgaard @ 2019-08-01 17:25 UTC (permalink / raw)
  To: buildroot

>>>>> "Titouan" == Titouan Christophe <titouan.christophe@railnova.eu> writes:

 > Hello Peter,
 > Thank you for reviewing this series !

 > On 8/1/19 12:41 PM, Peter Korsgaard wrote:
 >>>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:
 >> 
 >> Hi,
 >> 
 >> >> +ifeq ($(BR2_STATIC_LIBS),y)
 >> >> +MOSQUITTO_MAKE_OPTS += WITH_STATIC_LIBRARIES=yes WITH_SHARED_LIBRARIES=no
 >> >> +else
 >> >> +MOSQUITTO_MAKE_OPTS += WITH_STATIC_LIBRARIES=no WITH_SHARED_LIBRARIES=yes
 >> >> +endif
 >> 
 >> > We actually have 3 variants:
 >> 
 >> > - static only (BR2_STATIC_LIBS)
 >> > - shared only (BR2_SHARED_LIBS)
 >> > - shared and static (BR2_SHARED_STATIC_LIBS)
 >> 
 >> > So I reworked it to take that into consideration and committed, thanks.
 >> 
 >> Sorry, I will have to take that back. I did a test compilation with a
 >> completely static (BR2_STATIC_LIBS) setup, which failed:

 > Could you share the defconfig you have used to obtain that result ?

It was afaik just the default arm variant with BR2_STATIC_LIBS enabled.

 > When I run test-pkg with BR2_PACKAGE_MOSQUITTO=y (and
 > BR2_PACKAGE_MOSQUITTO_BROKER defaults to y), I see:
 > """br-arm-full-static [5/6]: OK""".

Hmm, very odd. With current git HEAD and this patch 1/3 applied and the
following config:

BR2_arm=y
BR2_STATIC_LIBS=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-static-2019.02-rc1.tar.bz2"
BR2_TOOLCHAIN_EXTERNAL_GCC_7=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_4=y
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_PACKAGE_MOSQUITTO=y

(E.G. support/config-fragments/autobuild/br-arm-full-static.config + mosquitto)

I get the expected failure:

In file included from security.c:25:0:
lib_load.h:23:11: fatal error: dlfcn.h: No such file or directory
 # include <dlfcn.h>
           ^~~~~~~~~
compilation terminated.
Makefile:189: recipe for target 'security.o' failed

br-arm-full-static-2019.02-rc1.tar.bz2 does not contain a dlfcn.h file,
so that makes sense.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 2/3] package/mosquitto: Switch systemd unit to Type=notify and depend on network
  2019-08-01 10:27   ` Peter Korsgaard
@ 2019-08-02  8:51     ` Titouan Christophe
  0 siblings, 0 replies; 13+ messages in thread
From: Titouan Christophe @ 2019-08-02  8:51 UTC (permalink / raw)
  To: buildroot

Hello Peter,

On 8/1/19 12:27 PM, Peter Korsgaard wrote:
>>>>>> "Titouan" == Titouan Christophe <titouan.christophe@railnova.eu> writes:
> 
>   > Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu>
> 
> It would be great if your commit message would explain _WHY_ this is
> done, not just _WHAT_ the change is - E.G. what is the advantage of type=notify?

Sure !

> 
>   > ---
>   > RFC: Would it be better to use the mosquitto.service file provided upstream ?
>   > https://github.com/eclipse/mosquitto/blob/master/service/systemd/mosquitto.service.notify
> 
> Not knowing much about systemd, but I think so. The differences look
> quite small.
Yes, that's why I think it would be better to use the upstreamed one for 
that. I'm not sure of Buildroot's policy regarding config files provided 
by the packages themselves, hence the question.

> 
>> ---
>   >  package/mosquitto/mosquitto.mk      | 4 ++++
>   >  package/mosquitto/mosquitto.service | 3 +++
>   >  2 files changed, 7 insertions(+)
> 
>   > diff --git a/package/mosquitto/mosquitto.mk b/package/mosquitto/mosquitto.mk
>   > index ed72af754a..333cce35c2 100644
>   > --- a/package/mosquitto/mosquitto.mk
>   > +++ b/package/mosquitto/mosquitto.mk
>   > @@ -23,6 +23,10 @@ else
>   >  MOSQUITTO_MAKE_OPTS += WITH_STATIC_LIBRARIES=no WITH_SHARED_LIBRARIES=yes
>   >  endif
>   
>   > +ifeq ($(BR2_PACKAGE_SYSTEMD),y)
>   > +MOSQUITTO_MAKE_OPTS += WITH_SYSTEMD=yes
> 
> This is not mentioned in the commit message. I see this causes mosquitto
> to link with -lsystemd, so you need to add systemd to
> MOSQUITTO_DEPENDENCIES.

Ok

> 
> Care to send an updated patch with a more descriptive commit message,
> reusing the upstream service file and adding systemd to _DEPENDENCIES?
> 

Sure, I'll respin that one

Regards,
Titouan

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

* [Buildroot] [PATCH 1/3] package/mosquitto: allow to build as static lib
  2019-08-01 17:25         ` Peter Korsgaard
@ 2019-08-02 13:18           ` Titouan Christophe
  2019-08-02 15:58             ` Peter Korsgaard
  0 siblings, 1 reply; 13+ messages in thread
From: Titouan Christophe @ 2019-08-02 13:18 UTC (permalink / raw)
  To: buildroot

Hello,
On 8/1/19 7:25 PM, Peter Korsgaard wrote:
> 
> It was afaik just the default arm variant with BR2_STATIC_LIBS enabled.
> 
>   > When I run test-pkg with BR2_PACKAGE_MOSQUITTO=y (and
>   > BR2_PACKAGE_MOSQUITTO_BROKER defaults to y), I see:
>   > """br-arm-full-static [5/6]: OK""".
> 
> Hmm, very odd. With current git HEAD and this patch 1/3 applied and the
> following config:
> 
> BR2_arm=y
> BR2_STATIC_LIBS=y
> BR2_TOOLCHAIN_EXTERNAL=y
> BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
> BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-static-2019.02-rc1.tar.bz2"
> BR2_TOOLCHAIN_EXTERNAL_GCC_7=y
> BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_4=y
> BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
> # BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
> BR2_TOOLCHAIN_EXTERNAL_CXX=y
> BR2_PACKAGE_MOSQUITTO=y
> 

Indeed, when doing a regular make (and not test-pkg) with this defconfig 
I can reproduce the aforementioned failure.

> (E.G. support/config-fragments/autobuild/br-arm-full-static.config + mosquitto)
> 
> I get the expected failure:
> 
> In file included from security.c:25:0:
> lib_load.h:23:11: fatal error: dlfcn.h: No such file or directory
>   # include <dlfcn.h>
>             ^~~~~~~~~
> compilation terminated.
> Makefile:189: recipe for target 'security.o' failed
> 
> br-arm-full-static-2019.02-rc1.tar.bz2 does not contain a dlfcn.h file,
> so that makes sense.
> 

Now, when looking at mosquitto, I understand that WITH_SHARED_LIBRARY=no 
implies that libmosquitto.so won't be created (and linked against).

However, the failure over here is due to some code in the broker which 
is intended to dynamically load modules at runtime, no matter if 
mosquitto is running inside a statically linked executable or from a dylib.

As such, I suggest then to only make the broker depend on 
BR2_SHARED_LIBS, while still allowing the client lib to be built 
statically, which in my opinion makes sense for embedded targets.
What do you think ?

Kind regards,

Titouan

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

* [Buildroot] [PATCH 1/3] package/mosquitto: allow to build as static lib
  2019-08-02 13:18           ` Titouan Christophe
@ 2019-08-02 15:58             ` Peter Korsgaard
  0 siblings, 0 replies; 13+ messages in thread
From: Peter Korsgaard @ 2019-08-02 15:58 UTC (permalink / raw)
  To: buildroot

>>>>> "Titouan" == Titouan Christophe <titouan.christophe@railnova.eu> writes:

Hi,

 > Indeed, when doing a regular make (and not test-pkg) with this
 > defconfig I can reproduce the aforementioned failure.

Funky, but OK.


 > Now, when looking at mosquitto, I understand that
 > WITH_SHARED_LIBRARY=no implies that libmosquitto.so won't be created
 > (and linked against).

 > However, the failure over here is due to some code in the broker which
 > is intended to dynamically load modules at runtime, no matter if
 > mosquitto is running inside a statically linked executable or from a
 > dylib.

 > As such, I suggest then to only make the broker depend on
 > BR2_SHARED_LIBS, while still allowing the client lib to be built
 > statically, which in my opinion makes sense for embedded targets.
 > What do you think ?

Yes, that could work. Will you send a patch for that?

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2019-08-02 15:58 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-18 10:06 [Buildroot] [PATCH 0/3] Update package mosquitto Titouan Christophe
2019-07-18 10:06 ` [Buildroot] [PATCH 1/3] package/mosquitto: allow to build as static lib Titouan Christophe
2019-08-01 10:23   ` Peter Korsgaard
2019-08-01 10:41     ` Peter Korsgaard
2019-08-01 17:09       ` Titouan Christophe
2019-08-01 17:25         ` Peter Korsgaard
2019-08-02 13:18           ` Titouan Christophe
2019-08-02 15:58             ` Peter Korsgaard
2019-07-18 10:06 ` [Buildroot] [PATCH 2/3] package/mosquitto: Switch systemd unit to Type=notify and depend on network Titouan Christophe
2019-08-01 10:27   ` Peter Korsgaard
2019-08-02  8:51     ` Titouan Christophe
2019-07-18 10:06 ` [Buildroot] [PATCH 3/3] package/mosquitto: bump to v1.6.3 Titouan Christophe
2019-08-01 10:48   ` 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.