- Convert some of the BuildRequires from package names to

pkgconfig(): libcares, libcjson, libwebsockets

- Fix linking of modules:
  - Add fix-undefined-symbols-in-plugins.patch
  - revert old workaround of settings -DCMAKE_SHARED_LINKER_FLAGS=

- Update mosquitto-1.6.8-config.patch:
  Set a short profilename for a cleaner ps aufxZ output
- Refreshed mosquitto-1.6.8-config.patch to apply cleanly again

OBS-URL: https://build.opensuse.org/package/show/network:messaging:mqtt/mosquitto?expand=0&rev=50
This commit is contained in:
Marcus Rückert 2021-03-11 12:29:52 +00:00 committed by Git OBS Bridge
parent 18084c4dbe
commit 7507500d42
5 changed files with 88 additions and 9 deletions

View File

@ -0,0 +1,52 @@
Index: mosquitto-2.0.8/plugins/auth-by-ip/CMakeLists.txt
===================================================================
--- mosquitto-2.0.8.orig/plugins/auth-by-ip/CMakeLists.txt
+++ mosquitto-2.0.8/plugins/auth-by-ip/CMakeLists.txt
@@ -1,7 +1,7 @@
include_directories(${mosquitto_SOURCE_DIR} ${mosquitto_SOURCE_DIR}/include
${STDBOOL_H_PATH} ${STDINT_H_PATH})
-add_library(mosquitto_auth_by_ip SHARED mosquitto_auth_by_ip.c)
+add_library(mosquitto_auth_by_ip MODULE mosquitto_auth_by_ip.c)
set_target_properties(mosquitto_auth_by_ip PROPERTIES
POSITION_INDEPENDENT_CODE 1
)
Index: mosquitto-2.0.8/plugins/dynamic-security/CMakeLists.txt
===================================================================
--- mosquitto-2.0.8.orig/plugins/dynamic-security/CMakeLists.txt
+++ mosquitto-2.0.8/plugins/dynamic-security/CMakeLists.txt
@@ -12,7 +12,7 @@ if (CJSON_FOUND AND WITH_TLS)
include_directories(${CLIENT_INC})
link_directories(${CLIENT_DIR} ${mosquitto_SOURCE_DIR})
- add_library(mosquitto_dynamic_security SHARED
+ add_library(mosquitto_dynamic_security MODULE
acl.c
auth.c
clients.c
Index: mosquitto-2.0.8/plugins/message-timestamp/CMakeLists.txt
===================================================================
--- mosquitto-2.0.8.orig/plugins/message-timestamp/CMakeLists.txt
+++ mosquitto-2.0.8/plugins/message-timestamp/CMakeLists.txt
@@ -1,7 +1,7 @@
include_directories(${mosquitto_SOURCE_DIR} ${mosquitto_SOURCE_DIR}/include
${STDBOOL_H_PATH} ${STDINT_H_PATH})
-add_library(mosquitto_message_timestamp SHARED mosquitto_message_timestamp.c)
+add_library(mosquitto_message_timestamp MODULE mosquitto_message_timestamp.c)
set_target_properties(mosquitto_message_timestamp PROPERTIES
POSITION_INDEPENDENT_CODE 1
)
Index: mosquitto-2.0.8/plugins/payload-modification/CMakeLists.txt
===================================================================
--- mosquitto-2.0.8.orig/plugins/payload-modification/CMakeLists.txt
+++ mosquitto-2.0.8/plugins/payload-modification/CMakeLists.txt
@@ -2,7 +2,7 @@ include_directories(${mosquitto_SOURCE_D
${STDBOOL_H_PATH} ${STDINT_H_PATH})
link_directories(${mosquitto_SOURCE_DIR})
-add_library(mosquitto_payload_modification SHARED mosquitto_payload_modification.c)
+add_library(mosquitto_payload_modification MODULE mosquitto_payload_modification.c)
set_target_properties(mosquitto_payload_modification PROPERTIES
POSITION_INDEPENDENT_CODE 1
)

View File

@ -1,11 +1,15 @@
--- a/security/mosquitto.apparmor Index: mosquitto-2.0.8/security/mosquitto.apparmor
+++ b/security/mosquitto.apparmor ===================================================================
@@ -1,3 +1,5 @@ --- mosquitto-2.0.8.orig/security/mosquitto.apparmor
+++ mosquitto-2.0.8/security/mosquitto.apparmor
@@ -1,4 +1,6 @@
-/usr/sbin/mosquitto {
+#include <tunables/global> +#include <tunables/global>
+ +
/usr/sbin/mosquitto { +profile mosquitto /usr/sbin/mosquitto {
#include <abstractions/base> #include <abstractions/base>
#include <abstractions/nameservice> #include <abstractions/nameservice>
@@ -6,6 +8,7 @@ @@ -6,6 +8,7 @@
/etc/mosquitto/mosquitto.conf r, /etc/mosquitto/mosquitto.conf r,
/etc/mosquitto/ca_certificates/* r, /etc/mosquitto/ca_certificates/* r,
@ -14,7 +18,7 @@
/etc/mosquitto/conf.d/* r, /etc/mosquitto/conf.d/* r,
/var/lib/mosquitto/ r, /var/lib/mosquitto/ r,
/var/lib/mosquitto/mosquitto.db rwk, /var/lib/mosquitto/mosquitto.db rwk,
@@ -24,4 +27,5 @@ @@ -25,4 +28,5 @@
/lib{,32,64}/libwrap.so* rm, /lib{,32,64}/libwrap.so* rm,
/etc/hosts.allow r, /etc/hosts.allow r,
/etc/hosts.deny r, /etc/hosts.deny r,

View File

@ -1,6 +1,8 @@
--- mosquitto-1.6.8.orig/mosquitto.conf Index: mosquitto-2.0.8/mosquitto.conf
+++ mosquitto-1.6.8/mosquitto.conf ===================================================================
@@ -985,4 +985,4 @@ --- mosquitto-2.0.8.orig/mosquitto.conf
+++ mosquitto-2.0.8/mosquitto.conf
@@ -871,4 +871,4 @@
# alphabetical order, with capital letters ordered first. If this option is # alphabetical order, with capital letters ordered first. If this option is
# given multiple times, all of the files from the first instance will be # given multiple times, all of the files from the first instance will be
# processed before the next instance. See the man page for examples. # processed before the next instance. See the man page for examples.

View File

@ -1,3 +1,23 @@
-------------------------------------------------------------------
Thu Mar 11 12:27:06 UTC 2021 - Marcus Rueckert <mrueckert@suse.de>
- Convert some of the BuildRequires from package names to
pkgconfig(): libcares, libcjson, libwebsockets
-------------------------------------------------------------------
Thu Mar 11 12:25:55 UTC 2021 - Marcus Rueckert <mrueckert@suse.de>
- Fix linking of modules:
- Add fix-undefined-symbols-in-plugins.patch
- revert old workaround of settings -DCMAKE_SHARED_LINKER_FLAGS=
-------------------------------------------------------------------
Thu Mar 11 12:22:47 UTC 2021 - Marcus Rueckert <mrueckert@suse.de>
- Update mosquitto-1.6.8-config.patch:
Set a short profilename for a cleaner ps aufxZ output
- Refreshed mosquitto-1.6.8-config.patch to apply cleanly again
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Feb 28 12:56:09 UTC 2021 - Martin Hauke <mardnh@gmx.de> Sun Feb 28 12:56:09 UTC 2021 - Martin Hauke <mardnh@gmx.de>

View File

@ -35,6 +35,7 @@ Source98: https://mosquitto.org/files/source/mosquitto-%{version}.tar.gz.a
Source99: %{name}.keyring Source99: %{name}.keyring
Patch0: mosquitto-1.4.1_apparmor.patch Patch0: mosquitto-1.4.1_apparmor.patch
Patch1: mosquitto-1.6.8-config.patch Patch1: mosquitto-1.6.8-config.patch
Patch2: fix-undefined-symbols-in-plugins.patch
BuildRequires: cmake BuildRequires: cmake
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: libxslt-tools BuildRequires: libxslt-tools
@ -115,11 +116,11 @@ Client for Mosquitto.
%setup -q %setup -q
%patch0 -p1 %patch0 -p1
%patch1 -p1 %patch1 -p1
%patch2 -p1
find misc -type f -exec chmod a-x "{}" "+" find misc -type f -exec chmod a-x "{}" "+"
%build %build
%cmake \ %cmake \
-DCMAKE_SHARED_LINKER_FLAGS="" \
-DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir} \ -DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir} \
-DWITH_WEBSOCKETS=ON \ -DWITH_WEBSOCKETS=ON \
-DUSE_LIBWRAP=OFF -DUSE_LIBWRAP=OFF