diff options
-rw-r--r-- | recipes-security/isic/files/configure_fix.patch | 170 | ||||
-rw-r--r-- | recipes-security/isic/files/isic-0.07-make.patch | 23 | ||||
-rw-r--r-- | recipes-security/isic/files/isic-0.07-netinet.patch | 68 | ||||
-rw-r--r-- | recipes-security/isic/isic_0.07.bb | 30 |
4 files changed, 291 insertions, 0 deletions
diff --git a/recipes-security/isic/files/configure_fix.patch b/recipes-security/isic/files/configure_fix.patch new file mode 100644 index 0000000..fc2a774 --- /dev/null +++ b/recipes-security/isic/files/configure_fix.patch | |||
@@ -0,0 +1,170 @@ | |||
1 | isic: add with-libnet remove libnet test | ||
2 | |||
3 | Inappropriate - builds fine on non-oe systems. We need to exlude | ||
4 | cross compile libnet test. Pass in the location for libnet.a. Path | ||
5 | did not support mulitlib either. | ||
6 | |||
7 | Signed-off-by: Armin Kuster <akuster808@gmail.com> | ||
8 | |||
9 | Index: isic-0.07/configure | ||
10 | =================================================================== | ||
11 | --- isic-0.07.orig/configure | ||
12 | +++ isic-0.07/configure | ||
13 | @@ -45,6 +45,8 @@ includedir='${prefix}/include' | ||
14 | oldincludedir='/usr/include' | ||
15 | infodir='${prefix}/info' | ||
16 | mandir='${prefix}/man' | ||
17 | +with_libnet_libraries | ||
18 | +libnet_libraries | ||
19 | |||
20 | # Initialize some other variables. | ||
21 | subdirs= | ||
22 | @@ -180,6 +182,7 @@ Features and packages: | ||
23 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | ||
24 | --x-includes=DIR X include files are in DIR | ||
25 | --x-libraries=DIR X library files are in DIR | ||
26 | + --with-libnet-dir=DIR libnet library is in this DIR | ||
27 | EOF | ||
28 | if test -n "$ac_help"; then | ||
29 | echo "--enable and --with options recognized:$ac_help" | ||
30 | @@ -828,117 +832,36 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCR | ||
31 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | ||
32 | |||
33 | |||
34 | -PREFIX=/usr/local | ||
35 | - | ||
36 | -ac_safe=`echo "$PREFIX/lib/libnet.a" | sed 'y%./+-%__p_%'` | ||
37 | -echo $ac_n "checking for $PREFIX/lib/libnet.a""... $ac_c" 1>&6 | ||
38 | -echo "configure:836: checking for $PREFIX/lib/libnet.a" >&5 | ||
39 | -if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then | ||
40 | - echo $ac_n "(cached) $ac_c" 1>&6 | ||
41 | -else | ||
42 | - if test "$cross_compiling" = yes; then | ||
43 | - { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; } | ||
44 | -else | ||
45 | - if test -r $PREFIX/lib/libnet.a; then | ||
46 | - eval "ac_cv_file_$ac_safe=yes" | ||
47 | - else | ||
48 | - eval "ac_cv_file_$ac_safe=no" | ||
49 | - fi | ||
50 | -fi | ||
51 | -fi | ||
52 | -if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then | ||
53 | - echo "$ac_t""yes" 1>&6 | ||
54 | - FOO=$LIBS; CFLAGS="$CFLAGS -I$PREFIX/include" LIBS="-L$PREFIX/lib $LIBS" | ||
55 | -else | ||
56 | - echo "$ac_t""no" 1>&6 | ||
57 | - | ||
58 | -fi | ||
59 | - | ||
60 | -echo $ac_n "checking for -lnet""... $ac_c" 1>&6 | ||
61 | -echo "configure:884: checking for -lnet" >&5 | ||
62 | -if eval "test \"`echo '$''{'ac_cv_lib_net'+set}'`\" = set"; then | ||
63 | - echo $ac_n "(cached) $ac_c" 1>&6 | ||
64 | -else | ||
65 | - ac_save_LIBS="$LIBS" | ||
66 | -LIBS="-lnet $LIBS" | ||
67 | -cat > conftest.$ac_ext <<EOF | ||
68 | -#line 891 "configure" | ||
69 | -#include "confdefs.h" | ||
70 | - | ||
71 | -int main() { | ||
72 | -main() | ||
73 | -; return 0; } | ||
74 | -EOF | ||
75 | -if { (eval echo configure:898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | ||
76 | - rm -rf conftest* | ||
77 | - ac_cv_lib_net=yes | ||
78 | -else | ||
79 | - echo "configure: failed program was:" >&5 | ||
80 | - cat conftest.$ac_ext >&5 | ||
81 | - rm -rf conftest* | ||
82 | - ac_cv_lib_net=no | ||
83 | +LIBNET_GLOB='libnet.a' | ||
84 | +libnet_libraries="" | ||
85 | +ac_libnet_libraries=NO | ||
86 | + | ||
87 | +# Check whether --with-libnet-libraries was given. | ||
88 | +if test "${with_libnet_libraries+set}" = set; then : | ||
89 | + withval=$with_libnet_libraries; ac_libnet_libraries="$withval" | ||
90 | +fi | ||
91 | + | ||
92 | +if test ! "$ac_libnet_libraries" = "NO"; then | ||
93 | + libnet_libdir=$ac_libnet_libraries | ||
94 | +else | ||
95 | + libnet_libdirs="/usr/lib" | ||
96 | + libnet_libdir=NONE | ||
97 | + for dir in $libnet_libdirs; do | ||
98 | + try="ls -1 $dir/${LIBNET_GLOB}" | ||
99 | + if test -n "`$try 2> /dev/null`"; then libnet_libdir=$dir; break; else echo "tried $dir" >&5; fi | ||
100 | + done | ||
101 | fi | ||
102 | -rm -f conftest* | ||
103 | -LIBS="$ac_save_LIBS" | ||
104 | |||
105 | -fi | ||
106 | -echo "$ac_t""$ac_cv_lib_net" 1>&6 | ||
107 | -if test "$ac_cv_lib_net" = yes; then | ||
108 | - DEFINES= | ||
109 | -else | ||
110 | - { echo "configure: error: Cannot find libnet... please get it from | ||
111 | - http://www.packetfactory.net/libnet" 1>&2; exit 1; } | ||
112 | -fi | ||
113 | +ac_libnet_libdir="$libnet_libdir" | ||
114 | |||
115 | -echo $ac_n "checking for libnet_init in -lnet""... $ac_c" 1>&6 | ||
116 | -echo "configure:921: checking for libnet_init in -lnet" >&5 | ||
117 | -ac_lib_var=`echo net'_'libnet_init | sed 'y%./+-%__p_%'` | ||
118 | -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | ||
119 | - echo $ac_n "(cached) $ac_c" 1>&6 | ||
120 | -else | ||
121 | - ac_save_LIBS="$LIBS" | ||
122 | -LIBS="-lnet $LIBS" | ||
123 | -cat > conftest.$ac_ext <<EOF | ||
124 | -#line 929 "configure" | ||
125 | -#include "confdefs.h" | ||
126 | -/* Override any gcc2 internal prototype to avoid an error. */ | ||
127 | -/* We use char because int might match the return type of a gcc2 | ||
128 | - builtin and then its argument prototype would still apply. */ | ||
129 | -char libnet_init(); | ||
130 | - | ||
131 | -int main() { | ||
132 | -libnet_init() | ||
133 | -; return 0; } | ||
134 | -EOF | ||
135 | -if { (eval echo configure:940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | ||
136 | - rm -rf conftest* | ||
137 | - eval "ac_cv_lib_$ac_lib_var=yes" | ||
138 | -else | ||
139 | - echo "configure: failed program was:" >&5 | ||
140 | - cat conftest.$ac_ext >&5 | ||
141 | - rm -rf conftest* | ||
142 | - eval "ac_cv_lib_$ac_lib_var=no" | ||
143 | +if test "$libnet_libraries"; then | ||
144 | + libnet_libraries="$ac_libnet_libdir" | ||
145 | fi | ||
146 | -rm -f conftest* | ||
147 | -LIBS="$ac_save_LIBS" | ||
148 | - | ||
149 | -fi | ||
150 | -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | ||
151 | - echo "$ac_t""yes" 1>&6 | ||
152 | - ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | ||
153 | - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | ||
154 | - cat >> confdefs.h <<EOF | ||
155 | -#define $ac_tr_lib 1 | ||
156 | -EOF | ||
157 | |||
158 | - LIBS="-lnet $LIBS" | ||
159 | - | ||
160 | -else | ||
161 | - echo "$ac_t""no" 1>&6 | ||
162 | +if test "$libnet_libraries" != "$x_libraries" && test -n "$libnet_libraries"; then | ||
163 | + LIBS="$LIBS -lnet" | ||
164 | fi | ||
165 | |||
166 | - | ||
167 | - | ||
168 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 | ||
169 | echo "configure:970: checking how to run the C preprocessor" >&5 | ||
170 | # On Suns, sometimes $CPP names a directory. | ||
diff --git a/recipes-security/isic/files/isic-0.07-make.patch b/recipes-security/isic/files/isic-0.07-make.patch new file mode 100644 index 0000000..9cffa8a --- /dev/null +++ b/recipes-security/isic/files/isic-0.07-make.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | isic: Fixup makefile to support destination | ||
2 | |||
3 | Backport: | ||
4 | http://pkgs.fedoraproject.org/cgit/isic.git/tree/isic-0.07-make.patch | ||
5 | |||
6 | Signed-off-by: Armin Kuster <akuser808@gmail.com> | ||
7 | |||
8 | Index: isic-0.07/Makefile.in | ||
9 | =================================================================== | ||
10 | --- isic-0.07.orig/Makefile.in | ||
11 | +++ isic-0.07/Makefile.in | ||
12 | @@ -63,7 +63,7 @@ package: distclean | ||
13 | tar -czvf isic-$(VERSION).tgz ./isic-$(VERSION)/* ) | ||
14 | |||
15 | install: $(BINS) $(MAN) | ||
16 | - $(INSTALL) -m 0755 -d $(PREFIX)/bin | ||
17 | - $(INSTALL) -m 0755 -c $(BINS) $(PREFIX)/bin | ||
18 | - $(INSTALL) -m 0755 -d $(PREFIX)/man/man1 | ||
19 | - ${INSTALL} -m 0755 -c $(MAN) $(PREFIX)/man/man1 | ||
20 | + $(INSTALL) -m 0755 -d $(DESTDIR)$(PREFIX)/bin | ||
21 | + $(INSTALL) -m 0755 -c $(BINS) $(DESTDIR)$(PREFIX)/bin | ||
22 | + $(INSTALL) -m 0755 -d $(DESTDIR)$(PREFIX)/share/man/man1 | ||
23 | + ${INSTALL} -m 0755 -c $(MAN) $(DESTDIR)$(PREFIX)/share/man/man1 | ||
diff --git a/recipes-security/isic/files/isic-0.07-netinet.patch b/recipes-security/isic/files/isic-0.07-netinet.patch new file mode 100644 index 0000000..c4ea74e --- /dev/null +++ b/recipes-security/isic/files/isic-0.07-netinet.patch | |||
@@ -0,0 +1,68 @@ | |||
1 | isic: add missing header file | ||
2 | |||
3 | Backport: | ||
4 | http://pkgs.fedoraproject.org/cgit/isic.git/tree/isic-0.07-netinet.patch | ||
5 | |||
6 | Signed-off-by: Armin Kuster <akuster808@gmail.com> | ||
7 | |||
8 | Index: isic-0.07/multisic.c | ||
9 | =================================================================== | ||
10 | --- isic-0.07.orig/multisic.c | ||
11 | +++ isic-0.07/multisic.c | ||
12 | @@ -1,5 +1,8 @@ | ||
13 | #include "isic.h" | ||
14 | |||
15 | +#include <netinet/udp.h> | ||
16 | +/*#include <netinet/tcp.h>*/ | ||
17 | + | ||
18 | /* This is tuned for ethernet sized frames (1500 bytes) | ||
19 | * For user over a modem or frame (or other) you will have to change the | ||
20 | * 'rand() & 0x4ff' line below. The 0x4ff needs to be less than the size of | ||
21 | Index: isic-0.07/tcpsic.c | ||
22 | =================================================================== | ||
23 | --- isic-0.07.orig/tcpsic.c | ||
24 | +++ isic-0.07/tcpsic.c | ||
25 | @@ -1,5 +1,7 @@ | ||
26 | #include "isic.h" | ||
27 | |||
28 | +#include <netinet/tcp.h> | ||
29 | + | ||
30 | /* This is tuned for ethernet sized frames (1500 bytes) | ||
31 | * For user over a modem or frame (or other) you will have to change the | ||
32 | * 'rand() & 0x4ff' line below. The 0x4ff needs to be less than the size of | ||
33 | Index: isic-0.07/tcpsic6.c | ||
34 | =================================================================== | ||
35 | --- isic-0.07.orig/tcpsic6.c | ||
36 | +++ isic-0.07/tcpsic6.c | ||
37 | @@ -1,5 +1,7 @@ | ||
38 | #include "isic.h" | ||
39 | |||
40 | +#include <netinet/tcp.h> | ||
41 | + | ||
42 | /* This is tuned for ethernet sized frames (1500 bytes) | ||
43 | * For user over a modem or frame (or other) you will have to change the | ||
44 | * 'rand() & 0x4ff' line below. The 0x4ff needs to be less than the size of | ||
45 | Index: isic-0.07/udpsic.c | ||
46 | =================================================================== | ||
47 | --- isic-0.07.orig/udpsic.c | ||
48 | +++ isic-0.07/udpsic.c | ||
49 | @@ -1,5 +1,7 @@ | ||
50 | #include "isic.h" | ||
51 | |||
52 | +#include <netinet/udp.h> | ||
53 | + | ||
54 | /* This is tuned for ethernet sized frames (1500 bytes) | ||
55 | * For user over a modem or frame (or other) you will have to change the | ||
56 | * 'rand() & 0x4ff' line below. The 0x4ff needs to be less than the size of | ||
57 | Index: isic-0.07/udpsic6.c | ||
58 | =================================================================== | ||
59 | --- isic-0.07.orig/udpsic6.c | ||
60 | +++ isic-0.07/udpsic6.c | ||
61 | @@ -1,5 +1,7 @@ | ||
62 | #include "isic.h" | ||
63 | |||
64 | +#include <netinet/udp.h> | ||
65 | + | ||
66 | /* This is tuned for ethernet sized frames (1500 bytes) | ||
67 | * For user over a modem or frame (or other) you will have to change the | ||
68 | * 'rand() & 0x4ff' line below. The 0x4ff needs to be less than the size of | ||
diff --git a/recipes-security/isic/isic_0.07.bb b/recipes-security/isic/isic_0.07.bb new file mode 100644 index 0000000..fb6e904 --- /dev/null +++ b/recipes-security/isic/isic_0.07.bb | |||
@@ -0,0 +1,30 @@ | |||
1 | SUMMARY = "ISIC -- IP Stack Integrity Checker" | ||
2 | DESCRIPTION = "ISIC is a suite of utilities to exercise the stability of an IP Stack and its component stacks (TCP, UDP, ICMP et. al.)" | ||
3 | HOMEPAGE = "http://isic.sourceforge.net/" | ||
4 | SECTION = "security" | ||
5 | LICENSE = "BSD" | ||
6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=d41d8cd98f00b204e9800998ecf8427e" | ||
7 | |||
8 | DEPENDS = "libnet" | ||
9 | PARALLEL_MAKE = "" | ||
10 | |||
11 | SRC_URI = "http://prdownloads.sourceforge.net/isic/${BPN}-${PV}.tgz \ | ||
12 | file://configure_fix.patch \ | ||
13 | file://isic-0.07-netinet.patch \ | ||
14 | file://isic-0.07-make.patch \ | ||
15 | " | ||
16 | |||
17 | SRC_URI[md5sum] = "29f70c9bde9aa9128b8f7e66a315f9a4" | ||
18 | SRC_URI[sha256sum] = "e033c53e03e26a4c72b723e2a5a1c433ee70eb4d23a1ba0d7d7e14ee1a80429d" | ||
19 | |||
20 | S="${WORKDIR}/${BPN}-${PV}" | ||
21 | |||
22 | inherit autotools-brokensep | ||
23 | |||
24 | EXTRA_OECONF += "--with-libnet-dir=${STAGING_DIR_HOST}${libdir} " | ||
25 | |||
26 | do_configure () { | ||
27 | oe_runconf | ||
28 | } | ||
29 | |||
30 | RDEPNEDS += "libnet" | ||