Blame SOURCES/rhnsd-5.0.35-2-el8-to-rhnsd-5.0.35-3-el8.patch

3bef80
diff --git a/rhnsd.spec b/rhnsd.spec
3bef80
index d59e6e23ac..52642b3c1e 100644
3bef80
--- a/rhnsd.spec
3bef80
+++ b/rhnsd.spec
3bef80
@@ -1,7 +1,7 @@
3bef80
 Summary: Spacewalk query daemon
3bef80
 Name: rhnsd
3bef80
 Version: 5.0.35
3bef80
-Release: 2%{?dist}
3bef80
+Release: 3%{?dist}
3bef80
 License: GPLv2
3bef80
 Source0: https://github.com/spacewalkproject/spacewalk/archive/%{name}-%{version}.tar.gz
3bef80
 URL:     https://github.com/spacewalkproject/spacewalk
3bef80
@@ -9,7 +9,7 @@ URL:     https://github.com/spacewalkproject/spacewalk
3bef80
 BuildRequires: gettext
3bef80
 
3bef80
 Requires: rhn-check >= 0.0.8
3bef80
-%if 0%{?suse_version} >= 1210 || 0%{?fedora}
3bef80
+%if 0%{?suse_version} >= 1210 || 0%{?fedora} || 0%{?rhel} >= 7
3bef80
 BuildRequires: systemd
3bef80
 %{?systemd_requires}
3bef80
 %endif
3bef80
@@ -18,7 +18,7 @@ Requires(post): aaa_base
3bef80
 Requires(preun): aaa_base
3bef80
 BuildRequires: sysconfig
3bef80
 %else
3bef80
-%if 0%{?fedora}
3bef80
+%if 0%{?fedora} || 0%{?rhel} >= 7
3bef80
 Requires(post): chkconfig
3bef80
 Requires(preun): chkconfig
3bef80
 Requires(post): systemd-sysv
3bef80
@@ -49,7 +49,7 @@ make -f Makefile.rhnsd install VERSION=%{version}-%{release} PREFIX=$RPM_BUILD_R
3bef80
 %if 0%{?suse_version} && 0%{?suse_version} < 1210
3bef80
 install -m 0755 rhnsd.init.SUSE $RPM_BUILD_ROOT/%{_initrddir}/rhnsd
3bef80
 %endif
3bef80
-%if 0%{?fedora} || 0%{?suse_version} >= 1210
3bef80
+%if 0%{?fedora} || 0%{?suse_version} >= 1210 || 0%{?rhel} >= 7
3bef80
 rm $RPM_BUILD_ROOT/%{_initrddir}/rhnsd
3bef80
 mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
3bef80
 install -m 0644 rhnsd.service $RPM_BUILD_ROOT/%{_unitdir}/
3bef80
@@ -91,7 +91,7 @@ fi
3bef80
 %service_del_preun rhnsd.service
3bef80
 %else
3bef80
 if [ $1 = 0 ] ; then
3bef80
-    %if 0%{?fedora}
3bef80
+    %if 0%{?fedora} || 0%{?rhel} >= 7
3bef80
         %systemd_preun rhnsd.service
3bef80
     %else
3bef80
     service rhnsd stop >/dev/null 2>&1
3bef80
@@ -107,7 +107,7 @@ fi
3bef80
 %service_del_postun rhnsd.service
3bef80
 %else
3bef80
 if [ "$1" -ge "1" ]; then
3bef80
-    %if 0%{?fedora}
3bef80
+    %if 0%{?fedora} || 0%{?rhel} >= 7
3bef80
     %systemd_postun_with_restart rhnsd.service
3bef80
     %else
3bef80
     service rhnsd condrestart >/dev/null 2>&1 || :
3bef80
@@ -120,7 +120,7 @@ fi
3bef80
 %dir %{_sysconfdir}/sysconfig/rhn
3bef80
 %config(noreplace) %{_sysconfdir}/sysconfig/rhn/rhnsd
3bef80
 %{_sbindir}/rhnsd
3bef80
-%if 0%{?fedora} || 0%{?suse_version} >= 1210
3bef80
+%if 0%{?fedora} || 0%{?suse_version} >= 1210 || 0%{?rhel} >= 7
3bef80
 %{_unitdir}/rhnsd.service
3bef80
 %else
3bef80
 %{_initrddir}/rhnsd
3bef80
@@ -129,6 +129,10 @@ fi
3bef80
 %doc LICENSE
3bef80
 
3bef80
 %changelog
3bef80
+* Fri Aug 10 2018 Tomas Kasparek <tkasparek@redhat.com> 5.0.35-3
3bef80
+- Resolves: #1610286 - don't start as sysv service on systemd systems
3bef80
+  (tkasparek@redhat.com)
3bef80
+
3bef80
 * Mon Feb 19 2018 Tomas Kasparek <tkasparek@redhat.com> 5.0.35-2
3bef80
 - rebuild for rhel8 
3bef80