From patchwork Sat Oct 10 19:48:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrice Fontaine X-Patchwork-Id: 1380122 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=JG49Gryf; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C7wVl0GGfz9sSn for ; Sun, 11 Oct 2020 06:49:03 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 5BD2E860D2; Sat, 10 Oct 2020 19:49:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 10aAj3MJ9AnE; Sat, 10 Oct 2020 19:49:00 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6F0D2861C5; Sat, 10 Oct 2020 19:49:00 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 5BF8D1BF39C for ; Sat, 10 Oct 2020 19:48:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 59087861C5 for ; Sat, 10 Oct 2020 19:48:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oA8aCSfEAm-J for ; Sat, 10 Oct 2020 19:48:58 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 0D710860D2 for ; Sat, 10 Oct 2020 19:48:58 +0000 (UTC) Received: by mail-wm1-f52.google.com with SMTP id a72so2624038wme.5 for ; Sat, 10 Oct 2020 12:48:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=rNChLFyPpLXtRQwWmjWmXCnIn0cd4sCfMHhW9fSYZos=; b=JG49GryfApUkgGU2P/I1ZYvXGSx59Woq0bGoE5ld6rHJre3QwZ9afQ0CfqvA+oNy5W /flt3H+iF3WQynoLkDpzU1Mko3YabSACVFy/EJWD4Yxvx6OMfv+P7hIbvJLSAwEn2kTE lgULIOKDR8CRdOL/y7V9E3/qxCLcROoUX8NovdkMpKWKCdlgSWd8rdP8p8vP+TeBrc/F 03psuWlG4JcUJlix6J77aWcle33/7+AYFi9b5Qnq9RdvN3saQgSui5vDAjVPL9okPAgl QAU15Gb4MBoFPBuCTASCIIEY/snbx1hF2LDU4WpvMPQJD9RZOyOluBdwgbIkfQ+zwehK erYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=rNChLFyPpLXtRQwWmjWmXCnIn0cd4sCfMHhW9fSYZos=; b=nlNNzZaa+DNCt+Jeu47ZB4SbYQ1w5Jx4iEd7Z9rCVgEI7Fh5l1qfoUiUMUuzcerT63 bNJEgRbnc2LkkdVtQh06xGEraBXre4I2qNVpo3OGBV86GuYfPKwWCOGQ1B5hgVpJNtFj nVrCjGGYzprOH0c68KTyQYtbULqaEfSNzD0QdkOivkDkKmxV4kCiF115iqVBz9ZXo6ZO YVBipROrc0TAwxx+kZGFKEt1yiG9KoCffedHGGpuHp4fymJycYJVjV9AZCIFP85KxGo1 iIcNg1nTdjIcASVDUlF4HfXT36lD5oWqH6CX2bOB8kaXUKVcch/EPX5dSVb7//nNWvkM fUdg== X-Gm-Message-State: AOAM531XYgTnXDWgpPuhnmhRmz4ceWrMAxLC7PZicC8Z4F4iLxQ8ATE8 3E88T/y67IJTzglaMklfLf3HeoEXpsMAdg== X-Google-Smtp-Source: ABdhPJyNEnUZtqq/WVZbiHOLs9o7TmxS7yzQx7K3TF6toWOw65Ywn4rZJkld9b6mZqjzjr9kqfUEZQ== X-Received: by 2002:a7b:c14f:: with SMTP id z15mr4052326wmi.73.1602359336041; Sat, 10 Oct 2020 12:48:56 -0700 (PDT) Received: from kali.home (2a01cb0881b76d00c2afd0dfa851d2b9.ipv6.abo.wanadoo.fr. [2a01:cb08:81b7:6d00:c2af:d0df:a851:d2b9]) by smtp.gmail.com with ESMTPSA id x3sm8079710wmi.45.2020.10.10.12.48.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Oct 2020 12:48:55 -0700 (PDT) From: Fabrice Fontaine To: buildroot@buildroot.org Date: Sat, 10 Oct 2020 21:48:50 +0200 Message-Id: <20201010194850.1434998-1-fontaine.fabrice@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] package/suricata: bump to version 6.0.0 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabrice Fontaine Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" - Refresh first patch - Drop second patch, not needed since https://github.com/OISF/suricata/commit/5c725d50502b2a7a747fc04938937b8c6b733aac - Drop BR2_PACKAGE_GEOIP dependency as suricata switched to GeoIP2, see https://github.com/OISF/suricata/commit/a291209e473a261546363f0d9051f1e3b82e699a - jansson is now a mandatory dependency, see https://github.com/OISF/suricata/commit/e49c40428e1b9f7e5dcdb5857c3978d5cb859fd9 - rustc is now a mandatory dependency, see https://github.com/OISF/suricata/commit/75429bbe3ea3ff12a9e8e7e863a10ded91cb6de9 EOL date of 4.1 branch is December 31st, 2020. Signed-off-by: Fabrice Fontaine --- ...ure-proper-shabang-on-python-scripts.patch | 12 ++++--- ...low-the-user-to-override-RUST_TARGET.patch | 35 +++++++++++++++++++ ...re.ac-fix-cross-compilation-with-lua.patch | 33 ----------------- package/suricata/Config.in | 4 +++ package/suricata/suricata.hash | 2 +- package/suricata/suricata.mk | 23 +++++------- 6 files changed, 55 insertions(+), 54 deletions(-) create mode 100644 package/suricata/0002-configure.ac-allow-the-user-to-override-RUST_TARGET.patch delete mode 100644 package/suricata/0002-configure.ac-fix-cross-compilation-with-lua.patch diff --git a/package/suricata/0001-python-ensure-proper-shabang-on-python-scripts.patch b/package/suricata/0001-python-ensure-proper-shabang-on-python-scripts.patch index 4be591be3f..424b30d317 100644 --- a/package/suricata/0001-python-ensure-proper-shabang-on-python-scripts.patch +++ b/package/suricata/0001-python-ensure-proper-shabang-on-python-scripts.patch @@ -18,6 +18,8 @@ executable. - provide proper commit log ] Signed-off-by: Yann E. MORIN +[Fabrice: update for 6.0.0] +Signed-off-by: Fabrice Fontaine --- python/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) @@ -27,16 +29,16 @@ index 59d195f29..a41604f72 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -6,11 +6,11 @@ EXTRA_DIST = setup.py \ - if HAVE_PYTHON + if HAVE_PYTHON_DISTUTILS all-local: cd $(srcdir) && \ -- $(HAVE_PYTHON) setup.py build --build-base $(abs_builddir) -+ $(HAVE_PYTHON) setup.py build -e "/usr/bin/env python" --build-base $(abs_builddir) +- $(HAVE_PYTHON) setup.py build --build-base "$(abs_builddir)" ++ $(HAVE_PYTHON) setup.py build -e "/usr/bin/env python" --build-base "$(abs_builddir)" install-exec-local: cd $(srcdir) && \ -- $(HAVE_PYTHON) setup.py build --build-base $(abs_builddir) \ -+ $(HAVE_PYTHON) setup.py build -e "/usr/bin/env python" --build-base $(abs_builddir) \ +- $(HAVE_PYTHON) setup.py build --build-base "$(abs_builddir)" \ ++ $(HAVE_PYTHON) setup.py build -e "/usr/bin/env python" --build-base "$(abs_builddir)" \ install --prefix $(DESTDIR)$(prefix) uninstall-local: diff --git a/package/suricata/0002-configure.ac-allow-the-user-to-override-RUST_TARGET.patch b/package/suricata/0002-configure.ac-allow-the-user-to-override-RUST_TARGET.patch new file mode 100644 index 0000000000..ec876a6852 --- /dev/null +++ b/package/suricata/0002-configure.ac-allow-the-user-to-override-RUST_TARGET.patch @@ -0,0 +1,35 @@ +From 7ab4d5eb55e1d3900390b76e5f46e80e22d4e80e Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Sat, 10 Oct 2020 21:34:21 +0200 +Subject: [PATCH] configure.ac: allow the user to override RUST_TARGET + +When cross-compiling, RUST_TARGET is not always equal to host_triplet +(e.g. buildroot) so allow the user to override this default value +through RUST_TARGET environment variable + +Signed-off-by: Fabrice Fontaine +--- + configure.ac | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 32c230209..7d7c9373f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2489,7 +2489,12 @@ fi + have_rust_vendor="no" + + if test "x$cross_compiling" = "xyes"; then +- RUST_SURICATA_LIB_XC_DIR="${host_alias}/" ++ if test "x$RUST_TARGET" != "x"; then ++ RUST_SURICATA_LIB_XC_DIR="$RUST_TARGET/" ++ AC_SUBST([RUST_TARGET],["--target $RUST_TARGET"]) ++ else ++ RUST_SURICATA_LIB_XC_DIR="${host_alias}/" ++ fi + else + if test "x$CARGO_BUILD_TARGET" = "x"; then + RUST_SURICATA_LIB_XC_DIR= +-- +2.28.0 + diff --git a/package/suricata/0002-configure.ac-fix-cross-compilation-with-lua.patch b/package/suricata/0002-configure.ac-fix-cross-compilation-with-lua.patch deleted file mode 100644 index 5c13ac7bec..0000000000 --- a/package/suricata/0002-configure.ac-fix-cross-compilation-with-lua.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 8db38c21b525327305778fcaa232b2a797ffcb82 Mon Sep 17 00:00:00 2001 -From: Fabrice Fontaine -Date: Thu, 7 May 2020 19:05:23 +0200 -Subject: [PATCH] configure.ac: fix cross-compilation with lua - -lua integer size is detected through AC_RUN_IFELSE since -https://github.com/OISF/suricata/commit/2abcd5d27f29ca37ae31108cc0ea0143fa25d0a1 - -This breaks cross-compilation and is needed only for rust so disable it -if rust is not wanted - -Signed-off-by: Fabrice Fontaine -[Upstream status: not submitted yet] ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 127848234..f5f33d42d 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -2225,7 +2225,7 @@ return 0; - AM_CONDITIONAL([HAVE_LUA], [test "x$enable_lua" != "xno"]) - - # If Lua is enabled, test the integer size. -- if test "x$enable_lua" = "xyes"; then -+ if test "x$enable_lua" = "xyes" && test "x$enable_rust" = "xyes"; then - TMPLIBS="$LIBS" - LIBS="" - --- -2.26.2 - diff --git a/package/suricata/Config.in b/package/suricata/Config.in index 2add34956e..5f7eb21da0 100644 --- a/package/suricata/Config.in +++ b/package/suricata/Config.in @@ -1,8 +1,11 @@ config BR2_PACKAGE_SURICATA bool "suricata" + depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS depends on BR2_USE_MMU # fork() depends on BR2_USE_WCHAR depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_HOST_RUSTC + select BR2_PACKAGE_JANSSON select BR2_PACKAGE_LIBHTP select BR2_PACKAGE_LIBPCAP select BR2_PACKAGE_LIBYAML @@ -18,5 +21,6 @@ config BR2_PACKAGE_SURICATA https://suricata-ids.org comment "suricata needs a toolchain w/ wchar, threads" + depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS depends on BR2_USE_MMU depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/suricata/suricata.hash b/package/suricata/suricata.hash index 9e79f3a96c..a6cf43fb66 100644 --- a/package/suricata/suricata.hash +++ b/package/suricata/suricata.hash @@ -1,5 +1,5 @@ # Locally computed: -sha256 3440cd1065b1b3999dc101a37c49321fab2791b38f16e2f7fe27369dd007eea7 suricata-4.1.9.tar.gz +sha256 3c175a6dee9071141391f64828502cfb6e48dc1a20833e1411fb45be5368923b suricata-6.0.0.tar.gz # Hash for license files: sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING diff --git a/package/suricata/suricata.mk b/package/suricata/suricata.mk index d6ae48c1f5..a4c9802840 100644 --- a/package/suricata/suricata.mk +++ b/package/suricata/suricata.mk @@ -4,7 +4,7 @@ # ################################################################################ -SURICATA_VERSION = 4.1.9 +SURICATA_VERSION = 6.0.0 SURICATA_SITE = https://www.openinfosecfoundation.org/download SURICATA_LICENSE = GPL-2.0 SURICATA_LICENSE_FILES = COPYING LICENSE @@ -13,7 +13,8 @@ SURICATA_AUTORECONF = YES SURICATA_DEPENDENCIES = \ host-pkgconf \ - $(if $(BR2_PACKAGE_JANSSON),jansson) \ + host-rustc \ + jansson \ $(if $(BR2_PACKAGE_LIBCAP_NG),libcap-ng) \ $(if $(BR2_PACKAGE_LIBEVENT),libevent) \ libhtp \ @@ -24,12 +25,14 @@ SURICATA_DEPENDENCIES = \ pcre \ $(if $(BR2_PACKAGE_XZ),xz) -SURICATA_CONF_ENV = ac_cv_path_HAVE_SPHINXBUILD=no +SURICATA_CONF_ENV = \ + ac_cv_path_HAVE_SPHINXBUILD=no \ + CARGO_HOME=$(HOST_DIR)/share/cargo \ + RUST_TARGET=$(RUSTC_TARGET_NAME) SURICATA_CONF_OPTS = \ --disable-gccprotect \ --disable-pie \ - --disable-rust \ --disable-suricata-update \ --enable-non-bundled-htp @@ -46,19 +49,9 @@ else SURICATA_CONF_OPTS += --disable-libmagic endif -# --disable-libgeoip disables libgeoip when --enable-geoip is requested. -# This allows libmaxminddb to be picked up instead of libgeoip when both are -# installed on the system. ifeq ($(BR2_PACKAGE_LIBMAXMINDDB),y) SURICATA_DEPENDENCIES += libmaxminddb -SURICATA_CONF_OPTS += \ - --enable-geoip \ - --disable-libgeoip -else ifeq ($(BR2_PACKAGE_GEOIP),y) -SURICATA_DEPENDENCIES += geoip -SURICATA_CONF_OPTS += \ - --enable-geoip \ - --enable-libgeoip +SURICATA_CONF_OPTS += --enable-geoip else SURICATA_CONF_OPTS += --disable-geoip endif