2017-05-30 14:53:47 +02:00
|
|
|
#
|
|
|
|
# spec file for package mosquitto
|
|
|
|
#
|
Accepting request 674913 from home:mnhauke
- Update to version 1.5.7
Broker:
- Ensure that an error occurs if `per_listener_settings true` is
given after other security options.
- Fix case where old unreferenced msg_store messages were being
saved to the persistence file, bloating its size unnecessarily.
Library:
- Fix `mosquitto_topic_matches_sub()` not returning MOSQ_ERR_INVAL
for invalid subscriptions like `topic/#abc`. This only affects
the return value, not the match/no match result, which was
already correct.
- Update to version 1.5.6
Security:
* Fix CVE-2018-12551 (bsc#1125021): If Mosquitto is configured to
use a password file for authentication, any malformed data in
the password file will be treated as valid. This typically means
that the malformed data becomes a username and no password.
If this occurs, clients can circumvent authentication and get
access to the broker by using the malformed username. In
particular, a blank line will be treated as a valid empty username.
Other security measures are unaffected. Users who have only used
the mosquitto_passwd utility to create and modify their password
files are unaffected by this vulnerability.
* Fix CVE-2018-12550 (bsc#1125021): If an ACL file is empty, or
has only blank lines or comments, then mosquitto treats the ACL
file as not being defined, which means that no topic access is
denied. Although denying access to all topics is not a useful
configuration, this behaviour is unexpected and could lead
to access being incorrectly granted in some circumstances. This
OBS-URL: https://build.opensuse.org/request/show/674913
OBS-URL: https://build.opensuse.org/package/show/network:messaging:mqtt/mosquitto?expand=0&rev=18
2019-02-14 16:33:56 +01:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2017-05-30 14:53:47 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
Accepting request 674913 from home:mnhauke
- Update to version 1.5.7
Broker:
- Ensure that an error occurs if `per_listener_settings true` is
given after other security options.
- Fix case where old unreferenced msg_store messages were being
saved to the persistence file, bloating its size unnecessarily.
Library:
- Fix `mosquitto_topic_matches_sub()` not returning MOSQ_ERR_INVAL
for invalid subscriptions like `topic/#abc`. This only affects
the return value, not the match/no match result, which was
already correct.
- Update to version 1.5.6
Security:
* Fix CVE-2018-12551 (bsc#1125021): If Mosquitto is configured to
use a password file for authentication, any malformed data in
the password file will be treated as valid. This typically means
that the malformed data becomes a username and no password.
If this occurs, clients can circumvent authentication and get
access to the broker by using the malformed username. In
particular, a blank line will be treated as a valid empty username.
Other security measures are unaffected. Users who have only used
the mosquitto_passwd utility to create and modify their password
files are unaffected by this vulnerability.
* Fix CVE-2018-12550 (bsc#1125021): If an ACL file is empty, or
has only blank lines or comments, then mosquitto treats the ACL
file as not being defined, which means that no topic access is
denied. Although denying access to all topics is not a useful
configuration, this behaviour is unexpected and could lead
to access being incorrectly granted in some circumstances. This
OBS-URL: https://build.opensuse.org/request/show/674913
OBS-URL: https://build.opensuse.org/package/show/network:messaging:mqtt/mosquitto?expand=0&rev=18
2019-02-14 16:33:56 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-05-30 14:53:47 +02:00
|
|
|
#
|
|
|
|
|
2017-09-07 19:35:53 +02:00
|
|
|
|
2018-05-07 12:48:14 +02:00
|
|
|
%define home %{_localstatedir}/lib/%{name}
|
|
|
|
%define c_lib libmosquitto1
|
|
|
|
%define cpp_lib libmosquittopp1
|
2017-05-30 14:53:47 +02:00
|
|
|
%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
|
2019-11-29 22:28:23 +01:00
|
|
|
Version: 1.6.8
|
2017-05-30 14:53:47 +02:00
|
|
|
Release: 0
|
2017-09-07 19:35:53 +02:00
|
|
|
Summary: A MQTT v3.1/v3.1.1 Broker
|
2017-05-30 14:53:47 +02:00
|
|
|
License: EPL-1.0
|
2017-09-07 19:35:53 +02:00
|
|
|
Group: Productivity/Networking/Other
|
2019-02-19 13:08:24 +01:00
|
|
|
URL: https://mosquitto.org/
|
|
|
|
Source: https://mosquitto.org/files/source/mosquitto-%{version}.tar.gz
|
|
|
|
Source98: https://mosquitto.org/files/source/mosquitto-%{version}.tar.gz.asc#/%{name}-%{version}.tar.gz.sig
|
|
|
|
Source99: %{name}.keyring
|
2017-05-30 14:53:47 +02:00
|
|
|
Source1: mosquitto.service
|
|
|
|
Source4: README-conf-d
|
|
|
|
Source5: README-ca_certificates
|
|
|
|
Source6: README-certs
|
2017-07-22 22:23:50 +02:00
|
|
|
Patch0: mosquitto-1.4.1_apparmor.patch
|
2017-05-30 14:53:47 +02:00
|
|
|
BuildRequires: cmake
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: libcares-devel
|
2019-04-18 14:33:55 +02:00
|
|
|
#BuildRequires: libuuid-devel
|
2018-05-07 12:48:14 +02:00
|
|
|
BuildRequires: openssl-devel >= 1.0.0
|
|
|
|
BuildRequires: tcpd-devel
|
|
|
|
Requires(pre): shadow
|
2017-05-30 14:53:47 +02:00
|
|
|
%if %{with websockets}
|
|
|
|
BuildRequires: libwebsockets-devel
|
|
|
|
%endif
|
|
|
|
%if %{with systemd}
|
|
|
|
BuildRequires: pkgconfig(systemd)
|
|
|
|
%{?systemd_requires}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%description
|
2017-09-07 19:35:53 +02:00
|
|
|
Mosquitto is a message broker that implements the
|
2017-05-30 14:53:47 +02:00
|
|
|
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}
|
|
|
|
Summary: Shared C Library for %{name}
|
2017-09-07 19:35:53 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
|
2017-05-30 14:53:47 +02:00
|
|
|
%description -n %{c_lib}
|
2017-09-07 19:35:53 +02:00
|
|
|
Mosquitto is a message broker that implements the
|
2017-05-30 14:53:47 +02:00
|
|
|
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 package holds the shared C library.
|
|
|
|
|
|
|
|
%package -n %{cpp_lib}
|
|
|
|
Summary: Shared C++ Library for %{name}
|
2017-09-07 19:35:53 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
|
2017-05-30 14:53:47 +02:00
|
|
|
%description -n %{cpp_lib}
|
2017-09-07 19:35:53 +02:00
|
|
|
Mosquitto is a message broker that implements the
|
2017-05-30 14:53:47 +02:00
|
|
|
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 package holds the shared C++ library.
|
|
|
|
|
|
|
|
%package devel
|
2018-05-07 12:48:14 +02:00
|
|
|
Summary: Development files for %{name}
|
|
|
|
Group: Development/Libraries/C and C++
|
2017-05-30 14:53:47 +02:00
|
|
|
Requires: %{c_lib} = %{version}
|
|
|
|
Requires: %{cpp_lib} = %{version}
|
|
|
|
Provides: libmosquitto-devel = %{version}-%{release}
|
|
|
|
Provides: libmosquittopp-devel = %{version}-%{release}
|
2017-09-07 19:35:53 +02:00
|
|
|
|
2017-05-30 14:53:47 +02:00
|
|
|
%description devel
|
2017-09-07 19:35:53 +02:00
|
|
|
Mosquitto is a message broker that implements the
|
2017-05-30 14:53:47 +02:00
|
|
|
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 package holds the development files.
|
|
|
|
|
|
|
|
%package clients
|
|
|
|
Summary: Client for Mosquitto
|
2017-09-07 19:35:53 +02:00
|
|
|
Group: Productivity/Networking/Other
|
|
|
|
|
2017-05-30 14:53:47 +02:00
|
|
|
%description clients
|
2017-09-07 19:35:53 +02:00
|
|
|
Mosquitto is a message broker that implements the
|
2017-05-30 14:53:47 +02:00
|
|
|
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
|
2017-07-22 22:23:50 +02:00
|
|
|
%patch0 -p1
|
2017-09-07 19:35:53 +02:00
|
|
|
find misc -type f -exec chmod a-x "{}" "+"
|
2017-05-30 14:53:47 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
%cmake \
|
2019-09-21 17:25:51 +02:00
|
|
|
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
|
2017-05-30 14:53:47 +02:00
|
|
|
%if %{with websockets}
|
|
|
|
-DWITH_WEBSOCKETS=ON \
|
|
|
|
%endif
|
2018-05-07 12:48:14 +02:00
|
|
|
-DUSE_LIBWRAP=OFF
|
2017-05-30 14:53:47 +02:00
|
|
|
make
|
|
|
|
|
|
|
|
%install
|
|
|
|
%cmake_install
|
|
|
|
%if %{with systemd}
|
2018-05-07 12:48:14 +02:00
|
|
|
install -D -m 0644 %{SOURCE1} \
|
2017-05-30 14:53:47 +02:00
|
|
|
%{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}
|
2018-05-07 12:48:14 +02:00
|
|
|
install -D -m 644 security/mosquitto.apparmor %{buildroot}%{_sysconfdir}/apparmor.d/usr.sbin.mosquitto
|
|
|
|
install -D -m 755 -d %{buildroot}%{_sysconfdir}/apparmor.d/local/
|
|
|
|
echo "# Site-specific additions and overrides for 'usr.sbin.mosquitto'" > %{buildroot}%{_sysconfdir}/apparmor.d/local/usr.sbin.mosquitto
|
2017-05-30 14:53:47 +02:00
|
|
|
%endif
|
2018-05-07 12:48:14 +02:00
|
|
|
install -D -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/mosquitto/conf.d/README
|
|
|
|
install -D -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/mosquitto/ca_certificates/README
|
|
|
|
install -D -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/mosquitto/certs/README
|
2017-05-30 14:53:47 +02:00
|
|
|
|
|
|
|
%pre
|
2018-05-07 12:48:14 +02:00
|
|
|
getent group %{name} || %{_sbindir}/groupadd -r %{name}
|
|
|
|
getent passwd %{name} || %{_sbindir}/useradd -g %{name} -s /bin/false -r -c "%{name}" -d %{home} %{name}
|
2017-05-30 14:53:47 +02:00
|
|
|
# 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)
|
2018-05-07 12:48:14 +02:00
|
|
|
%license LICENSE.txt
|
|
|
|
%doc edl-v10 epl-v10
|
2017-05-30 14:53:47 +02:00
|
|
|
%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}
|
2018-05-07 12:48:14 +02:00
|
|
|
%dir %{_sysconfdir}/apparmor.d/
|
|
|
|
%dir %{_sysconfdir}/apparmor.d/local/
|
|
|
|
%config %{_sysconfdir}/apparmor.d/usr.sbin.mosquitto
|
|
|
|
%config(noreplace) %{_sysconfdir}/apparmor.d/local/usr.sbin.mosquitto
|
2017-05-30 14:53:47 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%files clients
|
|
|
|
%defattr(-,root,root,-)
|
2018-05-07 12:48:14 +02:00
|
|
|
%license LICENSE.txt
|
|
|
|
%doc edl-v10 epl-v10
|
2017-05-30 14:53:47 +02:00
|
|
|
%{_bindir}/mosquitto_pub
|
|
|
|
%{_bindir}/mosquitto_sub
|
2019-04-18 14:33:55 +02:00
|
|
|
%{_bindir}/mosquitto_rr
|
2017-05-30 14:53:47 +02:00
|
|
|
%{_mandir}/man1/mosquitto_pub.1%{ext_man}
|
|
|
|
%{_mandir}/man1/mosquitto_sub.1%{ext_man}
|
2019-04-18 14:33:55 +02:00
|
|
|
%{_mandir}/man1/mosquitto_rr.1%{ext_man}
|
2017-05-30 14:53:47 +02:00
|
|
|
|
|
|
|
%files -n %{c_lib}
|
|
|
|
%defattr(-,root,root)
|
2018-05-07 12:48:14 +02:00
|
|
|
%license LICENSE.txt
|
|
|
|
%doc edl-v10 epl-v10
|
2017-05-30 14:53:47 +02:00
|
|
|
%{_libdir}/libmosquitto.so.*
|
|
|
|
|
|
|
|
%files -n %{cpp_lib}
|
|
|
|
%defattr(-,root,root)
|
2018-05-07 12:48:14 +02:00
|
|
|
%license LICENSE.txt
|
|
|
|
%doc edl-v10 epl-v10
|
2017-05-30 14:53:47 +02:00
|
|
|
%{_libdir}/libmosquittopp.so.*
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_libdir}/libmosquitto.so
|
|
|
|
%{_libdir}/libmosquittopp.so
|
|
|
|
%{_includedir}/mosquitto.h
|
2018-05-07 12:48:14 +02:00
|
|
|
%{_includedir}/mosquitto_broker.h
|
2017-05-30 14:53:47 +02:00
|
|
|
%{_includedir}/mosquitto_plugin.h
|
|
|
|
%{_includedir}/mosquittopp.h
|
|
|
|
%{_mandir}/man3/libmosquitto.3%{ext_man}
|
2018-05-07 12:48:14 +02:00
|
|
|
%{_libdir}/pkgconfig/libmosquitto.pc
|
|
|
|
%{_libdir}/pkgconfig/libmosquittopp.pc
|
2017-05-30 14:53:47 +02:00
|
|
|
|
|
|
|
%changelog
|