Accepting request 457424 from devel:languages:erlang

- Cleanup file list and prepare merging the plugins package into
  the main package:
  - No longer create parts of the filelist in %install
  - Only exclude the plugins starting with rabbitmq_* and not all
    files in the plugin dir. Some of the files are basic libraries
    needed to even launch rabbitmq. (boo#1025442)
- in the tmpfiles.d file: make the directory group owned
- own the run dir in the non systemd case

OBS-URL: https://build.opensuse.org/request/show/457424
OBS-URL: https://build.opensuse.org/package/show/network:messaging:amqp/rabbitmq-server?expand=0&rev=74
This commit is contained in:
Dirk Mueller 2017-03-01 21:44:48 +00:00 committed by Git OBS Bridge
parent b41bc91f71
commit 2f915d3c6e
3 changed files with 39 additions and 28 deletions

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Wed Feb 15 13:09:26 UTC 2017 - mrueckert@suse.de
- Cleanup file list and prepare merging the plugins package into
the main package:
- No longer create parts of the filelist in %install
- Only exclude the plugins starting with rabbitmq_* and not all
files in the plugin dir. Some of the files are basic libraries
needed to even launch rabbitmq. (boo#1025442)
- in the tmpfiles.d file: make the directory group owned
- own the run dir in the non systemd case
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Feb 13 10:54:43 UTC 2017 - mrueckert@suse.de Mon Feb 13 10:54:43 UTC 2017 - mrueckert@suse.de

View File

@ -15,6 +15,7 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
%bcond_without split_plugins
%define _rabbit_erllibdir %{_libdir}/rabbitmq/lib/rabbitmq_server-%{version} %define _rabbit_erllibdir %{_libdir}/rabbitmq/lib/rabbitmq_server-%{version}
%define _rabbit_libdir %{_libdir}/rabbitmq %define _rabbit_libdir %{_libdir}/rabbitmq
@ -53,8 +54,8 @@ BuildRequires: python-xml
BuildRequires: rsync BuildRequires: rsync
BuildRequires: unzip BuildRequires: unzip
BuildRequires: xmlto BuildRequires: xmlto
BuildRequires: zip
BuildRequires: xz BuildRequires: xz
BuildRequires: zip
Requires: erlang Requires: erlang
Requires: erlang-epmd Requires: erlang-epmd
Requires: logrotate Requires: logrotate
@ -158,14 +159,6 @@ mkdir -p %{buildroot}%{_sysconfdir}/rabbitmq
mkdir -p %{buildroot}%{_localstatedir}/lib/rabbitmq/mnesia mkdir -p %{buildroot}%{_localstatedir}/lib/rabbitmq/mnesia
mkdir -p %{buildroot}%{_localstatedir}/log/rabbitmq mkdir -p %{buildroot}%{_localstatedir}/log/rabbitmq
# Build the list of files
rm -f %{_builddir}/filelist.%{name}.rpm
echo '%defattr(-,root,root, -)' >> %{_builddir}/filelist.%{name}.rpm
(cd %{buildroot}; \
find . -type f ! -regex '\.%{_sysconfdir}.*' \
! -regex '\.\(%{_rabbit_erllibdir}\|%{_rabbit_libdir}\).*' \
| sed -e 's/^\.//' >> %{_builddir}/filelist.%{name}.rpm)
# Create hardlinks for duplicate files # Create hardlinks for duplicate files
%fdupes %{buildroot}/usr/share %fdupes %{buildroot}/usr/share
@ -202,36 +195,42 @@ systemd-tmpfiles --create --clean /usr/lib/tmpfiles.d/rabbitmq-server.conf
%insserv_cleanup %insserv_cleanup
%endif %endif
%files -f ../filelist.%{name}.rpm %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%attr(0750, rabbitmq, rabbitmq) %dir %{_localstatedir}/lib/rabbitmq %config(noreplace) %{_sysconfdir}/logrotate.d/rabbitmq-server
%attr(0750, rabbitmq, rabbitmq) %dir %{_localstatedir}/log/rabbitmq %config(noreplace) %{_sysconfdir}/rabbitmq/
%dir %{_sysconfdir}/rabbitmq %{_rabbit_libdir}
%dir %{_rabbit_libdir} %if %{with split_plugins}
#{_rabbit_libdir}/bin %exclude %{_rabbit_erllibdir}/plugins/rabbitmq_*
%dir %{_rabbit_libdir}/lib %endif
%{_rabbit_erllibdir} #
%if 0%{?have_systemd} %if 0%{?have_systemd}
%{_unitdir}/%{name}.service %{_unitdir}/%{name}.service
/usr/lib/tmpfiles.d/rabbitmq-server.conf /usr/lib/tmpfiles.d/rabbitmq-server.conf
%else %else
%{_initddir}/rabbitmq-server %{_initddir}/rabbitmq-server
%dir %attr(0755, rabbitmq, rabbitmq) %{_localstatedir}/run/rabbitmq
%endif %endif
#
%attr(0750, rabbitmq, rabbitmq) %dir %{_localstatedir}/lib/rabbitmq
%attr(0750, rabbitmq, rabbitmq) %dir %{_localstatedir}/log/rabbitmq
#
%{_sbindir}/rabbitmq-plugins
%{_sbindir}/rabbitmq-server
%{_sbindir}/rabbitmqctl
%{_sbindir}/rcrabbitmq-server %{_sbindir}/rcrabbitmq-server
%dir /usr/lib/ocf #
%dir /usr/lib/ocf/resource.d %dir /usr/lib/ocf/
%dir /usr/lib/ocf/resource.d/rabbitmq %dir /usr/lib/ocf/resource.d/
%config(noreplace) %{_sysconfdir}/logrotate.d/rabbitmq-server /usr/lib/ocf/resource.d/rabbitmq/
%config(noreplace) %{_sysconfdir}/rabbitmq/rabbitmq.config #
%doc LICENSE* README* CODE_OF_CONDUCT.md CONTRIBUTING.md %doc LICENSE* README* CODE_OF_CONDUCT.md CONTRIBUTING.md
%dir %{_rabbit_erllibdir}/plugins
%exclude %{_rabbit_erllibdir}/plugins/*
%exclude %{_libdir}/erlang/lib/amqp_client*/*
%exclude %{_libdir}/erlang/lib/rabbit_common*/*
%if %{with split_plugins}
%files plugins %files plugins
%defattr(-,root,root) %defattr(-,root,root)
%{_rabbit_erllibdir}/plugins/ %{_rabbit_erllibdir}/plugins/rabbitmq_*
%endif
%files -n erlang-rabbitmq-client %files -n erlang-rabbitmq-client
%defattr(-,root,root) %defattr(-,root,root)

View File

@ -1 +1 @@
d /var/run/rabbitmq 0755 rabbitmq root - - d /var/run/rabbitmq 0755 rabbitmq rabbitmq - -