From 61e4fc1199ea20ad1c86f2ff8a708deceeaf53a2 Mon Sep 17 00:00:00 2001 From: reinhard Date: Fri, 20 Apr 2001 07:53:01 +0000 Subject: [PATCH] *) install documentation *) rename patches *) bump NEED_VERSION ok kevlo@ --- net/arpcatch/Makefile | 14 ++- net/arpcatch/patches/patch-Makefile | 9 ++ net/arpcatch/patches/patch-aa | 145 -------------------------- net/arpcatch/patches/patch-arpcatch_c | 36 +++++++ net/arpcatch/patches/patch-arpcatch_h | 41 ++++++++ net/arpcatch/patches/patch-bpf_c | 36 +++++++ net/arpcatch/patches/patch-config_c | 11 ++ net/arpcatch/patches/patch-libtqbf_c | 12 +++ net/arpcatch/pkg/COMMENT | 1 - net/arpcatch/pkg/DESCR | 2 +- net/arpcatch/pkg/PLIST | 3 + 11 files changed, 159 insertions(+), 151 deletions(-) create mode 100644 net/arpcatch/patches/patch-Makefile delete mode 100644 net/arpcatch/patches/patch-aa create mode 100644 net/arpcatch/patches/patch-arpcatch_c create mode 100644 net/arpcatch/patches/patch-arpcatch_h create mode 100644 net/arpcatch/patches/patch-bpf_c create mode 100644 net/arpcatch/patches/patch-config_c create mode 100644 net/arpcatch/patches/patch-libtqbf_c delete mode 100644 net/arpcatch/pkg/COMMENT diff --git a/net/arpcatch/Makefile b/net/arpcatch/Makefile index d52ee3369f9..789c78029ee 100644 --- a/net/arpcatch/Makefile +++ b/net/arpcatch/Makefile @@ -1,10 +1,14 @@ -# $OpenBSD: Makefile,v 1.7 2001/04/19 10:41:17 wilfried Exp $ +# $OpenBSD: Makefile,v 1.8 2001/04/20 07:53:01 reinhard Exp $ + +COMMENT= userland arp-proxy daemon DISTNAME= arpcatch PKGNAME= ${DISTNAME}-19970824 CATEGORIES= net -NEED_VERSION= 1.191 -MASTER_SITES= http://www.enteract.com/~tqbf/ +NEED_VERSION= 1.397 +MASTER_SITES= ${HOMEPAGE} + +HOMEPAGE= http://skoda.sockpuppet.org/tqbf/ MAINTAINER= ports@openbsd.org @@ -13,12 +17,14 @@ PERMIT_PACKAGE_FTP= Yes PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes -WRKDIST= ${WRKDIR}/${PKGNAME} +WRKDIST= ${WRKDIR}/${DISTNAME} ALL_TARGET= INSTALL_TARGET= install do-install: ${INSTALL_PROGRAM} ${WRKSRC}/aproxyd ${PREFIX}/sbin/aproxyd + ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/arpcatch + ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/arpcatch .include diff --git a/net/arpcatch/patches/patch-Makefile b/net/arpcatch/patches/patch-Makefile new file mode 100644 index 00000000000..f35d5b3f17e --- /dev/null +++ b/net/arpcatch/patches/patch-Makefile @@ -0,0 +1,9 @@ +$OpenBSD: patch-Makefile,v 1.1 2001/04/20 07:53:02 reinhard Exp $ +--- Makefile.orig Mon Aug 18 22:54:00 1997 ++++ Makefile Tue Apr 17 16:00:13 2001 +@@ -1,5 +1,3 @@ +-CFLAGS= -g +-LDFLAGS= + LIBS= -lpcap + TARGET= aproxyd + diff --git a/net/arpcatch/patches/patch-aa b/net/arpcatch/patches/patch-aa deleted file mode 100644 index c808432db67..00000000000 --- a/net/arpcatch/patches/patch-aa +++ /dev/null @@ -1,145 +0,0 @@ -diff -u Makefile.orig Makefile ---- Makefile.orig Mon Aug 18 22:54:00 1997 -+++ Makefile Mon Mar 12 17:02:06 2001 -@@ -1,5 +1,3 @@ --CFLAGS= -g --LDFLAGS= - LIBS= -lpcap - TARGET= aproxyd - -diff -u arpcatch.c.orig arpcatch.c ---- arpcatch.c.orig Fri Aug 22 06:57:01 1997 -+++ arpcatch.c Fri Jan 21 07:12:04 2000 -@@ -37,6 +37,7 @@ - } - } - -+ printf("Starting on %s interface\n",device); - if(!(at = read_config(configfile))) { - perror("config file read"); - exit(errno); -@@ -50,6 +51,7 @@ - read_loop(fd, at); - - perror("read"); -+return 1; - } - - /* needs cleaning up */ -@@ -63,7 +65,6 @@ - struct ether_addr *ea; - struct ether_arp *ah; - -- struct in_addr foo; - - for(;;) { - struct in_addr ia; -@@ -129,7 +130,7 @@ - - fd = bpf_open(device); - if(fd < 0) { -- perror("bpf open"); -+ fprintf(stderr,"Error initializing bpf filter\nExiting..\n"); - exit(errno); - } - -diff -u arpcatch.h.orig arpcatch.h ---- arpcatch.h.orig Tue Aug 19 03:51:02 1997 -+++ arpcatch.h Fri Jan 21 07:08:36 2000 -@@ -5,6 +5,7 @@ - - #include - #include -+#include - #include - #include - #include -@@ -12,6 +13,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -25,8 +27,6 @@ - - #include - #include --#include --#include - #include - - #include "list.h" -@@ -76,5 +76,12 @@ - int bpf_promisc(int, int); - - table_t *read_config(char *); -+void chop(char *); -+void *NEW(const int); -+u_long resolve(char *); -+ -+int arp_send(int, u_long *, u_long *, struct ether_addr *, struct ether_addr *); -+ -+ - - #endif -diff -u bpf.c.orig bpf.c ---- bpf.c.orig Tue Aug 19 03:38:20 1997 -+++ bpf.c Fri Jan 21 06:53:13 2000 -@@ -47,21 +47,26 @@ - - do { - snprintf(file, PATH_MAX, "/dev/bpf%d", i++); -- if((fd = open(file, O_RDWR)) < 0) -- continue; -- } while(errno == EBUSY && fd < 0); -+ fd = open(file, O_RDWR); -+ } while(fd < 0 && errno == EBUSY); - -- if(fd < 0) -+ if(fd < 0) { -+ perror("bpf open"); - return(-1); -+ } - - memset(&ifr, 0, sizeof(ifr)); - strncpy(ifr.ifr_name, device, 15); - -- if(bpf_setbuf(fd, DEFAULT_BUFLEN) < 0) -+ if(bpf_setbuf(fd, DEFAULT_BUFLEN) < 0) { -+ perror("bpf setbuf"); - return(-2); -+ } - -- if(ioctl(fd, BIOCSETIF, (char *) &ifr) < 0) -+ if(ioctl(fd, BIOCSETIF, (char *) &ifr) < 0) { -+ perror("bpf ioctl"); - return(-3); -+ } - - return(fd); - } -diff -u config.c.orig arpcatch/config.c ---- config.c.orig Mon Nov 24 16:18:54 1997 -+++ config.c Fri Jan 21 06:07:06 2000 -@@ -1,7 +1,6 @@ - #include "arpcatch.h" - #include - #include --#include - - static list_t *add_host(char *buffer, list_t *hosts); - static int add_proxy(char *buffer, table_t *at); -diff -u libtqbf.c.orig arpcatch/libtqbf.c ---- libtqbf.c.orig Tue Aug 19 02:02:13 1997 -+++ libtqbf.c Fri Jan 21 06:55:56 2000 -@@ -349,8 +349,6 @@ - int jday (int month, int day, int year) { - int c, ya, jd; - -- int brit_jd = 2361222; -- - if (month > 2) - month -= 3; - else diff --git a/net/arpcatch/patches/patch-arpcatch_c b/net/arpcatch/patches/patch-arpcatch_c new file mode 100644 index 00000000000..93b87001bd3 --- /dev/null +++ b/net/arpcatch/patches/patch-arpcatch_c @@ -0,0 +1,36 @@ + $OpenBSD: patch-arpcatch_c,v 1.1 2001/04/20 07:53:02 reinhard Exp $ +--- arpcatch.c.orig Fri Aug 22 02:57:01 1997 ++++ arpcatch.c Tue Apr 17 16:00:13 2001 +@@ -37,6 +37,7 @@ int main(int argc, char **argv) { + } + } + ++ printf("Starting on %s interface\n",device); + if(!(at = read_config(configfile))) { + perror("config file read"); + exit(errno); +@@ -50,6 +51,7 @@ int main(int argc, char **argv) { + read_loop(fd, at); + + perror("read"); ++return 1; + } + + /* needs cleaning up */ +@@ -63,7 +65,6 @@ int read_loop(int fd, table_t *at) { + struct ether_addr *ea; + struct ether_arp *ah; + +- struct in_addr foo; + + for(;;) { + struct in_addr ia; +@@ -129,7 +130,7 @@ int init_bpf(char *device) { + + fd = bpf_open(device); + if(fd < 0) { +- perror("bpf open"); ++ fprintf(stderr,"Error initializing bpf filter\nExiting..\n"); + exit(errno); + } + diff --git a/net/arpcatch/patches/patch-arpcatch_h b/net/arpcatch/patches/patch-arpcatch_h new file mode 100644 index 00000000000..5fb597a6fe5 --- /dev/null +++ b/net/arpcatch/patches/patch-arpcatch_h @@ -0,0 +1,41 @@ +$OpenBSD: patch-arpcatch_h,v 1.1 2001/04/20 07:53:02 reinhard Exp $ +--- arpcatch.h.orig Mon Aug 18 23:51:02 1997 ++++ arpcatch.h Tue Apr 17 16:00:13 2001 +@@ -5,6 +5,7 @@ + + #include + #include ++#include + #include + #include + #include +@@ -12,6 +13,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -25,8 +27,6 @@ + + #include + #include +-#include +-#include + #include + + #include "list.h" +@@ -76,5 +76,12 @@ int bpf_immediate(int, int); + int bpf_promisc(int, int); + + table_t *read_config(char *); ++void chop(char *); ++void *NEW(const int); ++u_long resolve(char *); ++ ++int arp_send(int, u_long *, u_long *, struct ether_addr *, struct ether_addr *); ++ ++ + + #endif diff --git a/net/arpcatch/patches/patch-bpf_c b/net/arpcatch/patches/patch-bpf_c new file mode 100644 index 00000000000..3c671b6ec5c --- /dev/null +++ b/net/arpcatch/patches/patch-bpf_c @@ -0,0 +1,36 @@ +$OpenBSD: patch-bpf_c,v 1.1 2001/04/20 07:53:02 reinhard Exp $ +--- bpf.c.orig Mon Aug 18 23:38:20 1997 ++++ bpf.c Tue Apr 17 16:00:13 2001 +@@ -47,21 +47,26 @@ int bpf_open(char *device) { + + do { + snprintf(file, PATH_MAX, "/dev/bpf%d", i++); +- if((fd = open(file, O_RDWR)) < 0) +- continue; +- } while(errno == EBUSY && fd < 0); ++ fd = open(file, O_RDWR); ++ } while(fd < 0 && errno == EBUSY); + +- if(fd < 0) ++ if(fd < 0) { ++ perror("bpf open"); + return(-1); ++ } + + memset(&ifr, 0, sizeof(ifr)); + strncpy(ifr.ifr_name, device, 15); + +- if(bpf_setbuf(fd, DEFAULT_BUFLEN) < 0) ++ if(bpf_setbuf(fd, DEFAULT_BUFLEN) < 0) { ++ perror("bpf setbuf"); + return(-2); ++ } + +- if(ioctl(fd, BIOCSETIF, (char *) &ifr) < 0) ++ if(ioctl(fd, BIOCSETIF, (char *) &ifr) < 0) { ++ perror("bpf ioctl"); + return(-3); ++ } + + return(fd); + } diff --git a/net/arpcatch/patches/patch-config_c b/net/arpcatch/patches/patch-config_c new file mode 100644 index 00000000000..d9428f98e17 --- /dev/null +++ b/net/arpcatch/patches/patch-config_c @@ -0,0 +1,11 @@ +$OpenBSD: patch-config_c,v 1.1 2001/04/20 07:53:02 reinhard Exp $ +--- config.c.orig Mon Nov 24 12:18:54 1997 ++++ config.c Tue Apr 17 16:00:13 2001 +@@ -1,7 +1,6 @@ + #include "arpcatch.h" + #include + #include +-#include + + static list_t *add_host(char *buffer, list_t *hosts); + static int add_proxy(char *buffer, table_t *at); diff --git a/net/arpcatch/patches/patch-libtqbf_c b/net/arpcatch/patches/patch-libtqbf_c new file mode 100644 index 00000000000..a1d352acbec --- /dev/null +++ b/net/arpcatch/patches/patch-libtqbf_c @@ -0,0 +1,12 @@ +$OpenBSD: patch-libtqbf_c,v 1.1 2001/04/20 07:53:02 reinhard Exp $ +--- libtqbf.c.orig Mon Aug 18 22:02:13 1997 ++++ libtqbf.c Tue Apr 17 16:00:13 2001 +@@ -349,8 +349,6 @@ u_long resolve(char *address) { + int jday (int month, int day, int year) { + int c, ya, jd; + +- int brit_jd = 2361222; +- + if (month > 2) + month -= 3; + else diff --git a/net/arpcatch/pkg/COMMENT b/net/arpcatch/pkg/COMMENT deleted file mode 100644 index 8f8e7a11ef3..00000000000 --- a/net/arpcatch/pkg/COMMENT +++ /dev/null @@ -1 +0,0 @@ -Userland arp-proxy daemon diff --git a/net/arpcatch/pkg/DESCR b/net/arpcatch/pkg/DESCR index 2dca0f92c86..918aa95e599 100644 --- a/net/arpcatch/pkg/DESCR +++ b/net/arpcatch/pkg/DESCR @@ -33,4 +33,4 @@ If you have problems, questions, comments, bitches, etc, feel free to mail me at - +WWW: ${HOMEPAGE} diff --git a/net/arpcatch/pkg/PLIST b/net/arpcatch/pkg/PLIST index 4fe9ac295c1..4ebc7ed957a 100644 --- a/net/arpcatch/pkg/PLIST +++ b/net/arpcatch/pkg/PLIST @@ -1 +1,4 @@ +@comment $OpenBSD: PLIST,v 1.2 2001/04/20 07:53:03 reinhard Exp $ sbin/aproxyd +share/doc/arpcatch/README +@dirrm share/doc/arpcatch