summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbouyer <bouyer@pkgsrc.org>2006-02-18 17:22:57 +0000
committerbouyer <bouyer@pkgsrc.org>2006-02-18 17:22:57 +0000
commit8e6581c009d41ffe99909990f0a81ade39343458 (patch)
treeb7f914ae5a972b424487d8779fce2a0f076621e2
parent856b60714ea6b5713b56faa54b33e81bbb282da0 (diff)
downloadpkgsrc-8e6581c009d41ffe99909990f0a81ade39343458.tar.gz
Initial import of nagios-plugin-pgsql 1.4.2, based on nagios-plugin-pgsql
from pkgsrc-wip. This is a package for a pgsql monitoring plug-in for nagios. For more information about nagios, see the 'nagios-base' package.
-rw-r--r--net/nagios-plugin-pgsql/DESCR2
-rw-r--r--net/nagios-plugin-pgsql/Makefile23
-rw-r--r--net/nagios-plugin-pgsql/PLIST2
-rw-r--r--net/nagios-plugin-pgsql/distinfo6
-rw-r--r--net/nagios-plugin-pgsql/patches/patch-ak105
5 files changed, 138 insertions, 0 deletions
diff --git a/net/nagios-plugin-pgsql/DESCR b/net/nagios-plugin-pgsql/DESCR
new file mode 100644
index 00000000000..3b31cbf7021
--- /dev/null
+++ b/net/nagios-plugin-pgsql/DESCR
@@ -0,0 +1,2 @@
+ This is a package for a pgsql monitoring plug-in for nagios. For
+more information about nagios, see the 'nagios-base' package.
diff --git a/net/nagios-plugin-pgsql/Makefile b/net/nagios-plugin-pgsql/Makefile
new file mode 100644
index 00000000000..0e0bc630217
--- /dev/null
+++ b/net/nagios-plugin-pgsql/Makefile
@@ -0,0 +1,23 @@
+# $NetBSD: Makefile,v 1.1.1.1 2006/02/18 17:22:57 bouyer Exp $
+#
+
+PKGNAME= nagios-plugin-pgsql-${PLUGINSVERSION}
+CATEGORIES= net sysutils databases
+
+MAINTAINER= tech-pkg@NetBSD.org
+COMMENT= Nagios pgsql plugin
+
+DEPENDS+= nagios-plugins-${PLUGINSVERSION}:../../net/nagios-plugins
+
+CONFIGURE_ARGS+= --with-pgsql=${BUILDLINK_PREFIX.pgsql-lib}
+#CPPFLAGS+= -I${PGSQL_PREFIX}/include/pgsql
+
+.include "../../net/nagios-plugins/Makefile.common"
+
+BINARY_TARGET= check_pgsql
+
+.include "../../net/nagios-plugins/Makefile.plugin"
+.include "../../mk/pgsql.buildlink3.mk"
+.include "../../security/openssl/buildlink3.mk"
+.include "../../devel/gettext-lib/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/net/nagios-plugin-pgsql/PLIST b/net/nagios-plugin-pgsql/PLIST
new file mode 100644
index 00000000000..bff84343d17
--- /dev/null
+++ b/net/nagios-plugin-pgsql/PLIST
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2006/02/18 17:22:57 bouyer Exp $
+libexec/nagios/check_pgsql
diff --git a/net/nagios-plugin-pgsql/distinfo b/net/nagios-plugin-pgsql/distinfo
new file mode 100644
index 00000000000..706f3608203
--- /dev/null
+++ b/net/nagios-plugin-pgsql/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1.1.1 2006/02/18 17:22:57 bouyer Exp $
+
+SHA1 (nagios-plugins-1.4.2.tar.gz) = d12238c75c0bbb0c7cb8e81585effe5375b9ced4
+RMD160 (nagios-plugins-1.4.2.tar.gz) = 93d747bb445e4e59cdb72ef210feb052b7855cac
+Size (nagios-plugins-1.4.2.tar.gz) = 971447 bytes
+SHA1 (patch-ak) = c3d9f6ea9a971c45ec4159f800c2a975a3013c82
diff --git a/net/nagios-plugin-pgsql/patches/patch-ak b/net/nagios-plugin-pgsql/patches/patch-ak
new file mode 100644
index 00000000000..fcf8b069a00
--- /dev/null
+++ b/net/nagios-plugin-pgsql/patches/patch-ak
@@ -0,0 +1,105 @@
+$NetBSD: patch-ak,v 1.1.1.1 2006/02/18 17:22:57 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);