From aaf4775f63b04a59c2723631b19b79a333e89c1c Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Mar 27 2014 14:07:22 +0000 Subject: Do not clobber a file outside the build hierarchy This prevented "fedpkg build" in a git checkout from building the package. Signed-off-by: Lubomir Rintel --- diff --git a/rabbitmq-server.spec b/rabbitmq-server.spec index b0f91f3..3ca9060 100644 --- a/rabbitmq-server.spec +++ b/rabbitmq-server.spec @@ -1,6 +1,6 @@ Name: rabbitmq-server Version: 3.1.5 -Release: 2%{?dist} +Release: 3%{?dist} License: MPLv1.1 Group: Development/Libraries Source: http://www.rabbitmq.com/releases/rabbitmq-server/v%{version}/%{name}-%{version}.tar.gz @@ -43,8 +43,8 @@ scalable implementation of an AMQP broker. # We want to install into /usr/lib, even on 64-bit platforms %global _rabbit_libdir %{_exec_prefix}/lib/rabbitmq %global _rabbit_erllibdir %{_rabbit_libdir}/lib/rabbitmq_server-%{version} -%global _rabbit_wrapper %{_builddir}/`basename %{S:2}` -%global _rabbit_server_ocf %{_builddir}/`basename %{S:4}` +%global _rabbit_wrapper %{_builddir}/%{buildsubdir}/`basename %{S:2}` +%global _rabbit_server_ocf %{_builddir}/%{buildsubdir}/`basename %{S:4}` %global _plugins_state_dir %{_localstatedir}/lib/rabbitmq/plugins @@ -86,12 +86,12 @@ mkdir -p %{buildroot}%{_sysconfdir}/rabbitmq rm %{_maindir}/LICENSE %{_maindir}/LICENSE-MPL-RabbitMQ %{_maindir}/INSTALL #Build the list of files -rm -f %{_builddir}/%{name}.files -echo '%defattr(-,root,root, -)' >> %{_builddir}/%{name}.files +rm -f %{_builddir}/%{buildsubdir}/%{name}.files +echo '%defattr(-,root,root, -)' >> %{_builddir}/%{buildsubdir}/%{name}.files (cd %{buildroot}; \ find . -type f ! -regex '\.%{_sysconfdir}.*' \ ! -regex '\.\(%{_rabbit_erllibdir}\|%{_rabbit_libdir}\).*' \ - | sed -e 's/^\.//' >> %{_builddir}/%{name}.files) + | sed -e 's/^\.//' >> %{_builddir}/%{buildsubdir}/%{name}.files) install -d %{buildroot}%{_localstatedir}/run/rabbitmq %if 0%{?fedora} > 14 @@ -160,7 +160,7 @@ done /bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || : %endif -%files -f ../%{name}.files +%files -f %{name}.files %attr(0750, rabbitmq, rabbitmq) %dir %{_localstatedir}/lib/rabbitmq %attr(0750, rabbitmq, rabbitmq) %dir %{_localstatedir}/log/rabbitmq %dir %{_sysconfdir}/rabbitmq @@ -182,6 +182,9 @@ done rm -rf %{buildroot} %changelog +* Thu Mar 27 2014 Lubomir Rintel - 3.1.5-3 +- Do not clobber a file outside the build hierarchy + * Tue Aug 27 2013 Peter Lemenkov - 3.1.5-2 - Fix permissoon for *.service file (rhbz #1001472)