[pkg-nagios-changes] [Git][nagios-team/pkg-nsca][upstream] New upstream version 2.10.2
Bas Couwenberg (@sebastic)
gitlab at salsa.debian.org
Tue Jun 7 16:57:20 BST 2022
Bas Couwenberg pushed to branch upstream at Debian Nagios Maintainer Group / pkg-nsca
Commits:
ab054eae by Bas Couwenberg at 2022-06-07T17:51:28+02:00
New upstream version 2.10.2
- - - - -
10 changed files:
- CHANGELOG.md
- Makefile.in
- configure
- configure.ac
- include/common.h
- + nsca.service.in
- nsca.spec
- src/nsca.c
- src/send_nsca.c
- update-version
Changes:
=====================================
CHANGELOG.md
=====================================
@@ -1,6 +1,12 @@
NSCA Changelog
==============
+2.10.2 - 2022-06-06
+-------------------
+ * Fixed exiting with STATE_OK when no packets were successfully sent
+ * Added systemd service file
+ * Fixed compilation warning
+
2.10.1 - 2021-10-27
------------------
* Fixed backward compatibility issue with -d in send_nsca (#44)
=====================================
Makefile.in
=====================================
@@ -53,6 +53,7 @@ distclean: clean
cd package/solaris; $(MAKE) $@ ; cd ../..
rm -f conf.libmcrypttest config.log config.status config.cache init-script Makefile subst $(SRC_INCLUDE)config.h
rm -f sample-config/nsca.cfg sample-config/send_nsca.cfg sample-config/nsca.xinetd
+ rm -f nsca.service
devclean: distclean
=====================================
configure
=====================================
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for nsca 2.9.2.
+# Generated by GNU Autoconf 2.69 for nsca 2.10.2.
#
# Report bugs to <nagios-users at lists.sourceforge.net>.
#
@@ -580,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='nsca'
PACKAGE_TARNAME='nsca'
-PACKAGE_VERSION='2.9.2'
-PACKAGE_STRING='nsca 2.9.2'
+PACKAGE_VERSION='2.10.2'
+PACKAGE_STRING='nsca 2.10.2'
PACKAGE_BUGREPORT='nagios-users at lists.sourceforge.net'
PACKAGE_URL='http://www.nagios.org'
@@ -1264,7 +1264,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures nsca 2.9.2 to adapt to many kinds of systems.
+\`configure' configures nsca 2.10.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1329,7 +1329,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of nsca 2.9.2:";;
+ short | recursive ) echo "Configuration of nsca 2.10.2:";;
esac
cat <<\_ACEOF
@@ -1421,7 +1421,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-nsca configure 2.9.2
+nsca configure 2.10.2
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2027,7 +2027,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by nsca $as_me 2.9.2, which was
+It was created by nsca $as_me 2.10.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2362,14 +2362,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_config_headers="$ac_config_headers include/config.h"
-ac_config_files="$ac_config_files Makefile subst src/Makefile package/solaris/Makefile init-script sample-config/nsca.cfg sample-config/send_nsca.cfg sample-config/nsca.xinetd"
+ac_config_files="$ac_config_files Makefile subst src/Makefile package/solaris/Makefile init-script nsca.service sample-config/nsca.cfg sample-config/send_nsca.cfg sample-config/nsca.xinetd"
PKG_NAME=nsca
-PKG_VERSION="2.10.1"
+PKG_VERSION="2.10.2"
PKG_HOME_URL="http://www.nagios.org/"
-PKG_REL_DATE="2021-10-27"
+PKG_REL_DATE="2022-06-06"
@@ -4501,6 +4501,21 @@ fi
done
+for ac_func in getnameinfo getaddrinfo
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ as_fn_error $? "Missing address resolution functions" "$LINENO" 5
+fi
+done
+
+
ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "
#if HAVE_SIGNAL_H
#include <signal.h>
@@ -5527,7 +5542,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by nsca $as_me 2.9.2, which was
+This file was extended by nsca $as_me 2.10.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -5590,7 +5605,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-nsca config.status 2.9.2
+nsca config.status 2.10.2
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@@ -5718,6 +5733,7 @@ do
"src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
"package/solaris/Makefile") CONFIG_FILES="$CONFIG_FILES package/solaris/Makefile" ;;
"init-script") CONFIG_FILES="$CONFIG_FILES init-script" ;;
+ "nsca.service") CONFIG_FILES="$CONFIG_FILES nsca.service" ;;
"sample-config/nsca.cfg") CONFIG_FILES="$CONFIG_FILES sample-config/nsca.cfg" ;;
"sample-config/send_nsca.cfg") CONFIG_FILES="$CONFIG_FILES sample-config/send_nsca.cfg" ;;
"sample-config/nsca.xinetd") CONFIG_FILES="$CONFIG_FILES sample-config/nsca.xinetd" ;;
@@ -6309,6 +6325,7 @@ fi
perl subst init-script
+perl subst nsca.service
perl subst sample-config/nsca.xinetd
perl subst sample-config/nsca.cfg
perl subst sample-config/send_nsca.cfg
=====================================
configure.ac
=====================================
@@ -4,7 +4,7 @@ dnl Disable caching
define([AC_CACHE_LOAD],)
define([AC_CACHE_SAVE],)
-AC_INIT([nsca],[2.10.1],[nagios-users at lists.sourceforge.net],[nsca],[http://www.nagios.org])
+AC_INIT([nsca],[2.10.2],[nagios-users at lists.sourceforge.net],[nsca],[http://www.nagios.org])
AC_CONFIG_SRCDIR([src/nsca.c])
AC_CONFIG_HEADER(include/config.h)
AC_CONFIG_FILES([Makefile
@@ -12,15 +12,16 @@ AC_CONFIG_FILES([Makefile
src/Makefile
package/solaris/Makefile
init-script
+ nsca.service
sample-config/nsca.cfg
sample-config/send_nsca.cfg
sample-config/nsca.xinetd])
AC_PREFIX_DEFAULT(/usr/local/nagios)
PKG_NAME=nsca
-PKG_VERSION="2.10.1"
+PKG_VERSION="2.10.2"
PKG_HOME_URL="http://www.nagios.org/"
-PKG_REL_DATE="2021-10-27"
+PKG_REL_DATE="2022-06-06"
AC_SUBST(PKG_NAME)
AC_SUBST(PKG_VERSION)
AC_SUBST(PKG_HOME_URL)
@@ -268,6 +269,7 @@ AC_PATH_PROG(PERL,perl)
AC_OUTPUT()
perl subst init-script
+perl subst nsca.service
perl subst sample-config/nsca.xinetd
perl subst sample-config/nsca.cfg
perl subst sample-config/send_nsca.cfg
=====================================
include/common.h
=====================================
@@ -2,7 +2,7 @@
*
* COMMON.H - NSCA Common Include File
* Copyright (c) 1999-2003 Ethan Galstad (nagios at nagios.org)
- * Last Modified: 2021-10-27
+ * Last Modified: 2022-06-06
*
* License:
*
@@ -24,8 +24,8 @@
#include "config.h"
-#define PROGRAM_VERSION "2.10.1"
-#define MODIFICATION_DATE "2021-10-27"
+#define PROGRAM_VERSION "2.10.2"
+#define MODIFICATION_DATE "2022-06-06"
#define OK 0
=====================================
nsca.service.in
=====================================
@@ -0,0 +1,12 @@
+[Unit]
+Description=Nagios Service Check Acceptor
+After=syslog.target network.target local-fs.target
+
+[Service]
+EnvironmentFile=-/etc/sysconfig/nsca
+ExecStart=@bindir@/nsca $OPTIONS -c @sysconfdir@/nsca.cfg
+ExecReload=/bin/kill -HUP $MAINPID
+Type=forking
+
+[Install]
+WantedBy=multi-user.target
=====================================
nsca.spec
=====================================
@@ -1,5 +1,5 @@
%define name nsca
-%define version 2.10.1
+%define version 2.10.2
%define release 1
%define nsusr nagios
%define nsgrp nagios
=====================================
src/nsca.c
=====================================
@@ -5,7 +5,7 @@
* Copyright (c) 2000-2009 Ethan Galstad (egalstad at nagios.org)
* License: GPL v2
*
- * Last Modified: 2021-10-27
+ * Last Modified: 2022-06-06
*
* Command line: NSCA -c <config_file> [mode]
*
=====================================
src/send_nsca.c
=====================================
@@ -4,7 +4,7 @@
* License: GPL v2
* Copyright (c) 2000-2007 Ethan Galstad (nagios at nagios.org)
*
- * Last Modified: 2021-10-27
+ * Last Modified: 2022-06-06
*
* Command line: SEND_NSCA <host_address> [-p port] [-to to_sec] [-c config_file]
*
@@ -15,10 +15,12 @@
/*#define DEBUG*/
+#define _GNU_SOURCE
#include "../include/common.h"
#include "../include/config.h"
#include "../include/netutils.h"
#include "../include/utils.h"
+#include <stdio.h>
time_t start_time,end_time;
@@ -344,7 +346,10 @@ int main(int argc, char **argv){
printf("%d data packet(s) sent to host successfully.\n",total_packets);
/* exit cleanly */
- do_exit(STATE_OK);
+ if (total_packets == 0)
+ do_exit(STATE_CRITICAL);
+ else
+ do_exit(STATE_OK);
/* no compiler complaints here... */
return STATE_OK;
=====================================
update-version
=====================================
@@ -10,10 +10,10 @@ else
fi
# Current version number
-CURRENTVERSION=2.10.1
+CURRENTVERSION=2.10.2
# Last date
-LASTDATE=2021-10-27
+LASTDATE=2022-06-06
if [ "x$1" = "x" ]
then
View it on GitLab: https://salsa.debian.org/nagios-team/pkg-nsca/-/commit/ab054eae09f599a6da254a28db4cdf0c1ceb3992
--
View it on GitLab: https://salsa.debian.org/nagios-team/pkg-nsca/-/commit/ab054eae09f599a6da254a28db4cdf0c1ceb3992
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-nagios-changes/attachments/20220607/57965bee/attachment-0001.htm>
More information about the pkg-nagios-changes
mailing list