diff --git a/debian/changelog b/debian/changelog index bef8b52f..1ad8ab4e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,46 @@ +mosquitto (1.6.8-2) unstable; urgency=medium + + * Also install mqtt_protocol.h in libmosquitto-dev package. + (Closes: #951116) + + -- Gianfranco Costamagna Sat, 15 Feb 2020 19:51:49 +0100 + mosquitto (1.6.8-1) unstable; urgency=medium - * New upstream release. + * Upload to unstable + + -- Gianfranco Costamagna Sat, 08 Feb 2020 09:35:50 +0100 + +mosquitto (1.6.8-1~exp3) experimental; urgency=medium + + * Tweak patch 1570 to fix a build failure with non-libc libraries + + -- Gianfranco Costamagna Sat, 25 Jan 2020 10:47:39 +0100 + +mosquitto (1.6.8-1~exp2) experimental; urgency=medium + + * Add libcares-dev dependency, to enable SRV functionality + * Bump std-version to 4.5.0, no changes required + * Simplify rules file, avoding the systemd hack in configure script + * Rename patches with the upstream PR number on github. + + -- Gianfranco Costamagna Fri, 24 Jan 2020 14:19:46 +0100 + +mosquitto (1.6.8-1~exp1) experimental; urgency=medium + + * New upstream version 1.6.8 (Closes: #949585) + * Also install examples into etc directory + * Install missing mosquitto_broker.h header file + * Add mosquitto_rr to tools + * Install manpages into debian/*.manpages files + * Fix installation of libraries in case soname is added to the so file + * Bump std-version to 4.4.1, no changes required + * Require uthash at least 2.1.0, previously the embedded version was used during build process + * Bump compat level to 12 + * Switch build system to cmake + * Do not override dh_auto_test anymore - -- Roger A. Light Tue, 03 Dec 2019 15:04:38 +0000 + -- Gianfranco Costamagna Wed, 22 Jan 2020 12:23:22 +0100 mosquitto (1.6.7-1) unstable; urgency=medium diff --git a/debian/compat b/debian/compat deleted file mode 100644 index b4de3947..00000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -11 diff --git a/debian/control b/debian/control index d5d66300..8b6b81b4 100644 --- a/debian/control +++ b/debian/control @@ -2,15 +2,18 @@ Source: mosquitto Section: net Priority: optional Maintainer: Roger A. Light -Build-Depends: debhelper (>= 11), +Build-Depends: debhelper-compat (= 12), + cmake, + libc-ares-dev, libssl-dev (>=1.0.0), libsystemd-dev, libwebsockets-dev, + libdlt-dev, libwrap0-dev, pkg-config, - uthash-dev, + uthash-dev (>=2.1.0), uuid-dev -Standards-Version: 4.4.0 +Standards-Version: 4.5.0 Homepage: https://mosquitto.org/ Vcs-Git: https://github.com/eclipse/mosquitto Vcs-Browser: https://github.com/eclipse/mosquitto/tree/debian diff --git a/debian/libmosquitto-dev.install b/debian/libmosquitto-dev.install index 1aa2ff94..2719b7f3 100644 --- a/debian/libmosquitto-dev.install +++ b/debian/libmosquitto-dev.install @@ -1,4 +1,4 @@ usr/include/mosquitto.h +usr/include/mqtt_protocol.h usr/lib/*/libmosquitto.so -usr/share/man/man3/libmosquitto.3 usr/lib/*/pkgconfig/libmosquitto.pc diff --git a/debian/libmosquitto-dev.manpages b/debian/libmosquitto-dev.manpages new file mode 100644 index 00000000..5aa3cdd7 --- /dev/null +++ b/debian/libmosquitto-dev.manpages @@ -0,0 +1 @@ +usr/share/man/man3/libmosquitto.3 diff --git a/debian/libmosquitto1.install b/debian/libmosquitto1.install index 0a9cdbb4..67d884a6 100644 --- a/debian/libmosquitto1.install +++ b/debian/libmosquitto1.install @@ -1 +1 @@ -usr/lib/*/libmosquitto.so.1 +usr/lib/*/libmosquitto.so.* diff --git a/debian/libmosquittopp1.install b/debian/libmosquittopp1.install index 18f1d21f..d6eb5e5b 100644 --- a/debian/libmosquittopp1.install +++ b/debian/libmosquittopp1.install @@ -1 +1 @@ -usr/lib/*/libmosquittopp.so.1 +usr/lib/*/libmosquittopp.so.* diff --git a/debian/mosquitto-clients.install b/debian/mosquitto-clients.install index 06beb92e..7ee3b443 100644 --- a/debian/mosquitto-clients.install +++ b/debian/mosquitto-clients.install @@ -1,4 +1,3 @@ usr/bin/mosquitto_pub usr/bin/mosquitto_sub -usr/share/man/man1/mosquitto_pub.1 -usr/share/man/man1/mosquitto_sub.1 +usr/bin/mosquitto_rr diff --git a/debian/mosquitto-clients.manpages b/debian/mosquitto-clients.manpages new file mode 100644 index 00000000..eb8de11b --- /dev/null +++ b/debian/mosquitto-clients.manpages @@ -0,0 +1,3 @@ +usr/share/man/man1/mosquitto_pub.1 +usr/share/man/man1/mosquitto_sub.1 +usr/share/man/man1/mosquitto_rr.1 diff --git a/debian/mosquitto-dev.install b/debian/mosquitto-dev.install index 9853d024..a05e3acf 100644 --- a/debian/mosquitto-dev.install +++ b/debian/mosquitto-dev.install @@ -1 +1,2 @@ usr/include/mosquitto_plugin.h +usr/include/mosquitto_broker.h diff --git a/debian/mosquitto.install b/debian/mosquitto.install index 0648f3f9..57f6b9cb 100644 --- a/debian/mosquitto.install +++ b/debian/mosquitto.install @@ -2,11 +2,7 @@ etc/mosquitto/ca_certificates/README etc/mosquitto/certs/README etc/mosquitto/conf.d/README etc/mosquitto/mosquitto.conf +etc/mosquitto/*.example lib/systemd/system/mosquitto.service usr/bin/mosquitto_passwd usr/sbin/mosquitto -usr/share/man/man1/mosquitto_passwd.1 -usr/share/man/man5/mosquitto.conf.5 -usr/share/man/man7/mosquitto-tls.7 -usr/share/man/man7/mqtt.7 -usr/share/man/man8/mosquitto.8 diff --git a/debian/mosquitto.manpages b/debian/mosquitto.manpages new file mode 100644 index 00000000..ab1a30e2 --- /dev/null +++ b/debian/mosquitto.manpages @@ -0,0 +1,5 @@ +usr/share/man/man1/mosquitto_passwd.1 +usr/share/man/man5/mosquitto.conf.5 +usr/share/man/man7/mosquitto-tls.7 +usr/share/man/man7/mqtt.7 +usr/share/man/man8/mosquitto.8 diff --git a/debian/patches/1568.patch b/debian/patches/1568.patch new file mode 100644 index 00000000..15f7a910 --- /dev/null +++ b/debian/patches/1568.patch @@ -0,0 +1,67 @@ +Upstream-Status: Submitted [https://github.com/eclipse/mosquitto/pull/1568] +From 50bfc79cae5764a6e513b684a5eb5bef2b35c856 Mon Sep 17 00:00:00 2001 +From: Gianfranco Costamagna +Date: Wed, 22 Jan 2020 12:30:25 +0100 +Subject: [PATCH] Bugfix: include "deps" directory only if BUNDLED_DEPS has + been provided and set to true + +Signed-off-by: Gianfranco Costamagna +--- + config.mk | 5 ++++- + lib/CMakeLists.txt | 5 ++++- + test/unit/Makefile | 6 +++++- + 3 files changed, 13 insertions(+), 3 deletions(-) + +diff --git a/config.mk b/config.mk +index 51e36e0d0..0ac24b3d4 100644 +--- a/config.mk ++++ b/config.mk +@@ -135,7 +135,10 @@ endif + + STATIC_LIB_DEPS:= + +-LIB_CPPFLAGS=$(CPPFLAGS) -I. -I.. -I../lib -I../src/deps ++LIB_CPPFLAGS=$(CPPFLAGS) -I. -I.. -I../lib ++ifeq ($(WITH_BUNDLED_DEPS),yes) ++ LIB_CPPFLAGS:=$(LIB_CPPFLAGS) -I../src/deps ++endif + LIB_CFLAGS:=$(CFLAGS) + LIB_CXXFLAGS:=$(CXXFLAGS) + LIB_LDFLAGS:=$(LDFLAGS) +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index e1521f12a..891046a81 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -1,11 +1,14 @@ + add_subdirectory(cpp) + + include_directories(${mosquitto_SOURCE_DIR} ${mosquitto_SOURCE_DIR}/lib +- ${mosquitto_SOURCE_DIR}/src/deps + ${STDBOOL_H_PATH} ${STDINT_H_PATH} + ${OPENSSL_INCLUDE_DIR} ${PTHREAD_INCLUDE_DIR}) + link_directories(${mosquitto_SOURCE_DIR}/lib) + ++if (WITH_BUNDLED_DEPS) ++ include_directories(${mosquitto_SOURCE_DIR} ${mosquitto_SOURCE_DIR}/src/deps) ++endif (WITH_BUNDLED_DEPS) ++ + set(C_SRC + actions.c + callbacks.c +diff --git a/test/unit/Makefile b/test/unit/Makefile +index 9d422428d..928579492 100644 +--- a/test/unit/Makefile ++++ b/test/unit/Makefile +@@ -2,7 +2,11 @@ include ../../config.mk + + .PHONY: all check test test-broker test-lib clean coverage + +-CPPFLAGS:=$(CPPFLAGS) -I../.. -I../../lib -I../../src -I../../src/deps ++CPPFLAGS:=$(CPPFLAGS) -I../.. -I../../lib -I../../src ++ifeq ($(WITH_BUNDLED_DEPS),yes) ++ CPPFLAGS:=$(CPPFLAGS) -I../../src/deps ++endif ++ + CFLAGS:=$(CFLAGS) -coverage -Wall -ggdb + LDFLAGS:=$(LDFLAGS) -coverage + LDADD:=$(LDADD) -lcunit diff --git a/debian/patches/1569.patch b/debian/patches/1569.patch new file mode 100644 index 00000000..9718b98c --- /dev/null +++ b/debian/patches/1569.patch @@ -0,0 +1,25 @@ +Upstream-Status: Submitted [https://github.com/eclipse/mosquitto/pull/1569] +From fda932612afce2cead2fd2ca1c8ea543b2892177 Mon Sep 17 00:00:00 2001 +From: Gianfranco Costamagna +Date: Wed, 22 Jan 2020 12:31:01 +0100 +Subject: [PATCH] Bugfix: enabling DLT was overriding everything else on linker + flags because of error in cmake set keyword + +Signed-off-by: Gianfranco Costamagna +--- + src/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 7898ff5b1..6dfbba5e6 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -130,7 +130,7 @@ add_definitions (-DWITH_BROKER) + if (WITH_DLT) + message(STATUS "DLT_LIBDIR = ${DLT_LIBDIR}") + link_directories(${DLT_LIBDIR}) +- set (MOSQ_LIBS ${DLT_LIBRARIES}) ++ set (MOSQ_LIBS ${MOSQ_LIBS} ${DLT_LIBRARIES}) + endif (WITH_DLT) + + set (MOSQ_LIBS ${MOSQ_LIBS} ${OPENSSL_LIBRARIES}) diff --git a/debian/patches/1570.patch b/debian/patches/1570.patch new file mode 100644 index 00000000..f11fc481 --- /dev/null +++ b/debian/patches/1570.patch @@ -0,0 +1,39 @@ +Upstream-Status: Submitted [https://github.com/eclipse/mosquitto/pull/1570] +From 775677b05190380c3736bf0dbef002ee7b9bff33 Mon Sep 17 00:00:00 2001 +From: Gianfranco Costamagna +Date: Wed, 22 Jan 2020 12:29:41 +0100 +Subject: [PATCH] cmake: add ADNS enable/disable dynamic support + +Signed-off-by: Gianfranco Costamagna +--- + src/CMakeLists.txt | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 7898ff5b1..edae76f32 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -105,6 +105,9 @@ if (WITH_SYS_TREE) + add_definitions("-DWITH_SYS_TREE") + endif (WITH_SYS_TREE) + ++option(WITH_ADNS ++ "Include ADNS support?" OFF) ++ + if (CMAKE_SYSTEM_NAME STREQUAL Linux) + option(WITH_SYSTEMD + "Include systemd support?" OFF) +@@ -137,10 +140,11 @@ set (MOSQ_LIBS ${MOSQ_LIBS} ${OPENSSL_LIBRARIES}) + # Check for getaddrinfo_a + include(CheckLibraryExists) + check_library_exists(anl getaddrinfo_a "" HAVE_GETADDRINFO_A) +-if (HAVE_GETADDRINFO_A) ++if (HAVE_GETADDRINFO_A AND WITH_ADNS) ++ add_definitions("-DWITH_ADNS") + add_definitions(-DHAVE_GETADDRINFO_A) + set (MOSQ_LIBS ${MOSQ_LIBS} anl) +-endif (HAVE_GETADDRINFO_A) ++endif (HAVE_GETADDRINFO_A AND WITH_ADNS) + + + if (UNIX) diff --git a/debian/patches/1571.patch b/debian/patches/1571.patch new file mode 100644 index 00000000..2cfa4845 --- /dev/null +++ b/debian/patches/1571.patch @@ -0,0 +1,24 @@ +Upstream-Status: Submitted [https://github.com/eclipse/mosquitto/pull/1571] +From 3fe5468f1bdca1bff1d18cf43c9e338f41aa9e32 Mon Sep 17 00:00:00 2001 +From: Gianfranco Costamagna +Date: Wed, 22 Jan 2020 12:39:49 +0100 +Subject: [PATCH] Add dynamic symbols linking with cmake too + +Signed-off-by: Gianfranco Costamagna +--- + lib/CMakeLists.txt | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index e1521f12a..14ba12739 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -88,6 +88,8 @@ set_target_properties(libmosquitto PROPERTIES + OUTPUT_NAME mosquitto + VERSION ${VERSION} + SOVERSION 1 ++ LINK_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/linker.version ++ LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/linker.version" + ) + + install(TARGETS libmosquitto RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") diff --git a/debian/patches/914525.patch b/debian/patches/914525.patch deleted file mode 100644 index e4f75db0..00000000 --- a/debian/patches/914525.patch +++ /dev/null @@ -1,20 +0,0 @@ -Description: Use pkg-config to get systemd libs to allow build on non-linux systems -Author: Roger Light -Forwarded: yes -Index: mosquitto-pulls/config.mk -=================================================================== ---- mosquitto-pulls.orig/config.mk -+++ mosquitto-pulls/config.mk -@@ -247,8 +247,10 @@ ifeq ($(WITH_SYS_TREE),yes) - endif - - ifeq ($(WITH_SYSTEMD),yes) -- BROKER_CPPFLAGS:=$(BROKER_CPPFLAGS) -DWITH_SYSTEMD -- BROKER_LDADD:=$(BROKER_LDADD) -lsystemd -+ ifneq ($(shell pkg-config --libs libsystemd),) -+ BROKER_CPPFLAGS:=$(BROKER_CPPFLAGS) -DWITH_SYSTEMD $(shell pkg-config --cflags libsystemd) -+ BROKER_LDADD:=$(BROKER_LDADD) $(shell pkg-config --libs libsystemd) -+ endif - endif - - ifeq ($(WITH_SRV),yes) diff --git a/debian/patches/install-protocol.patch b/debian/patches/install-protocol.patch new file mode 100644 index 00000000..82e54073 --- /dev/null +++ b/debian/patches/install-protocol.patch @@ -0,0 +1,14 @@ +Description: Also install mqtt_protocol.h, as is done in Makefile +Author: Gianfranco Costamagna +Bug-Debian: https://bugs.debian.org/951116 +Forwarded: https://github.com/eclipse/mosquitto/pull/1599 +Last-Update: 2020-02-15 + +--- mosquitto-1.6.8.orig/lib/CMakeLists.txt ++++ mosquitto-1.6.8/lib/CMakeLists.txt +@@ -113,4 +113,4 @@ if (WITH_STATIC_LIBRARIES) + install(TARGETS libmosquitto_static ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}") + endif (WITH_STATIC_LIBRARIES) + +-install(FILES mosquitto.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") ++install(FILES mqtt_protocol.h mosquitto.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") diff --git a/debian/patches/series b/debian/patches/series index 380236d1..4b55d196 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,6 @@ -914525.patch debian-config.patch +1568.patch +1569.patch +1570.patch +1571.patch +install-protocol.patch diff --git a/debian/rules b/debian/rules index d1be3571..8df87969 100755 --- a/debian/rules +++ b/debian/rules @@ -1,20 +1,19 @@ #!/usr/bin/make -f -export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -export prefix=/usr -export libdir=/usr/lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH) - %: - # Don't process CMake rules, CMakeLists.txt is only included for Windows/Mac support. - dh $@ --buildsystem=makefile + dh $@ --buildsystem=cmake override_dh_installchangelogs: dh_installchangelogs ChangeLog.txt -override_dh_auto_build: - dh_auto_build -- WITH_BUNDLED_DEPS=no WITH_ADNS=yes WITH_WRAP=yes WITH_WEBSOCKETS=yes WITH_STRIP=no WITH_SYSTEMD=yes +ifeq ($(DEB_BUILD_ARCH_OS), linux) +SYSTEMD=ON +else +SYSTEMD=OFF +endif -override_dh_auto_test: +override_dh_auto_configure: + dh_auto_configure -- -DWITH_BUNDLED_DEPS=OFF -DWITH_ADNS=ON -DUSE_LIBWRAP=ON -DWITH_WEBSOCKETS=ON -DWITH_DLT=ON -DWITH_SRV=ON -DWITH_SYSTEMD=${SYSTEMD} override_dh_strip: dh_strip -p mosquitto --dbgsym-migration='mosquitto-dbg (<< 1.5)' -Xlibmosquitto @@ -32,7 +31,7 @@ override_dh_auto_install: install -m 644 debian/README-certs debian/tmp/etc/mosquitto/certs/README install -m 644 debian/mosquitto.conf debian/tmp/etc/mosquitto/mosquitto.conf install -d debian/tmp/lib/systemd/system/ - install -m 644 ./service/systemd/mosquitto.service.notify debian/tmp/lib/systemd/system/mosquitto.service + install -m 644 ./service/systemd/mosquitto.service.notify debian/tmp/lib/systemd/system/mosquitto.service override_dh_makeshlibs: dh_makeshlibs -- -c4