public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/mosquitto] epel10.3: Fix service startup, mosquitto user to own dirs, package owns runtime dirs
@ 2026-11-22 21:36 Peter Robinson
  0 siblings, 0 replies; only message in thread
From: Peter Robinson @ 2026-11-22 21:36 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/mosquitto
Branch : epel10.3
Commit : 5e97c828e85184bcf20f785e79e2268c3c47e58d
Author : Peter Robinson <pbrobinson@gmail.com>
Date   : 2025-12-18T00:56:36+00:00
Stats  : +40/-6 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/mosquitto/c/5e97c828e85184bcf20f785e79e2268c3c47e58d?branch=epel10.3

Log:
Fix service startup, mosquitto user to own dirs, package owns runtime dirs

---
diff --git a/mosquitto-fix-service.patch b/mosquitto-fix-service.patch
new file mode 100644
index 0000000..f0711fc
--- /dev/null
+++ b/mosquitto-fix-service.patch
@@ -0,0 +1,26 @@
+--- mosquitto-2.0.22/service/systemd/mosquitto.service.notify.orig	2025-12-18 00:27:44.907573533 +0000
++++ mosquitto-2.0.22/service/systemd/mosquitto.service.notify	2025-12-18 00:28:33.929697561 +0000
+@@ -1,19 +1,17 @@
+ [Unit]
+ Description=Mosquitto MQTT Broker
+ Documentation=man:mosquitto.conf(5) man:mosquitto(8)
+-After=network.target
+-Wants=network.target
++After=network-online.target
++Wants=network-online.target
+ 
+ [Service]
++User=mosquitto
++Group=mosquitto
+ Type=notify
+ NotifyAccess=main
+ ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
+ ExecReload=/bin/kill -HUP $MAINPID
+ Restart=on-failure
+-ExecStartPre=/bin/mkdir -m 740 -p /var/log/mosquitto
+-ExecStartPre=/bin/chown mosquitto:mosquitto /var/log/mosquitto
+-ExecStartPre=/bin/mkdir -m 740 -p /run/mosquitto
+-ExecStartPre=/bin/chown mosquitto:mosquitto /run/mosquitto
+ 
+ [Install]
+ WantedBy=multi-user.target

diff --git a/mosquitto.spec b/mosquitto.spec
index db3f8fb..bb7337c 100644
--- a/mosquitto.spec
+++ b/mosquitto.spec
@@ -2,7 +2,7 @@
 
 Name:           mosquitto
 Version:        2.0.22
-Release:        5%{?dist}
+Release:        6%{?dist}
 Summary:        Open Source MQTT v5/v3.1.x Broker
 
 License:        EPL-2.0
@@ -10,7 +10,8 @@ URL:            https://mosquitto.org/
 Source0:        https://mosquitto.org/files/source/%{name}-%{version}.tar.gz
 Source1:        mosquitto-sysusers.conf
 # https://github.com/eclipse-mosquitto/mosquitto/pull/3150
-Patch1:         0001-Fix-the-libdir-location-in-the-pkgconf-files.patch
+Patch:          0001-Fix-the-libdir-location-in-the-pkgconf-files.patch
+Patch:          mosquitto-fix-service.patch
 
 BuildRequires:  c-ares-devel
 BuildRequires:  cjson-devel
@@ -74,6 +75,8 @@ sed -i "s/websockets_shared/websockets/" src/CMakeLists.txt
 mkdir -p %{buildroot}%{_unitdir}
 install -p -m 0644 service/systemd/%{name}.service.notify %{buildroot}%{_unitdir}/%{name}.service
 install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/%{name}.conf
+mkdir -p %{buildroot}%{_var}/log/%{name}
+mkdir -p %{buildroot}%{_rundir}/%{name}
 
 %if 0%{?with_tests}
 %check
@@ -83,16 +86,18 @@ make test
 %files
 %license LICENSE.txt 
 %doc ChangeLog.txt CONTRIBUTING.md README.md
+%dir %attr(750,mosquitto,mosquitto) %{_sysconfdir}/%{name}
+%dir %attr(750,mosquitto,mosquitto) %{_localstatedir}/log/%{name}
+%dir %attr(750,mosquitto,mosquitto) %{_rundir}/%{name}
+%config(noreplace) %attr(640,mosquitto,mosquitto) %{_sysconfdir}/%{name}/%{name}.conf
+%config %attr(640,mosquitto,mosquitto) %{_sysconfdir}/%{name}/*.example
 %{_bindir}/%{name}*
-%if 0%{?fedora} < 42 || 0%{?rhel}
+%if 0%{?rhel}
 %{_sbindir}/%{name}
 %endif
 %{_libdir}/libmosquitto*.so.1
 %{_libdir}/libmosquitto*.so.%{version}
 %{_libdir}/mosquitto_dynamic_security.so
-%dir %{_sysconfdir}/%{name}
-%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
-%config %{_sysconfdir}/%{name}/*.example
 %{_sysusersdir}/%{name}.conf
 %{_unitdir}/%{name}.service
 %{_mandir}/man*/%{name}*
@@ -106,6 +111,9 @@ make test
 %{_mandir}/man3/libmosquitto.3.*
 
 %changelog
+* Thu Dec 18 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 2.0.22-6
+- Fix service startup, mosquitto user to own dirs, package owns runtime dirs
+
 * Sun Nov 30 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 2.0.22-5
 - Rebuild against libwebsockets 4.5.0
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-22 21:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-22 21:36 [rpms/mosquitto] epel10.3: Fix service startup, mosquitto user to own dirs, package owns runtime dirs Peter Robinson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox