pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/net/nagios-plugin-radius import nagios-plugin-radius, ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/b4e080e4278d
branches: trunk
changeset: 527800:b4e080e4278d
user: bouyer <bouyer%pkgsrc.org@localhost>
date: Fri Apr 13 20:06:21 2007 +0000
description:
import nagios-plugin-radius, a package for the nagios radius plugin from
nagios-plugins-1.4.3.
diffstat:
net/nagios-plugin-radius/DESCR | 2 +
net/nagios-plugin-radius/Makefile | 29 ++++++++
net/nagios-plugin-radius/PLIST | 2 +
net/nagios-plugin-radius/distinfo | 10 ++
net/nagios-plugin-radius/patches/patch-aa | 74 +++++++++++++++++++++
net/nagios-plugin-radius/patches/patch-ab | 37 ++++++++++
net/nagios-plugin-radius/patches/patch-ak | 105 ++++++++++++++++++++++++++++++
net/nagios-plugin-radius/patches/patch-al | 92 ++++++++++++++++++++++++++
net/nagios-plugin-radius/patches/patch-am | 56 ++++++++++++++++
9 files changed, 407 insertions(+), 0 deletions(-)
diffs (truncated from 444 to 300 lines):
diff -r 432136cfc559 -r b4e080e4278d net/nagios-plugin-radius/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/nagios-plugin-radius/DESCR Fri Apr 13 20:06:21 2007 +0000
@@ -0,0 +1,2 @@
+This is a package for the radius monitoring plug-in for nagios. For
+more information about nagios, see the 'nagios-base' package.
diff -r 432136cfc559 -r b4e080e4278d net/nagios-plugin-radius/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/nagios-plugin-radius/Makefile Fri Apr 13 20:06:21 2007 +0000
@@ -0,0 +1,29 @@
+# $NetBSD: Makefile,v 1.1.1.1 2007/04/13 20:06:21 bouyer Exp $
+#
+
+PKGNAME= nagios-plugin-radius-${PLUGINSVERSION}
+CATEGORIES= net sysutils
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+COMMENT= Nagios radius plugin
+
+DEPENDS+= nagios-plugins-${PLUGINSVERSION}{,nb[0-9]*}:../../net/nagios-plugins
+DEPENDS+= p5-Net-SNMP-[0-9]*:../../net/p5-Net-SNMP
+
+BUILD_DEFS+= PKG_SYSCONFBASE
+
+.include "../../net/nagios-plugins/Makefile.common"
+
+BINARY_TARGET= check_radius
+
+SUBST_CLASSES+= config
+SUBST_STAGE.config= post-patch
+SUBST_FILES.config= plugins/check_radius.c
+SUBST_SED.config= -e "s|@SYSCONFDIR@|${PKG_SYSCONFBASE}|g"
+SUBST_MESSAGE.config= Fixing configuration file path.
+
+.include "../../net/nagios-plugins/Makefile.plugin"
+.include "../../net/radiusclient-ng/buildlink3.mk"
+.include "../../security/openssl/buildlink3.mk"
+.include "../../devel/gettext-lib/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 432136cfc559 -r b4e080e4278d net/nagios-plugin-radius/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/nagios-plugin-radius/PLIST Fri Apr 13 20:06:21 2007 +0000
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2007/04/13 20:06:21 bouyer Exp $
+libexec/nagios/check_radius
diff -r 432136cfc559 -r b4e080e4278d net/nagios-plugin-radius/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/nagios-plugin-radius/distinfo Fri Apr 13 20:06:21 2007 +0000
@@ -0,0 +1,10 @@
+$NetBSD: distinfo,v 1.1.1.1 2007/04/13 20:06:21 bouyer Exp $
+
+SHA1 (nagios-plugins-1.4.3.tar.gz) = c26fc2f31d7579c3a8174dcd1965046c4b1c8d37
+RMD160 (nagios-plugins-1.4.3.tar.gz) = bc1d4f8cddd481775c514758a462fe533e01e846
+Size (nagios-plugins-1.4.3.tar.gz) = 1257775 bytes
+SHA1 (patch-aa) = a1ae2a0b138bb421408997cf0c00c515ebb84ec4
+SHA1 (patch-ab) = 773faf9ec0e3783334e38b7e301a90189de73aa9
+SHA1 (patch-ak) = c3d9f6ea9a971c45ec4159f800c2a975a3013c82
+SHA1 (patch-al) = cfeef69928795681f17e1faa1639fb3e57a31c32
+SHA1 (patch-am) = ed7e108505679e739449b5eed6101f307e23f436
diff -r 432136cfc559 -r b4e080e4278d net/nagios-plugin-radius/patches/patch-aa
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/nagios-plugin-radius/patches/patch-aa Fri Apr 13 20:06:21 2007 +0000
@@ -0,0 +1,74 @@
+$NetBSD: patch-aa,v 1.1.1.1 2007/04/13 20:06:21 bouyer Exp $
+
+--- plugins/check_radius.c.orig 2004-12-26 00:17:44.000000000 +0100
++++ plugins/check_radius.c 2007-04-13 15:03:20.000000000 +0200
+@@ -27,7 +27,7 @@
+ #include "utils.h"
+ #include "netutils.h"
+
+-#include <radiusclient.h>
++#include <radiusclient-ng.h>
+
+ int process_arguments (int, char **);
+ void print_help (void);
+@@ -38,7 +38,7 @@
+ char *password = NULL;
+ char *nasid = NULL;
+ char *expect = NULL;
+-char *config_file = NULL;
++char *config_file = "@SYSCONFDIR@/radiusclient-ng/radiusclient.conf";
+ unsigned short port = PW_AUTH_UDP_PORT;
+ int retries = 1;
+ int verbose = FALSE;
+@@ -108,6 +108,7 @@
+ int result = STATE_UNKNOWN;
+ UINT4 client_id;
+ char *str;
++ rc_handle *handle;
+
+ setlocale (LC_ALL, "");
+ bindtextdomain (PACKAGE, LOCALEDIR);
+@@ -117,32 +118,33 @@
+ usage4 (_("Could not parse arguments"));
+
+ str = strdup ("dictionary");
+- if ((config_file && rc_read_config (config_file)) ||
+- rc_read_dictionary (rc_conf_str (str)))
++ handle = rc_read_config (config_file);
++ if (handle == NULL ||
++ rc_read_dictionary (handle, rc_conf_str (handle, str)))
+ die (STATE_UNKNOWN, _("Config file error"));
+
+ service = PW_AUTHENTICATE_ONLY;
+
+- if (!(rc_avpair_add (&data.send_pairs, PW_SERVICE_TYPE, &service, 0) &&
+- rc_avpair_add (&data.send_pairs, PW_USER_NAME, username, 0) &&
+- rc_avpair_add (&data.send_pairs, PW_USER_PASSWORD, password, 0) &&
+- (nasid==NULL || rc_avpair_add (&data.send_pairs, PW_NAS_IDENTIFIER, nasid, 0))))
++ if (!(rc_avpair_add (handle, &data.send_pairs, PW_SERVICE_TYPE, &service, -1, 0) &&
++ rc_avpair_add (handle, &data.send_pairs, PW_USER_NAME, username, -1, 0) &&
++ rc_avpair_add (handle, &data.send_pairs, PW_USER_PASSWORD, password, -1, 0) &&
++ (nasid==NULL || rc_avpair_add (handle, &data.send_pairs, PW_NAS_IDENTIFIER, nasid, -1, 0))))
+ die (STATE_UNKNOWN, _("Out of Memory?"));
+
+ /*
+ * Fill in NAS-IP-Address
+ */
+
+- if ((client_id = rc_own_ipaddress ()) == 0)
++ if ((client_id = rc_own_ipaddress (handle)) == 0)
+ return (ERROR_RC);
+
+- if (rc_avpair_add (&(data.send_pairs), PW_NAS_IP_ADDRESS, &client_id, 0) ==
++ if (rc_avpair_add (handle, &(data.send_pairs), PW_NAS_IP_ADDRESS, &client_id, -1, 0) ==
+ NULL) return (ERROR_RC);
+
+- rc_buildreq (&data, PW_ACCESS_REQUEST, server, port, (int)timeout_interval,
++ rc_buildreq (handle, &data, PW_ACCESS_REQUEST, server, port, (int)timeout_interval,
+ retries);
+
+- result = rc_send_server (&data, msg);
++ result = rc_send_server (handle, &data, msg);
+ rc_avpair_free (data.send_pairs);
+ if (data.receive_pairs)
+ rc_avpair_free (data.receive_pairs);
diff -r 432136cfc559 -r b4e080e4278d net/nagios-plugin-radius/patches/patch-ab
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/nagios-plugin-radius/patches/patch-ab Fri Apr 13 20:06:21 2007 +0000
@@ -0,0 +1,37 @@
+$NetBSD: patch-ab,v 1.1.1.1 2007/04/13 20:06:21 bouyer Exp $
+
+--- configure.orig 2007-04-13 15:02:05.000000000 +0200
++++ configure 2007-04-13 15:02:49.000000000 +0200
+@@ -24967,13 +24967,13 @@
+
+ _SAVEDLIBS="$LIBS"
+
+-echo "$as_me:$LINENO: checking for rc_read_config in -lradiusclient" >&5
+-echo $ECHO_N "checking for rc_read_config in -lradiusclient... $ECHO_C" >&6
++echo "$as_me:$LINENO: checking for rc_read_config in -lradiusclient-ng" >&5
++echo $ECHO_N "checking for rc_read_config in -lradiusclient-ng... $ECHO_C" >&6
+ if test "${ac_cv_lib_radiusclient_rc_read_config+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lradiusclient $LIBS"
++LIBS="-lradiusclient-ng $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -25036,13 +25036,13 @@
+ #define HAVE_LIBRADIUSCLIENT 1
+ _ACEOF
+
+- LIBS="-lradiusclient $LIBS"
++ LIBS="-lradiusclient-ng $LIBS"
+
+ fi
+
+ if test "$ac_cv_lib_radiusclient_rc_read_config" = "yes"; then
+ EXTRAS="$EXTRAS check_radius"
+- RADIUSLIBS="-lradiusclient"
++ RADIUSLIBS="-lradiusclient-ng"
+
+ else
+ { echo "$as_me:$LINENO: WARNING: Skipping radius plugin" >&5
diff -r 432136cfc559 -r b4e080e4278d net/nagios-plugin-radius/patches/patch-ak
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/nagios-plugin-radius/patches/patch-ak Fri Apr 13 20:06:21 2007 +0000
@@ -0,0 +1,105 @@
+$NetBSD: patch-ak,v 1.1.1.1 2007/04/13 20:06:21 bouyer Exp $
+
+--- lib/mountlist.c.orig 2005-10-14 22:09:29.000000000 +0200
++++ lib/mountlist.c 2005-10-14 22:23:14.000000000 +0200
+@@ -66,7 +66,11 @@
+ # if HAVE_STRUCT_FSSTAT_F_FSTYPENAME
+ # define FS_TYPE(Ent) ((Ent).f_fstypename)
+ # else
+-# define FS_TYPE(Ent) mnt_names[(Ent).f_type]
++# ifdef STAT_STATVFS
++# define FS_TYPE(Ent) mnt_names[(Ent).f_fsid]
++# else
++# define FS_TYPE(Ent) mnt_names[(Ent).f_type]
++# endif
+ # endif
+ #endif /* MOUNTED_GETFSSTAT */
+
+@@ -109,6 +113,10 @@
+ # include <sys/statfs.h>
+ #endif
+
++#ifdef HAVE_SYS_STATVFS_H
++#include <sys/statvfs.h>
++#endif
++
+ #ifdef MOUNTED_LISTMNTENT
+ # include <mntent.h>
+ #endif
+@@ -173,7 +181,7 @@
+
+ #if MOUNTED_GETMNTINFO
+
+-# if ! HAVE_F_FSTYPENAME_IN_STATFS
++# if ! HAVE_F_FSTYPENAME_IN_STATFS && ! STAT_STATVFS
+ static char *
+ fstype_to_string (short t)
+ {
+@@ -271,12 +279,16 @@
+
+ /* __NetBSD__ || BSD_NET2 || __OpenBSD__ */
+ static char *
++#ifdef STAT_STATVFS
++fsp_to_string (const struct statvfs *fsp)
++#else
+ fsp_to_string (const struct statfs *fsp)
++#endif
+ {
+-# if defined HAVE_F_FSTYPENAME_IN_STATFS
++# if defined HAVE_F_FSTYPENAME_IN_STATFS || defined STAT_STATVFS
+ return (char *) (fsp->f_fstypename);
+ # else
+- return fstype_to_string (fsp->f_type);
++ return fstype_to_string (fsp->f_type);
+ # endif
+ }
+
+@@ -381,7 +393,11 @@
+
+ #ifdef MOUNTED_GETMNTINFO /* 4.4BSD. */
+ {
++#ifdef STAT_STATVFS
++ struct statvfs *fsp;
++#else
+ struct statfs *fsp;
++#endif
+ int entries;
+
+ entries = getmntinfo (&fsp, MNT_NOWAIT);
+@@ -543,9 +559,17 @@
+ {
+ int numsys, counter;
+ size_t bufsize;
++#ifdef STAT_STATVFS
++ struct statvfs *stats;
++#else
+ struct statfs *stats;
++#endif
+
++#ifdef STAT_STATVFS
++ numsys = getfsstat ((struct statvfs *)0, 0L, MNT_NOWAIT);
++#else
+ numsys = getfsstat ((struct statfs *)0, 0L, MNT_NOWAIT);
++#endif
+ if (numsys < 0)
+ return (NULL);
+ if (SIZE_MAX / sizeof *stats <= numsys)
+@@ -608,10 +632,18 @@
+ # ifdef GETFSTYP /* SVR3. */
+ if (need_fs_type)
+ {
++#ifdef STAT_STATVFS
++ struct statvfs fsd;
++#else
+ struct statfs fsd;
++#endif
+ char typebuf[FSTYPSZ];
+
++#ifdef STAT_STATVFS
++ if (statvfs (me->me_mountdir, &fsd, sizeof fsd, 0) != -1
++#else
+ if (statfs (me->me_mountdir, &fsd, sizeof fsd, 0) != -1
++#endif
+ && sysfs (GETFSTYP, fsd.f_fstyp, typebuf) != -1)
+ {
+ me->me_type = xstrdup (typebuf);
diff -r 432136cfc559 -r b4e080e4278d net/nagios-plugin-radius/patches/patch-al
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/nagios-plugin-radius/patches/patch-al Fri Apr 13 20:06:21 2007 +0000
@@ -0,0 +1,92 @@
+$NetBSD: patch-al,v 1.1.1.1 2007/04/13 20:06:21 bouyer Exp $
+
+--- contrib/check_axis.sh.orig 2003-05-26 10:09:23.000000000 +0000
++++ contrib/check_axis.sh
+@@ -5,7 +5,7 @@ port=$2
+ usr=$3
+ pass=$4
+
+-if [ ! "$#" == "4" ]; then
Home |
Main Index |
Thread Index |
Old Index