diff options
author | David Wragg <dpw@lshift.net> | 2009-05-08 15:44:58 +0100 |
---|---|---|
committer | David Wragg <dpw@lshift.net> | 2009-05-08 15:44:58 +0100 |
commit | 03d33df3b6fff8b66e483ba5c8deec5de0b672cc (patch) | |
tree | a6a04ecc9092ad96d38a62f2c90930f745bbda41 | |
parent | a5c2bda31cf129cdf5d6860e97a88b0d6c61d9dd (diff) | |
download | rabbitmq-server-03d33df3b6fff8b66e483ba5c8deec5de0b672cc.tar.gz |
Create user and group in %pre rather than %postbug20649
They are referred to in the %files section, which leads to warnings
if they are not created until %post runs.
-rw-r--r-- | packaging/RPMS/Fedora/rabbitmq-server.spec | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/packaging/RPMS/Fedora/rabbitmq-server.spec b/packaging/RPMS/Fedora/rabbitmq-server.spec index 184a9832..6bf3b841 100644 --- a/packaging/RPMS/Fedora/rabbitmq-server.spec +++ b/packaging/RPMS/Fedora/rabbitmq-server.spec @@ -28,13 +28,6 @@ scalable implementation of an AMQP broker. %define _maindir %{buildroot}%{_rabbit_erllibdir} -%pre -if [ $1 -gt 1 ]; then - #Upgrade - stop and remove previous instance of rabbitmq-server init.d script - /sbin/service rabbitmq-server stop - /sbin/chkconfig --del rabbitmq-server -fi - %prep %setup -q @@ -73,7 +66,14 @@ echo '%defattr(-,root,root, -)' >> %{_builddir}/filelist.%{name}.rpm ! -regex '\.\(%{_rabbit_erllibdir}\|%{_rabbit_libdir}\).*' \ | sed -e 's/^\.//' >> %{_builddir}/filelist.%{name}.rpm) -%post +%pre + +if [ $1 -gt 1 ]; then + #Upgrade - stop and remove previous instance of rabbitmq-server init.d script + /sbin/service rabbitmq-server stop + /sbin/chkconfig --del rabbitmq-server +fi + # create rabbitmq group if ! getent group rabbitmq >/dev/null; then groupadd -r rabbitmq @@ -85,6 +85,7 @@ if ! getent passwd rabbitmq >/dev/null; then -c "RabbitMQ messaging server" fi +%post /sbin/chkconfig --add %{name} %preun |