update buildroot to 2017.02.11

This commit is contained in:
jbnadal
2018-05-22 15:35:47 +02:00
parent 4bf1f5e091
commit a3c10bd762
9257 changed files with 433426 additions and 1701 deletions

View File

@@ -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

View File

@@ -0,0 +1,20 @@
config BR2_PACKAGE_MOSQUITTO
bool "mosquitto"
depends on BR2_USE_MMU # fork()
depends on BR2_TOOLCHAIN_HAS_SYNC_4
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
3.1.1. MQTT provides a lightweight method of carrying out
messaging using a publish/subscribe model. This makes it
suitable for "machine to machine" messaging such as with low
power sensors or mobile devices such as phones, embedded
computers or microcontrollers like the Arduino.
http://mosquitto.org/
comment "mosquitto needs a toolchain w/ dynamic library"
depends on BR2_USE_MMU
depends on BR2_TOOLCHAIN_HAS_SYNC_4
depends on BR2_STATIC_LIBS

View File

@@ -0,0 +1,35 @@
#!/bin/sh
start() {
printf "Starting mosquitto: "
start-stop-daemon -S -q -m -b -p /var/run/mosquitto.pid \
--exec /usr/sbin/mosquitto \
-- -c /etc/mosquitto/mosquitto.conf
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
stop() {
printf "Stopping mosquitto: "
start-stop-daemon -K -q -p /var/run/mosquitto.pid
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?

View File

@@ -0,0 +1,7 @@
# Locally calculated after checking gpg signature
sha256 7d3b3e245a3b4ec94b05678c8199c806359737949f4cfe0bf936184f6ca89a83 mosquitto-1.4.15.tar.gz
# License files
sha256 cc77e25bafd40637b7084f04086d606f0a200051b61806f97c93405926670bc1 LICENSE.txt
sha256 3b9be6b894d0769de796e653571ff6cef494913c0ce78c35a97db939e7d9087c epl-v10
sha256 e8cf7d54ea46c19aba793983889b7f7425e1ebfcaaccec764a7db091646e203c edl-v10

View File

@@ -0,0 +1,105 @@
################################################################################
#
# mosquitto
#
################################################################################
MOSQUITTO_VERSION = 1.4.15
MOSQUITTO_SITE = https://mosquitto.org/files/source
MOSQUITTO_LICENSE = EPLv1.0 or EDLv1.0
MOSQUITTO_LICENSE_FILES = LICENSE.txt epl-v10 edl-v10
MOSQUITTO_INSTALL_STAGING = YES
MOSQUITTO_MAKE_OPTS = \
UNAME=Linux \
STRIP=true \
prefix=/usr \
WITH_WRAP=no \
WITH_DOCS=no
# adns uses getaddrinfo_a
ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
MOSQUITTO_MAKE_OPTS += WITH_ADNS=yes
else
MOSQUITTO_MAKE_OPTS += WITH_ADNS=no
endif
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
MOSQUITTO_MAKE_OPTS += WITH_THREADING=yes
else
MOSQUITTO_MAKE_OPTS += WITH_THREADING=no
endif
ifeq ($(BR2_PACKAGE_OPENSSL),y)
MOSQUITTO_DEPENDENCIES += openssl
MOSQUITTO_MAKE_OPTS += WITH_TLS=yes
else
MOSQUITTO_MAKE_OPTS += WITH_TLS=no
endif
ifeq ($(BR2_PACKAGE_C_ARES),y)
MOSQUITTO_DEPENDENCIES += c-ares
MOSQUITTO_MAKE_OPTS += WITH_SRV=yes
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
else
MOSQUITTO_MAKE_OPTS += WITH_WEBSOCKETS=no
endif
# C++ support is only used to create a wrapper library
ifneq ($(BR2_INSTALL_LIBSTDCPP),y)
define MOSQUITTO_DISABLE_CPP
$(SED) '/-C cpp/d' $(@D)/lib/Makefile
endef
MOSQUITTO_POST_PATCH_HOOKS += MOSQUITTO_DISABLE_CPP
endif
define MOSQUITTO_BUILD_CMDS
$(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \
$(MOSQUITTO_MAKE_OPTS)
endef
define MOSQUITTO_INSTALL_STAGING_CMDS
$(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \
$(MOSQUITTO_MAKE_OPTS) DESTDIR=$(STAGING_DIR) install
endef
define MOSQUITTO_INSTALL_TARGET_CMDS
$(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \
$(MOSQUITTO_MAKE_OPTS) DESTDIR=$(TARGET_DIR) install
rm -f $(TARGET_DIR)/etc/mosquitto/*.example
$(INSTALL) -D -m 0644 $(@D)/mosquitto.conf \
$(TARGET_DIR)/etc/mosquitto/mosquitto.conf
endef
define MOSQUITTO_INSTALL_INIT_SYSV
$(INSTALL) -D -m 0755 package/mosquitto/S50mosquitto \
$(TARGET_DIR)/etc/init.d/S50mosquitto
endef
define MOSQUITTO_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 644 package/mosquitto/mosquitto.service \
$(TARGET_DIR)/usr/lib/systemd/system/mosquitto.service
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
ln -fs ../../../../usr/lib/systemd/system/mosquitto.service \
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/mosquitto.service
endef
define MOSQUITTO_USERS
mosquitto -1 nogroup -1 * - - - Mosquitto user
endef
$(eval $(generic-package))

View File

@@ -0,0 +1,10 @@
[Unit]
Description=Mosquitto MQTT broker
[Service]
ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
[Install]
WantedBy=multi-user.target