Accepting request 499508 from home:mnhauke
initial package for mosquitto OBS-URL: https://build.opensuse.org/request/show/499508 OBS-URL: https://build.opensuse.org/package/show/network:messaging:mqtt/mosquitto?expand=0&rev=1
This commit is contained in:
commit
51aac92ba6
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.osc
|
1
README-ca_certificates
Normal file
1
README-ca_certificates
Normal file
@ -0,0 +1 @@
|
|||||||
|
Place your SSL/TLS Certificate Authority certificates in this directory.
|
3
README-certs
Normal file
3
README-certs
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
Place your SSL/TLS server keys and certificates in this directory.
|
||||||
|
|
||||||
|
This directory should only be readable by the mosquitto user.
|
2
README-conf-d
Normal file
2
README-conf-d
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
Any files placed in this directory that have a .conf ending will be loaded as
|
||||||
|
config files by the broker. Use this to make your local config.
|
3
mosquitto-1.4.12.tar.gz
Normal file
3
mosquitto-1.4.12.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:b12e2353f92cb76882ce7b7bddfea022b461b38cbe6e7fb7c969d0daeb379cf7
|
||||||
|
size 362721
|
16
mosquitto-1.4.1_apparmor.patch
Normal file
16
mosquitto-1.4.1_apparmor.patch
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
Index: mosquitto-1.4.1/security/mosquitto.apparmor
|
||||||
|
===================================================================
|
||||||
|
--- mosquitto-1.4.1.orig/security/mosquitto.apparmor
|
||||||
|
+++ mosquitto-1.4.1/security/mosquitto.apparmor
|
||||||
|
@@ -1,3 +1,5 @@
|
||||||
|
+#include <tunables/global>
|
||||||
|
+
|
||||||
|
/usr/sbin/mosquitto {
|
||||||
|
#include <abstractions/base>
|
||||||
|
#include <abstractions/nameservice>
|
||||||
|
@@ -24,4 +26,5 @@
|
||||||
|
/lib{,32,64}/libwrap.so* rm,
|
||||||
|
/etc/hosts.allow r,
|
||||||
|
/etc/hosts.deny r,
|
||||||
|
+ #include <local/usr.sbin.mosquitto>
|
||||||
|
}
|
274
mosquitto.changes
Normal file
274
mosquitto.changes
Normal file
@ -0,0 +1,274 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon May 29 20:19:58 UTC 2017 - mardnh@gmx.de
|
||||||
|
|
||||||
|
- Update to 1.4.12
|
||||||
|
* Security:
|
||||||
|
- Fix CVE-2017-7650, which allows clients with username or
|
||||||
|
client id set to '#' or '+' to bypass pattern based ACLs or
|
||||||
|
third party plugins. The fix denies message sending or
|
||||||
|
receiving of messages for clients with a '#' or '+' in their
|
||||||
|
username or client id and if the message is subject to a
|
||||||
|
pattern ACL check or plugin check.
|
||||||
|
* Broker:
|
||||||
|
- Fix mosquitto.db from becoming corrupted due to client
|
||||||
|
messages being
|
||||||
|
persisted with no stored message. Closes #424.
|
||||||
|
- Fix bridge not restarting properly. Closes #428.
|
||||||
|
- Fix unitialized memory in gets_quiet on Windows. Closes #426.
|
||||||
|
- Fix building with WITH_ADNS=no for systems that don't use
|
||||||
|
glibc. Closes #415.
|
||||||
|
- Fixes to readme.md.
|
||||||
|
- Fix deprecation warning for OpenSSL 1.1. PR #416.
|
||||||
|
- Don't segfault on duplicate bridge names. Closes #446.
|
||||||
|
- Fix CVE-2017-7650.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Mar 19 20:27:12 UTC 2017 - mrueckert@suse.de
|
||||||
|
|
||||||
|
- update to 1.4.11
|
||||||
|
- Broker:
|
||||||
|
- Fix crash when "lazy" type bridge attempts to reconnect.
|
||||||
|
Closes #259.
|
||||||
|
- maximum_connections now applies to websockets listeners.
|
||||||
|
Closes #271.
|
||||||
|
- Allow bridges to use TLS with IPv6.
|
||||||
|
- Don't error on zero length persistence files. Closes #316.
|
||||||
|
- For http only websockets clients, close files served over
|
||||||
|
http in all cases when the client disconnects. Closes #354.
|
||||||
|
- Fix error message when websockets http_dir directory does not
|
||||||
|
exist.
|
||||||
|
- Improve password utility error message. Closes #379.
|
||||||
|
- Clients:
|
||||||
|
- Use of --ciphers no longer requires you to also pass
|
||||||
|
--tls-version. Closes #380.
|
||||||
|
- Client library:
|
||||||
|
- Clients can now use TLS with IPv6.
|
||||||
|
- Fix potential socket leakage when reconnecting. Closes #304.
|
||||||
|
- Fix potential negative timeout being passed to pselect.
|
||||||
|
Closes #329.
|
||||||
|
- update 1.4.10
|
||||||
|
- Broker:
|
||||||
|
- Fix TLS operation with websockets listeners and libwebsockts
|
||||||
|
2.x. Closes #186.
|
||||||
|
- Don't disconnect client on HUP before reading the pending
|
||||||
|
data. Closes #7.
|
||||||
|
- Fix some $SYS messages being incorrectly persisted. Closes
|
||||||
|
#191.
|
||||||
|
- Support OpenSSL 1.1.0.
|
||||||
|
- Call fsync after persisting data to ensure it is correctly
|
||||||
|
written. Closes #189.
|
||||||
|
- Fix persistence saving of subscription QoS on big-endian
|
||||||
|
machines.
|
||||||
|
- Fix will retained flag handling on Windows. Closes #222.
|
||||||
|
- Broker now displays an error if it is unable to open the log
|
||||||
|
file. Closes #234.
|
||||||
|
- Client library:
|
||||||
|
- Support OpenSSL 1.1.0.
|
||||||
|
- Fixed the C++ library not allowing SOCKS support to be used.
|
||||||
|
Closes #198.
|
||||||
|
- Fix memory leak when verifying a server certificate with a
|
||||||
|
subjectAltName section. Closes #237.
|
||||||
|
- Build:
|
||||||
|
- Don't attempt to install docs when WITH_DOCS=no. Closes #184.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jun 28 00:28:53 UTC 2016 - mrueckert@suse.de
|
||||||
|
|
||||||
|
- update to 1.4.9
|
||||||
|
- Broker:
|
||||||
|
- Ensure websockets clients that previously connected with
|
||||||
|
clean session set to false have their queued messages
|
||||||
|
delivered immediately on reconnecting. Closes #476314.
|
||||||
|
- Reconnecting client with clean session set to false doesn't
|
||||||
|
start with mid=1 again.
|
||||||
|
- Will topic isn't truncated by one byte when using a
|
||||||
|
mount_point any more.
|
||||||
|
- Network errors are printed correctly on Windows.
|
||||||
|
- Fix incorrect $SYS heap memory reporting when using ACLs.
|
||||||
|
- Bridge config parameters couldn't contain a space, this has
|
||||||
|
been fixed. Closes #150.
|
||||||
|
- Fix saving of persistence messages that start with a '/'.
|
||||||
|
Closes #151.
|
||||||
|
- Fix reconnecting for bridges that use TLS on Windows. Closes
|
||||||
|
#154.
|
||||||
|
- Broker and bridges can now cope with unknown incoming PUBACK,
|
||||||
|
PUBREC, PUBREL, PUBCOMP without disconnecting. Closes #57.
|
||||||
|
- Fix websockets listeners not being able to bind to an IP
|
||||||
|
address. Closes #170.
|
||||||
|
- mosquitto_passwd utility now correctly deals with unknown
|
||||||
|
command line arguments in all cases. Closes #169.
|
||||||
|
- Fix publishing of $SYS/broker/clients/maximum
|
||||||
|
- Fix order of #includes in lib/send_mosq.c to ensure struct
|
||||||
|
mosquitto doesn't differ between source files when websockets
|
||||||
|
is being used. Closes #180.
|
||||||
|
- Fix possible rare crash when writing out persistence file and
|
||||||
|
a client has incomplete messages inflight that it has been
|
||||||
|
denied the right to publish.
|
||||||
|
- Client library:
|
||||||
|
- Fix the case where a message received just before the
|
||||||
|
keepalive timer expired would cause the client to miss the
|
||||||
|
keepalive timer.
|
||||||
|
- Return value of pthread_create is now checked.
|
||||||
|
- _mosquitto_destroy should not cancel threads that weren't
|
||||||
|
created by libmosquitto. Closes #166.
|
||||||
|
- Clients can now cope with unknown incoming PUBACK, PUBREC,
|
||||||
|
PUBREL, PUBCOMP without disconnecting. Closes #57.
|
||||||
|
- Fix mosquitto_topic_matches_sub() reporting matches on some
|
||||||
|
invalid subscriptions.
|
||||||
|
- Clients:
|
||||||
|
- Handle some unchecked malloc() calls. Closes #1.
|
||||||
|
- Build:
|
||||||
|
- Fix string quoting in CMakeLists.txt. Closes #4.
|
||||||
|
- Fix building on Visual Studio 2015. Closes #136.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 28 01:26:44 UTC 2016 - mrueckert@suse.de
|
||||||
|
|
||||||
|
- update to 1.4.8
|
||||||
|
- Broker:
|
||||||
|
- Wills published by clients connected to a listener with
|
||||||
|
mount_point defined now correctly obey the mount point. This
|
||||||
|
was a potential security risk because it allowed clients to
|
||||||
|
publish messages outside of their restricted mount point.
|
||||||
|
This is only affects brokers where the mount_point option is
|
||||||
|
in use. Closes #487178.
|
||||||
|
- Fix detection of broken connections on Windows.
|
||||||
|
Closes #485143.
|
||||||
|
- Close stdin etc. when daemonised. Closes #485589.
|
||||||
|
- Fix incorrect detection of FreeBSD and OpenBSD.
|
||||||
|
Closes #485131.
|
||||||
|
- Client library:
|
||||||
|
- mosq->want_write should be cleared immediately before a call
|
||||||
|
to SSL_write, to allow clients using mosquitto_want_write()
|
||||||
|
to get accurate results.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Feb 11 01:00:18 UTC 2016 - mrueckert@suse.de
|
||||||
|
|
||||||
|
- update to 1.4.7
|
||||||
|
- Broker:
|
||||||
|
- Fix support for libwebsockets 1.22.
|
||||||
|
- changes from 1.4.6
|
||||||
|
- Broker:
|
||||||
|
- Add support for libwebsockets 1.6.
|
||||||
|
- Client library:
|
||||||
|
- Fix _mosquitto_socketpair() on Windows, reducing the chance
|
||||||
|
of delays when publishing. Closes #483979.
|
||||||
|
- Clients:
|
||||||
|
- Fix "mosquitto_pub -l" stripping the final character on a
|
||||||
|
line. Closes #483981.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Dec 9 17:11:00 UTC 2015 - mrueckert@suse.de
|
||||||
|
|
||||||
|
- enable websocket supports
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Dec 9 17:00:02 UTC 2015 - mrueckert@suse.de
|
||||||
|
|
||||||
|
- enabled tcp wrapper support
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Dec 9 16:04:49 UTC 2015 - mrueckert@suse.de
|
||||||
|
|
||||||
|
- pass the config file in the service file. it does not load it
|
||||||
|
otherwise.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Dec 7 17:05:42 UTC 2015 - mrueckert@suse.de
|
||||||
|
|
||||||
|
- update to 1.4.5
|
||||||
|
- Broker
|
||||||
|
- Fix possible memory leak if bridge using SSL attempts to
|
||||||
|
connect to a host that is not up.
|
||||||
|
- Free unused topic tree elements (fix in 1.4.3 was
|
||||||
|
incomplete). Closes #468987.
|
||||||
|
- Clients
|
||||||
|
- “mosquitto_pub -l” now no longer limited to 1024 byte lines.
|
||||||
|
Closes #478917.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Nov 6 22:46:19 UTC 2015 - mrueckert@suse.de
|
||||||
|
|
||||||
|
- update to 1.4.4
|
||||||
|
- Broker:
|
||||||
|
- Don't leak sockets when outgoing bridge with multiple
|
||||||
|
addresses cannot connect. Closes #477571.
|
||||||
|
- Fix cross compiling of websockets. Closes #475807.
|
||||||
|
- Fix memory free related crashes on openwrt. Closes #475707.
|
||||||
|
- Fix excessive calls to message retry check.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 10 15:21:38 UTC 2015 - mrueckert@suse.de
|
||||||
|
|
||||||
|
- update to 1.4.3
|
||||||
|
- Broker
|
||||||
|
- Fix incorrect bridge notification on initial connection.
|
||||||
|
Closes #467096.
|
||||||
|
- Build fixes for OpenBSD.
|
||||||
|
- Fix incorrect behaviour for autosave_interval, most noticable
|
||||||
|
for autosave_interval=1. Closes #465438.
|
||||||
|
- Fix handling of outgoing QoS>0 messages for bridges that
|
||||||
|
could not be sent because the bridge connection was down.
|
||||||
|
- Free unused topic tree elements. Closes #468987.
|
||||||
|
- Fix some potential memory leaks. Closes #470253.
|
||||||
|
- Fix potential crash on libwebsockets error.
|
||||||
|
- Client library
|
||||||
|
- Add missing error strings to mosquitto_strerror.
|
||||||
|
- Handle fragmented TLS packets without a delay. Closes
|
||||||
|
#470660.
|
||||||
|
- Fix incorrect loop timeout being chosen when using threaded
|
||||||
|
- interface and keepalive = 0. Closes #471334.
|
||||||
|
- Increment inflight messages count correctly. Closes #474935.
|
||||||
|
- Clients
|
||||||
|
- Report error string on connection failure rather than error
|
||||||
|
code.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri May 8 14:59:17 UTC 2015 - mrueckert@suse.de
|
||||||
|
|
||||||
|
- update to 1.4.2
|
||||||
|
Broker:
|
||||||
|
- Fix bridge prefixes only working for the first outgoing
|
||||||
|
message. Closes #464437.
|
||||||
|
- Fix incorrect bridge connection notifications on local broker.
|
||||||
|
- Fix persistent db writing on Windows. Closes #464779.
|
||||||
|
- ACLs are now checked before sending a will message.
|
||||||
|
- Fix possible crash when using bridges on Windows. Closes
|
||||||
|
#465384.
|
||||||
|
- Fix parsing of auth_opt_ arguments with extra spaces/tabs.
|
||||||
|
- Broker will return CONNACK rc=5 when a username/password is not
|
||||||
|
authorised. This was being incorrectly set as rc=4.
|
||||||
|
- Fix handling of payload lengths>4096 with websockets.
|
||||||
|
Client library:
|
||||||
|
- Inflight message count wasn't being decreased for outgoing
|
||||||
|
messages using QoS 2, meaning that only up to 20 QoS 2 messages
|
||||||
|
could be sent. This has been fixed. Closes #464436.
|
||||||
|
- Fix CMake dependencies for C++ wrapper building. Closes
|
||||||
|
#463884.
|
||||||
|
- Fix possibility of select() being called with a socket that is
|
||||||
|
>FD_SETSIZE. This is a fix for #464632 that will be followed
|
||||||
|
>up by removing the select() call in a future version.
|
||||||
|
- Fix calls to mosquitto_connect*_async() not completing.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri May 1 22:28:20 UTC 2015 - mrueckert@suse.de
|
||||||
|
|
||||||
|
- added mosquitto-1.4.1_apparmor.patch to make the profile work in
|
||||||
|
newer apparmor
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri May 1 22:06:15 UTC 2015 - mrueckert@suse.de
|
||||||
|
|
||||||
|
- merge a few things from the other packages
|
||||||
|
- create dir structure in the config dir + readmes
|
||||||
|
- splitout the client
|
||||||
|
- provide the splitted devel package names
|
||||||
|
- install the apparmor profile
|
||||||
|
- install firewall config
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri May 1 20:34:01 UTC 2015 - mrueckert@suse.de
|
||||||
|
|
||||||
|
- initial package
|
||||||
|
|
5
mosquitto.fw
Normal file
5
mosquitto.fw
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
## Name: Mosquitto MQTT Broker
|
||||||
|
## Description: Open ports for Mosquitto MQTT Broker
|
||||||
|
|
||||||
|
# space separated list of allowed TCP ports
|
||||||
|
TCP="1883"
|
12
mosquitto.service
Normal file
12
mosquitto.service
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Mosquitto MQTT v3.1/v3.1.1 Broker
|
||||||
|
Documentation=man:mosquitto.conf(5) man:mosquitto(8)
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=mosquitto
|
||||||
|
Group=mosquitto
|
||||||
|
ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
262
mosquitto.spec
Normal file
262
mosquitto.spec
Normal file
@ -0,0 +1,262 @@
|
|||||||
|
#
|
||||||
|
# spec file for package mosquitto
|
||||||
|
#
|
||||||
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
%if 0%{?suse_version} > 1230 || 0%{?rhel_version} > 600 || 0%{?centos_version} > 600 || 0%{?fedora_version} >= 20 || 0%{?el7}%{?fc20}%{?fc21}%{?fc22}%{?fc23}%{?fc24}%{?fc25}
|
||||||
|
%bcond_without systemd
|
||||||
|
%else
|
||||||
|
%bcond_with systemd
|
||||||
|
%endif
|
||||||
|
%bcond_without websockets
|
||||||
|
|
||||||
|
Name: mosquitto
|
||||||
|
Version: 1.4.12
|
||||||
|
Release: 0
|
||||||
|
License: EPL-1.0
|
||||||
|
Summary: An Open Source MQTT v3.1/v3.1.1 Broker
|
||||||
|
Url: http://mosquitto.org/
|
||||||
|
Group: System/Daemons
|
||||||
|
Source: http://mosquitto.org/files/source/mosquitto-%{version}.tar.gz
|
||||||
|
Source1: mosquitto.service
|
||||||
|
Source2: mosquitto.fw
|
||||||
|
Source4: README-conf-d
|
||||||
|
Source5: README-ca_certificates
|
||||||
|
Source6: README-certs
|
||||||
|
Patch: mosquitto-1.4.1_apparmor.patch
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
BuildRequires: cmake
|
||||||
|
BuildRequires: gcc-c++
|
||||||
|
BuildRequires: libcares-devel
|
||||||
|
BuildRequires: libuuid-devel
|
||||||
|
%if %{with websockets}
|
||||||
|
BuildRequires: libwebsockets-devel
|
||||||
|
%endif
|
||||||
|
BuildRequires: openssl-devel >= 1.0.0
|
||||||
|
BuildRequires: tcpd-devel
|
||||||
|
%if %{with systemd}
|
||||||
|
BuildRequires: pkgconfig(systemd)
|
||||||
|
%{?systemd_requires}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%define _fwdefdir /etc/sysconfig/SuSEfirewall2.d/services
|
||||||
|
%define home /var/lib/%{name}
|
||||||
|
%define c_lib libmosquitto1
|
||||||
|
%define cpp_lib libmosquittopp1
|
||||||
|
|
||||||
|
%description
|
||||||
|
Mosquitto is an open source (BSD licensed) message broker that implements the
|
||||||
|
MQ Telemetry Transport protocol versions 3.1 and 3.1.1. MQTT provides a
|
||||||
|
lightweight method of carrying out messaging using a publish/subscribe model.
|
||||||
|
This makes it suitable for "machine to machine" messaging such as with low
|
||||||
|
power sensors or mobile devices such as phones, embedded computers or
|
||||||
|
microcontrollers like the Arduino. A good example of this is all of the work
|
||||||
|
that Andy Stanford-Clark (one of the originators of MQTT) has done in home
|
||||||
|
monitoring and automation with his twittering house and twittering ferry.
|
||||||
|
|
||||||
|
%package -n %{c_lib}
|
||||||
|
Group: Development/Libraries/C and C++
|
||||||
|
|
||||||
|
Summary: Shared C Library for %{name}
|
||||||
|
%description -n %{c_lib}
|
||||||
|
Mosquitto is an open source (BSD licensed) message broker that implements the
|
||||||
|
MQ Telemetry Transport protocol versions 3.1 and 3.1.1. MQTT provides a
|
||||||
|
lightweight method of carrying out messaging using a publish/subscribe model.
|
||||||
|
This makes it suitable for "machine to machine" messaging such as with low
|
||||||
|
power sensors or mobile devices such as phones, embedded computers or
|
||||||
|
microcontrollers like the Arduino. A good example of this is all of the work
|
||||||
|
that Andy Stanford-Clark (one of the originators of MQTT) has done in home
|
||||||
|
monitoring and automation with his twittering house and twittering ferry.
|
||||||
|
|
||||||
|
This package holds the shared C library.
|
||||||
|
|
||||||
|
|
||||||
|
%package -n %{cpp_lib}
|
||||||
|
Group: Development/Libraries/C and C++
|
||||||
|
|
||||||
|
Summary: Shared C++ Library for %{name}
|
||||||
|
%description -n %{cpp_lib}
|
||||||
|
Mosquitto is an open source (BSD licensed) message broker that implements the
|
||||||
|
MQ Telemetry Transport protocol versions 3.1 and 3.1.1. MQTT provides a
|
||||||
|
lightweight method of carrying out messaging using a publish/subscribe model.
|
||||||
|
This makes it suitable for "machine to machine" messaging such as with low
|
||||||
|
power sensors or mobile devices such as phones, embedded computers or
|
||||||
|
microcontrollers like the Arduino. A good example of this is all of the work
|
||||||
|
that Andy Stanford-Clark (one of the originators of MQTT) has done in home
|
||||||
|
monitoring and automation with his twittering house and twittering ferry.
|
||||||
|
|
||||||
|
This package holds the shared C++ library.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Group: Development/Libraries/C and C++
|
||||||
|
Requires: %{c_lib} = %{version}
|
||||||
|
Requires: %{cpp_lib} = %{version}
|
||||||
|
Provides: libmosquitto-devel = %{version}-%{release}
|
||||||
|
Provides: libmosquittopp-devel = %{version}-%{release}
|
||||||
|
Summary: Development files %{name}
|
||||||
|
%description devel
|
||||||
|
Mosquitto is an open source (BSD licensed) message broker that implements the
|
||||||
|
MQ Telemetry Transport protocol versions 3.1 and 3.1.1. MQTT provides a
|
||||||
|
lightweight method of carrying out messaging using a publish/subscribe model.
|
||||||
|
This makes it suitable for "machine to machine" messaging such as with low
|
||||||
|
power sensors or mobile devices such as phones, embedded computers or
|
||||||
|
microcontrollers like the Arduino. A good example of this is all of the work
|
||||||
|
that Andy Stanford-Clark (one of the originators of MQTT) has done in home
|
||||||
|
monitoring and automation with his twittering house and twittering ferry.
|
||||||
|
|
||||||
|
This package holds the development files.
|
||||||
|
|
||||||
|
%package clients
|
||||||
|
Group: System/Daemons
|
||||||
|
|
||||||
|
Summary: Client for Mosquitto
|
||||||
|
%description clients
|
||||||
|
Mosquitto is an open source (BSD licensed) message broker that implements the
|
||||||
|
MQ Telemetry Transport protocol versions 3.1 and 3.1.1. MQTT provides a
|
||||||
|
lightweight method of carrying out messaging using a publish/subscribe model.
|
||||||
|
This makes it suitable for "machine to machine" messaging such as with low
|
||||||
|
power sensors or mobile devices such as phones, embedded computers or
|
||||||
|
microcontrollers like the Arduino. A good example of this is all of the work
|
||||||
|
that Andy Stanford-Clark (one of the originators of MQTT) has done in home
|
||||||
|
monitoring and automation with his twittering house and twittering ferry.
|
||||||
|
|
||||||
|
Client for Mosquitto.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
%patch -p1
|
||||||
|
find misc -type f -print0 | xargs -r0 chmod a-x
|
||||||
|
|
||||||
|
%build
|
||||||
|
%cmake \
|
||||||
|
%if %{with websockets}
|
||||||
|
-DWITH_WEBSOCKETS=ON \
|
||||||
|
%endif
|
||||||
|
-DUSE_LIBWRAP=ON
|
||||||
|
make
|
||||||
|
|
||||||
|
%install
|
||||||
|
%cmake_install
|
||||||
|
%if %{with systemd}
|
||||||
|
install -D -m 0644 %{S:1} \
|
||||||
|
%{buildroot}%{_unitdir}/%{name}.service
|
||||||
|
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
||||||
|
%endif
|
||||||
|
install -Dd -m 0750 %{buildroot}%{home}
|
||||||
|
chmod -R o= %{buildroot}%{_sysconfdir}/%{name}/
|
||||||
|
%if 0%{?suse_version}
|
||||||
|
install -D -m 644 %{S:2} %{buildroot}%{_fwdefdir}/mosquitto
|
||||||
|
install -D -m 644 security/mosquitto.apparmor %{buildroot}/etc/apparmor.d/usr.sbin.mosquitto
|
||||||
|
install -D -m 755 -d %{buildroot}/etc/apparmor.d/local/
|
||||||
|
echo "# Site-specific additions and overrides for 'usr.sbin.mosquitto'" > %{buildroot}/etc/apparmor.d/local/usr.sbin.mosquitto
|
||||||
|
%endif
|
||||||
|
install -D -m 644 %{S:4} %{buildroot}/etc/mosquitto/conf.d/README
|
||||||
|
install -D -m 644 %{S:5} %{buildroot}/etc/mosquitto/ca_certificates/README
|
||||||
|
install -D -m 644 %{S:6} %{buildroot}/etc/mosquitto/certs/README
|
||||||
|
|
||||||
|
%pre
|
||||||
|
/usr/sbin/groupadd -r %{name} >/dev/null 2>&1 || :
|
||||||
|
/usr/sbin/useradd -g %{name} -s /bin/false -r -c "%{name}" -d %{home} %{name} >/dev/null 2>&1 || :
|
||||||
|
# START BIG SYSTEMD
|
||||||
|
%if %{with systemd}
|
||||||
|
%if 0%{?suse_version}
|
||||||
|
%service_add_pre %{name}.service
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%preun
|
||||||
|
%if 0%{?suse_version}
|
||||||
|
%service_del_preun %{name}.service
|
||||||
|
%else
|
||||||
|
%systemd_preun %{name}.service
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%post
|
||||||
|
%if 0%{?suse_version}
|
||||||
|
%service_add_post %{name}.service
|
||||||
|
%else
|
||||||
|
%systemd_post %{name}.service
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%if 0%{?suse_version}
|
||||||
|
%service_del_postun %{name}.service
|
||||||
|
%else
|
||||||
|
%systemd_postun_with_restart %{name}.service
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
# /END BIG SYSTEMD
|
||||||
|
|
||||||
|
%post -n %{c_lib} -p /sbin/ldconfig
|
||||||
|
%postun -n %{c_lib} -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%post -n %{cpp_lib} -p /sbin/ldconfig
|
||||||
|
%postun -n %{cpp_lib} -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%doc edl-v10 epl-v10 LICENSE.txt
|
||||||
|
%doc CONTRIBUTING.md ChangeLog.txt readme.md *.html *.example
|
||||||
|
%doc examples/ logo/ security/ misc/
|
||||||
|
%config(noreplace) %attr(-,root,%{name}) %{_sysconfdir}/mosquitto/
|
||||||
|
%{_bindir}/mosquitto_passwd
|
||||||
|
%{_sbindir}/mosquitto
|
||||||
|
%{_mandir}/man1/mosquitto_passwd.1%{ext_man}
|
||||||
|
%{_mandir}/man5/mosquitto.conf.5%{ext_man}
|
||||||
|
%{_mandir}/man7/mosquitto-tls.7%{ext_man}
|
||||||
|
%{_mandir}/man7/mqtt.7%{ext_man}
|
||||||
|
%{_mandir}/man8/mosquitto.8%{ext_man}
|
||||||
|
%if %{with systemd}
|
||||||
|
%{_unitdir}/%{name}.service
|
||||||
|
%if 0%{?suse_version}
|
||||||
|
%{_sbindir}/rc%{name}
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
%dir %attr(-,%{name},%{name}) %{home}
|
||||||
|
%if 0%{?suse_version}
|
||||||
|
%dir /etc/apparmor.d/
|
||||||
|
%dir /etc/apparmor.d/local/
|
||||||
|
%config /etc/apparmor.d/usr.sbin.mosquitto
|
||||||
|
%config(noreplace) /etc/apparmor.d/local/usr.sbin.mosquitto
|
||||||
|
%config(noreplace) %{_fwdefdir}/mosquitto
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files clients
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%doc edl-v10 epl-v10 LICENSE.txt
|
||||||
|
%{_bindir}/mosquitto_pub
|
||||||
|
%{_bindir}/mosquitto_sub
|
||||||
|
%{_mandir}/man1/mosquitto_pub.1%{ext_man}
|
||||||
|
%{_mandir}/man1/mosquitto_sub.1%{ext_man}
|
||||||
|
|
||||||
|
%files -n %{c_lib}
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%doc edl-v10 epl-v10 LICENSE.txt
|
||||||
|
%{_libdir}/libmosquitto.so.*
|
||||||
|
|
||||||
|
%files -n %{cpp_lib}
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%doc edl-v10 epl-v10 LICENSE.txt
|
||||||
|
%{_libdir}/libmosquittopp.so.*
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_libdir}/libmosquitto.so
|
||||||
|
%{_libdir}/libmosquittopp.so
|
||||||
|
%{_includedir}/mosquitto.h
|
||||||
|
%{_includedir}/mosquitto_plugin.h
|
||||||
|
%{_includedir}/mosquittopp.h
|
||||||
|
%{_mandir}/man3/libmosquitto.3%{ext_man}
|
||||||
|
|
||||||
|
%changelog
|
Loading…
x
Reference in New Issue
Block a user