From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 1D7971384B4 for ; Mon, 30 Nov 2015 06:11:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 87C3321C044; Mon, 30 Nov 2015 06:11:04 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0D55A21C044 for ; Mon, 30 Nov 2015 06:11:03 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 486AD33FD3F for ; Mon, 30 Nov 2015 06:11:02 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5FDB2B5D for ; Mon, 30 Nov 2015 06:10:59 +0000 (UTC) From: "Slawek Lis" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Slawek Lis" Message-ID: <1448864021.1cccc7fc24794b31f27225822e9017bdf39187e5.slis@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/suricata/, net-analyzer/suricata/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-analyzer/suricata/Manifest net-analyzer/suricata/files/fortify_source-numeric.patch net-analyzer/suricata/files/json.patch net-analyzer/suricata/files/magic-location.patch net-analyzer/suricata/metadata.xml net-analyzer/suricata/suricata-2.0.10.ebuild X-VCS-Directories: net-analyzer/suricata/ net-analyzer/suricata/files/ X-VCS-Committer: slis X-VCS-Committer-Name: Slawek Lis X-VCS-Revision: 1cccc7fc24794b31f27225822e9017bdf39187e5 X-VCS-Branch: master Date: Mon, 30 Nov 2015 06:10:59 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: ac5186ce-1d6f-4c63-a136-9fcda232a6fd X-Archives-Hash: 7d131878590313e42e750e7d030c394d commit: 1cccc7fc24794b31f27225822e9017bdf39187e5 Author: Slawomir Lis gentoo org> AuthorDate: Mon Nov 30 06:13:41 2015 +0000 Commit: Slawek Lis gentoo org> CommitDate: Mon Nov 30 06:13:41 2015 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1cccc7fc Added suricata ebuild (#437564) Package-Manager: portage-2.2.26 net-analyzer/suricata/Manifest | 1 + .../suricata/files/fortify_source-numeric.patch | 11 ++ net-analyzer/suricata/files/json.patch | 10 ++ net-analyzer/suricata/files/magic-location.patch | 13 +++ net-analyzer/suricata/metadata.xml | 16 +++ net-analyzer/suricata/suricata-2.0.10.ebuild | 119 +++++++++++++++++++++ 6 files changed, 170 insertions(+) diff --git a/net-analyzer/suricata/Manifest b/net-analyzer/suricata/Manifest new file mode 100644 index 0000000..77f17d0 --- /dev/null +++ b/net-analyzer/suricata/Manifest @@ -0,0 +1 @@ +DIST suricata-2.0.10.tar.gz 3090730 SHA256 c8d1d3b6ce3d2a56577fca224424071afd921739d3859efc8a62229556d4beef SHA512 fa3683a93d85b26166b0f67a85f1a498941aadf4372ef98bd7fe62fcdef150af46b65456e3a764e054c385abbf44138ae6f70882c68ba320508eade6e181f2c6 WHIRLPOOL b867003e76df2b0b1b56c89415ed96acbf9d8966739d77aa303055d29ae5cdad8ad0b58e969336f0c1fc2e5d9990941622c19c062828dae58bf062f5662225f3 diff --git a/net-analyzer/suricata/files/fortify_source-numeric.patch b/net-analyzer/suricata/files/fortify_source-numeric.patch new file mode 100644 index 0000000..0a7f482 --- /dev/null +++ b/net-analyzer/suricata/files/fortify_source-numeric.patch @@ -0,0 +1,11 @@ +--- a/src/suricata.c 2015-10-02 00:21:55.634213646 +0200 ++++ b/src/suricata.c 2015-10-02 00:22:39.143940007 +0200 +@@ -774,7 +774,7 @@ + printf("compiled with -fstack-protector-all\n"); + #endif + #ifdef _FORTIFY_SOURCE +- printf("compiled with _FORTIFY_SOURCE=%d\n", _FORTIFY_SOURCE); ++ printf("compiled with _FORTIFY_SOURCE\n"); + #endif + #ifdef CLS + printf("L1 cache line size (CLS)=%d\n", CLS); diff --git a/net-analyzer/suricata/files/json.patch b/net-analyzer/suricata/files/json.patch new file mode 100644 index 0000000..a542f35 --- /dev/null +++ b/net-analyzer/suricata/files/json.patch @@ -0,0 +1,10 @@ +--- src/output-json.h.orig 2015-11-21 21:56:24.996289587 +0100 ++++ src/output-json.h 2015-11-21 21:57:11.419622642 +0100 +@@ -28,6 +28,7 @@ + + #ifdef HAVE_LIBJANSSON + ++#include + #include "suricata-common.h" + #include "util-buffer.h" + #include "util-logopenfile.h" diff --git a/net-analyzer/suricata/files/magic-location.patch b/net-analyzer/suricata/files/magic-location.patch new file mode 100644 index 0000000..02681f9 --- /dev/null +++ b/net-analyzer/suricata/files/magic-location.patch @@ -0,0 +1,13 @@ +diff --git a/configure.ac b/configure.ac +index 8b41eb0..3cdf0e7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -182,7 +182,7 @@ + fi + echo -n "installation for $host OS... " + +- e_magic_file="/usr/share/file/magic" ++ e_magic_file="/usr/share/misc/magic.mgc" + case "$host" in + *-*-*freebsd*) + LUA_PC_NAME="lua-5.1" diff --git a/net-analyzer/suricata/metadata.xml b/net-analyzer/suricata/metadata.xml new file mode 100644 index 0000000..34c1b31 --- /dev/null +++ b/net-analyzer/suricata/metadata.xml @@ -0,0 +1,16 @@ + + + + + slis@gentoo.org + + + Enable AF_PACKET support + Enable unix socket + Enable NVIDIA Cuda computations support + Enable Luajit support + Enable libnetfilter_log support + Enable AF_PACKET support + Enable AF_PACKET support + + diff --git a/net-analyzer/suricata/suricata-2.0.10.ebuild b/net-analyzer/suricata/suricata-2.0.10.ebuild new file mode 100644 index 0000000..40b2740 --- /dev/null +++ b/net-analyzer/suricata/suricata-2.0.10.ebuild @@ -0,0 +1,119 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools eutils user + +DESCRIPTION="High performance Network IDS, IPS and Network Security Monitoring engine" +HOMEPAGE="http://suricata-ids.org/" +SRC_URI="http://www.openinfosecfoundation.org/download/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+af-packet control-socket cuda debug geoip hardened lua luajit nflog +nfqueue +rules test" + +DEPEND=" + >=dev-libs/jansson-2.2 + dev-libs/libpcre + dev-libs/libyaml + net-libs/libnet:* + net-libs/libnfnetlink + dev-libs/nspr + dev-libs/nss + net-libs/libpcap + sys-apps/file + cuda? ( dev-util/nvidia-cuda-toolkit ) + geoip? ( dev-libs/geoip ) + lua? ( dev-lang/lua:* ) + luajit? ( dev-lang/luajit:* ) + nflog? ( net-libs/libnetfilter_log ) + nfqueue? ( net-libs/libnetfilter_queue ) +" +# #446814 +# prelude? ( dev-libs/libprelude ) +# pfring? ( sys-process/numactl net-libs/pf_ring) +# system-htp? ( >=net-analyzer/htp-0.5.5 ) +RDEPEND="${DEPEND}" + +pkg_setup() { + enewgroup ${PN} + enewuser ${PN} -1 -1 /var/lib/${PN} "${PN}" +} + +src_prepare() { + epatch "${FILESDIR}/fortify_source-numeric.patch" + epatch "${FILESDIR}/magic-location.patch" + epatch "${FILESDIR}/json.patch" + + eautoreconf +} + +src_configure() { + local myeconfargs=( + "--localstatedir=/var/" \ + "--disable-detection" \ + $(use_enable af-packet) \ + $(use_enable nfqueue) \ + $(use_enable test coccinelle) \ + $(use_enable test unittests) \ + $(use_enable control-socket unix-socket) + ) + + if use cuda ; then + myeconfargs+=( $(use_enable cuda) ) + fi + if use debug ; then + myeconfargs+=( $(use_enable debug) ) + fi + if use geoip ; then + myeconfargs+=( $(use_enable geoip) ) + fi + if use hardened ; then + myeconfargs+=( $(use_enable hardened gccprotect) ) + fi + if use nflog ; then + myeconfargs+=( $(use_enable nflog) ) + fi + # not supported yet (no pfring in portage) +# if use pfring ; then +# myeconfargs+=( $(use_enable pfring) ) +# fi + # no libprelude in portage +# if use prelude ; then +# myeconfargs+=( $(use_enable prelude) ) +# fi + # htp not added into portage yet +# if use system-htp ; then +# myeconfargs+=( $(use_enable system-htp non-bundled-htp) ) +# fi + if use lua ; then + myeconfargs+=( $(use_enable lua) ) + fi + if use luajit ; then + myeconfargs+=( $(use_enable luajit) ) + fi + + LIBS+="-lrt -lnuma" + + econf LIBS="${LIBS}" ${myeconfargs[@]} +} + +src_install() { + emake DESTDIR="${D}" install + + insinto "/etc/${PN}" + doins {classification,reference,threshold}.config suricata.yaml + + if use rules ; then + insinto "/etc/${PN}/rules" + doins rules/*.rules + fi + + dodir "/var/lib/${PN}" + dodir "/var/log/${PN}" + fowners -R ${PN}: "/var/lib/${PN}" "/var/log/${PN}" "/etc/${PN}" + fperms 750 "/var/lib/${PN}" "/var/log/${PN}" "/etc/${PN}" +} \ No newline at end of file