rpms/nsca/EL-5 nsca-2.7.2-confpath.patch, NONE, 1.1 nsca-2.7.2-initscript.patch, NONE, 1.1 nsca.spec, NONE, 1.1 sources, 1.1, 1.2

Michael Thomas (wart) fedora-extras-commits at redhat.com
Thu Apr 3 22:53:12 UTC 2008


Author: wart

Update of /cvs/pkgs/rpms/nsca/EL-5
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17893

Modified Files:
	sources 
Added Files:
	nsca-2.7.2-confpath.patch nsca-2.7.2-initscript.patch 
	nsca.spec 
Log Message:
Initial import for EL-5



nsca-2.7.2-confpath.patch:

--- NEW FILE nsca-2.7.2-confpath.patch ---
--- nsca-2.7.2/src/send_nsca.c.orig	2008-02-18 20:44:32.000000000 -0800
+++ nsca-2.7.2/src/send_nsca.c	2008-02-18 20:45:05.000000000 -0800
@@ -25,7 +25,7 @@
 int server_port=DEFAULT_SERVER_PORT;
 char server_name[MAX_HOST_ADDRESS_LENGTH];
 char password[MAX_INPUT_BUFFER]="";
-char config_file[MAX_INPUT_BUFFER]="send_nsca.cfg";
+char config_file[MAX_INPUT_BUFFER]="/etc/nagios/send_nsca.cfg";
 char delimiter[2]="\t";
 
 char received_iv[TRANSMITTED_IV_SIZE];

nsca-2.7.2-initscript.patch:

--- NEW FILE nsca-2.7.2-initscript.patch ---
--- init-script.in	2003-01-08 03:57:23.000000000 +0100
+++ init-script.in	2008-03-11 17:52:45.000000000 +0100
@@ -5,11 +5,11 @@
 #  This script takes care of starting and stopping the NSCA daemon.
 #  Modeled after init script for NRPE written by jaclu at grm.se
 #
-# chkconfig: 2345 80 30
+# chkconfig: - 80 20
 # description: nsca is a daemon for accepting service check results \
 #              from applications running on other hosts.
 # processname: nsca
-# config: /usr/local/nagios/etc/nsca.cfg
+# config: /etc/nagios/nsca.cfg
 
 # Source function library
 if [ -f /etc/rc.d/init.d/functions ]; then
@@ -26,7 +26,7 @@
 # Check that networking is up.
 [ ${NETWORKING} = "no" ] && exit 0
 
-NscaBin=@bindir@/nsca
+NscaBin=@sbindir@/nsca
 NscaCfg=@sysconfdir@/nsca.cfg
 LockFile=/var/lock/subsys/nsca
 
@@ -51,11 +51,21 @@
 	$0 stop
 	$0 start
 	;;
+  reload)
+	echo -n $"Reloading nsca: "
+	killproc nsca -HUP
+	RETVAL=$?
+	echo
+        ;;
+  condrestart)
+        [ -e $LockFile ] && restart
+        RETVAL=$?
+        ;;
   status)
 	status nsca
 	;;
   *)
-	echo "Usage: nsca {start|stop|restart|status}"
+	echo "Usage: nsca {start|stop|restart|reload|condrestart|status}"
 	exit 1
 esac
 


--- NEW FILE nsca.spec ---
Summary:        Nagios Service Check Acceptor
Name:           nsca
Version:        2.7.2
Release:        6%{?dist}
License:        GPLv2+
Group:          Applications/System
URL:            http://www.nagios.org/
Source:         http://downloads.sourceforge.net/nagios/nsca-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Patch0:         nsca-2.7.2-initscript.patch
Patch1:         nsca-2.7.2-confpath.patch

BuildRequires:  libmcrypt-devel
Requires:       nagios
Requires(preun): /sbin/service, /sbin/chkconfig
Requires(post): /sbin/chkconfig
Requires(postun): /sbin/service


%description
The purpose of this addon is to allow you to execute Nagios/NetSaint
plugins on a remote host in as transparent a manner as possible.


%package client
Group:          Applications/System
Summary:        Client application for sending updates to a nsca server


%description client
Client application for sending updates to a nsca server.


%prep
%setup -q
%patch0 -p0 -b .initscript
%patch1 -p1 -b .confpath
# Change defaults in the config file to match the nagios package
sed -i -e "s|^command_file=.*|command_file=%{_localstatedir}/spool/nagios/cmd/nagios.cmd|" \
       -e "s|^alternate_dump_file=.*|alternate_dump_file=%{_localstatedir}/spool/nagios/cmd/nsca.dump|" \
       sample-config/nsca.cfg.in


%build
%configure \
        --sysconfdir="%{_sysconfdir}/nagios" \
        --localstatedir="%{_localstatedir}/log/nagios" \
        --with-nsca-user="nagios" \
        --with-nsca-grp="nagios" \
        --with-nsca-port="5667"
make %{?_smp_mflags} all


%install
rm -rf %{buildroot}
install -Dp -m 0755 src/nsca %{buildroot}%{_sbindir}/nsca
install -Dp -m 0755 src/send_nsca %{buildroot}%{_sbindir}/send_nsca
install -Dp -m 0644 sample-config/nsca.cfg %{buildroot}%{_sysconfdir}/nagios/nsca.cfg
install -Dp -m 0644 sample-config/send_nsca.cfg %{buildroot}%{_sysconfdir}/nagios/send_nsca.cfg
install -Dp -m 0755 init-script %{buildroot}%{_initrddir}/nsca


%post
/sbin/chkconfig --add nsca || :


%preun
if [ $1 -eq 0 ]; then
        /sbin/service nsca stop &>/dev/null
        /sbin/chkconfig --del nsca || :
fi


%postun
if [ "$1" -ge "1" ]; then
        /sbin/service nsca condrestart &>/dev/null || :
fi


%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root,0755)
%doc Changelog LEGAL README SECURITY
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/nagios/nsca.cfg
%{_initrddir}/nsca
%{_sbindir}/nsca


%files client
%defattr(-,root,root,-)
%doc Changelog LEGAL README SECURITY
%dir %{_sysconfdir}/nagios
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/nagios/send_nsca.cfg
%{_sbindir}/send_nsca


%changelog
* Mon Mar 31 2008 Wart <wart at kobold.org> - 2.7.2-6
- Change license to match sources

* Tue Mar 11 2008 Xavier Bachelot <xavier at bachelot.org> - 2.7.2-5
- Fix and rename initscript patch.
- Let client sub-package own %%{_sysconfdir}/nagios.

* Sun Mar 09 2008 Wart <wart at kobold.org> - 2.7.2-4
- Merge sed script for init script into the init script patch

* Mon Mar 03 2008 Xavier Bachelot <xavier at bachelot.org> - 2.7.2-3
- Sync with Wart's package (rhbz#433547).

* Thu Feb 07 2008 Xavier Bachelot <xavier at bachelot.org> - 2.7.2-2
- Split daemon and client.

* Wed Feb 02 2008 Xavier Bachelot <xavier at bachelot.org> - 2.7.2-1
- Update to 2.7.2.
- Clean up spec.

* Mon Dec 11 2006 Dag Wieers <dag at wieers.com> - 2.6-1
- Updated to release 2.6.

* Wed Feb 08 2006 Dag Wieers <dag at wieers.com> - 2.5-2
- Removed -s option in sysv script. (Rick Johnson)

* Wed Feb 08 2006 Dag Wieers <dag at wieers.com> - 2.5-1
- Updated to release 2.5.

* Tue Nov 11 2003 Dag Wieers <dag at wieers.com> - 2.4-2
- Fixed command_file and alternate_dump_file in nsca.cfg. (Johan Krisar)
- Removed the nagios dependency. (Johan Krisar)
- Added %%{_localstatedir}/spool/nagios/ as directoriy to filelist.

* Mon Oct 27 2003 Dag Wieers <dag at wieers.com> - 2.4-1
- Fixed default port and xinetd file. (Shad L. Lords)

* Mon Oct 06 2003 Dag Wieers <dag at wieers.com> - 2.4-0
- Initial package. (using DAR)


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/nsca/EL-5/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	3 Apr 2008 20:19:39 -0000	1.1
+++ sources	3 Apr 2008 22:52:28 -0000	1.2
@@ -0,0 +1 @@
+33a98e7975f633a9489d7a8938ed6131  nsca-2.7.2.tar.gz




More information about the fedora-extras-commits mailing list