2014-06-03 11:55:06 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2011-2013 OpenWrt.org
|
|
|
|
# Copyright (C) 2010 Jo-Philipp Wich <xm@subsignal.org>
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=mosquitto
|
mosquitto: bump to 1.5.6
This is a bugfix and security release.
CVE-2018-12551: If Mosquitto is configured to use a password file for
authentication, any malformed data in the password file will be
treated as valid. This typically means that the malformed data becomes
a username and no password. If this occurs, clients can circumvent
authentication and get access to the broker by using the malformed
username. In particular, a blank line will be treated as a valid empty
username. Other security measures are unaffected.
=> Users who have only used the mosquitto_passwd utility to create and
modify their password files are unaffected by this vulnerability.
CVE-2018-12550: If an ACL file is empty, or has only blank lines or
comments, then mosquitto treats the ACL file as not being defined,
which means that no topic access is denied. Although denying access to
all topics is not a useful configuration, this behaviour is unexpected
and could lead to access being incorrectly granted in some
circumstances.
CVE-2018-12546. If a client publishes a retained message to a topic
that they have access to, and then their access to that topic is
revoked, the retained message will still be delivered to future
subscribers. This behaviour may be undesirable in some applications,
so a configuration option `check_retain_source` has been introduced to
enforce checking of the retained message source on publish.
Plus the following bugfixes:
* wills not sent to websocket clients
* spaces now allowed in bridge usernames
* durable clients not receiving offline messages with
per_listener_settings==true
* compilation with openssl without deprecated apis
* TLS working over SOCKS
* better comment handling in config files
Full changelog available at: https://github.com/eclipse/mosquitto/blob/fixes/ChangeLog.txt#L1
Signed-off-by: Karl Palsson <karlp@etactica.com>
2019-02-07 14:02:27 +00:00
|
|
|
PKG_VERSION:=1.5.6
|
2018-12-17 10:55:34 +00:00
|
|
|
PKG_RELEASE:=1
|
2014-08-11 13:18:20 +00:00
|
|
|
PKG_LICENSE:=BSD-3-Clause
|
2014-11-25 07:42:42 +00:00
|
|
|
PKG_LICENSE_FILES:=LICENSE.txt
|
2018-10-18 11:07:28 +00:00
|
|
|
PKG_CPE_ID:=cpe:/a:eclipse:mosquitto
|
2014-06-03 11:55:06 +00:00
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
2018-08-20 09:30:12 +00:00
|
|
|
PKG_SOURCE_URL:=https://mosquitto.org/files/source/
|
mosquitto: bump to 1.5.6
This is a bugfix and security release.
CVE-2018-12551: If Mosquitto is configured to use a password file for
authentication, any malformed data in the password file will be
treated as valid. This typically means that the malformed data becomes
a username and no password. If this occurs, clients can circumvent
authentication and get access to the broker by using the malformed
username. In particular, a blank line will be treated as a valid empty
username. Other security measures are unaffected.
=> Users who have only used the mosquitto_passwd utility to create and
modify their password files are unaffected by this vulnerability.
CVE-2018-12550: If an ACL file is empty, or has only blank lines or
comments, then mosquitto treats the ACL file as not being defined,
which means that no topic access is denied. Although denying access to
all topics is not a useful configuration, this behaviour is unexpected
and could lead to access being incorrectly granted in some
circumstances.
CVE-2018-12546. If a client publishes a retained message to a topic
that they have access to, and then their access to that topic is
revoked, the retained message will still be delivered to future
subscribers. This behaviour may be undesirable in some applications,
so a configuration option `check_retain_source` has been introduced to
enforce checking of the retained message source on publish.
Plus the following bugfixes:
* wills not sent to websocket clients
* spaces now allowed in bridge usernames
* durable clients not receiving offline messages with
per_listener_settings==true
* compilation with openssl without deprecated apis
* TLS working over SOCKS
* better comment handling in config files
Full changelog available at: https://github.com/eclipse/mosquitto/blob/fixes/ChangeLog.txt#L1
Signed-off-by: Karl Palsson <karlp@etactica.com>
2019-02-07 14:02:27 +00:00
|
|
|
PKG_HASH:=d5bdc13cc668350026376d57fc14de10aaee029f6840707677637d15e0751a40
|
2014-06-03 11:55:06 +00:00
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
2017-01-17 21:52:04 +00:00
|
|
|
define Package/mosquitto/default
|
2014-06-03 11:55:06 +00:00
|
|
|
SECTION:=net
|
|
|
|
CATEGORY:=Network
|
|
|
|
TITLE:=mosquitto - an MQTT message broker
|
|
|
|
URL:=http://www.mosquitto.org/
|
2016-06-06 10:52:41 +00:00
|
|
|
MAINTAINER:=Karl Palsson <karlp@etactica.com>
|
2015-02-20 16:56:28 +00:00
|
|
|
DEPENDS:= +librt +libuuid
|
2014-10-08 01:45:30 +00:00
|
|
|
USERID:=mosquitto=200:mosquitto=200
|
2014-06-03 11:55:06 +00:00
|
|
|
endef
|
|
|
|
|
2017-01-17 21:52:04 +00:00
|
|
|
define Package/mosquitto-ssl
|
2014-06-03 11:55:06 +00:00
|
|
|
$(call Package/mosquitto/default)
|
|
|
|
TITLE+= (with SSL support)
|
2015-02-20 15:57:37 +00:00
|
|
|
DEPENDS+= +libopenssl +MOSQUITTO_LWS:libwebsockets-openssl
|
2014-06-03 11:55:06 +00:00
|
|
|
VARIANT:=ssl
|
2017-01-17 10:43:42 +00:00
|
|
|
PROVIDES:=mosquitto
|
2014-06-03 11:55:06 +00:00
|
|
|
endef
|
|
|
|
|
2017-01-17 21:52:04 +00:00
|
|
|
define Package/mosquitto-nossl
|
|
|
|
$(call Package/mosquitto/default)
|
2014-06-03 11:55:06 +00:00
|
|
|
TITLE+= (without SSL support)
|
|
|
|
VARIANT:=nossl
|
2017-01-17 10:43:42 +00:00
|
|
|
PROVIDES:=mosquitto
|
2014-06-03 11:55:06 +00:00
|
|
|
endef
|
|
|
|
|
2017-01-17 21:52:04 +00:00
|
|
|
define Package/mosquitto-ssl/config
|
2015-02-20 15:57:37 +00:00
|
|
|
source "$(SOURCE)/Config.in"
|
|
|
|
endef
|
|
|
|
|
2017-01-17 21:52:04 +00:00
|
|
|
define Package/mosquitto/default/description
|
2014-08-11 10:53:35 +00:00
|
|
|
Mosquitto is an open source (BSD licensed) message broker that implements
|
|
|
|
the MQTT protocol version 3.1 and 3.1.1. MQTT provides a lightweight
|
|
|
|
method of carrying out messaging using a publish/subscribe model.
|
2014-06-03 11:55:06 +00:00
|
|
|
|
|
|
|
This package also includes some basic support for configuring via UCI
|
|
|
|
endef
|
|
|
|
|
2017-01-17 21:52:04 +00:00
|
|
|
define Package/mosquitto-ssl/description
|
|
|
|
$(call Package/mosquitto/default/description)
|
2018-02-19 11:35:41 +00:00
|
|
|
This package is built with SSL support. TLS-PSK will be included (in both
|
|
|
|
the client and broker) if OpenSSL is built with TLS-PSK support.
|
2014-06-03 11:55:06 +00:00
|
|
|
endef
|
|
|
|
|
2017-01-17 21:52:04 +00:00
|
|
|
define Package/mosquitto-nossl/description
|
|
|
|
$(call Package/mosquitto/default/description)
|
2014-06-03 11:55:06 +00:00
|
|
|
This package is built WITHOUT SSL support.
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
|
|
define Package/mosquitto-client/default
|
|
|
|
$(Package/mosquitto/default)
|
|
|
|
TITLE:= mosquitto - client tools
|
|
|
|
DEPENDS+=+libcares
|
2017-04-05 13:59:29 +00:00
|
|
|
PROVIDES:=mosquitto-client
|
2014-06-03 11:55:06 +00:00
|
|
|
endef
|
2017-04-05 13:59:29 +00:00
|
|
|
define Package/mosquitto-client-ssl
|
2014-06-03 11:55:06 +00:00
|
|
|
$(call Package/mosquitto-client/default)
|
|
|
|
TITLE+= (With SSL support)
|
2017-01-17 21:52:04 +00:00
|
|
|
DEPENDS+=+libmosquitto-ssl
|
2014-06-03 11:55:06 +00:00
|
|
|
VARIANT:=ssl
|
|
|
|
endef
|
|
|
|
define Package/mosquitto-client-nossl
|
|
|
|
$(call Package/mosquitto-client/default)
|
|
|
|
TITLE+= (Without SSL support)
|
|
|
|
DEPENDS+=+libmosquitto-nossl
|
|
|
|
VARIANT:=nossl
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/mosquitto-client/default/description
|
|
|
|
Command line client tools for publishing messages to MQTT servers
|
|
|
|
and subscribing to topics.
|
|
|
|
endef
|
|
|
|
|
2017-04-05 13:59:29 +00:00
|
|
|
define Package/mosquitto-client-ssl/description
|
2014-06-03 11:55:06 +00:00
|
|
|
$(call Package/mosquitto-client/default/description)
|
|
|
|
This package is built with SSL support
|
|
|
|
endef
|
|
|
|
define Package/mosquitto-client-nossl/description
|
|
|
|
$(call Package/mosquitto-client/default/description)
|
|
|
|
This package is built without SSL support
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libmosquitto/default
|
|
|
|
$(Package/mosquitto/default)
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
DEPENDS:=+libpthread +librt +libcares
|
|
|
|
TITLE:= mosquitto - client library
|
2017-01-17 10:43:42 +00:00
|
|
|
PROVIDES:=libmosquitto
|
2014-06-03 11:55:06 +00:00
|
|
|
endef
|
|
|
|
|
2017-01-17 21:52:04 +00:00
|
|
|
define Package/libmosquitto-ssl
|
2014-06-03 11:55:06 +00:00
|
|
|
$(call Package/libmosquitto/default)
|
|
|
|
TITLE+= (With SSL Support)
|
|
|
|
DEPENDS+= +libopenssl
|
|
|
|
VARIANT=ssl
|
|
|
|
endef
|
|
|
|
define Package/libmosquitto-nossl
|
|
|
|
$(call Package/libmosquitto/default)
|
|
|
|
TITLE+= (Without SSL Support)
|
|
|
|
VARIANT=nossl
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libmosquitto/default/description
|
|
|
|
Library required for mosquitto's command line client tools, also for
|
|
|
|
use by any third party software that wants to communicate with a
|
|
|
|
mosquitto server.
|
|
|
|
|
2014-08-11 10:53:35 +00:00
|
|
|
Should be useable for communicating with any MQTT v3.1/3.1.1 compatible
|
2014-06-03 11:55:06 +00:00
|
|
|
server, such as IBM's RSMB, in addition to Mosquitto
|
|
|
|
endef
|
|
|
|
|
2017-01-17 21:52:04 +00:00
|
|
|
define Package/libmosquitto-ssl/description
|
2014-06-03 11:55:06 +00:00
|
|
|
$(call Package/libmosquitto/default/description)
|
|
|
|
This package is built with SSL support
|
|
|
|
endef
|
|
|
|
define Package/libmosquitto-nossl/description
|
|
|
|
$(call Package/libmosquitto/default/description)
|
|
|
|
This package is built without SSL support
|
|
|
|
endef
|
|
|
|
|
2016-02-19 00:23:54 +00:00
|
|
|
define Package/libmosquittopp
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
2017-12-11 10:55:08 +00:00
|
|
|
DEPENDS:=libmosquitto +libstdcpp
|
2016-02-19 00:23:54 +00:00
|
|
|
TITLE:= mosquitto - client c++ library
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libmosquittopp/description
|
|
|
|
C++ Library wrapper for libmosquitto.
|
|
|
|
endef
|
2014-06-03 11:55:06 +00:00
|
|
|
|
2017-01-17 21:52:04 +00:00
|
|
|
define Package/mosquitto-ssl/conffiles
|
2014-06-03 11:55:06 +00:00
|
|
|
/etc/mosquitto/mosquitto.conf
|
|
|
|
/etc/config/mosquitto
|
|
|
|
endef
|
|
|
|
|
2017-01-17 21:52:04 +00:00
|
|
|
Package/mosquitto-nossl/conffiles = $(Package/mosquitto-ssl/conffiles)
|
2014-06-03 11:55:06 +00:00
|
|
|
|
2016-01-18 17:40:52 +00:00
|
|
|
define Package/mosquitto/install/default
|
2014-06-03 11:55:06 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mosquitto $(1)/usr/sbin/mosquitto
|
|
|
|
$(INSTALL_DIR) $(1)/etc/mosquitto
|
|
|
|
$(INSTALL_CONF) $(PKG_BUILD_DIR)/mosquitto.conf $(1)/etc/mosquitto/mosquitto.conf
|
2016-03-03 13:41:49 +00:00
|
|
|
$(CP) ./files/* $(1)/
|
2014-06-03 11:55:06 +00:00
|
|
|
endef
|
|
|
|
|
2016-01-18 17:40:52 +00:00
|
|
|
define Package/mosquitto-nossl/install
|
|
|
|
$(call Package/mosquitto/install/default,$(1))
|
|
|
|
endef
|
|
|
|
|
2017-01-17 21:52:04 +00:00
|
|
|
define Package/mosquitto-ssl/install
|
2016-01-18 17:40:52 +00:00
|
|
|
$(call Package/mosquitto/install/default,$(1))
|
|
|
|
ifeq ($(CONFIG_MOSQUITTO_PASSWD),y)
|
|
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mosquitto_passwd $(1)/usr/bin
|
|
|
|
endif
|
|
|
|
endef
|
2014-06-03 11:55:06 +00:00
|
|
|
|
2017-04-05 13:59:29 +00:00
|
|
|
define Package/mosquitto-client-ssl/install
|
2014-06-03 11:55:06 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/client/mosquitto_pub $(1)/usr/bin/mosquitto_pub
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/client/mosquitto_sub $(1)/usr/bin/mosquitto_sub
|
|
|
|
endef
|
2017-06-07 15:40:28 +00:00
|
|
|
Package/mosquitto-client-nossl/install = $(Package/mosquitto-client-ssl/install)
|
2014-06-03 11:55:06 +00:00
|
|
|
|
|
|
|
# This installs files into ./staging_dir/. so that you can cross compile from the host
|
|
|
|
define Build/InstallDev
|
|
|
|
$(INSTALL_DIR) $(1)/usr/include
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/lib/mosquitto.h $(1)/usr/include
|
2016-02-19 00:23:54 +00:00
|
|
|
$(CP) $(PKG_BUILD_DIR)/lib/cpp/mosquittopp.h $(1)/usr/include
|
2018-11-11 09:49:37 +00:00
|
|
|
$(CP) $(PKG_BUILD_DIR)/src/mosquitto_plugin.h $(1)/usr/include
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/src/mosquitto_broker.h $(1)/usr/include
|
2014-06-03 11:55:06 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/lib/libmosquitto.so.1 $(1)/usr/lib/
|
2016-02-19 00:23:54 +00:00
|
|
|
$(CP) $(PKG_BUILD_DIR)/lib/cpp/libmosquittopp.so.1 $(1)/usr/lib/
|
2014-06-03 11:55:06 +00:00
|
|
|
$(LN) libmosquitto.so.1 $(1)/usr/lib/libmosquitto.so
|
2016-02-19 00:23:54 +00:00
|
|
|
$(LN) libmosquittopp.so.1 $(1)/usr/lib/libmosquittopp.so
|
2018-09-03 14:29:03 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/libmosquitto.pc.in $(1)/usr/lib/pkgconfig/libmosquitto.pc
|
|
|
|
sed -i -e "s#@CMAKE_INSTALL_PREFIX@#/usr#" \
|
|
|
|
-e "s#@VERSION@#$(PKG_VERSION)#" \
|
|
|
|
$(1)/usr/lib/pkgconfig/libmosquitto.pc
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/libmosquittopp.pc.in $(1)/usr/lib/pkgconfig/libmosquittopp.pc
|
|
|
|
sed -i -e "s#@CMAKE_INSTALL_PREFIX@#/usr#" \
|
|
|
|
-e "s#@VERSION@#$(PKG_VERSION)#" \
|
|
|
|
$(1)/usr/lib/pkgconfig/libmosquittopp.pc
|
2014-06-03 11:55:06 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
# This installs files on the target. Compare with Build/InstallDev
|
2017-01-17 21:52:04 +00:00
|
|
|
define Package/libmosquitto-ssl/install
|
2014-06-03 11:55:06 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/libmosquitto.so.1 $(1)/usr/lib/
|
|
|
|
$(LN) libmosquitto.so.1 $(1)/usr/lib/libmosquitto.so
|
|
|
|
endef
|
2017-01-17 21:52:04 +00:00
|
|
|
Package/libmosquitto-nossl/install = $(Package/libmosquitto-ssl/install)
|
2014-06-03 11:55:06 +00:00
|
|
|
|
2016-02-19 00:23:54 +00:00
|
|
|
define Package/libmosquittopp/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/cpp/libmosquittopp.so.1 $(1)/usr/lib/
|
|
|
|
$(LN) libmosquittopp.so.1 $(1)/usr/lib/libmosquittopp.so
|
|
|
|
endef
|
|
|
|
|
2014-06-03 11:55:06 +00:00
|
|
|
# Applies to all...
|
2017-01-12 15:10:32 +00:00
|
|
|
MAKE_FLAGS += WITH_DOCS=no UNAME=Linux
|
2014-06-03 11:55:06 +00:00
|
|
|
ifeq ($(BUILD_VARIANT),nossl)
|
2016-01-19 10:40:18 +00:00
|
|
|
MAKE_FLAGS += WITH_TLS=no WITH_WEBSOCKETS=no
|
2015-02-22 01:36:35 +00:00
|
|
|
else
|
|
|
|
MAKE_FLAGS += WITH_WEBSOCKETS=$(if $(CONFIG_MOSQUITTO_LWS),"yes","no")
|
2018-02-19 11:35:41 +00:00
|
|
|
MAKE_FLAGS += WITH_TLS_PSK=$(if $(CONFIG_OPENSSL_WITH_PSK),"yes","no")
|
2014-06-03 11:55:06 +00:00
|
|
|
endif
|
|
|
|
|
2017-01-17 21:52:04 +00:00
|
|
|
$(eval $(call BuildPackage,mosquitto-ssl))
|
|
|
|
$(eval $(call BuildPackage,mosquitto-nossl))
|
|
|
|
$(eval $(call BuildPackage,libmosquitto-ssl))
|
2014-06-03 11:55:06 +00:00
|
|
|
$(eval $(call BuildPackage,libmosquitto-nossl))
|
2016-02-19 00:23:54 +00:00
|
|
|
$(eval $(call BuildPackage,libmosquittopp))
|
2017-04-05 13:59:29 +00:00
|
|
|
$(eval $(call BuildPackage,mosquitto-client-ssl))
|
2014-06-03 11:55:06 +00:00
|
|
|
$(eval $(call BuildPackage,mosquitto-client-nossl))
|