Gentoo Archives: gentoo-commits

From: "Marcelo Goes (vanquirius)" <vanquirius@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-analyzer/snort/files: snort-2.8.3.1-libnet.patch
Date: Sun, 23 Nov 2008 15:29:40
Message-Id: E1L4Gu2-0007n9-8q@stork.gentoo.org
1 vanquirius 08/11/23 15:29:38
2
3 Added: snort-2.8.3.1-libnet.patch
4 Log:
5 2.8.3.1 version bump with many changes for bug 245752. Thanks to Jason
6 Wallace <jason.r.wallace at gmail dot com> and Antixrict <antixrict at
7 inbox.lv> for the rewrite. Currently in package.mask for testing.
8 (Portage version: 2.1.4.5)
9
10 Revision Changes Path
11 1.1 net-analyzer/snort/files/snort-2.8.3.1-libnet.patch
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/snort/files/snort-2.8.3.1-libnet.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/snort/files/snort-2.8.3.1-libnet.patch?rev=1.1&content-type=text/plain
15
16 Index: snort-2.8.3.1-libnet.patch
17 ===================================================================
18 diff -ru snort-2.8.3.1/configure.in snort-2.8.3.1_gentoo/configure.in
19 --- snort-2.8.3.1/configure.in 2008-09-15 10:45:24.000000000 -0400
20 +++ snort-2.8.3.1_gentoo/configure.in 2008-11-03 16:34:41.000000000 -0500
21 @@ -1151,19 +1151,19 @@
22 else
23 libnet_dir="/usr/include /usr/local/include /sw/include"
24 fi
25 - AC_MSG_CHECKING("for libnet.h version 1.0.x")
26 + AC_MSG_CHECKING("for libnet-1.0.h version 1.0.x")
27 for i in $libnet_dir; do
28 - if test -r "$i/libnet.h"; then
29 + if test -r "$i/libnet-1.0.h"; then
30 LIBNET_INC_DIR="$i"
31 fi
32 done
33
34 if test "$LIBNET_INC_DIR" != ""; then
35 - if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet.h | grep -v 1.0 >/dev/null"; then
36 - FAIL_MESSAGE("libnet 1.0.x (libnet.h)", $LIBNET_INC_DIR)
37 + if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet-1.0.h | grep -v 1.0 >/dev/null"; then
38 + FAIL_MESSAGE("libnet 1.0.x (libnet-1.0.h)", $LIBNET_INC_DIR)
39 fi
40 - CFLAGS="${CFLAGS} `libnet-config --defines` `libnet-config --cflags`"
41 - LIBS="${LIBS} `libnet-config --libs`"
42 + CFLAGS="${CFLAGS} `libnet-1.0-config --defines` `libnet-1.0-config --cflags`"
43 + LIBS="${LIBS} `libnet-1.0-config --libs`"
44 CPPFLAGS="${CPPFLAGS} -I${LIBNET_INC_DIR}"
45 AC_MSG_RESULT($i)
46 else
47 @@ -1185,8 +1185,8 @@
48 [ --enable-flexresp Flexible Responses on hostile connection attempts],
49 enable_flexresp="$enableval", enable_flexresp="no")
50 if test "x$enable_flexresp" = "xyes"; then
51 - CPPFLAGS="${CPPFLAGS} -DENABLE_RESPONSE `libnet-config --defines --cflags`"
52 - LDFLAGS="${LDFLAGS} `libnet-config --libs`"
53 + CPPFLAGS="${CPPFLAGS} -DENABLE_RESPONSE `libnet-1.0-config --defines --cflags`"
54 + LDFLAGS="${LDFLAGS} `libnet-1.0-config --libs`"
55 fi
56
57 if test "x$enable_flexresp" != "xno" -a "x$enable_flexresp" = "xyes"; then
58 @@ -1196,21 +1196,21 @@
59 exit
60 fi
61
62 - if test `libnet-config --cflags | wc -c` = "1"; then
63 + if test `libnet-1.0-config --cflags | wc -c` = "1"; then
64 CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/sw/include"
65 LIBNET_CONFIG_BROKEN_CFLAGS="yes"
66 fi
67
68 - if test `libnet-config --libs | wc -c` = "1"; then
69 - AC_MSG_WARN(libnet-config --libs is broken on your system. If you)
70 + if test `libnet-1.0-config --libs | wc -c` = "1"; then
71 + AC_MSG_WARN(libnet-1.0-config --libs is broken on your system. If you)
72 AC_MSG_WARN(are using a precompiled package please notify the)
73 AC_MSG_WARN(maintainer.)
74 LDFLAGS="${LDFLAGS} -L/usr/local/lib -L/sw/lib"
75 - LIBS="${LIBS} -lnet"
76 + LIBS="${LIBS} -lnet-1.0"
77 fi
78
79 LNET=""
80 - AC_CHECK_HEADERS(libnet.h,, LNET="no")
81 + AC_CHECK_HEADERS(libnet-1.0.h,, LNET="no")
82 if test "x$LNET" = "xno"; then
83 echo
84 echo " ERROR! Libnet header not found, go get it from"
85 @@ -1228,33 +1228,33 @@
86 libnet_dir="/usr/include /usr/local/include /sw/include"
87 fi
88 else
89 - libnet_dir=`libnet-config --cflags | cut -dI -f2`
90 + libnet_dir=`libnet-1.0-config --cflags | cut -dI -f2`
91 fi
92
93 LIBNET_INC_DIR=""
94 for i in $libnet_dir; do
95 - if test -r "$i/libnet.h"; then
96 + if test -r "$i/libnet-1.0.h"; then
97 LIBNET_INC_DIR="$i"
98 fi
99 done
100
101 if test "x$LIBNET_INC_DIR" != "x"; then
102 - if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet.h | grep -v 1.0.2a >/dev/null"; then
103 + if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet-1.0.h | grep -v 1.0.2a >/dev/null"; then
104 AC_MSG_RESULT(no)
105 echo
106 echo " ERROR! Snort with --enable-flexresp will *only* work with"
107 echo " libnet version 1.0.2a, go get it from"
108 echo " http://www.packetfactory.net/projects/libnet/"
109 - FAIL_MESSAGE("libnet 1.0.2a (libnet.h)", $LIBNET_INC_DIR)
110 + FAIL_MESSAGE("libnet 1.0.2a (libnet-1.0.h)", $LIBNET_INC_DIR)
111 fi
112 AC_MSG_RESULT(yes)
113 else
114 AC_MSG_RESULT(no)
115 - FAIL_MESSAGE("libnet 1.0.2a (libnet.h)", $libnet_dir)
116 + FAIL_MESSAGE("libnet 1.0.2a (libnet-1.0.h)", $libnet_dir)
117 fi
118
119 LNET=""
120 - AC_CHECK_LIB(net, libnet_build_ip,, LNET="no")
121 + AC_CHECK_LIB(net-1.0, libnet_build_ip,, LNET="no")
122 if test "x$LNET" = "xno"; then
123 echo
124 echo " ERROR! Libnet library not found, go get it from"
125 @@ -1305,8 +1305,8 @@
126 [ --enable-react Intercept and terminate offending HTTP accesses],
127 enable_react="$enableval", enable_react="no")
128 if test "x$enable_react" = "xyes"; then
129 - CPPFLAGS="${CPPFLAGS} -DENABLE_REACT `libnet-config --defines --cflags`"
130 - LDFLAGS="${LDFLAGS} `libnet-config --libs`"
131 + CPPFLAGS="${CPPFLAGS} -DENABLE_REACT `libnet-1.0-config --defines --cflags`"
132 + LDFLAGS="${LDFLAGS} `libnet-1.0-config --libs`"
133 fi
134
135 if test "x$enable_react" != "xno" -a "x$enable_react" = "xyes"; then
136 @@ -1317,13 +1317,13 @@
137 exit
138 fi
139
140 - if test `libnet-config --cflags | wc -c` = "1"; then
141 + if test `libnet-1.0-config --cflags | wc -c` = "1"; then
142 CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/sw/include"
143 LIBNET_CONFIG_BROKEN_CFLAGS="yes"
144 fi
145
146 - if test `libnet-config --libs | wc -c` = "1"; then
147 - AC_MSG_WARN(libnet-config --libs is broken on your system. If you)
148 + if test `libnet-1.0-config --libs | wc -c` = "1"; then
149 + AC_MSG_WARN(libnet-1.0-config --libs is broken on your system. If you)
150 AC_MSG_WARN(are using a precompiled package please notify the)
151 AC_MSG_WARN(maintainer.)
152 LDFLAGS="${LDFLAGS} -L/usr/local/lib -L/sw/lib"
153 @@ -1331,7 +1331,7 @@
154 fi
155
156 LNET=""
157 - AC_CHECK_HEADERS(libnet.h,, LNET="no")
158 + AC_CHECK_HEADERS(libnet-1.0.h,, LNET="no")
159 if test "x$LNET" = "xno"; then
160 echo
161 echo " ERROR! Libnet header not found, go get it from"
162 @@ -1349,33 +1349,33 @@
163 libnet_dir="/usr/include /usr/local/include /sw/include"
164 fi
165 else
166 - libnet_dir=`libnet-config --cflags | cut -dI -f2`
167 + libnet_dir=`libnet-1.0-config --cflags | cut -dI -f2`
168 fi
169
170 LIBNET_INC_DIR=""
171 for i in $libnet_dir; do
172 - if test -r "$i/libnet.h"; then
173 + if test -r "$i/libnet-1.0.h"; then
174 LIBNET_INC_DIR="$i"
175 fi
176 done
177
178 if test "x$LIBNET_INC_DIR" != "x"; then
179 - if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet.h | grep -v 1.0.2a >/dev/null"; then
180 + if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet-1.0.h | grep -v 1.0.2a >/dev/null"; then
181 AC_MSG_RESULT(no)
182 echo
183 echo " ERROR! Snort with --enable-react will *only* work with"
184 echo " libnet version 1.0.2a, go get it from"
185 echo " http://www.packetfactory.net/projects/libnet/"
186 - FAIL_MESSAGE("libnet 1.0.2a (libnet.h)", $LIBNET_INC_DIR)
187 + FAIL_MESSAGE("libnet 1.0.2a (libnet-1.0.h)", $LIBNET_INC_DIR)
188 fi
189 AC_MSG_RESULT(yes)
190 else
191 AC_MSG_RESULT(no)
192 - FAIL_MESSAGE("libnet 1.0.2a (libnet.h)", $libnet_dir)
193 + FAIL_MESSAGE("libnet 1.0.2a (libnet-1.0.h)", $libnet_dir)
194 fi
195
196 LNET=""
197 - AC_CHECK_LIB(net, libnet_build_ip,, LNET="no")
198 + AC_CHECK_LIB(net-1.0, libnet_build_ip,, LNET="no")
199 if test "x$LNET" = "xno"; then
200 echo
201 echo " ERROR! Libnet library not found, go get it from"
202 diff -ru snort-2.8.3.1/src/detection-plugins/sp_react.c snort-2.8.3.1_gentoo/src/detection-plugins/sp_react.c
203 --- snort-2.8.3.1/src/detection-plugins/sp_react.c 2008-07-11 16:56:00.000000000 -0400
204 +++ snort-2.8.3.1_gentoo/src/detection-plugins/sp_react.c 2008-11-03 16:39:16.000000000 -0500
205 @@ -59,7 +59,7 @@
206 #include <stdlib.h>
207 #include <string.h>
208 #include <ctype.h>
209 -#include <libnet.h>
210 +#include <libnet-1.0.h>
211
212 #include "rules.h"
213 #include "decode.h"
214 diff -ru snort-2.8.3.1/src/detection-plugins/sp_respond.c snort-2.8.3.1_gentoo/src/detection-plugins/sp_respond.c
215 --- snort-2.8.3.1/src/detection-plugins/sp_respond.c 2008-07-11 16:56:00.000000000 -0400
216 +++ snort-2.8.3.1_gentoo/src/detection-plugins/sp_respond.c 2008-11-03 16:38:50.000000000 -0500
217 @@ -36,7 +36,7 @@
218
219
220 #if defined(ENABLE_RESPONSE) && !defined(ENABLE_RESPONSE2)
221 -#include <libnet.h>
222 +#include <libnet-1.0.h>
223
224 #include "decode.h"
225 #include "rules.h"
226 diff -ru snort-2.8.3.1/src/inline.c snort-2.8.3.1_gentoo/src/inline.c
227 --- snort-2.8.3.1/src/inline.c 2008-02-25 16:34:56.000000000 -0500
228 +++ snort-2.8.3.1_gentoo/src/inline.c 2008-11-03 16:39:44.000000000 -0500
229 @@ -20,7 +20,7 @@
230 #include <stdlib.h>
231 #include <string.h>
232 #include <pcap.h>
233 -#include <libnet.h>
234 +#include <libnet-1.0.h>
235
236 #include "decode.h"
237 #include "inline.h"