This change set makes bind build again for SLE 11 too.

- Depend on systemd macros and sysvinit on post-12.3 only.
- Create empty lwresd.conf at build time.
- Reduce file list pre-13.1.

OBS-URL: https://build.opensuse.org/package/show/network/bind?expand=0&rev=167
This commit is contained in:
Lars Müller 2015-05-08 18:11:21 +00:00 committed by Git OBS Bridge
parent 44ffc351bb
commit 1ea9273bb0
2 changed files with 34 additions and 1 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri May 8 18:00:41 UTC 2015 - lmuelle@suse.com
- Depend on systemd macros and sysvinit on post-12.3 only.
- Create empty lwresd.conf at build time.
- Reduce file list pre-13.1.
------------------------------------------------------------------- -------------------------------------------------------------------
Fri May 8 15:05:25 UTC 2015 - lmuelle@suse.com Fri May 8 15:05:25 UTC 2015 - lmuelle@suse.com

View File

@ -54,7 +54,9 @@ BuildRequires: openldap2-devel
BuildRequires: openssl BuildRequires: openssl
BuildRequires: openssl-devel BuildRequires: openssl-devel
BuildRequires: python-base BuildRequires: python-base
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1230
BuildRequires: systemd-rpm-macros BuildRequires: systemd-rpm-macros
%endif
BuildRequires: update-desktop-files BuildRequires: update-desktop-files
Provides: bind8 Provides: bind8
Provides: bind9 Provides: bind9
@ -317,7 +319,9 @@ Summary: BIND documentation
Group: Documentation/Other Group: Documentation/Other
Version: %rpm_vers Version: %rpm_vers
Release: 0 Release: 0
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1230
BuildArch: noarch BuildArch: noarch
%endif
%description doc %description doc
Documentation of the Berkeley Internet Name Domain (BIND) Domain Name Documentation of the Berkeley Internet Name Domain (BIND) Domain Name
@ -332,7 +336,9 @@ Release: 0
Requires: %{name}-chrootenv Requires: %{name}-chrootenv
Provides: dns_daemon Provides: dns_daemon
Requires(pre): /usr/sbin/groupadd /usr/sbin/useradd Requires(pre): /usr/sbin/groupadd /usr/sbin/useradd
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1230
PreReq: sysvinit(network) sysvinit(syslog) PreReq: sysvinit(network) sysvinit(syslog)
%endif
%description lwresd %description lwresd
Bind-lwresd provides resolution services to local clients using a Bind-lwresd provides resolution services to local clients using a
@ -498,7 +504,7 @@ rm -f ${RPM_BUILD_ROOT}/%{_libdir}/lib*.{la,a}
mv vendor-files/config/named.conf ${RPM_BUILD_ROOT}/%{_sysconfdir} mv vendor-files/config/named.conf ${RPM_BUILD_ROOT}/%{_sysconfdir}
mv vendor-files/config/bind.reg ${RPM_BUILD_ROOT}/%{_sysconfdir}/slp.reg.d mv vendor-files/config/bind.reg ${RPM_BUILD_ROOT}/%{_sysconfdir}/slp.reg.d
mv vendor-files/config/rndc-access.conf ${RPM_BUILD_ROOT}/%{_sysconfdir}/named.d mv vendor-files/config/rndc-access.conf ${RPM_BUILD_ROOT}/%{_sysconfdir}/named.d
for file in named.conf.include rndc.key; do for file in lwresd.conf named.conf.include rndc.key; do
touch ${RPM_BUILD_ROOT}/%{_sysconfdir}/${file} touch ${RPM_BUILD_ROOT}/%{_sysconfdir}/${file}
done done
for file in lwresd named; do for file in lwresd named; do
@ -576,11 +582,15 @@ test -d ${TEMP_DIR} || \
test -e ${TEMP_SYSCONFIG_FILE} && \ test -e ${TEMP_SYSCONFIG_FILE} && \
old ${TEMP_SYSCONFIG_FILE} old ${TEMP_SYSCONFIG_FILE}
echo "NAMED_RUN_CHROOTED=\"${NAMED_RUN_CHROOTED}\"" >${TEMP_SYSCONFIG_FILE} echo "NAMED_RUN_CHROOTED=\"${NAMED_RUN_CHROOTED}\"" >${TEMP_SYSCONFIG_FILE}
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1230
%service_add_pre named %service_add_pre named
%endif
%preun %preun
%stop_on_removal named %stop_on_removal named
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1230
%service_del_preun named %service_del_preun named
%endif
%post %post
%{fillup_and_insserv -nf named} %{fillup_and_insserv -nf named}
@ -698,12 +708,16 @@ if [ -f ${NAMED_ACTIVE_FILE} ]; then
sbin/insserv named sbin/insserv named
test ! -s ${NAMED_ACTIVE_FILE} && rm -f ${NAMED_ACTIVE_FILE} test ! -s ${NAMED_ACTIVE_FILE} && rm -f ${NAMED_ACTIVE_FILE}
fi fi
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1230
%service_add_post named %service_add_post named
%endif
%postun %postun
%restart_on_update named %restart_on_update named
%insserv_cleanup %insserv_cleanup
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1230
%service_del_postun named %service_del_postun named
%endif
%post -n libbind9-140 -p /sbin/ldconfig %post -n libbind9-140 -p /sbin/ldconfig
%postun -n libbind9-140 -p /sbin/ldconfig %postun -n libbind9-140 -p /sbin/ldconfig
@ -737,7 +751,9 @@ fi
%pre lwresd %pre lwresd
%{GROUPADD_NAMED} %{GROUPADD_NAMED}
%{USERADD_NAMED} %{USERADD_NAMED}
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1230
%service_add_pre lwresd %service_add_pre lwresd
%endif
%post lwresd %post lwresd
# Create a key if usr/sbin/rndc-confgen is installed. # Create a key if usr/sbin/rndc-confgen is installed.
@ -753,16 +769,22 @@ fi
if [ $1 -le 1 ]; then if [ $1 -le 1 ]; then
%{fillup_and_insserv -fy lwresd} %{fillup_and_insserv -fy lwresd}
fi; fi;
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1230
%service_add_post lwresd %service_add_post lwresd
%endif
%preun lwresd %preun lwresd
%stop_on_removal lwresd %stop_on_removal lwresd
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1230
%service_del_preun lwresd %service_del_preun lwresd
%endif
%postun lwresd %postun lwresd
%restart_on_update lwresd %restart_on_update lwresd
%insserv_cleanup %insserv_cleanup
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1230
%service_del_postun lwresd %service_del_postun lwresd
%endif
%post utils %post utils
/sbin/ldconfig /sbin/ldconfig
@ -939,8 +961,10 @@ fi
%{_bindir}/genDDNSkey %{_bindir}/genDDNSkey
%{_sbindir}/arpaname %{_sbindir}/arpaname
%{_sbindir}/ddns-confgen %{_sbindir}/ddns-confgen
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1230
%{_sbindir}/dnssec-checkds %{_sbindir}/dnssec-checkds
%{_sbindir}/dnssec-coverage %{_sbindir}/dnssec-coverage
%endif
%{_sbindir}/dnssec-dsfromkey %{_sbindir}/dnssec-dsfromkey
%{_sbindir}/dnssec-importkey %{_sbindir}/dnssec-importkey
%{_sbindir}/dnssec-keyfromlabel %{_sbindir}/dnssec-keyfromlabel
@ -967,8 +991,10 @@ fi
%{_mandir}/man1/nsupdate.1.gz %{_mandir}/man1/nsupdate.1.gz
%{_mandir}/man5/rndc.conf.5.gz %{_mandir}/man5/rndc.conf.5.gz
%{_mandir}/man8/ddns-confgen.8.gz %{_mandir}/man8/ddns-confgen.8.gz
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1230
%{_mandir}/man8/dnssec-checkds.8.gz %{_mandir}/man8/dnssec-checkds.8.gz
%{_mandir}/man8/dnssec-coverage.8.gz %{_mandir}/man8/dnssec-coverage.8.gz
%endif
%{_mandir}/man8/dnssec-dsfromkey.8.gz %{_mandir}/man8/dnssec-dsfromkey.8.gz
%{_mandir}/man8/dnssec-importkey.8.gz %{_mandir}/man8/dnssec-importkey.8.gz
%{_mandir}/man8/dnssec-keyfromlabel.8.gz %{_mandir}/man8/dnssec-keyfromlabel.8.gz