monitoring/rhnmd/rhnmd.spec | 39 +++++++++++++++++++++++++++++++++++----
rel-eng/packages/rhnmd | 2 +-
2 files changed, 36 insertions(+), 5 deletions(-)
New commits:
commit 2fd3e3a336266b9bbd4e68b6750826451cc3b57a
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Dec 10 12:01:03 2012 +0100
Automatic commit of package [rhnmd] release [5.3.13-1].
diff --git a/monitoring/rhnmd/rhnmd.spec b/monitoring/rhnmd/rhnmd.spec
index 8fb3855..dcc3be0 100644
--- a/monitoring/rhnmd/rhnmd.spec
+++ b/monitoring/rhnmd/rhnmd.spec
@@ -8,7 +8,7 @@ Summary: Red Hat Network Monitoring Daemon
Name: rhnmd
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 5.3.12
+Version: 5.3.13
Release: 1%{?dist}
License: GPLv2
BuildArch: noarch
@@ -182,6 +182,9 @@ rm -rf $RPM_BUILD_ROOT
%doc LICENSE
%changelog
+* Mon Dec 10 2012 Michael Mraka <michael.mraka(a)redhat.com> 5.3.13-1
+- use rhnmd.service on Fedora
+
* Sun Nov 11 2012 Michael Calmer <mc(a)suse.de> 5.3.12-1
- create rhnmd.service for systemd
- no use of /var/lock/subsys/ anymore
diff --git a/rel-eng/packages/rhnmd b/rel-eng/packages/rhnmd
index b773ee9..018b726 100644
--- a/rel-eng/packages/rhnmd
+++ b/rel-eng/packages/rhnmd
@@ -1 +1 @@
-5.3.12-1 monitoring/rhnmd/
+5.3.13-1 monitoring/rhnmd/
commit c2bd154fde8911462576ce3dbe890f5b830d4248
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Dec 10 11:55:23 2012 +0100
use rhnmd.service on Fedora
diff --git a/monitoring/rhnmd/rhnmd.spec b/monitoring/rhnmd/rhnmd.spec
index b49865e..8fb3855 100644
--- a/monitoring/rhnmd/rhnmd.spec
+++ b/monitoring/rhnmd/rhnmd.spec
@@ -20,6 +20,21 @@ Requires: openssh
BuildRequires: sysconfig
%else
Requires: openssh-server
+%if 0%{?fedora}
+Requires(post): chkconfig
+Requires(preun): chkconfig
+Requires(post): systemd-sysv
+Requires(preun): systemd-sysv
+Requires(post): systemd-units
+Requires(preun): systemd-units
+BuildRequires: systemd-units
+%else
+Requires(post): chkconfig
+Requires(preun): chkconfig
+# This is for /sbin/service
+Requires(preun): initscripts
+Requires(postun): initscripts
+%endif
%endif
%if 0%{?suse_version} >= 1210
BuildRequires: systemd
@@ -64,9 +79,14 @@ mkdir -p $RPM_BUILD_ROOT%{_initddir}
install -pm 0755 rhnmd.init.SUSE $RPM_BUILD_ROOT%{_initddir}/rhnmd
%endif
%else
+%if 0%{?fedora}
+mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
+install -m 0644 rhnmd.service $RPM_BUILD_ROOT/%{_unitdir}/
+%else
mkdir -p $RPM_BUILD_ROOT%{_initddir}
install -pm 0755 rhnmd-init $RPM_BUILD_ROOT%{_initddir}/rhnmd
%endif
+%endif
install -pm 0755 rhnmd_create_key.sh $RPM_BUILD_ROOT%{_var}/lib/%{np_name}/sbin/
install -pm 0644 rhnmd_config $RPM_BUILD_ROOT%{_sysconfdir}/%{np_name}/rhnmd_config
install -pm 0600 authorized_keys
$RPM_BUILD_ROOT%{_var}/lib/%{np_name}/.ssh/authorized_keys
@@ -108,7 +128,9 @@ fi
%if 0%{?suse_version} >= 1210
%service_add_post rhnmd.service
%else
-/sbin/chkconfig --add rhnmd
+if [ -f /etc/init.d/rhnmd ]; then
+ /sbin/chkconfig --add rhnmd
+fi
/usr/sbin/semanage fcontext -a -t sshd_key_t
'/var/lib/nocpulse/\.ssh/nocpulse-identity' || :
%if 0%{?rhel} && "%rhel" < "6"
/usr/sbin/semanage fcontext -a -t sshd_key_t
'/var/lib/nocpulse/\.ssh/authorized_keys' || :
@@ -123,8 +145,14 @@ fi
%service_del_preun rhnmd.service
%else
if [ $1 = 0 ]; then
+ %if 0%{?fedora}
+ /bin/systemctl stop rhnmd.service >/dev/null 2>&1
+ %else
/sbin/service rhnmd stop > /dev/null 2>&1
- /sbin/chkconfig --del rhnmd
+ %endif
+ if [ -f /etc/init.d/rhnmd ]; then
+ /sbin/chkconfig --del rhnmd
+ fi
fi
%endif
@@ -146,7 +174,7 @@ rm -rf $RPM_BUILD_ROOT
%{_var}/lib/%{np_name}/sbin/*
%{_usr}/sbin/rhnmd
%config(noreplace) %{_sysconfdir}/%{np_name}/rhnmd_config
-%if 0%{?suse_version} >= 1210
+%if 0%{?fedora} || 0%{?suse_version} >= 1210
%{_unitdir}/rhnmd.service
%else
%{_initddir}/rhnmd