fixed SPEC file so it comply with new systemd-rpm macros guidelines (#850045)
This commit is contained in:
parent
fd468c0f80
commit
d9b90b5d92
62
bind.spec
62
bind.spec
@ -22,7 +22,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv
|
|||||||
Name: bind
|
Name: bind
|
||||||
License: ISC
|
License: ISC
|
||||||
Version: 9.9.1
|
Version: 9.9.1
|
||||||
Release: 8.%{PATCHVER}%{?dist}
|
Release: 9.%{PATCHVER}%{?dist}
|
||||||
Epoch: 32
|
Epoch: 32
|
||||||
Url: http://www.isc.org/products/BIND/
|
Url: http://www.isc.org/products/BIND/
|
||||||
Buildroot:%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
Buildroot:%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
@ -490,9 +490,9 @@ fi;
|
|||||||
|
|
||||||
%post
|
%post
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
|
%systemd_post named.service
|
||||||
if [ "$1" -eq 1 ]; then
|
if [ "$1" -eq 1 ]; then
|
||||||
# Initial installation
|
# Initial installation
|
||||||
/bin/systemctl daemon-reload > /dev/null 2>&1 || :
|
|
||||||
[ -x /sbin/restorecon ] && /sbin/restorecon /etc/rndc.* /etc/named.* >/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
|
# rndc.key has to have correct perms and ownership, CVE-2007-6283
|
||||||
[ -e /etc/rndc.key ] && chown root:named /etc/rndc.key
|
[ -e /etc/rndc.key ] && chown root:named /etc/rndc.key
|
||||||
@ -501,42 +501,26 @@ fi
|
|||||||
:;
|
:;
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
if [ "$1" -eq 0 ] ; then
|
# Package removal, not upgrade
|
||||||
# Package removal, not upgrade
|
%systemd_preun named.service
|
||||||
/bin/systemctl --no-reload disable named.service > /dev/null 2>&1 || :
|
|
||||||
/bin/systemctl stop named.service > /dev/null 2>&1 || :
|
|
||||||
fi
|
|
||||||
:;
|
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
# Package upgrade, not uninstall
|
||||||
if [ "$1" -ge 1 ] ; then
|
%systemd_postun_with_restart named.service
|
||||||
# Package upgrade, not uninstall
|
|
||||||
/bin/systemctl try-restart named.service >/dev/null 2>&1 || :
|
|
||||||
fi
|
|
||||||
:;
|
|
||||||
|
|
||||||
%if %{SDB}
|
%if %{SDB}
|
||||||
%post sdb
|
%post sdb
|
||||||
if [ "$1" -eq 1 ] ; then
|
# Initial installation
|
||||||
# Initial installation
|
%systemd_post named-sdb.service
|
||||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
|
||||||
fi
|
|
||||||
|
|
||||||
%preun sdb
|
%preun sdb
|
||||||
if [ $1 -eq 0 ] ; then
|
# Package removal, not upgrade
|
||||||
# Package removal, not upgrade
|
%systemd_preun named-sdb.service
|
||||||
/bin/systemctl --no-reload disable named-sdb.service > /dev/null 2>&1 || :
|
|
||||||
/bin/systemctl stop named-sdb.service > /dev/null 2>&1 || :
|
|
||||||
fi
|
|
||||||
|
|
||||||
%postun sdb
|
%postun sdb
|
||||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
# Package upgrade, not uninstall
|
||||||
if [ $1 -ge 1 ] ; then
|
%systemd_postun_with_restart named-sdb.service
|
||||||
# Package upgrade, not uninstall
|
|
||||||
/bin/systemctl try-restart named-sdb.service >/dev/null 2>&1 || :
|
|
||||||
fi
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%triggerpostun -n bind -- bind <= 32:9.5.0-20.b1
|
%triggerpostun -n bind -- bind <= 32:9.5.0-20.b1
|
||||||
@ -559,6 +543,8 @@ fi
|
|||||||
%postun libs-lite -p /sbin/ldconfig
|
%postun libs-lite -p /sbin/ldconfig
|
||||||
|
|
||||||
%post chroot
|
%post chroot
|
||||||
|
%systemd_post named-chroot.service
|
||||||
|
%systemd_post named-sdb-chroot.service
|
||||||
if [ "$1" -gt 0 ]; then
|
if [ "$1" -gt 0 ]; then
|
||||||
[ -e %{chroot_prefix}/dev/random ] || \
|
[ -e %{chroot_prefix}/dev/random ] || \
|
||||||
/bin/mknod %{chroot_prefix}/dev/random c 1 8
|
/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
|
/bin/mknod %{chroot_prefix}/dev/null c 1 3
|
||||||
rm -f %{chroot_prefix}/etc/localtime
|
rm -f %{chroot_prefix}/etc/localtime
|
||||||
cp /etc/localtime %{chroot_prefix}/etc/localtime
|
cp /etc/localtime %{chroot_prefix}/etc/localtime
|
||||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
|
||||||
fi;
|
fi;
|
||||||
:;
|
:;
|
||||||
|
|
||||||
@ -579,25 +564,19 @@ fi;
|
|||||||
:;
|
:;
|
||||||
|
|
||||||
%preun chroot
|
%preun chroot
|
||||||
|
%systemd_preun named-chroot.service
|
||||||
|
%systemd_preun named-sdb-chroot.service
|
||||||
if [ "$1" -eq 0 ]; then
|
if [ "$1" -eq 0 ]; then
|
||||||
# Package removal, not upgrade
|
# 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}/dev/{random,zero,null}
|
||||||
rm -f %{chroot_prefix}/etc/localtime
|
rm -f %{chroot_prefix}/etc/localtime
|
||||||
fi
|
fi
|
||||||
:;
|
:;
|
||||||
|
|
||||||
%postun chroot
|
%postun chroot
|
||||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
# Package upgrade, not uninstall
|
||||||
if [ $1 -ge 1 ] ; then
|
%systemd_postun_with_restart named-chroot.service
|
||||||
# Package upgrade, not uninstall
|
%systemd_postun_with_restart named-sdb-chroot.service
|
||||||
/bin/systemctl try-restart named-chroot.service >/dev/null 2>&1 || :
|
|
||||||
/bin/systemctl try-restart named-sdb-chroot.service >/dev/null 2>&1 || :
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf ${RPM_BUILD_ROOT}
|
rm -rf ${RPM_BUILD_ROOT}
|
||||||
@ -775,6 +754,9 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%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
|
* 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)
|
- Changed PrivateTmp to "false" in *-chroot.service unit files (#825869)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user