From 254ec00aac11862952126f0e91bab8b5ba6b53f3 Mon Sep 17 00:00:00 2001 From: Foxtrot Date: Tue, 20 Aug 2019 19:02:04 +0100 Subject: [PATCH] Packages: Update ettercap package --- network/ettercap/Makefile | 52 +++++++++++-------- .../patches/001-cross_compiling.patch | 23 ++++++++ .../002-libnet_check_honor_ldflags.patch | 24 +++++++++ .../patches/003-automake-compat.patch | 34 ++++++++++++ 4 files changed, 110 insertions(+), 23 deletions(-) create mode 100644 network/ettercap/patches/001-cross_compiling.patch create mode 100644 network/ettercap/patches/002-libnet_check_honor_ldflags.patch create mode 100644 network/ettercap/patches/003-automake-compat.patch diff --git a/network/ettercap/Makefile b/network/ettercap/Makefile index 9c30fec..92b06e1 100644 --- a/network/ettercap/Makefile +++ b/network/ettercap/Makefile @@ -8,25 +8,26 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ettercap -PKG_VERSION:=0.8.2 -PKG_RELEASE:=1 +PKG_VERSION:=NG-0.7.3 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/Ettercap/ettercap/releases/download/v0.8.2/ -PKG_MD5SUM:=b6b20851862f55644d5f296f77b785d1 +PKG_SOURCE_URL:=@SF/ettercap +PKG_MD5SUM:=28fb15cd024162c55249888fe1b97820 +PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk -# include $(INCLUDE_DIR)/nls.mk +include $(INCLUDE_DIR)/nls.mk define Package/ettercap SECTION:=net CATEGORY:=Network - DEPENDS:=+libcurl +libpcap +libnet1 +libopenssl +libpcre +libncurses +libltdl +libpthread +zlib +libiconv-full + DEPENDS:=+libpcap +libnet1 +libopenssl +libpcre +libncurses +libltdl +libpthread +zlib TITLE:=Ettercap is a suite for man in the middle attacks on LAN. - URL:=http://www.ettercap-project.org + URL:=http://ettercap.sourceforge.net endef define Package/ettercap/description @@ -40,28 +41,33 @@ define Package/ettercap/conffiles /etc/etter.conf endef -TARGET_CFLAGS += -I$(STAGING_DIR)/usr/lib/libiconv-full/include +define Build/Prepare + $(call Build/Prepare/Default) + # remove default optimization flags set by configure + $(SED) 's,DEBUG_FLAGS=.*,DEBUG_FLAGS=,g' $(PKG_BUILD_DIR)/configure +endef -#IPV6 -> LIBNET needed? -CMAKE_OPTIONS += \ - -DHAVE_UTF8:BOOL=OFF \ - -DINSTALL_DESKTOP:BOOL=OFF \ - -DENABLE_GTK:BOOL=OFF \ - -DBUNDLED_LIBS:BOOL=OFF \ - -DLIBNET_INCLUDE_DIR:PATH=$(STAGING_DIR)/usr/lib/libnet-1.1.x/include \ - -DLIBNET_LIBRARY:FILEPATH=$(STAGING_DIR)/usr/lib/libnet-1.1.x/lib/libnet.so \ - -DHAVE_ICONV:FILEPATH=$(STAGING_DIR)/usr/lib/libiconv-full/lib/libiconv.so \ - -DEXECUTABLE_OUTPUT_PATH=$(PKG_BUILD_DIR)/bin_out +CONFIGURE_ARGS += \ + --with-libpcap="$(STAGING_DIR)/usr" \ + --with-libnet="$(STAGING_DIR)/usr/lib/libnet-1.1.x" \ + --with-openssl="$(STAGING_DIR)/usr" \ + --with-libpcre="$(STAGING_DIR)/usr" \ + --with-iconv="$(ICONV_PREFIX)" \ + --with-libncurses="$(STAGING_DIR)/usr" \ + --disable-gtk \ + --disable-debug \ + --enable-plugins + +MAKE_FLAGS += \ + DESTDIR="$(PKG_INSTALL_DIR)" define Package/ettercap/install - $(INSTALL_DIR) $(1)/etc/ettercap - $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/ettercap/etter.* $(1)/etc/ettercap/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/etter.conf $(1)/etc/ $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/etter{cap,filter,log} $(1)/usr/bin/ $(INSTALL_DIR) $(1)/usr/lib/ettercap $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ettercap/*.so $(1)/usr/lib/ettercap/ - $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libettercap.so* $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/share/ettercap $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/ettercap/* $(1)/usr/share/ettercap/ endef diff --git a/network/ettercap/patches/001-cross_compiling.patch b/network/ettercap/patches/001-cross_compiling.patch new file mode 100644 index 0000000..8c95397 --- /dev/null +++ b/network/ettercap/patches/001-cross_compiling.patch @@ -0,0 +1,23 @@ +diff -urN ettercap-NG-0.7.3/configure ettercap-NG-0.7.3.new/configure +--- ettercap-NG-0.7.3/configure 2005-05-27 17:11:45.000000000 +0200 ++++ ettercap-NG-0.7.3.new/configure 2006-08-21 20:15:07.000000000 +0200 +@@ -27354,6 +27354,7 @@ + + echo "$as_me:$LINENO: checking for NS_GET32" >&5 + echo $ECHO_N "checking for NS_GET32... $ECHO_C" >&6 ++cross_compiling=no + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling + See \`config.log' for more details." >&5 +diff -urN ettercap-NG-0.7.3/configure.in ettercap-NG-0.7.3.new/configure.in +--- ettercap-NG-0.7.3/configure.in 2005-01-13 10:24:28.000000000 +0100 ++++ ettercap-NG-0.7.3.new/configure.in 2006-08-21 20:13:29.000000000 +0200 +@@ -236,7 +236,7 @@ + AC_CHECK_HEADERS(sys/poll.h poll.h sys/select.h) + AC_CHECK_HEADERS(sys/cdefs.h) + dnl nameser NS_GET32 and so on... +-EC_NS_GET() ++#EC_NS_GET() + + dnl ================================================================== + dnl Checks for typedefs, structures, and compiler characteristics. diff --git a/network/ettercap/patches/002-libnet_check_honor_ldflags.patch b/network/ettercap/patches/002-libnet_check_honor_ldflags.patch new file mode 100644 index 0000000..55b00a7 --- /dev/null +++ b/network/ettercap/patches/002-libnet_check_honor_ldflags.patch @@ -0,0 +1,24 @@ +diff -ruN ettercap-NG-0.7.3-old/configure ettercap-NG-0.7.3-new/configure +--- ettercap-NG-0.7.3-old/configure 2006-10-03 18:24:09.000000000 +0200 ++++ ettercap-NG-0.7.3-new/configure 2006-10-03 18:28:57.000000000 +0200 +@@ -31759,7 +31759,7 @@ + + OLDLDFLAGS="${LDFLAGS}" + OLDLIBS="${LIBS}" +- LDFLAGS="$LNETLIB" ++ LDFLAGS="$LDFLAGS $LNETLIB" + LIBS="$LIBS" + + echo "$as_me:$LINENO: checking for libnet_adv_free_packet in -lnet" >&5 +diff -ruN ettercap-NG-0.7.3-old/configure.in ettercap-NG-0.7.3-new/configure.in +--- ettercap-NG-0.7.3-old/configure.in 2006-10-03 18:24:09.000000000 +0200 ++++ ettercap-NG-0.7.3-new/configure.in 2006-10-03 18:26:45.000000000 +0200 +@@ -500,7 +500,7 @@ + ] + ) + +-EC_CHECK_FUNC(net, libnet_adv_free_packet, $LNETLIB, $LIBS,, AC_MSG_ERROR([Incorrect libnet version. libnet >= 1.1.2.1 required])) ++EC_CHECK_FUNC(net, libnet_adv_free_packet, $LDFLAGS $LNETLIB, $LIBS,, AC_MSG_ERROR([Incorrect libnet version. libnet >= 1.1.2.1 required])) + + dnl ------------------ + dnl Checks for openssl diff --git a/network/ettercap/patches/003-automake-compat.patch b/network/ettercap/patches/003-automake-compat.patch new file mode 100644 index 0000000..eea45f2 --- /dev/null +++ b/network/ettercap/patches/003-automake-compat.patch @@ -0,0 +1,34 @@ +--- a/configure.in ++++ b/configure.in +@@ -197,6 +197,9 @@ dnl ======================== + dnl Libtool related... + dnl ======================== + ++LT_INIT ++LTDL_INIT ++LT_CONFIG_LTDL_DIR([libltdl]) + AC_DISABLE_STATIC + AC_LIBTOOL_WIN32_DLL + AC_LIBTOOL_DLOPEN +--- a/include/ec_os_mingw.h ++++ b/include/ec_os_mingw.h +@@ -163,7 +163,7 @@ EC_API_EXTERN const char *ec_win_get_ec_ + */ + #if !defined(HAVE_DLOPEN) + #define RTLD_NOW 0 +- #define LTDL_SHLIB_EXT "*.dll" ++ #define LT_MODULE_EXT ".dll" + + #define dlopen(dll,flg) ec_win_dlopen (dll, flg) + #define lt_dlopen(dll) ec_win_dlopen (dll, 0) +--- a/src/ec_plugins.c ++++ b/src/ec_plugins.c +@@ -131,7 +131,7 @@ int plugin_filter(struct dirent *d) + int plugin_filter(const struct dirent *d) + #endif + { +- if ( match_pattern(d->d_name, PLUGIN_PATTERN LTDL_SHLIB_EXT) ) ++ if ( match_pattern(d->d_name, PLUGIN_PATTERN LT_MODULE_EXT) ) + return 1; + + return 0;