2.0.3, fix for plugin installs, enable DNS SRV records, plugins in main package, more explicit file globs, other cleanups

epel9
Peter Robinson 4 years ago
parent 13dc8220ec
commit 621dbb1950

1
.gitignore vendored

@ -1,3 +1,4 @@
/mosquitto-1.*.tar.gz
/mosquitto-2.0.0.tar.gz
/mosquitto-2.0.2.tar.gz
/mosquitto-2.0.3.tar.gz

@ -0,0 +1,70 @@
From 9d7580fdb695efef7f27c6fb4bbb4579e283ebd8 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Fri, 18 Dec 2020 08:05:06 +0000
Subject: [PATCH 1/2] Use libdir as the install prefix for plugins
Use the libdir variable from config.mk just like lib/ uses to ensure
that the plugins are installed into the same location as the library.
This fixes systems that use lib64 for libraries like most 64 bit
Linux distributions.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
plugins/dynamic-security/Makefile | 6 +++---
plugins/message-timestamp/Makefile | 6 +++---
plugins/payload-modification/Makefile | 6 +++---
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/plugins/dynamic-security/Makefile b/plugins/dynamic-security/Makefile
index 810a17ba..9ef728b1 100644
--- a/plugins/dynamic-security/Makefile
+++ b/plugins/dynamic-security/Makefile
@@ -77,10 +77,10 @@ test:
install: all
ifeq ($(WITH_CJSON),yes)
ifeq ($(WITH_TLS),yes)
- $(INSTALL) -d "${DESTDIR}$(prefix)/lib"
- $(INSTALL) ${STRIP_OPTS} ${PLUGIN_NAME}.so "${DESTDIR}${prefix}/lib/${PLUGIN_NAME}.so"
+ $(INSTALL) -d "${DESTDIR}$(libdir)"
+ $(INSTALL) ${STRIP_OPTS} ${PLUGIN_NAME}.so "${DESTDIR}${libdir}/${PLUGIN_NAME}.so"
endif
endif
uninstall :
- -rm -f "${DESTDIR}${prefix}/lib/${PLUGIN_NAME}.so"
+ -rm -f "${DESTDIR}${libdir}/${PLUGIN_NAME}.so"
diff --git a/plugins/message-timestamp/Makefile b/plugins/message-timestamp/Makefile
index b78384dc..f76b74cc 100644
--- a/plugins/message-timestamp/Makefile
+++ b/plugins/message-timestamp/Makefile
@@ -20,8 +20,8 @@ test:
install: ${PLUGIN_NAME}.so
# Don't install, these are examples only.
- #$(INSTALL) -d "${DESTDIR}$(prefix)/lib"
- #$(INSTALL) ${STRIP_OPTS} ${PLUGIN_NAME}.so "${DESTDIR}${prefix}/lib/${PLUGIN_NAME}.so"
+ #$(INSTALL) -d "${DESTDIR}$(libdir)"
+ #$(INSTALL) ${STRIP_OPTS} ${PLUGIN_NAME}.so "${DESTDIR}${libdir}/${PLUGIN_NAME}.so"
uninstall :
- -rm -f "${DESTDIR}${prefix}/lib/${PLUGIN_NAME}.so"
+ -rm -f "${DESTDIR}${libdir}/${PLUGIN_NAME}.so"
diff --git a/plugins/payload-modification/Makefile b/plugins/payload-modification/Makefile
index 9511517a..ff3bcfc2 100644
--- a/plugins/payload-modification/Makefile
+++ b/plugins/payload-modification/Makefile
@@ -20,8 +20,8 @@ test:
install: ${PLUGIN_NAME}.so
# Don't install, these are examples only.
- #$(INSTALL) -d "${DESTDIR}$(prefix)/lib"
- #$(INSTALL) ${STRIP_OPTS} ${PLUGIN_NAME}.so "${DESTDIR}${prefix}/lib/${PLUGIN_NAME}.so"
+ #$(INSTALL) -d "${DESTDIR}$(libdir)"
+ #$(INSTALL) ${STRIP_OPTS} ${PLUGIN_NAME}.so "${DESTDIR}${libdir}/${PLUGIN_NAME}.so"
uninstall :
- -rm -f "${DESTDIR}${prefix}/lib/${PLUGIN_NAME}.so"
+ -rm -f "${DESTDIR}${libdir}/${PLUGIN_NAME}.so"
--
2.29.2

@ -1,13 +1,18 @@
%global with_tests 0
Name: mosquitto
Version: 2.0.2
Version: 2.0.3
Release: 1%{?dist}
Summary: Open Source MQTT v3.1/v3.1.1 Broker
License: EPL-2.0
URL: http://mosquitto.org/
Source0: http://mosquitto.org/files/source/%{name}-%{version}.tar.gz
# https://github.com/eclipse/mosquitto/pull/1964
Patch0: 0001-Use-libdir-as-the-install-prefix-for-plugins.patch
BuildRequires: c-ares-devel
BuildRequires: cjson-devel
BuildRequires: gcc-c++
BuildRequires: libuuid-devel
BuildRequires: libwebsockets-devel
@ -17,6 +22,9 @@ BuildRequires: cjson-devel
%if 0%{?rhel} == 7
BuildRequires: tcp_wrappers-libs
%endif
%if 0%{?with_tests}
BuildRequires: CUnit-devel
%endif
#BuildRequires: uthash-devel
Provides: bundled(uthash)
@ -54,7 +62,7 @@ export CFLAGS="%{optflags} -std=gnu99"
export CFLAGS="%{optflags}"
%endif
export LDFLAGS="%{optflags} %{__global_ldflags} -Wl,--as-needed"
make all %{?_smp_mflags} WITH_WEBSOCKETS=yes WITH_SYSTEMD=yes
make all %{?_smp_mflags} WITH_WEBSOCKETS=yes WITH_SYSTEMD=yes WITH_SRV=yes
%install
%if "%{_lib}" == "lib64"
@ -65,13 +73,11 @@ export LIB_SUFFIX=64
mkdir -p %{buildroot}%{_unitdir}
install -p -m 0644 service/systemd/%{name}.service.notify %{buildroot}%{_unitdir}/%{name}.service
mv %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf.example %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
# Temporary fix till be location is fixed upstream
%ifnarch armv7hl i686
mv %{buildroot}/usr/lib/*.so %{buildroot}%{_libdir}/
%endif
%if 0%{?with_tests}
%check
#make test
make test
%endif
%pre
getent group %{name} >/dev/null || groupadd -r %{name}
@ -94,25 +100,32 @@ exit 0
%files
%license LICENSE.txt
%doc ChangeLog.txt CONTRIBUTING.md README.md
%{_bindir}/*
%{_sbindir}/*
%{_libdir}/*.so.*
%{_bindir}/%{name}*
%{_sbindir}/%{name}
%{_libdir}/libmosquitto*.so.1
%{_libdir}/mosquitto_dynamic_security.so
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
%config%{_sysconfdir}/%{name}/*.example
%config %{_sysconfdir}/%{name}/*.example
%{_unitdir}/%{name}.service
%{_mandir}/man1/*.1.*
%{_mandir}/man5/*.5.*
%{_mandir}/man7/*.7.*
%{_mandir}/man8/*.8.*
%{_mandir}/man*/%{name}*
%{_mandir}/man7/mqtt.7.*
%files devel
%{_includedir}/*.h
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_mandir}/man3/*.3.*
%{_includedir}/mosquitto*.h
%{_includedir}/mqtt*.h
%{_libdir}/libmosquitto*.so
%{_libdir}/pkgconfig/libmosquitto*.pc
%{_mandir}/man3/libmosquitto.3.*
%changelog
* Fri Dec 18 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 2.0.3-1
- Update to new upstream release 2.0.3
- Enable DNS SRV record support
- Ship plugin in main package
- More explicit globs for files
- Conditionalise tests
* Wed Dec 16 2020 Fabian Affolter <mail@fabian-affolter.ch> - 2.0.2-1
- Update to new upstream release 2.0.2

@ -1 +1 @@
SHA512 (mosquitto-2.0.2.tar.gz) = 14ad40991c25b47b4bab4d14e8878cf4b31291cad8839a19f114da7dbaaea420a09837801cd24a37d20d14721787cc84dffe8091cc69add8ec556740745ebe2c
SHA512 (mosquitto-2.0.3.tar.gz) = 9781259fe097a2334cd3cfec9fe2627ac4486b6289f3e8fa19646e7b4c2c59e76d6fef4d5929f43aec8861adcef7fc1736f45faec1eeb6c0cfc908b8728a3df2

Loading…
Cancel
Save