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

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