summaryrefslogtreecommitdiffstats
path: root/bind.spec
diff options
context:
space:
mode:
authorTomas Hozza <thozza@redhat.com>2012-08-22 14:47:47 +0200
committerTomas Hozza <thozza@redhat.com>2012-08-22 14:47:47 +0200
commitd9b90b5d923b683abf8472278711d98ced6073f5 (patch)
tree1b82deb4c0b09869edb84d792a2d60c8507a497e /bind.spec
parentfd468c0f8061a6422bae508f12b4ec02e49959b2 (diff)
downloadbind-d9b90b5d923b683abf8472278711d98ced6073f5.tar.gz
bind-d9b90b5d923b683abf8472278711d98ced6073f5.tar.xz
bind-d9b90b5d923b683abf8472278711d98ced6073f5.zip
fixed SPEC file so it comply with new systemd-rpm macros guidelines (#850045)
Diffstat (limited to 'bind.spec')
-rw-r--r--bind.spec62
1 files changed, 22 insertions, 40 deletions
diff --git a/bind.spec b/bind.spec
index 0bcf82a..3d61cee 100644
--- a/bind.spec
+++ b/bind.spec
@@ -22,7 +22,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv
Name: bind
License: ISC
Version: 9.9.1
-Release: 8.%{PATCHVER}%{?dist}
+Release: 9.%{PATCHVER}%{?dist}
Epoch: 32
Url: http://www.isc.org/products/BIND/
Buildroot:%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -490,9 +490,9 @@ fi;
%post
/sbin/ldconfig
+%systemd_post named.service
if [ "$1" -eq 1 ]; then
# Initial installation
- /bin/systemctl daemon-reload > /dev/null 2>&1 || :
[ -x /sbin/restorecon ] && /sbin/restorecon /etc/rndc.* /etc/named.* >/dev/null 2>&1 ;
# rndc.key has to have correct perms and ownership, CVE-2007-6283
[ -e /etc/rndc.key ] && chown root:named /etc/rndc.key
@@ -501,42 +501,26 @@ fi
:;
%preun
-if [ "$1" -eq 0 ] ; then
- # Package removal, not upgrade
- /bin/systemctl --no-reload disable named.service > /dev/null 2>&1 || :
- /bin/systemctl stop named.service > /dev/null 2>&1 || :
-fi
-:;
+# Package removal, not upgrade
+%systemd_preun named.service
%postun
/sbin/ldconfig
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ "$1" -ge 1 ] ; then
- # Package upgrade, not uninstall
- /bin/systemctl try-restart named.service >/dev/null 2>&1 || :
-fi
-:;
+# Package upgrade, not uninstall
+%systemd_postun_with_restart named.service
%if %{SDB}
%post sdb
-if [ "$1" -eq 1 ] ; then
- # Initial installation
- /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
+# Initial installation
+%systemd_post named-sdb.service
%preun sdb
-if [ $1 -eq 0 ] ; then
- # Package removal, not upgrade
- /bin/systemctl --no-reload disable named-sdb.service > /dev/null 2>&1 || :
- /bin/systemctl stop named-sdb.service > /dev/null 2>&1 || :
-fi
+# Package removal, not upgrade
+%systemd_preun named-sdb.service
%postun sdb
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -ge 1 ] ; then
- # Package upgrade, not uninstall
- /bin/systemctl try-restart named-sdb.service >/dev/null 2>&1 || :
-fi
+# Package upgrade, not uninstall
+%systemd_postun_with_restart named-sdb.service
%endif
%triggerpostun -n bind -- bind <= 32:9.5.0-20.b1
@@ -559,6 +543,8 @@ fi
%postun libs-lite -p /sbin/ldconfig
%post chroot
+%systemd_post named-chroot.service
+%systemd_post named-sdb-chroot.service
if [ "$1" -gt 0 ]; then
[ -e %{chroot_prefix}/dev/random ] || \
/bin/mknod %{chroot_prefix}/dev/random c 1 8
@@ -568,7 +554,6 @@ if [ "$1" -gt 0 ]; then
/bin/mknod %{chroot_prefix}/dev/null c 1 3
rm -f %{chroot_prefix}/etc/localtime
cp /etc/localtime %{chroot_prefix}/etc/localtime
- /bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi;
:;
@@ -579,25 +564,19 @@ fi;
:;
%preun chroot
+%systemd_preun named-chroot.service
+%systemd_preun named-sdb-chroot.service
if [ "$1" -eq 0 ]; then
# Package removal, not upgrade
- /bin/systemctl --no-reload disable named-chroot.service > /dev/null 2>&1 || :
- /bin/systemctl --no-reload disable named-sdb-chroot.service > /dev/null 2>&1 || :
- /bin/systemctl stop named-chroot.service > /dev/null 2>&1 || :
- /bin/systemctl stop named-sdb-chroot.service > /dev/null 2>&1 || :
rm -f %{chroot_prefix}/dev/{random,zero,null}
rm -f %{chroot_prefix}/etc/localtime
fi
:;
%postun chroot
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -ge 1 ] ; then
- # Package upgrade, not uninstall
- /bin/systemctl try-restart named-chroot.service >/dev/null 2>&1 || :
- /bin/systemctl try-restart named-sdb-chroot.service >/dev/null 2>&1 || :
-fi
-;;
+# Package upgrade, not uninstall
+%systemd_postun_with_restart named-chroot.service
+%systemd_postun_with_restart named-sdb-chroot.service
%clean
rm -rf ${RPM_BUILD_ROOT}
@@ -775,6 +754,9 @@ rm -rf ${RPM_BUILD_ROOT}
%endif
%changelog
+* Wed Aug 22 2012 Tomas Hozza <thozza@redhat.com> 32:9.9.1-9.P2
+- fixed SPEC file so it comply with new systemd-rpm macros guidelines (#850045)
+
* Wed Aug 08 2012 Tomas Hozza <thozza@redhat.com> 32:9.9.1-8.P2
- Changed PrivateTmp to "false" in *-chroot.service unit files (#825869)