From: ndowens <ndowens@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] yersinia: simplify cross-build patch
Date: Thu, 31 Dec 2020 01:45:20 +0100 [thread overview]
Message-ID: <20201231004520.8H_1qLyperahcaoM4PoZiRj-uD7jWVeZpBFfPf1iYWQ@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-27568@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 327 bytes --]
There is an updated pull request by ndowens against master on the void-packages repository
https://github.com/ndowens/void-packages yersinia
https://github.com/void-linux/void-packages/pull/27568
yersinia: simplify cross-build patch
A patch file from https://github.com/void-linux/void-packages/pull/27568.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-yersinia-27568.patch --]
[-- Type: text/x-diff, Size: 8604 bytes --]
From 3c90bf2925189ed21905a019753dc1ae627c1027 Mon Sep 17 00:00:00 2001
From: Nathan Owens <ndowens@artixlinux.org>
Date: Wed, 30 Dec 2020 18:32:49 -0600
Subject: [PATCH] yersinia: simplify cross-build patch
---
srcpkgs/yersinia/patches/0001-fix-cross.patch | 53 ++++++
srcpkgs/yersinia/patches/fix_crossbuild.patch | 176 ------------------
srcpkgs/yersinia/template | 7 +-
3 files changed, 56 insertions(+), 180 deletions(-)
create mode 100644 srcpkgs/yersinia/patches/0001-fix-cross.patch
delete mode 100644 srcpkgs/yersinia/patches/fix_crossbuild.patch
diff --git a/srcpkgs/yersinia/patches/0001-fix-cross.patch b/srcpkgs/yersinia/patches/0001-fix-cross.patch
new file mode 100644
index 00000000000..9879a236cda
--- /dev/null
+++ b/srcpkgs/yersinia/patches/0001-fix-cross.patch
@@ -0,0 +1,53 @@
+From 784ccf7e6aebc80263e5a2bfac2427d597867259 Mon Sep 17 00:00:00 2001
+From: Nathan Owens <ndowens@artixlinux.org>
+Date: Wed, 30 Dec 2020 18:30:54 -0600
+Subject: [PATCH] fix cross
+
+Use AC_COMPILE_IFELSE instead of AC_TRY_RUN
+---
+ configure.in | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git configure.in configure.in
+index e796198..892312b 100644
+--- configure.in
++++ configure.in
+@@ -105,7 +105,7 @@ dnl Check for BSD's BPF
+ disable_bpf=no
+ have_bpf=no
+ AC_MSG_CHECKING(for BPF device sending support)
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+ #include <stdio.h>
+ #include <fcntl.h>
+ #include <stdlib.h>
+@@ -127,7 +127,7 @@ main(int argc, char *argv[]) {
+
+ /* else suck, no good */
+ exit(-1);
+-}],
++}])],
+ [
+ if test $disable_bpf = no ; then
+ AC_DEFINE([HAVE_BPF], [1],
+@@ -217,7 +217,7 @@ dnl AC_MSG_ERROR(...i'm sure you'll take the right decision.)
+ dnl fi
+
+ AC_MSG_CHECKING(if libnet is at least version 1.1.2)
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
+ #include<stdio.h>
+ #include<libnet.h>
+ #define HOPE_MAJOR 1
+@@ -403,7 +403,7 @@ AC_CHECK_FUNCS(strerror_r, have_strerror_r=yes,have_strerror_r=no)
+
+ if test $have_strerror_r = yes; then
+ AC_MSG_CHECKING(if strerror_r is on glibc version >= 2.0)
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
+ #include <stdio.h>
+ #include <features.h>
+ int main()
+--
+2.30.0
+
diff --git a/srcpkgs/yersinia/patches/fix_crossbuild.patch b/srcpkgs/yersinia/patches/fix_crossbuild.patch
deleted file mode 100644
index e7705d01527..00000000000
--- a/srcpkgs/yersinia/patches/fix_crossbuild.patch
+++ /dev/null
@@ -1,176 +0,0 @@
---- 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 <stdio.h>
--#include <fcntl.h>
--#include <stdlib.h>
--#include <errno.h>
--
--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<stdio.h>
--#include<libnet.h>
--#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
index f9d57cfe9ff..16f9f05680d 100644
--- a/srcpkgs/yersinia/template
+++ b/srcpkgs/yersinia/template
@@ -4,7 +4,7 @@ version=0.8.2
revision=2
build_style=gnu-configure
configure_args="--disable-gtk"
-hostmakedepends="pkg-config automake"
+hostmakedepends="automake libtool gettext pkg-config"
makedepends="libpcap-devel libnet-devel ncurses-devel gettext-devel"
short_desc="Framework for layer 2 security testing"
maintainer="Alex Childs <misuchiru03+void@gmail.com>"
@@ -17,7 +17,6 @@ if [ -n "$CROSS_BUILD" ]; then
hostmakedepends+=" ${makedepends}"
fi
-post_configure() {
- # configure doesn't honor env CFLAGS
- vsed -i src/Makefile -e'/^CFLAGS/s/$/ -fcommon/'
+pre_configure() {
+ autoreconf -fi
}
next prev parent reply other threads:[~2020-12-31 0:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-31 0:31 [PR PATCH] " ndowens
2020-12-31 0:35 ` [PR PATCH] [Updated] " ndowens
2020-12-31 0:37 ` ndowens
2020-12-31 0:39 ` ndowens
2020-12-31 0:45 ` ndowens [this message]
2020-12-31 0:47 ` ndowens
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201231004520.8H_1qLyperahcaoM4PoZiRj-uD7jWVeZpBFfPf1iYWQ@z \
--to=ndowens@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).