rpms/argus/devel argus-2.0.6.fixes.1-libpcap10.patch, NONE, 1.1 argus.spec, 1.13, 1.14

Kevin Kofler kkofler at fedoraproject.org
Sun Oct 4 06:45:16 UTC 2009


Author: kkofler

Update of /cvs/pkgs/rpms/argus/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25741/devel

Modified Files:
	argus.spec 
Added Files:
	argus-2.0.6.fixes.1-libpcap10.patch 
Log Message:
Don't try sedding argus_parse.c which is already removed by a previous patch.
Use patch instead of sed to stop exporting the conflicting function entirely (as argus_parse.c was the only user outside of argus_filter.c itself).

argus-2.0.6.fixes.1-libpcap10.patch:
 common/argus_filter.c  |   14 +++++++-------
 include/argus_filter.h |    4 ----
 2 files changed, 7 insertions(+), 11 deletions(-)

--- NEW FILE argus-2.0.6.fixes.1-libpcap10.patch ---
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 <stdio.h>
 
-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 *);
 


Index: argus.spec
===================================================================
RCS file: /cvs/pkgs/rpms/argus/devel/argus.spec,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -p -r1.13 -r1.14
--- argus.spec	4 Oct 2009 06:22:55 -0000	1.13
+++ argus.spec	4 Oct 2009 06:45:16 -0000	1.14
@@ -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,13 +41,11 @@ Clients to the argus probe which process
 %setup -a1
 %patch0 -p1
 %patch1 -p1
-# bpf_dump conflicts with a function with slightly different prototype (added
-# const) in libpcap 1.0
-sed -i -e s/bpf_dump/internal_bpf_dump/g include/argus_filter.h common/argus_{filter,parse}.c
-pushd %{name}-clients-%{version}
 %patch2 -p1
+pushd %{name}-clients-%{version}
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 popd
 %{__install} -p -m 0644 %{SOURCE3} .
 




More information about the fedora-extras-commits mailing list