From 981dc2e024144bcb3a9af2cba3c6ba351385204e260972af9fa49d87c033828a Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Thu, 25 Apr 2013 09:45:59 +0000 Subject: [PATCH] Accepting request 173319 from Cloud:OpenStack:Grizzly - fix rabbitmq-server startup on systemd enabled systems (create /var/run/rabbitmq-server directory using systemd-tmpfiles mechanism) (forwarded request 173204 from tpaszkowski) OBS-URL: https://build.opensuse.org/request/show/173319 OBS-URL: https://build.opensuse.org/package/show/network:messaging:amqp/rabbitmq-server?expand=0&rev=18 --- rabbitmq-server.changes | 6 ++++++ rabbitmq-server.spec | 9 +++++++++ rabbitmq-server.tmpfiles.d.conf | 1 + 3 files changed, 16 insertions(+) create mode 100644 rabbitmq-server.tmpfiles.d.conf diff --git a/rabbitmq-server.changes b/rabbitmq-server.changes index a7a270f..28557f5 100644 --- a/rabbitmq-server.changes +++ b/rabbitmq-server.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Apr 24 12:25:15 UTC 2013 - tpaszkowski@novell.com + +- fix rabbitmq-server startup on systemd enabled systems (create + /var/run/rabbitmq-server directory using systemd-tmpfiles mechanism) + ------------------------------------------------------------------ Wed Apr 3 12:00:36 UTC 2013 - dmueller@suse.com diff --git a/rabbitmq-server.spec b/rabbitmq-server.spec index 3a3f0ff..94e3eaf 100644 --- a/rabbitmq-server.spec +++ b/rabbitmq-server.spec @@ -38,6 +38,7 @@ Source3: rabbitmq-server.logrotate Source4: rabbitmq-server.ocf Source5: rabbitmq-server.sysconfig Source6: rabbitmq-server.service +Source7: rabbitmq-server.tmpfiles.d.conf Patch0: no-nmap.patch Patch1: no-remove-common.patch BuildRequires: erlang @@ -147,6 +148,12 @@ mkdir -p %{buildroot}%{_sysconfdir}/rabbitmq mkdir -p %{buildroot}%{_localstatedir}/lib/rabbitmq/mnesia mkdir -p %{buildroot}%{_localstatedir}/log/rabbitmq +# tmpfiles.d for systemd +%if 0%{?have_systemd} +mkdir -p %{buildroot}%/usr/lib/tmpfiles.d +install -p -D -m 0644 %{SOURCE7} %{buildroot}/usr/lib/tmpfiles.d/rabbitmq-server.conf +%endif + # Build the list of files rm -f %{_builddir}/filelist.%{name}.rpm echo '%defattr(-,root,root, -)' >> %{_builddir}/filelist.%{name}.rpm @@ -173,6 +180,7 @@ exit 0 %fillup_and_insserv rabbitmq-server %if 0%{?have_systemd} %service_add_post %{name}.service +systemd-tmpfiles --create --clean /usr/lib/tmpfiles.d/rabbitmq-server.conf %endif %preun @@ -201,6 +209,7 @@ exit 0 %{_sbindir}/rcrabbitmq-server %if 0%{?have_systemd} %{_unitdir}/%{name}.service +/usr/lib/tmpfiles.d/rabbitmq-server.conf %endif %dir /usr/lib/ocf %dir /usr/lib/ocf/resource.d diff --git a/rabbitmq-server.tmpfiles.d.conf b/rabbitmq-server.tmpfiles.d.conf new file mode 100644 index 0000000..7539e79 --- /dev/null +++ b/rabbitmq-server.tmpfiles.d.conf @@ -0,0 +1 @@ +d /var/run/rabbitmq 0755 rabbitmq root - -