From 1ea9273bb0af31646b0c64f6ce69c5a1399f4f9d1169a92477df613aaab5108b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20M=C3=BCller?= Date: Fri, 8 May 2015 18:11:21 +0000 Subject: [PATCH] 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 --- bind.changes | 7 +++++++ bind.spec | 28 +++++++++++++++++++++++++++- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/bind.changes b/bind.changes index 7e1d45e..73cbe6c 100644 --- a/bind.changes +++ b/bind.changes @@ -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 diff --git a/bind.spec b/bind.spec index 8476170..27a6e79 100644 --- a/bind.spec +++ b/bind.spec @@ -54,7 +54,9 @@ BuildRequires: openldap2-devel BuildRequires: openssl BuildRequires: openssl-devel BuildRequires: python-base +%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1230 BuildRequires: systemd-rpm-macros +%endif BuildRequires: update-desktop-files Provides: bind8 Provides: bind9 @@ -317,7 +319,9 @@ Summary: BIND documentation Group: Documentation/Other Version: %rpm_vers Release: 0 +%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1230 BuildArch: noarch +%endif %description doc Documentation of the Berkeley Internet Name Domain (BIND) Domain Name @@ -332,7 +336,9 @@ Release: 0 Requires: %{name}-chrootenv Provides: dns_daemon Requires(pre): /usr/sbin/groupadd /usr/sbin/useradd +%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1230 PreReq: sysvinit(network) sysvinit(syslog) +%endif %description lwresd 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/bind.reg ${RPM_BUILD_ROOT}/%{_sysconfdir}/slp.reg.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} done for file in lwresd named; do @@ -576,11 +582,15 @@ test -d ${TEMP_DIR} || \ test -e ${TEMP_SYSCONFIG_FILE} && \ old ${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 +%endif %preun %stop_on_removal named +%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1230 %service_del_preun named +%endif %post %{fillup_and_insserv -nf named} @@ -698,12 +708,16 @@ if [ -f ${NAMED_ACTIVE_FILE} ]; then sbin/insserv named test ! -s ${NAMED_ACTIVE_FILE} && rm -f ${NAMED_ACTIVE_FILE} fi +%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1230 %service_add_post named +%endif %postun %restart_on_update named %insserv_cleanup +%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1230 %service_del_postun named +%endif %post -n libbind9-140 -p /sbin/ldconfig %postun -n libbind9-140 -p /sbin/ldconfig @@ -737,7 +751,9 @@ fi %pre lwresd %{GROUPADD_NAMED} %{USERADD_NAMED} +%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1230 %service_add_pre lwresd +%endif %post lwresd # Create a key if usr/sbin/rndc-confgen is installed. @@ -753,16 +769,22 @@ fi if [ $1 -le 1 ]; then %{fillup_and_insserv -fy lwresd} fi; +%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1230 %service_add_post lwresd +%endif %preun lwresd %stop_on_removal lwresd +%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1230 %service_del_preun lwresd +%endif %postun lwresd %restart_on_update lwresd %insserv_cleanup +%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1230 %service_del_postun lwresd +%endif %post utils /sbin/ldconfig @@ -939,8 +961,10 @@ fi %{_bindir}/genDDNSkey %{_sbindir}/arpaname %{_sbindir}/ddns-confgen +%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1230 %{_sbindir}/dnssec-checkds %{_sbindir}/dnssec-coverage +%endif %{_sbindir}/dnssec-dsfromkey %{_sbindir}/dnssec-importkey %{_sbindir}/dnssec-keyfromlabel @@ -967,8 +991,10 @@ fi %{_mandir}/man1/nsupdate.1.gz %{_mandir}/man5/rndc.conf.5.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-coverage.8.gz +%endif %{_mandir}/man8/dnssec-dsfromkey.8.gz %{_mandir}/man8/dnssec-importkey.8.gz %{_mandir}/man8/dnssec-keyfromlabel.8.gz