From 4e8c935dd70438ed11d15560a8924c498895cf10670d3ca663dc8bae5e063f2d Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 23 Mar 2017 16:11:03 +0000 Subject: [PATCH] Accepting request 481339 from home:kukuk:branches:network - Add with_systemd define with default off, since we still use init scripts and no systemd units. OBS-URL: https://build.opensuse.org/request/show/481339 OBS-URL: https://build.opensuse.org/package/show/network/bind?expand=0&rev=207 --- bind.changes | 6 ++++++ bind.spec | 24 ++++++++++++++---------- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/bind.changes b/bind.changes index 381c879..9aca5a6 100644 --- a/bind.changes +++ b/bind.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Mar 20 15:02:16 CET 2017 - kukuk@suse.de + +- Add with_systemd define with default off, since we still use init + scripts and no systemd units. + ------------------------------------------------------------------- Sat Feb 18 17:24:58 UTC 2017 - kukuk@suse.com diff --git a/bind.spec b/bind.spec index a1377f7..cc61dba 100644 --- a/bind.spec +++ b/bind.spec @@ -21,6 +21,7 @@ Name: bind %define pkg_vers 9.10.4-P5 %define rpm_vers 9.10.4P5 %define idn_vers 1.0 +%define with_systemd 0 Summary: Domain Name System (DNS) Server (named) License: ISC Group: Productivity/Networking/DNS/Servers @@ -55,7 +56,7 @@ BuildRequires: openldap2-devel BuildRequires: openssl BuildRequires: openssl-devel BuildRequires: python-base -%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1230 +%if %{with_systemd} BuildRequires: systemd-rpm-macros %else PreReq: %insserv_prereq @@ -339,6 +340,9 @@ Release: 0 Requires: %{name}-chrootenv Provides: dns_daemon Requires(pre): /usr/sbin/groupadd /usr/sbin/useradd +%if !%{with_systemd} +PreReq: %insserv_prereq +%endif %if 0%{?suse_version} == 0 || 0%{?suse_version} > 1230 PreReq: sysvinit(network) sysvinit(syslog) %endif @@ -595,19 +599,19 @@ 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 +%if %{with_systemd} %service_add_pre named.service %endif %preun -%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1230 +%if %{with_systemd} %service_del_preun named.service %else %stop_on_removal named %endif %post -%if 0%{?suse_version} > 0 && 0%{?suse_version} <= 1230 +%if !%{with_systemd} %{fillup_and_insserv -nf named} %endif %{fillup_only -nsa named named} @@ -719,7 +723,7 @@ fi # End of 'Add include files to NAMED_CONF_INCLUDE_FILES' fi # End of 'Are we in update mode?' # Remove TEMP_SYSCONFIG_FILE in any case. rm -f ${TEMP_SYSCONFIG_FILE} -%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1230 +%if %{with_systemd} %service_add_post named.service %else NAMED_ACTIVE_FILE="var/adm/named.was.active" @@ -730,7 +734,7 @@ fi %endif %postun -%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1230 +%if %{with_systemd} %service_del_postun named.service %else %restart_on_update named @@ -769,7 +773,7 @@ fi %pre lwresd %{GROUPADD_NAMED} %{USERADD_NAMED} -%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1230 +%if %{with_systemd} %service_add_pre lwresd.service %endif @@ -784,7 +788,7 @@ fi if [ ! -s etc/lwresd.conf ]; then rm -f etc/lwresd.conf fi -%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1230 +%if %{with_systemd} %service_add_post lwresd.service %else if [ $1 -le 1 ]; then @@ -794,14 +798,14 @@ fi %preun lwresd %stop_on_removal lwresd -%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1230 +%if %{with_systemd} %service_del_preun lwresd.service %else %stop_on_removal lwresd %endif %postun lwresd -%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1230 +%if %{with_systemd} %service_del_postun lwresd.service %else %restart_on_update lwresd