diff options
author | peter <peter> | 2008-06-22 13:36:59 +0000 |
---|---|---|
committer | peter <peter> | 2008-06-22 13:36:59 +0000 |
commit | 61811b6dfdd76f9ad1ee6ec5e3858633baadae03 (patch) | |
tree | 17aa1b747c8b1a6d954dc037c9be06077f46f59a /sysutils | |
parent | c9d4d9f955966349032e4b038424da6f714b6893 (diff) | |
download | pkgsrc-61811b6dfdd76f9ad1ee6ec5e3858633baadae03.tar.gz |
Update to pfstat-2.3.
Added a patch to make it compile on NetBSD 3.1 (no pf+ALTQ).
(No changelog found)
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/pfstat/Makefile | 24 | ||||
-rw-r--r-- | sysutils/pfstat/PLIST | 6 | ||||
-rw-r--r-- | sysutils/pfstat/distinfo | 12 | ||||
-rw-r--r-- | sysutils/pfstat/patches/patch-aa | 59 | ||||
-rw-r--r-- | sysutils/pfstat/patches/patch-ab | 50 | ||||
-rw-r--r-- | sysutils/pfstat/patches/patch-ac | 23 |
6 files changed, 109 insertions, 65 deletions
diff --git a/sysutils/pfstat/Makefile b/sysutils/pfstat/Makefile index 6d129d1ebc5..32079d80056 100644 --- a/sysutils/pfstat/Makefile +++ b/sysutils/pfstat/Makefile @@ -1,23 +1,35 @@ -# $NetBSD: Makefile,v 1.9 2007/05/18 10:03:32 peter Exp $ +# $NetBSD: Makefile,v 1.10 2008/06/22 13:36:59 peter Exp $ -DISTNAME= pfstat-1.7 -PKGREVISION= 2 +DISTNAME= pfstat-2.3 CATEGORIES= sysutils net MASTER_SITES= http://www.benzedrine.cx/ -MAINTAINER= pkgsrc-users@NetBSD.org +MAINTAINER= peter@NetBSD.org HOMEPAGE= http://www.benzedrine.cx/pfstat.html COMMENT= Utility to render graphical statistics for PF NO_CONFIGURE= yes +MAKE_ENV+= PF_VERSION=${PF_VERSION:S/.//} NOGCCERROR=yes -INSTALLATION_DIRS= bin ${PKGMANDIR}/man8 +INSTALLATION_DIRS= bin ${PKGMANDIR}/man8 share/examples/pfstat + +SUBST_CLASSES+= conf +SUBST_STAGE.conf= post-patch +SUBST_FILES.conf= pfstat.8 pfstat.c pfstat.conf.example +SUBST_SED.conf= -e "s|/etc/pfstat.conf|${PREFIX}/etc/pfstat.conf|g" +SUBST_MESSAGE.conf= Fixing configuration file paths. + +do-build: + cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} + cd ${WRKSRC}/pfstatd && ${SETENV} ${MAKE_ENV} ${MAKE} do-install: ${INSTALL_PROGRAM} ${WRKSRC}/pfstat ${PREFIX}/bin ${INSTALL_MAN} ${WRKSRC}/pfstat.8 ${PREFIX}/${PKGMANDIR}/man8 + ${INSTALL_DATA} ${WRKSRC}/pfstat.conf.example ${PREFIX}/share/examples/pfstat + ${INSTALL_PROGRAM} ${WRKSRC}/pfstatd/pfstatd ${PREFIX}/bin + ${INSTALL_MAN} ${WRKSRC}/pfstatd/pfstatd.8 ${PREFIX}/${PKGMANDIR}/man8 .include "../../graphics/gd/buildlink3.mk" -.include "../../graphics/freetype-lib/buildlink3.mk" .include "../../security/pflkm/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/sysutils/pfstat/PLIST b/sysutils/pfstat/PLIST index 1755c888c3b..2d70850c250 100644 --- a/sysutils/pfstat/PLIST +++ b/sysutils/pfstat/PLIST @@ -1,3 +1,7 @@ -@comment $NetBSD: PLIST,v 1.1.1.1 2004/11/05 15:07:15 peter Exp $ +@comment $NetBSD: PLIST,v 1.2 2008/06/22 13:36:59 peter Exp $ bin/pfstat +bin/pfstatd man/man8/pfstat.8 +man/man8/pfstatd.8 +share/examples/pfstat/pfstat.conf.example +@dirrm share/examples/pfstat diff --git a/sysutils/pfstat/distinfo b/sysutils/pfstat/distinfo index 67f082d6685..9ce21a66dfd 100644 --- a/sysutils/pfstat/distinfo +++ b/sysutils/pfstat/distinfo @@ -1,6 +1,8 @@ -$NetBSD: distinfo,v 1.3 2006/03/06 23:02:07 peter Exp $ +$NetBSD: distinfo,v 1.4 2008/06/22 13:36:59 peter Exp $ -SHA1 (pfstat-1.7.tar.gz) = 7bd125039c130a56a4dda3040d309d0f445d88b5 -RMD160 (pfstat-1.7.tar.gz) = d15ebd14a42ddbdacf326b4ad59c2fcf4f7d8b07 -Size (pfstat-1.7.tar.gz) = 9610 bytes -SHA1 (patch-aa) = b1d244d9788cfaf33f3665108a419dc40ff68fea +SHA1 (pfstat-2.3.tar.gz) = 83be99fd5a7c997fc89c0858d27d471f7f9126c7 +RMD160 (pfstat-2.3.tar.gz) = 0048005aa114d49a8e1adefc8789c7aeb704f7ad +Size (pfstat-2.3.tar.gz) = 18332 bytes +SHA1 (patch-aa) = 72bf1f5806846833b20cacaec368744f25899e94 +SHA1 (patch-ab) = 24ab0271e0302e03f3b00feb9e4b20f97f932435 +SHA1 (patch-ac) = 451e8a66d108dab39277f7d8d93150150f822879 diff --git a/sysutils/pfstat/patches/patch-aa b/sysutils/pfstat/patches/patch-aa index 45fea1a4a5f..9360e0475f4 100644 --- a/sysutils/pfstat/patches/patch-aa +++ b/sysutils/pfstat/patches/patch-aa @@ -1,59 +1,12 @@ -$NetBSD: patch-aa,v 1.2 2006/03/06 23:02:07 peter Exp $ +$NetBSD: patch-aa,v 1.3 2008/06/22 13:36:59 peter Exp $ ---- pfstat.c.orig 2003-09-10 19:45:27.000000000 +0200 -+++ pfstat.c 2006-03-06 23:50:43.000000000 +0100 -@@ -37,7 +37,12 @@ +--- graph.c.old 2008-06-21 17:30:04.000000000 +0200 ++++ graph.c 2008-06-22 00:27:15.000000000 +0200 +@@ -37,7 +37,6 @@ #include <sys/socket.h> #include <netinet/in.h> #include <net/if.h> -+#ifdef __DragonFly__ -+#include <net/pf/pfvar.h> -+#else - #include <net/pfvar.h> -+#endif -+ +-#include <net/pfvar.h> #include <err.h> + #include <errno.h> #include <fcntl.h> - #include <stdio.h> -@@ -167,26 +172,26 @@ - } - close(dev); - if (s.running) { -- printf("%u %u", time(NULL), s.since); -+ printf("%u %u", (unsigned int)time(NULL), s.since); - printf(" %llu %llu %llu %llu", -- s.bcounters[0][0], -- s.bcounters[0][1], -- s.bcounters[1][0], -- s.bcounters[1][1]); -+ (unsigned long long)s.bcounters[0][0], -+ (unsigned long long)s.bcounters[0][1], -+ (unsigned long long)s.bcounters[1][0], -+ (unsigned long long)s.bcounters[1][1]); - printf(" %llu %llu %llu %llu %llu %llu %llu %llu", -- s.pcounters[0][0][PF_PASS], -- s.pcounters[0][0][PF_DROP], -- s.pcounters[0][1][PF_PASS], -- s.pcounters[0][1][PF_DROP], -- s.pcounters[1][0][PF_PASS], -- s.pcounters[1][0][PF_DROP], -- s.pcounters[1][1][PF_PASS], -- s.pcounters[1][1][PF_DROP]); -+ (unsigned long long)s.pcounters[0][0][PF_PASS], -+ (unsigned long long)s.pcounters[0][0][PF_DROP], -+ (unsigned long long)s.pcounters[0][1][PF_PASS], -+ (unsigned long long)s.pcounters[0][1][PF_DROP], -+ (unsigned long long)s.pcounters[1][0][PF_PASS], -+ (unsigned long long)s.pcounters[1][0][PF_DROP], -+ (unsigned long long)s.pcounters[1][1][PF_PASS], -+ (unsigned long long)s.pcounters[1][1][PF_DROP]); - printf(" %u", s.states); - for (i = 0; i < FCNT_MAX; ++i) -- printf(" %lld", s.fcounters[i]); -+ printf(" %lld", (long long)s.fcounters[i]); - for (i = 0; i < PFRES_MAX; ++i) -- printf(" %lld", s.counters[i]); -+ printf(" %lld", (long long)s.counters[i]); - printf("\n"); - } - return (0); diff --git a/sysutils/pfstat/patches/patch-ab b/sysutils/pfstat/patches/patch-ab new file mode 100644 index 00000000000..fd0b8be6081 --- /dev/null +++ b/sysutils/pfstat/patches/patch-ab @@ -0,0 +1,50 @@ +$NetBSD: patch-ab,v 1.1 2008/06/22 13:36:59 peter Exp $ + +--- pf.c.old 2008-06-22 00:26:15.000000000 +0200 ++++ pf.c 2008-06-22 15:10:13.000000000 +0200 +@@ -37,11 +37,17 @@ + #include <sys/socket.h> + #include <netinet/in.h> + #include <net/if.h> ++#ifdef __DragonFly__ ++#include <net/pf/pfvar.h> ++#else + #include <net/pfvar.h> ++#endif /* !__DragonFly__ */ ++#ifdef HAVE_ALTQ + #include <altq/altq.h> + #include <altq/altq_cbq.h> + #include <altq/altq_priq.h> + #include <altq/altq_hfsc.h> ++#endif /* HAVE_ALTQ */ + #include <arpa/inet.h> + #include <err.h> + #include <errno.h> +@@ -53,6 +59,7 @@ + + #include "pf.h" + ++#ifdef HAVE_ALTQ + union altq_stats { + class_stats_t cbq; + struct priq_classstats priq; +@@ -138,6 +145,7 @@ + } + return (0); + } ++#endif /* HAVE_ALTQ */ + + static int + query_ifaces(int fd, void (*cb)(int, const char *, int, double)) +@@ -195,9 +203,11 @@ + fprintf(stderr, "pf_query: query_ifaces() failed\n"); + return (1); + } ++#ifdef HAVE_ALTQ + if (query_queues(fd, cb)) { + fprintf(stderr, "pf_query: query_queues() failed\n"); + return (1); + } ++#endif /* HAVE_ALTQ */ + return (0); + } diff --git a/sysutils/pfstat/patches/patch-ac b/sysutils/pfstat/patches/patch-ac new file mode 100644 index 00000000000..7b999c336cf --- /dev/null +++ b/sysutils/pfstat/patches/patch-ac @@ -0,0 +1,23 @@ +$NetBSD: patch-ac,v 1.1 2008/06/22 13:36:59 peter Exp $ + +--- pf.h.old 2008-06-22 00:40:22.000000000 +0200 ++++ pf.h 2008-06-22 00:49:15.000000000 +0200 +@@ -33,6 +33,18 @@ + #ifndef _PF_H_ + #define _PF_H_ + ++#ifdef NetBSD ++#if PF_VERSION > 36 ++/* NetBSD has pf+ALTQ since 4.0 (shipped with pf version 3.7) */ ++#define HAVE_ALTQ ++#endif /* PF_VERSION > 36 */ ++#else ++/* Assume pf+ALTQ for non-NetBSD OS if pf version is at least 3.3 */ ++#if PF_VERSION > 32 ++#define HAVE_ALTQ ++#endif /* PF_VERSION > 32 */ ++#endif /* !__NetBSD__ */ ++ + #define COL_TYPE_SINCE -1 + #define COL_TYPE_GLOBAL 0 + #define COL_TYPE_IFACE 1 |