Source: mosquitto Version: 1.5.4-1 Severity: normal Tags: patch Dear Maintainer,
I noticed the new version of mosquitto failed to build on hurd. My thoughts was that this was because of the long-standing breakage in libsystemd-dummy that no non-linux porter seems to have had time to fix (see #830935). I fixed up libsystemd-dummy to verify this but unfortunately all the blame can not be put on non-linux porters this time. (I'll upload the fixed version shortly.) Apparently conf.mk hard-codes the linker flags instead of using pkg-config to retrieve them (which would end up blank with libsystemd.pc from libsystemd-dummy). Thus there are two options to fix mosquitto build on hurd: 1. start using pkg-config and replace the hardcoded -lsystemd 2. include special-casing in debian/rules The attached patch does the latter as it seemed easiest and least controversial. Please note the patch has only been (build-)tested on hurd, so you might want to give it a spin yourself (on linux) and verify the correct configure arguments are used. Regards, Andreas Henriksson
diff -Nru mosquitto-1.5.4/debian/changelog mosquitto-1.5.4/debian/changelog --- mosquitto-1.5.4/debian/changelog 2018-11-08 13:34:59.000000000 +0000 +++ mosquitto-1.5.4/debian/changelog 2018-11-24 13:41:32.000000000 +0000 @@ -1,3 +1,12 @@ +mosquitto (1.5.4-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * debian/rules: Only enable WITH_SYSTEMD=yes on linux + - this is needed as mosquitto build system doesn't use pkg-config + and instead hardcodes systemd linker flags. + + -- Andreas Henriksson <andr...@fatal.se> Sat, 24 Nov 2018 13:41:32 +0000 + mosquitto (1.5.4-1) unstable; urgency=medium * New upstream release (Closes: #911104). diff -Nru mosquitto-1.5.4/debian/rules mosquitto-1.5.4/debian/rules --- mosquitto-1.5.4/debian/rules 2018-11-08 13:34:59.000000000 +0000 +++ mosquitto-1.5.4/debian/rules 2018-11-24 13:41:32.000000000 +0000 @@ -1,8 +1,10 @@ #!/usr/bin/make -f +include /usr/share/dpkg/architecture.mk + export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed export prefix=/usr -export libdir=/usr/lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH) +export libdir=/usr/lib/$(DEB_HOST_MULTIARCH) %: dh $@ @@ -14,7 +16,10 @@ # Don't process CMake rules, CMakeLists.txt is only included for Windows/Mac support. override_dh_auto_build: - make WITH_BUNDLED_DEPS=no WITH_ADNS=yes WITH_WRAP=yes WITH_WEBSOCKETS=yes WITH_STRIP=no WITH_SYSTEMD=yes +ifneq (,$(findstring linux,$(DEB_HOST_ARCH_OS))) + CONFARGS="WITH_SYSTEMD=yes" +endif + make WITH_BUNDLED_DEPS=no WITH_ADNS=yes WITH_WRAP=yes WITH_WEBSOCKETS=yes WITH_STRIP=no $(CONFARGS) override_dh_auto_test: