From 949605627c4ae0720e30b418b6aba508b0daab0e Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Wed, 29 Aug 2018 06:09:08 +0100 Subject: mosquitto: upgrade to 1.5.1 This includes one security fix and numerous other bugfixes. MQTT version 3.1.1 is now the default protocol. See the following for details: https://mosquitto.org/blog/2018/08/version-151-released/ https://mosquitto.org/blog/2018/05/version-1-5-released/ Changes to the recipe: * Drop explicit installation of the libmosquitto.a static library because this no longer gets built by default, and the normal "make install" which we are running will install it anyway if it were to be enabled. * Drop our service file since there is one supplied in the source tree * Enable systemd notify support when systemd is being used * Update comments in the init script Signed-off-by: Paul Eggleton --- .../mosquitto/mosquitto_1.5.1.bb | 92 ++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 meta-networking/recipes-connectivity/mosquitto/mosquitto_1.5.1.bb (limited to 'meta-networking/recipes-connectivity/mosquitto/mosquitto_1.5.1.bb') diff --git a/meta-networking/recipes-connectivity/mosquitto/mosquitto_1.5.1.bb b/meta-networking/recipes-connectivity/mosquitto/mosquitto_1.5.1.bb new file mode 100644 index 0000000000..fa51f4e76e --- /dev/null +++ b/meta-networking/recipes-connectivity/mosquitto/mosquitto_1.5.1.bb @@ -0,0 +1,92 @@ +SUMMARY = "Open source MQTT v3.1/3.1.1 implemention" +DESCRIPTION = "Mosquitto is an open source (Eclipse licensed) message broker that implements the MQ Telemetry Transport protocol version 3.1 and 3.1.1. MQTT provides a lightweight method of carrying out messaging using a publish/subscribe model. " +HOMEPAGE = "http://mosquitto.org/" +SECTION = "console/network" +LICENSE = "EPL-1.0 | EDL-1.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=62ddc846179e908dc0c8efec4a42ef20 \ + file://edl-v10;md5=c09f121939f063aeb5235972be8c722c \ + file://epl-v10;md5=8d383c379e91d20ba18a52c3e7d3a979 \ + file://notice.html;md5=a00d6f9ab542be7babc2d8b80d5d2a4c \ +" +DEPENDS = "uthash" + +SRC_URI = "http://mosquitto.org/files/source/mosquitto-${PV}.tar.gz \ + file://0002-uthash-remove-in-tree-version.patch \ + file://mosquitto.init \ +" + +SRC_URI[md5sum] = "f98c99998a36a234f3a9d9b402b991db" +SRC_URI[sha256sum] = "8557bc7ae34dfaf32a0fb56d2491b7a7f731269c88337227233013502df4d5b0" + +inherit systemd update-rc.d useradd + +PACKAGECONFIG ??= "ssl uuid" + +PACKAGECONFIG[dns-srv] = ",,c-ares" +PACKAGECONFIG[ssl] = ",,openssl" +PACKAGECONFIG[uuid] = ",,util-linux" + +EXTRA_OEMAKE = " \ + prefix=${prefix} \ + mandir=${mandir} \ + localedir=${localedir} \ + ${@bb.utils.contains('PACKAGECONFIG', 'dns-srv', 'WITH_SRV=yes', 'WITH_SRV=no', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'ssl', 'WITH_TLS=yes WITH_TLS_PSK=yes', 'WITH_TLS=no WITH_TLS_PSK=no', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'uuid', 'WITH_UUID=yes', 'WITH_UUID=no', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'WITH_SYSTEMD=yes', 'WITH_SYSTEMD=no', d)} \ + STRIP=/bin/true \ + WITH_DOCS=no \ +" + +export LIB_SUFFIX = "${@d.getVar('baselib', True).replace('lib', '')}" + +do_install() { + oe_runmake 'DESTDIR=${D}' install + + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${S}/service/systemd/mosquitto.service.notify ${D}${systemd_unitdir}/system/mosquitto.service + + install -d ${D}${sysconfdir}/mosquitto + install -m 0644 ${D}${sysconfdir}/mosquitto/mosquitto.conf.example \ + ${D}${sysconfdir}/mosquitto/mosquitto.conf + + install -d ${D}${sysconfdir}/init.d/ + install -m 0755 ${WORKDIR}/mosquitto.init ${D}${sysconfdir}/init.d/mosquitto + sed -i -e 's,@SBINDIR@,${sbindir},g' \ + -e 's,@BASE_SBINDIR@,${base_sbindir},g' \ + -e 's,@LOCALSTATEDIR@,${localstatedir},g' \ + -e 's,@SYSCONFDIR@,${sysconfdir},g' \ + ${D}${sysconfdir}/init.d/mosquitto +} + +PACKAGES += "libmosquitto1 libmosquittopp1 ${PN}-clients" + +PACKAGE_BEFORE_PN = "${PN}-examples" + +FILES_${PN} = "${sbindir}/mosquitto \ + ${bindir}/mosquitto_passwd \ + ${sysconfdir}/mosquitto \ + ${sysconfdir}/init.d \ + ${systemd_unitdir}/system/mosquitto.service \ +" + +CONFFILES_${PN} += "${sysconfdir}/mosquitto/mosquitto.conf" + +FILES_libmosquitto1 = "${libdir}/libmosquitto.so.1" + +FILES_libmosquittopp1 = "${libdir}/libmosquittopp.so.1" + +FILES_${PN}-clients = "${bindir}/mosquitto_pub \ + ${bindir}/mosquitto_sub \ +" + +FILES_${PN}-examples = "${sysconfdir}/mosquitto/*.example" + +SYSTEMD_SERVICE_${PN} = "mosquitto.service" + +INITSCRIPT_NAME = "mosquitto" +INITSCRIPT_PARAMS = "defaults 30" + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM_${PN} = "--system --no-create-home --shell /bin/false \ + --user-group mosquitto" -- cgit 1.2.3-korg