public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rabbitmq-server] rawhide: [PATCH] Fix sysusers so rabbitmq user exists before installation
@ 2026-07-23 9:34 Tobias Urdin
0 siblings, 0 replies; only message in thread
From: Tobias Urdin @ 2026-07-23 9:34 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/rabbitmq-server
Branch : rawhide
Commit : 26af77b4f7e3710cc6a93a98416b274fe2d177d7
Author : Tobias Urdin <tobias.urdin@binero.com>
Date : 2026-07-23T11:33:49+02:00
Stats : +8/-6 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rabbitmq-server/c/26af77b4f7e3710cc6a93a98416b274fe2d177d7?branch=rawhide
Log:
[PATCH] Fix sysusers so rabbitmq user exists before installation
Use systemd-rpm-macros %sysusers_create_package to generate
a preinstall scriptlet that runs systemd-sysusers early in
the RPM transaction.
This ensures the rabbitmq user/group exists before file
ownership is applied, removing "using root" warnings during
install.
---
diff --git a/rabbitmq-server.spec b/rabbitmq-server.spec
index 2ae1d80..5e205be 100644
--- a/rabbitmq-server.spec
+++ b/rabbitmq-server.spec
@@ -19,6 +19,7 @@ Source3: rabbitmq-server.logrotate
# curl -O https://raw.githubusercontent.com/rabbitmq/rabbitmq-server-release/rabbitmq_v3_6_16/packaging/RPMS/Fedora/rabbitmq-server.tmpfiles
Source5: rabbitmq-server.tmpfiles
Source6: rabbitmq-server-cuttlefish
+Source7: rabbitmq-server.sysusers.conf
Patch: rabbitmq-server-0001-Use-default-EPMD-socket.patch
Patch: rabbitmq-server-0002-Use-proto_dist-from-command-line.patch
Patch: rabbitmq-server-0003-force-python3.patch
@@ -36,6 +37,7 @@ BuildRequires: make
BuildRequires: python3
BuildRequires: rsync
BuildRequires: systemd
+BuildRequires: systemd-rpm-macros
BuildRequires: xmlto
BuildRequires: zip
Requires: erlang-eldap%{?_isa} >= %{erlang_minver}
@@ -66,11 +68,6 @@ scalable implementation of an AMQP broker.
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%autosetup -p1
-# Create a sysusers.d config file
-cat >rabbitmq-server.sysusers.conf <<EOF
-u rabbitmq - 'RabbitMQ messaging server' %{_localstatedir}/lib/rabbitmq -
-EOF
-
%build
make PROJECT_VERSION=%{version} ESCRIPT_ZIP="zip -9 -X" V=1 # Doesn't support %%{?_smp_mflags}
@@ -119,13 +116,17 @@ install -p -D -m 0644 ./deps/rabbit/docs/rabbitmq.conf.example %{buildroot}%{_sy
install -d %{buildroot}%{_localstatedir}/run/rabbitmq
install -p -D -m 0644 %{SOURCE5} %{buildroot}%{_prefix}/lib/tmpfiles.d/%{name}.conf
-install -m0644 -D rabbitmq-server.sysusers.conf %{buildroot}%{_sysusersdir}/rabbitmq-server.conf
+install -m0644 -D %{SOURCE7} %{buildroot}%{_sysusersdir}/rabbitmq-server.conf
%check
#make check
+%pre
+%sysusers_create_package %{name} %{SOURCE7}
+
+
%post
%systemd_post %{name}.service
diff --git a/rabbitmq-server.sysusers.conf b/rabbitmq-server.sysusers.conf
new file mode 100644
index 0000000..c7eff1e
--- /dev/null
+++ b/rabbitmq-server.sysusers.conf
@@ -0,0 +1 @@
+u rabbitmq - 'RabbitMQ messaging server' /var/lib/rabbitmq -
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-23 9:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-23 9:34 [rpms/rabbitmq-server] rawhide: [PATCH] Fix sysusers so rabbitmq user exists before installation Tobias Urdin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox