pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/pfstat Update to pfstat-2.3.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6cf3e3049577
branches:  trunk
changeset: 543725:6cf3e3049577
user:      peter <peter%pkgsrc.org@localhost>
date:      Sun Jun 22 13:36:59 2008 +0000

description:
Update to pfstat-2.3.
Added a patch to make it compile on NetBSD 3.1 (no pf+ALTQ).

(No changelog found)

diffstat:

 sysutils/pfstat/Makefile         |  24 ++++++++++++----
 sysutils/pfstat/PLIST            |   6 +++-
 sysutils/pfstat/distinfo         |  12 ++++---
 sysutils/pfstat/patches/patch-aa |  59 ++++-----------------------------------
 sysutils/pfstat/patches/patch-ab |  50 +++++++++++++++++++++++++++++++++
 sysutils/pfstat/patches/patch-ac |  23 +++++++++++++++
 6 files changed, 109 insertions(+), 65 deletions(-)

diffs (224 lines):

diff -r 98f73394bfaa -r 6cf3e3049577 sysutils/pfstat/Makefile
--- a/sysutils/pfstat/Makefile  Sun Jun 22 13:36:33 2008 +0000
+++ b/sysutils/pfstat/Makefile  Sun Jun 22 13:36:59 2008 +0000
@@ -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@localhost
+MAINTAINER=    peter%NetBSD.org@localhost
 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 -r 98f73394bfaa -r 6cf3e3049577 sysutils/pfstat/PLIST
--- a/sysutils/pfstat/PLIST     Sun Jun 22 13:36:33 2008 +0000
+++ b/sysutils/pfstat/PLIST     Sun Jun 22 13:36:59 2008 +0000
@@ -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 -r 98f73394bfaa -r 6cf3e3049577 sysutils/pfstat/distinfo
--- a/sysutils/pfstat/distinfo  Sun Jun 22 13:36:33 2008 +0000
+++ b/sysutils/pfstat/distinfo  Sun Jun 22 13:36:59 2008 +0000
@@ -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 -r 98f73394bfaa -r 6cf3e3049577 sysutils/pfstat/patches/patch-aa
--- a/sysutils/pfstat/patches/patch-aa  Sun Jun 22 13:36:33 2008 +0000
+++ b/sysutils/pfstat/patches/patch-aa  Sun Jun 22 13:36:59 2008 +0000
@@ -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 -r 98f73394bfaa -r 6cf3e3049577 sysutils/pfstat/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/pfstat/patches/patch-ab  Sun Jun 22 13:36:59 2008 +0000
@@ -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 -r 98f73394bfaa -r 6cf3e3049577 sysutils/pfstat/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/pfstat/patches/patch-ac  Sun Jun 22 13:36:59 2008 +0000
@@ -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



Home | Main Index | Thread Index | Old Index