From patchwork Fri Feb 22 16:08:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sergio Prado X-Patchwork-Id: 1046992 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=e-labworks.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=e-labworks-com.20150623.gappssmtp.com header.i=@e-labworks-com.20150623.gappssmtp.com header.b="NXe2wEbR"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 445c3y22lfz9s2R for ; Sat, 23 Feb 2019 03:19:25 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id C5F5227087; Fri, 22 Feb 2019 16:19:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id odHSK5HGFTXe; Fri, 22 Feb 2019 16:19:19 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 5214F25E5D; Fri, 22 Feb 2019 16:19:19 +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 084401BF5AA for ; Fri, 22 Feb 2019 16:19:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 05A4B85DF5 for ; Fri, 22 Feb 2019 16:19:19 +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 3JP5HF3gWhbh for ; Fri, 22 Feb 2019 16:19:18 +0000 (UTC) X-Greylist: delayed 00:07:28 by SQLgrey-1.7.6 Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.176]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 0DB9485D8D for ; Fri, 22 Feb 2019 16:19:18 +0000 (UTC) Received: by mail-qk1-f176.google.com with SMTP id z13so1469263qki.2 for ; Fri, 22 Feb 2019 08:19:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=e-labworks-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=5c7qBdEHT3/ki2DPhLqHowA329sbMn+0RwrDpDzN9dI=; b=NXe2wEbRKZR4c/NvKX9jbzkMXsi5B0q0bCxTvCw9by0eCrCEP20AMU0nf0Hgs77qmk 4lop3EDdYYStlszmQYP0usVvzFLFBGAc4ypWXOH6nyGxwpswNZ4czJFpg25JKH0NuKJ2 bih0T2IS7VWTTcI7/1CY2oRQiuPu5z111eA6RQH54HjQrv6uXaakk35U3ydG0jdqIfI9 nJfWMzH/hPrIhS7oOevCQSN/3IAL/J/v3Khhd+rGWQtg4nIES9UlWaHudk5UMUPMy3Wl YDspYH4W1tOlXzw4GKMWXsriOqNQDya7sFo+RF8Rsi/lpZ9S/IhzrMcOAoIeMRMrQZXd wVfA== 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=5c7qBdEHT3/ki2DPhLqHowA329sbMn+0RwrDpDzN9dI=; b=PzEfg09KR42ygLgXAh5i9NyMYo2ieQzKnjf4ZF5vXUR6YUaipmeF4MalAEV1GzdXKV Sr4ktbiqJ64UexV1Ry3+ZqwPnb+EO7WjM2CoSbfjbAetA6e+J1J0199JM72vAV8aVQr9 Mvw6NB2nEh5Hla/U0UVtbExw2jUCDJWCSWVxTFoozRO382I6b8i0ssjdg41cUWhs70IH AxVTRfkDt5Zc2YQa+xOs1LcyIZoRGBz7uuOoa5kJnC/4m5AyulWO4u8QWtjSQyoE3rq4 UTUyf7xYC5X+XTBMIKYGCOFJ4Uq4rWDcnsnHI5exUQY9kS3C1c6Ky2/yf4f97SIroXpT GnOg== X-Gm-Message-State: AHQUAub7SLQKFmCifZQSh5I/Lqt6kptzECC1qS2cMGHMH3jwFrO8rYOM 19coDdy87yahkodJvH4Fr8zcNgNz2jQ= X-Google-Smtp-Source: AHgI3Iam5Yr9JdNAy+7zfvk1UF9wM4VpAmz8zCUBGcQJoXQVVhXa13S09F4k3yGEeGNtKBiS26tX6Q== X-Received: by 2002:a37:b581:: with SMTP id e123mr3449258qkf.183.1550851909180; Fri, 22 Feb 2019 08:11:49 -0800 (PST) Received: from n1.lan ([177.189.37.58]) by smtp.gmail.com with ESMTPSA id o21sm1201784qto.18.2019.02.22.08.11.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Feb 2019 08:11:48 -0800 (PST) From: Sergio Prado To: buildroot@buildroot.org Date: Fri, 22 Feb 2019 13:08:12 -0300 Message-Id: <1550851692-7009-1-git-send-email-sergio.prado@e-labworks.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2] package/snort: bump to version 2.9.12 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: Sergio Prado Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" In this version, OpenAppID [1] is enabled by default. OpenAppID depends on luajit and openssl. If we leave it enabled by default, snort would require luajit. Since luajit is not available on all architectures, that would limit the usage of the snort package. Since not all users will need/use OpenAppID, let's leave it disabled by default. To build with OpenAppID support, the user will need to enable luajit and libssl. Also, it is necessary to apply a patch to fix a compile error when building OpenAppID with uclibc and musl. The build fails when dereferencing the rpcent structure because rpc.h is not been included. [1] https://www.snort.org/downloads/openappid/9553 Signed-off-by: Sergio Prado --- Changes v1 -> v2: - patch series squashed into a single patch (suggested by Thomas Petazzoni) --- ...-error-when-building-against-uclibc-or-mu.patch | 34 ++++++++++++++++++++++ package/snort/snort.hash | 2 +- package/snort/snort.mk | 11 ++++++- 3 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 package/snort/0006-Fix-compile-error-when-building-against-uclibc-or-mu.patch diff --git a/package/snort/0006-Fix-compile-error-when-building-against-uclibc-or-mu.patch b/package/snort/0006-Fix-compile-error-when-building-against-uclibc-or-mu.patch new file mode 100644 index 000000000000..ce9d5526c841 --- /dev/null +++ b/package/snort/0006-Fix-compile-error-when-building-against-uclibc-or-mu.patch @@ -0,0 +1,34 @@ +From dc2f54097da3cd493b8f4d06a14ef40be484d24f Mon Sep 17 00:00:00 2001 +From: Sergio Prado +Date: Thu, 21 Feb 2019 15:02:08 -0300 +Subject: [PATCH] Fix compile error when building against uclibc or musl + +The build fails when dereferencing the rpcent structure with uclibc or musl C libraries. + +../../../src/dynamic-preprocessors/appid/service_plugins/service_rpc.c:241:20: +error: dereferencing pointer to incomplete type ‘struct rpcent’ + if (rpc->r_name) + +That's because rpc.h should be included when using these C libraries. + +Signed-off-by: Sergio Prado +--- + src/dynamic-preprocessors/appid/service_plugins/service_rpc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/dynamic-preprocessors/appid/service_plugins/service_rpc.c b/src/dynamic-preprocessors/appid/service_plugins/service_rpc.c +index 81bc8a5db8ab..2e45246083a8 100644 +--- a/src/dynamic-preprocessors/appid/service_plugins/service_rpc.c ++++ b/src/dynamic-preprocessors/appid/service_plugins/service_rpc.c +@@ -32,7 +32,7 @@ + #include "flow.h" + #include "service_api.h" + +-#if defined(FREEBSD) || defined(OPENBSD) ++#if defined(FREEBSD) || defined(OPENBSD) || (defined(LINUX) && defined(__UCLIBC__) && !defined(__UCLIBC_HAS_RPC__) || !defined(__GLIBC__)) + #include "rpc/rpc.h" + #endif + +-- +2.7.4 + diff --git a/package/snort/snort.hash b/package/snort/snort.hash index 211e862b7fc0..abe85920cf1e 100644 --- a/package/snort/snort.hash +++ b/package/snort/snort.hash @@ -1,5 +1,5 @@ # Locally computed: -sha256 9f6b3aeac5a109f55504bd370564ac431cb1773507929dc461626898f33f46cd snort-2.9.11.1.tar.gz +sha256 7b02e11987c6cb4f6d79d72799ca9ad2b4bd59cc1d96bb7d6c91549f990d99d0 snort-2.9.12.tar.gz # Hash for license files: sha256 f98260a6d3e5ef4ede8a2a6b698e5ac91d64c09243f7171e1c5b17b920a835c7 LICENSE diff --git a/package/snort/snort.mk b/package/snort/snort.mk index 568393468bb6..c767d7c5458a 100644 --- a/package/snort/snort.mk +++ b/package/snort/snort.mk @@ -4,7 +4,7 @@ # ################################################################################ -SNORT_VERSION = 2.9.11.1 +SNORT_VERSION = 2.9.12 SNORT_SITE = https://www.snort.org/downloads/snort SNORT_LICENSE = GPL-2.0 SNORT_LICENSE_FILES = LICENSE COPYING @@ -26,6 +26,15 @@ SNORT_CFLAGS += `$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc` SNORT_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs libtirpc` endif +# luajit and openssl should be enabled to build with +# OpenAppID support +ifeq ($(BR2_PACKAGE_LUAJIT)$(BR2_PACKAGE_OPENSSL),yy) +SNORT_DEPENDENCIES += luajit openssl +SNORT_CONF_OPTS += --enable-open-appid +else +SNORT_CONF_OPTS += --disable-open-appid +endif + SNORT_CONF_ENV = \ CFLAGS="$(TARGET_CFLAGS) $(SNORT_CFLAGS)" \ LIBS="$(SNORT_LIBS)" \