Accepting request 609105 from home:nkukreja:branches:network
- Remove rndc.key generation from bind.spec file because bind should create it on first boot (bsc#1092283) - Add misisng rndc.key check and generation code is lwresd.init script OBS-URL: https://build.opensuse.org/request/show/609105 OBS-URL: https://build.opensuse.org/package/show/network/bind?expand=0&rev=238
This commit is contained in:
parent
63b17d629c
commit
69299c3f09
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed May 16 10:22:25 UTC 2018 - navin.kukreja@suse.com
|
||||
|
||||
- Remove rndc.key generation from bind.spec file because bind
|
||||
should create it on first boot (bsc#1092283)
|
||||
- Add misisng rndc.key check and generation code is lwresd.init
|
||||
script
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 26 19:26:17 UTC 2018 - sweet_f_a@gmx.de
|
||||
|
||||
|
20
bind.spec
20
bind.spec
@ -394,7 +394,7 @@ rm -f %{buildroot}/%{_libdir}/lib*.{la,a}
|
||||
mv vendor-files/config/named.conf %{buildroot}/%{_sysconfdir}
|
||||
mv vendor-files/config/bind.reg %{buildroot}/%{_sysconfdir}/slp.reg.d
|
||||
mv vendor-files/config/rndc-access.conf %{buildroot}/%{_sysconfdir}/named.d
|
||||
for file in lwresd.conf named.conf.include rndc.key; do
|
||||
for file in lwresd.conf named.conf.include; do
|
||||
touch %{buildroot}/%{_sysconfdir}/${file}
|
||||
done
|
||||
|
||||
@ -486,11 +486,6 @@ echo "NAMED_RUN_CHROOTED=\"${NAMED_RUN_CHROOTED}\"" >${TEMP_SYSCONFIG_FILE}
|
||||
%{fillup_and_insserv -nf named}
|
||||
%endif
|
||||
%{fillup_only -nsa named named}
|
||||
if [ ! -f etc/rndc.key ]; then
|
||||
usr/sbin/rndc-confgen -a -b 512 -r dev/urandom
|
||||
chmod 0640 etc/rndc.key
|
||||
chown root:named etc/rndc.key
|
||||
fi
|
||||
TEMP_SYSCONFIG_FILE="var/adm/named-chroot"
|
||||
# Are we in update mode?
|
||||
if [ ${FIRST_ARG:-0} -gt 1 ]; then
|
||||
@ -645,12 +640,6 @@ fi
|
||||
%endif
|
||||
|
||||
%post lwresd
|
||||
# Create a key if usr/sbin/rndc-confgen is installed.
|
||||
if [ -x usr/sbin/rndc-confgen -a ! -f etc/rndc.key ]; then
|
||||
usr/sbin/rndc-confgen -a -b 512 -r dev/urandom
|
||||
chmod 0640 etc/rndc.key
|
||||
chown root:named etc/rndc.key
|
||||
fi
|
||||
# delete an emtpy lwresd.conf file
|
||||
if [ ! -s etc/lwresd.conf ]; then
|
||||
rm -f etc/lwresd.conf
|
||||
@ -680,19 +669,12 @@ fi
|
||||
%endif
|
||||
|
||||
%post utils
|
||||
# Create a key if lwresd is installed.
|
||||
if [ -x %{_sbindir}/lwresd -a ! -f %{_sysconfdir}/rndc.key ]; then
|
||||
%{_sbindir}/rndc-confgen -a -b 512 -r dev/urandom
|
||||
chmod 0640 %{_sysconfdir}/rndc.key
|
||||
chown root:named %{_sysconfdir}/rndc.key
|
||||
fi
|
||||
|
||||
%files
|
||||
%attr(0644,root,named) %config(noreplace) /%{_sysconfdir}/named.conf
|
||||
%dir %{_sysconfdir}/slp.reg.d
|
||||
%attr(0644,root,root) /%{_sysconfdir}/slp.reg.d/bind.reg
|
||||
%attr(0644,root,named) %ghost /%{_sysconfdir}/named.conf.include
|
||||
%attr(0640,root,named) %ghost %config(noreplace) /%{_sysconfdir}/rndc.key
|
||||
%if %{with_systemd}
|
||||
%config %{_unitdir}/named.service
|
||||
%{_sbindir}/named.init
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:fe5609bed079427793fef2bdc22a16d397b2dd358fd986e7e5315f567de2dc1e
|
||||
size 23552
|
||||
oid sha256:c2fb9236d4a9a16da076a8843be35378e7749f210548ea4e5d33e7f872e01775
|
||||
size 23419
|
||||
|
Loading…
x
Reference in New Issue
Block a user