rpms/nagios/devel import.log, NONE, 1.1 nagios-0001-from-rpm.patch, NONE, 1.1 nagios-0002-SELinux-relabeling.patch, NONE, 1.1 nagios-0003-Fix-etc-init.d-nagios-status.patch, NONE, 1.1 nagios.spec, 1.76, 1.77 nagios-initrd.patch, 1.2, NONE nagios.cfg.patch, 1.1, NONE

Peter Lemenkov peter at fedoraproject.org
Thu Feb 25 11:55:48 UTC 2010


Author: peter

Update of /cvs/pkgs/rpms/nagios/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11838/devel

Modified Files:
	nagios.spec 
Added Files:
	import.log nagios-0001-from-rpm.patch 
	nagios-0002-SELinux-relabeling.patch 
	nagios-0003-Fix-etc-init.d-nagios-status.patch 
Removed Files:
	nagios-initrd.patch nagios.cfg.patch 
Log Message:
Fixed issues #520979, #546561, #548638, #539963, #526817


--- NEW FILE import.log ---
nagios-3_2_0-4_fc12:HEAD:nagios-3.2.0-4.fc12.src.rpm:1267098879

nagios-0001-from-rpm.patch:
 daemon-init.in |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- NEW FILE nagios-0001-from-rpm.patch ---
>From 407c6e16ee99b2e12de526285f4ca74990ea2503 Mon Sep 17 00:00:00 2001
From: Mike McGrath <mmcgrath at redhat.com>
Date: Thu, 25 Feb 2010 14:21:30 +0300
Subject: [PATCH 1/3] from rpm

---
 daemon-init.in |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/daemon-init.in b/daemon-init.in
index cdb9b93..f2feb9d 100644
--- a/daemon-init.in
+++ b/daemon-init.in
@@ -124,11 +124,13 @@ case "$1" in
 		echo -n "Starting nagios:"
 		$NagiosBin -v $NagiosCfgFile > /dev/null 2>&1;
 		if [ $? -eq 0 ]; then
-			su - $NagiosUser -c "touch $NagiosVarDir/nagios.log $NagiosRetentionFile"
+                        touch $NagiosVarDir/nagios.log $NagiosRetentionFile
+                        chown $NagiosUser:$NagiosGroup $NagiosVarDir/nagios.log $NagiosRetentionFile
 			rm -f $NagiosCommandFile
 			touch $NagiosRunFile
 			chown $NagiosUser:$NagiosGroup $NagiosRunFile
 			$NagiosBin -d $NagiosCfgFile
+                        pidof nagios > $NagiosRunFile
 			if [ -d $NagiosLockDir ]; then touch $NagiosLockDir/$NagiosLockFile; fi
 			echo " done."
 			exit 0
-- 
1.6.6.1


nagios-0002-SELinux-relabeling.patch:
 daemon-init.in |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE nagios-0002-SELinux-relabeling.patch ---
>From 53ddfdb8b51b0164e71240aadbfba489158849c3 Mon Sep 17 00:00:00 2001
From: Daniel Walsh <dwalsh at redhat.com>
Date: Thu, 25 Feb 2010 14:24:00 +0300
Subject: [PATCH 2/3] SELinux relabeling

This patch adds a restorecon call to the init script to label the pid file
correctly.

---
 daemon-init.in |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/daemon-init.in b/daemon-init.in
index f2feb9d..d544eb4 100644
--- a/daemon-init.in
+++ b/daemon-init.in
@@ -129,6 +129,7 @@ case "$1" in
 			rm -f $NagiosCommandFile
 			touch $NagiosRunFile
 			chown $NagiosUser:$NagiosGroup $NagiosRunFile
+			[-x /sbin/restorecon ] && /sbin/restorecon $NagiosRunFile
 			$NagiosBin -d $NagiosCfgFile
                         pidof nagios > $NagiosRunFile
 			if [ -d $NagiosLockDir ]; then touch $NagiosLockDir/$NagiosLockFile; fi
-- 
1.6.6.1


nagios-0003-Fix-etc-init.d-nagios-status.patch:
 daemon-init.in |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

--- NEW FILE nagios-0003-Fix-etc-init.d-nagios-status.patch ---
>From c149a6dc2fe9cddd0986fad9cb654774692bb499 Mon Sep 17 00:00:00 2001
From: Ricky Zhou <rzhou at redhat.com>
Date: Thu, 25 Feb 2010 14:27:08 +0300
Subject: [PATCH 3/3] Fix /etc/init.d/nagios status

Fix status return code.

---
 daemon-init.in |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/daemon-init.in b/daemon-init.in
index d544eb4..460370d 100644
--- a/daemon-init.in
+++ b/daemon-init.in
@@ -52,12 +52,14 @@ status_nagios ()
 
 printstatus_nagios()
 {
-
-	if status_nagios $1 $2; then
+	status_nagios $1 $2
+	RETVAL=$?
+	if [ $RETVAL = 0 ]; then
 		echo "nagios (pid $NagiosPID) is running..."
 	else
 		echo "nagios is not running"
 	fi
+	return $RETVAL
 }
 
 
@@ -174,6 +176,7 @@ case "$1" in
 	status)
 		pid_nagios
 		printstatus_nagios nagios
+		exit $?
 		;;
 
 	checkconfig)
-- 
1.6.6.1



Index: nagios.spec
===================================================================
RCS file: /cvs/pkgs/rpms/nagios/devel/nagios.spec,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -p -r1.76 -r1.77
--- nagios.spec	4 Jan 2010 18:43:42 -0000	1.76
+++ nagios.spec	25 Feb 2010 11:55:48 -0000	1.77
@@ -1,6 +1,6 @@
 Name: nagios
 Version: 3.2.0
-Release: 3%{?dist}
+Release: 4%{?dist}
 Summary: Host/service/network monitoring program
 
 Group: Applications/System
@@ -13,13 +13,18 @@ Source3: nagios.internet.cfg
 Source4: nagios.htpasswd
 Source5: nagios.upgrade_to_v3.ReadMe
 Source6: nagios.upgrade_to_v3.sh
-Patch0: nagios-initrd.patch
-#Patch1: nagios.cfg.patch
+Patch1: nagios-0001-from-rpm.patch
+Patch2: nagios-0002-SELinux-relabeling.patch
+Patch3: nagios-0003-Fix-etc-init.d-nagios-status.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires: gd-devel > 1.8, mailx, libjpeg-devel, libpng-devel
-BuildRequires:  perl-devel
-BuildRequires:  perl(ExtUtils::Embed)
+BuildRequires: perl(CPAN)
+BuildRequires: perl(ExtUtils::MakeMaker)
+BuildRequires: perl(ExtUtils::Embed)
+BuildRequires: perl(Test::Harness)
+BuildRequires: perl(Test::More)
+BuildRequires: perl(Test::Simple)
 
 Requires: httpd
 Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
@@ -76,10 +81,12 @@ may compile against.
 
 %prep
 %setup -q
-%patch0 -p0 
+%patch1 -p1 -b .fedora
+%patch2 -p1 -b .selinux_relabel
+%patch3 -p1 -b .fix_status_retcode
 
 %build
-./configure \
+%configure \
 	--prefix=%{_datadir}/%{name} \
 	--exec-prefix=%{_localstatedir}/lib/%{name} \
 	--with-init-dir=%{_initrddir} \
@@ -203,6 +210,12 @@ fi
 %{_includedir}/%{name}
 
 %changelog
+* Thu Feb 25 2010 Peter Lemenkov <lemenkov at gmail.com> - 3.2.0-4
+- The package builds now with distro CFLAGS, CXXFLAGS (see bz #520979)
+- Fixed returning status for init-script (see bz #546561)
+- Fixed selinux issue with writing of PID-file (see bz #548638 and bz #539963)
+- Fixed build on EPEL (see bz #526817)
+
 * Mon Dec  7 2009 Stepan Kasal <skasal at redhat.com> - 3.2.0-3
 - rebuild against perl 5.10.1
 


--- nagios-initrd.patch DELETED ---


--- nagios.cfg.patch DELETED ---



More information about the scm-commits mailing list