All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/2] package/snort: bump to version 2.9.12
@ 2019-02-21 20:27 Sergio Prado
  2019-02-21 20:27 ` [Buildroot] [PATCH 1/2] " Sergio Prado
  2019-02-21 20:27 ` [Buildroot] [PATCH 2/2] package/snort: build with OpenAppID support if luajit/openssl is enabled Sergio Prado
  0 siblings, 2 replies; 6+ messages in thread
From: Sergio Prado @ 2019-02-21 20:27 UTC (permalink / raw)
  To: buildroot

This patch series will bump snort version to 2.9.12.

Since in this version OpenAppID is enabled by default, let's build it
only of its dependencies are enabled (luajit and openssl).

Sergio Prado (2):
  package/snort: bump to version 2.9.12
  package/snort: build with OpenAppID support if luajit/openssl is
    enabled

 ...-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

-- 
2.7.4

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/2] package/snort: bump to version 2.9.12
  2019-02-21 20:27 [Buildroot] [PATCH 0/2] package/snort: bump to version 2.9.12 Sergio Prado
@ 2019-02-21 20:27 ` Sergio Prado
  2019-02-23 13:51   ` Thomas Petazzoni
  2019-02-21 20:27 ` [Buildroot] [PATCH 2/2] package/snort: build with OpenAppID support if luajit/openssl is enabled Sergio Prado
  1 sibling, 1 reply; 6+ messages in thread
From: Sergio Prado @ 2019-02-21 20:27 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Sergio Prado <sergio.prado@e-labworks.com>
---
 package/snort/snort.hash | 2 +-
 package/snort/snort.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

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..30de02b3a8b1 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
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 2/2] package/snort: build with OpenAppID support if luajit/openssl is enabled
  2019-02-21 20:27 [Buildroot] [PATCH 0/2] package/snort: bump to version 2.9.12 Sergio Prado
  2019-02-21 20:27 ` [Buildroot] [PATCH 1/2] " Sergio Prado
@ 2019-02-21 20:27 ` Sergio Prado
  2019-02-22  8:04   ` Thomas Petazzoni
  1 sibling, 1 reply; 6+ messages in thread
From: Sergio Prado @ 2019-02-21 20:27 UTC (permalink / raw)
  To: buildroot

Since version 2.9.12, 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 <sergio.prado@e-labworks.com>
---
 ...-error-when-building-against-uclibc-or-mu.patch | 34 ++++++++++++++++++++++
 package/snort/snort.mk                             |  9 ++++++
 2 files changed, 43 insertions(+)
 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 <sergio.prado@e-labworks.com>
+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 <sergio.prado@e-labworks.com>
+---
+ 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.mk b/package/snort/snort.mk
index 30de02b3a8b1..c767d7c5458a 100644
--- a/package/snort/snort.mk
+++ b/package/snort/snort.mk
@@ -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)" \
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 2/2] package/snort: build with OpenAppID support if luajit/openssl is enabled
  2019-02-21 20:27 ` [Buildroot] [PATCH 2/2] package/snort: build with OpenAppID support if luajit/openssl is enabled Sergio Prado
@ 2019-02-22  8:04   ` Thomas Petazzoni
  2019-02-22  8:54     ` Sergio Prado
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2019-02-22  8:04 UTC (permalink / raw)
  To: buildroot

Hello Sergio,

Thanks for the patch.

On Thu, 21 Feb 2019 17:27:26 -0300
Sergio Prado <sergio.prado@e-labworks.com> wrote:

> Since version 2.9.12, 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 <sergio.prado@e-labworks.com>

Shouldn't this be squashed into PATCH 1/2 ? Indeed, if I applied just
PATCH 1/2, then I suppose snort will no longer build on architectures
that don't support Luajit.

Alternatively PATCH 1/2 could have an unconditional
--disable-open-appid, and then PATCH 2/2 adds the logic to enable
OpenAppID support when possible.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 2/2] package/snort: build with OpenAppID support if luajit/openssl is enabled
  2019-02-22  8:04   ` Thomas Petazzoni
@ 2019-02-22  8:54     ` Sergio Prado
  0 siblings, 0 replies; 6+ messages in thread
From: Sergio Prado @ 2019-02-22  8:54 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

Em sex, 22 de fev de 2019 ?s 05:04, Thomas Petazzoni <
thomas.petazzoni@bootlin.com> escreveu:

> > Since version 2.9.12, 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 <sergio.prado@e-labworks.com>
>
> Shouldn't this be squashed into PATCH 1/2 ? Indeed, if I applied just
> PATCH 1/2, then I suppose snort will no longer build on architectures
> that don't support Luajit.
>
> Alternatively PATCH 1/2 could have an unconditional
> --disable-open-appid, and then PATCH 2/2 adds the logic to enable
> OpenAppID support when possible.

Right. I'll squash into just one patch and send V2.

Thanks!

Sergio Prado
Embedded Labworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20190222/1268f750/attachment.html>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/2] package/snort: bump to version 2.9.12
  2019-02-21 20:27 ` [Buildroot] [PATCH 1/2] " Sergio Prado
@ 2019-02-23 13:51   ` Thomas Petazzoni
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2019-02-23 13:51 UTC (permalink / raw)
  To: buildroot

On Thu, 21 Feb 2019 17:27:25 -0300
Sergio Prado <sergio.prado@e-labworks.com> wrote:

> Signed-off-by: Sergio Prado <sergio.prado@e-labworks.com>
> ---
>  package/snort/snort.hash | 2 +-
>  package/snort/snort.mk   | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

So I screwed and applied this version to next :-/

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-02-23 13:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-21 20:27 [Buildroot] [PATCH 0/2] package/snort: bump to version 2.9.12 Sergio Prado
2019-02-21 20:27 ` [Buildroot] [PATCH 1/2] " Sergio Prado
2019-02-23 13:51   ` Thomas Petazzoni
2019-02-21 20:27 ` [Buildroot] [PATCH 2/2] package/snort: build with OpenAppID support if luajit/openssl is enabled Sergio Prado
2019-02-22  8:04   ` Thomas Petazzoni
2019-02-22  8:54     ` Sergio Prado

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.