diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 56d69ef..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: argus -# $Id$ -NAME := argus -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/argus-2.0.6.fixes.1-libpcap10.patch b/argus-2.0.6.fixes.1-libpcap10.patch new file mode 100644 index 0000000..8d225f8 --- /dev/null +++ b/argus-2.0.6.fixes.1-libpcap10.patch @@ -0,0 +1,90 @@ +diff -ur argus-2.0.6.fixes.1/common/argus_filter.c argus-2.0.6.fixes.1-libpcap10/common/argus_filter.c +--- argus-2.0.6.fixes.1/common/argus_filter.c 2004-05-10 15:29:10.000000000 +0200 ++++ argus-2.0.6.fixes.1-libpcap10/common/argus_filter.c 2009-10-04 08:41:35.000000000 +0200 +@@ -3106,6 +3106,8 @@ + } + + #ifdef BDEBUG ++static void bpf_dump_internal(struct bpf_program *p, int option); ++ + opt_dump(root) + struct block *root; + { +@@ -3113,7 +3115,7 @@ + + memset(bids, 0, sizeof bids); + f.bf_insns = Argusicode_to_fcode(root, &f.bf_len); +- bpf_dump(&f, 1); ++ bpf_dump_internal(&f, 1); + putchar('\n'); + free((char *)f.bf_insns); + } +@@ -3603,6 +3605,7 @@ + + + ++#ifdef BDEBUG + /* + * Copyright (c) 1992, 1993, 1994 + * The Regents of the University of California. All rights reserved. +@@ -3628,10 +3631,8 @@ + + #include + +-extern void bpf_dump(struct bpf_program *, int); +- +-void +-bpf_dump(struct bpf_program *p, int option) ++static void ++bpf_dump_internal(struct bpf_program *p, int option) + { + struct bpf_insn *insn; + int i; +@@ -3653,13 +3654,12 @@ + return; + } + for (i = 0; i < n; ++insn, ++i) { +-#ifdef BDEBUG + extern int bids[]; + printf(bids[i] > 0 ? "[%02d]" : " -- ", bids[i] - 1); +-#endif + puts(Argusbpf_image(insn, i)); + } + } ++#endif + + /* + * Copyright (c) 1990, 1991, 1992, 1993, 1994 +diff -ur argus-2.0.6.fixes.1/include/argus_filter.h argus-2.0.6.fixes.1-libpcap10/include/argus_filter.h +--- argus-2.0.6.fixes.1/include/argus_filter.h 2004-02-23 16:00:36.000000000 +0100 ++++ argus-2.0.6.fixes.1-libpcap10/include/argus_filter.h 2009-10-04 08:37:48.000000000 +0200 +@@ -142,8 +142,6 @@ + u_int ipaddrtonetmask(u_int); + u_int getnetnumber(u_int); + +-void bpf_dump(struct bpf_program *, int); +- + char *intoa(u_int); + static SIGRET nohostname(int); + char * getname(u_char *); +@@ -225,8 +223,6 @@ + extern u_int ipaddrtonetmask(u_int); + extern u_int getnetnumber(u_int); + +-extern void bpf_dump(struct bpf_program *, int); +- + extern char *intoa(u_int); + extern char * getname(u_char *); + +diff -ur argus-2.0.6.fixes.1/server/ArgusSource.h argus-2.0.6.fixes.1-libpcap10/server/ArgusSource.h +--- argus-2.0.6.fixes.1/server/ArgusSource.h 2004-02-23 16:00:36.000000000 +0100 ++++ argus-2.0.6.fixes.1-libpcap10/server/ArgusSource.h 2009-10-04 08:57:29.000000000 +0200 +@@ -324,8 +324,6 @@ + + int ArgusCreatePktFromFddi(const struct fddi_header *, struct ether_header *, int); + +-extern char *bpf_image(struct bpf_insn *, int); +- + + #else /* defined(ArgusSource) */ + diff --git a/argus.spec b/argus.spec index bf3fc6f..e2bbd07 100644 --- a/argus.spec +++ b/argus.spec @@ -1,6 +1,6 @@ Name: argus Version: 2.0.6.fixes.1 -Release: 17%{?dist} +Release: 19%{?dist} Summary: Network transaction audit tool License: GPLv2+ Group: Applications/Internet @@ -11,9 +11,12 @@ Source2: argus.init Source3: README.fedora Patch0: argus-2.0.6.fixes.1-makefile.patch Patch1: argus-2.0.6.fixes.1-build.patch -Patch2: argus-clients-2.0.6.fixes.1-makefile.patch -Patch3: argus-clients-2.0.6.fixes.1-build.patch -Patch4: argus-clients-2.0.6.fixes.1-print.patch +# bpf_dump conflicts with a function with slightly different prototype (added +# const) in libpcap 1.0 +Patch2: argus-2.0.6.fixes.1-libpcap10.patch +Patch3: argus-clients-2.0.6.fixes.1-makefile.patch +Patch4: argus-clients-2.0.6.fixes.1-build.patch +Patch5: argus-clients-2.0.6.fixes.1-print.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires(post): /sbin/chkconfig Requires(preun): /sbin/chkconfig @@ -38,10 +41,11 @@ Clients to the argus probe which process and display information. %setup -a1 %patch0 -p1 %patch1 -p1 -pushd %{name}-clients-%{version} %patch2 -p1 +pushd %{name}-clients-%{version} %patch3 -p1 %patch4 -p1 +%patch5 -p1 popd %{__install} -p -m 0644 %{SOURCE3} . @@ -123,6 +127,13 @@ fi %{_mandir}/man5/ra* %changelog +* Sun Oct 04 2009 Kevin Kofler - 2.0.6.fixes.1-19 +- Fix build with libpcap 1.0 (rename conflicting bpf_dump symbol, remove + conflicting redeclaration of bpf_image) + +* Wed Sep 30 2009 Gabriel Somlo - 2.0.6.fixes.1-18 +- Rebuilt for libpcap.1.0 + * Fri Jul 24 2009 Fedora Release Engineering - 2.0.6.fixes.1-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild