From 00cf349b94998f0416e1abae90cfd448ee82f253 Mon Sep 17 00:00:00 2001 From: hm-gh0st Date: Wed, 10 Oct 2018 22:52:28 -0500 Subject: [PATCH] New package: yersinia-0.8.2 --- srcpkgs/yersinia/patches/fix_crossbuild.patch | 176 ++++++++++++++++++ srcpkgs/yersinia/template | 18 ++ 2 files changed, 194 insertions(+) create mode 100644 srcpkgs/yersinia/patches/fix_crossbuild.patch create mode 100644 srcpkgs/yersinia/template diff --git a/srcpkgs/yersinia/patches/fix_crossbuild.patch b/srcpkgs/yersinia/patches/fix_crossbuild.patch new file mode 100644 index 00000000000..e7705d01527 --- /dev/null +++ b/srcpkgs/yersinia/patches/fix_crossbuild.patch @@ -0,0 +1,176 @@ +--- configure.orig ++++ configure +@@ -4843,59 +4843,6 @@ + + disable_bpf=no + have_bpf=no +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BPF device sending support" >&5 +-$as_echo_n "checking for BPF device sending support... " >&6; } +-if test "$cross_compiling" = yes; then : +- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-as_fn_error $? "cannot run test program while cross compiling +-See \`config.log' for more details" "$LINENO" 5; } +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-#include +-#include +-#include +-#include +- +-int +-main(int argc, char *argv[]) { +- int fd; +- +- fd = open("/dev/bpf0", O_RDONLY, 0); +- +- /* if we opened it, we're good */ +- if (fd > 1) +- exit(0); +- +- /* if we got EBUSY or permission denied it exists, so we're good */ +- if (fd < 0 && (errno == EBUSY || errno == 13)) +- exit(0); +- +- /* else suck, no good */ +- exit(-1); +-} +-_ACEOF +-if ac_fn_c_try_run "$LINENO"; then : +- +- if test $disable_bpf = no ; then +- +-$as_echo "#define HAVE_BPF 1" >>confdefs.h +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } +- have_bpf=yes +- else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +- fi +- +-fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ +- conftest.$ac_objext conftest.beam conftest.$ac_ext +-fi +- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a complete set of libnet headers" >&5 + $as_echo_n "checking for a complete set of libnet headers... " >&6; } +@@ -4947,11 +4894,6 @@ + LIBNET_INCLUDE="-I$libnet_dir" + LIBNET_LINK="-L`dirname $libnet_dir`/lib" + LIBNET_CONFIG="$libnet_config_dir/libnet-config" +- +- +- +- +- + fi + + if test "$LIBNET_LINK" != "-L/usr/lib" ; then +@@ -4961,99 +4903,7 @@ + CFLAGS="$CFLAGS $LIBNET_INCLUDE" + fi + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnet_build_stp_conf in -lnet" >&5 +-$as_echo_n "checking for libnet_build_stp_conf in -lnet... " >&6; } +-if ${ac_cv_lib_net_libnet_build_stp_conf+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lnet $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char libnet_build_stp_conf (); +-int +-main () +-{ +-return libnet_build_stp_conf (); +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_net_libnet_build_stp_conf=yes +-else +- ac_cv_lib_net_libnet_build_stp_conf=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_libnet_build_stp_conf" >&5 +-$as_echo "$ac_cv_lib_net_libnet_build_stp_conf" >&6; } +-if test "x$ac_cv_lib_net_libnet_build_stp_conf" = xyes; then : +- have_libnet=yes +-else +- have_libnet=no +-fi +- +-if test $have_libnet = no; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ouch!! Libnet library 1.1.2 is needed in order to compile Yersinia!!..." >&5 +-$as_echo "$as_me: WARNING: Ouch!! Libnet library 1.1.2 is needed in order to compile Yersinia!!..." >&2;} +- as_fn_error $? "...i'm sure you'll take the right decision." "$LINENO" 5 +-fi +- +- +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libnet is at least version 1.1.2" >&5 +-$as_echo_n "checking if libnet is at least version 1.1.2... " >&6; } +-if test "$cross_compiling" = yes; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; }; have_libnet=no +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-#include +-#include +-#define HOPE_MAJOR 1 +-#define HOPE_MEDIUM 1 +-#define HOPE_MINOR 2 +-int main() +-{ +- unsigned int major,medium,minor,current, desired; +- desired = HOPE_MAJOR*10000 + HOPE_MEDIUM*100 + HOPE_MINOR; +- sscanf( LIBNET_VERSION, "%d.%d.%d", &major, &medium, &minor); +- current = major*10000 + medium*100 + minor; +- if ( current >= desired ) +- exit(0); +- exit(1); +-} +-_ACEOF +-if ac_fn_c_try_run "$LINENO"; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; }; have_libnet=yes +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; }; have_libnet=no +-fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ +- conftest.$ac_objext conftest.beam conftest.$ac_ext +-fi +- +- +-if test $have_libnet = no; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ouch!! At least Libnet library version 1.1.2 is needed in order to compile Yersinia!!..." >&5 +-$as_echo "$as_me: WARNING: Ouch!! At least Libnet library version 1.1.2 is needed in order to compile Yersinia!!..." >&2;} +- as_fn_error $? "...i'm sure you'll take the right decision." "$LINENO" 5 +-fi +- +- ++have_libnet=yes + + for ac_header in sys/sockio.h sys/ioctl.h net/if.h + do : + diff --git a/srcpkgs/yersinia/template b/srcpkgs/yersinia/template new file mode 100644 index 00000000000..227c4a5291d --- /dev/null +++ b/srcpkgs/yersinia/template @@ -0,0 +1,18 @@ +# Template file for 'yersinia' +pkgname=yersinia +version=0.8.2 +revision=1 +build_style=gnu-configure +configure_args="--disable-gtk" +hostmakedepends="pkg-config automake" +makedepends="libpcap-devel libnet-devel ncurses-devel gettext-devel" +short_desc="Framework for layer 2 security testing" +maintainer="Alex Childs " +license="GPL-2.0-or-later" +homepage="https://github.com/tomac/yersinia" +distfiles="${homepage}/archive/v${version}.tar.gz" +checksum=964f528dbffd904376ab7986e69b1e8639591c929e2f39186ac9ebf2d3bc761f + +if [ -n "$CROSS_BUILD" ]; then + hostmakedepends+=" ${makedepends}" +fi