From: "Marek Szuba" <marecki@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/suricata/
Date: Wed, 16 Aug 2023 17:08:46 +0000 (UTC) [thread overview]
Message-ID: <1692205719.6d239f1820f40bccbc6bee23e88c2ac5a2b1dc52.marecki@gentoo> (raw)
commit: 6d239f1820f40bccbc6bee23e88c2ac5a2b1dc52
Author: Stijn Tintel <stijn <AT> linux-ipv6 <DOT> be>
AuthorDate: Thu Jul 27 13:27:03 2023 +0000
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Wed Aug 16 17:08:39 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d239f18
net-analyzer/suricata: add 7.0.0
Closes: https://bugs.gentoo.org/911313
Signed-off-by: Stijn Tintel <stijn <AT> linux-ipv6.be>
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>
net-analyzer/suricata/Manifest | 2 +
net-analyzer/suricata/metadata.xml | 1 +
net-analyzer/suricata/suricata-7.0.0.ebuild | 221 ++++++++++++++++++++++++++++
3 files changed, 224 insertions(+)
diff --git a/net-analyzer/suricata/Manifest b/net-analyzer/suricata/Manifest
index 85d27e588a21..d3bafea16736 100644
--- a/net-analyzer/suricata/Manifest
+++ b/net-analyzer/suricata/Manifest
@@ -2,3 +2,5 @@ DIST suricata-6.0.12.tar.gz 27388535 BLAKE2B 3cd16072014e814ec116bbde6649a023020
DIST suricata-6.0.12.tar.gz.sig 566 BLAKE2B 50102891a3efec7a52e16bf7c3842cbdf3e9feb0f9a1fe34ab714ea1b5f01c02aafec74c7252b1bb0b0da0242c4f4eb1771c74aef06f356672f6e5bcc405b1a8 SHA512 b3cfb4791599e9c48a46cd39e28d74022ac2aa88887b6cb04ceff70ae66a5e4b1e166caa48a47869c37cffd82e6eae1f65744ca3d84521f8808f90210039f31b
DIST suricata-6.0.13.tar.gz 27411308 BLAKE2B 47dcc47253c462510494dac35a4aa41a110f62bca148871d86509b76ac0c2a873b9fbb9fc981e65897d6443032c27c9f9eeb0fae524f4e56306ed01fe6e32b01 SHA512 7b7ea4b01b6ec4662db1e875e940d667b0aa71b7b91dccf72d32b644c6291814c3fde0c69c96c138d2f1e2412c92456fede823d61c3b7ba63f4bae0edc2dbb0d
DIST suricata-6.0.13.tar.gz.sig 566 BLAKE2B 880dccc4db0f322bd11f123fb2ad012a2904e4bee5ed0c2f161e0baee7054acde2234a9da94184ba67a5bb7adab1da10ca00c7850ae1a046dea07b91297b8476 SHA512 3578087d3ee4bcc8e0f6bd704e42d553b4baf208fc04002f4931bf8d23babe7727a25720c52143a3c423f1cc1f5513105e177fd4368b40927d6fe7234db9de65
+DIST suricata-7.0.0.tar.gz 23426302 BLAKE2B dc5026ee32dd679c18d8953048f7694c6ef69e9b60d91153e1fad5f0d757ccfcb0423ed6f3e21a27f02f6647476923d5c90e1ba83656249509414316f06cd18b SHA512 b512a8d9e7ce26b362be4e4b1e27b97c0fd6dad109e440d6227916a373e85341336782c0870a2b380fa215f4d2e8d86728f105a6af75d8662d746cee1752347d
+DIST suricata-7.0.0.tar.gz.sig 566 BLAKE2B 11033671642c953282fbb0dda0647d12ee143b16e1ee6202f0cc9bcee94eb123139e075ea860002851c2d37f3c9c7e90b72ef22c6cd0ea82dbf63d2bad852068 SHA512 216463c103c5f5fed3cb83190e78939b1efb6fcfe3f6bb8a023ff8a8df85fd7ad024fcc1d9720f196c6dbe3a3c80285a3689bf6e575ff51253a1e5df1a142fcb
diff --git a/net-analyzer/suricata/metadata.xml b/net-analyzer/suricata/metadata.xml
index f55796e7f1ed..ab8f1004e969 100644
--- a/net-analyzer/suricata/metadata.xml
+++ b/net-analyzer/suricata/metadata.xml
@@ -7,6 +7,7 @@
</maintainer>
<use>
<flag name="af-packet">Enable AF_PACKET support</flag>
+ <flag name="af-xdp">Enable AF_XDP support</flag>
<flag name="bpf">Enable support for eBPF (as well as XDP if supported by the kernel and the NIC driver)
for low-level, high-speed packet processing</flag>
<flag name="control-socket">Enable unix socket</flag>
diff --git a/net-analyzer/suricata/suricata-7.0.0.ebuild b/net-analyzer/suricata/suricata-7.0.0.ebuild
new file mode 100644
index 000000000000..f66b8fc5a628
--- /dev/null
+++ b/net-analyzer/suricata/suricata-7.0.0.ebuild
@@ -0,0 +1,221 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-1 luajit )
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit autotools flag-o-matic linux-info lua-single python-single-r1 systemd tmpfiles verify-sig
+
+DESCRIPTION="High performance Network IDS, IPS and Network Security Monitoring engine"
+HOMEPAGE="https://suricata.io/"
+SRC_URI="https://www.openinfosecfoundation.org/download/${P}.tar.gz
+ verify-sig? ( https://www.openinfosecfoundation.org/download/${P}.tar.gz.sig )"
+
+LICENSE="GPL-2"
+SLOT="0/7"
+KEYWORDS="~amd64 ~riscv ~x86"
+IUSE="+af-packet af-xdp bpf control-socket cuda debug +detection geoip hardened hyperscan lua lz4 nflog +nfqueue redis systemd test"
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}/usr/share/openpgp-keys/openinfosecfoundation.org.asc"
+
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}
+ af-xdp? ( bpf )
+ bpf? ( af-packet )
+ lua? ( ${LUA_REQUIRED_USE} )"
+
+RDEPEND="${PYTHON_DEPS}
+ acct-group/suricata
+ acct-user/suricata
+ dev-libs/jansson:=
+ dev-libs/libpcre2
+ dev-libs/libyaml
+ net-libs/libnet:*
+ net-libs/libnfnetlink
+ dev-libs/nspr
+ dev-libs/nss
+ $(python_gen_cond_dep '
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ ')
+ >=net-libs/libhtp-0.5.45
+ net-libs/libpcap
+ sys-apps/file
+ sys-libs/libcap-ng
+ af-xdp? ( net-libs/xdp-tools )
+ bpf? ( dev-libs/libbpf )
+ cuda? ( dev-util/nvidia-cuda-toolkit )
+ geoip? ( dev-libs/libmaxminddb:= )
+ hyperscan? ( dev-libs/hyperscan )
+ lua? ( ${LUA_DEPS} )
+ lz4? ( app-arch/lz4 )
+ nflog? ( net-libs/libnetfilter_log )
+ nfqueue? ( net-libs/libnetfilter_queue )
+ redis? ( dev-libs/hiredis:= )"
+DEPEND="${RDEPEND}
+ >=sys-devel/autoconf-2.69-r5
+ virtual/rust"
+BDEPEND="verify-sig? ( >=sec-keys/openpgp-keys-oisf-20200807 )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-5.0.1_configure-no-lz4-automagic.patch"
+ "${FILESDIR}/${PN}-5.0.6_configure-no-sphinx-pdflatex-automagic.patch"
+ "${FILESDIR}/${PN}-5.0.7_configure-no-hyperscan-automagic.patch"
+ "${FILESDIR}/${PN}-6.0.0_default-config.patch"
+)
+
+pkg_pretend() {
+ if use af-xdp && use kernel_linux; then
+ if kernel_is -lt 4 18; then
+ ewarn "Kernel 4.18 or newer is required for AF_XDP"
+ fi
+ fi
+
+ if use bpf && use kernel_linux; then
+ if kernel_is -lt 4 15; then
+ ewarn "Kernel 4.15 or newer is necessary to use all XDP features like the CPU redirect map"
+ fi
+
+ CONFIG_CHECK="~XDP_SOCKETS"
+ ERROR_XDP_SOCKETS="CONFIG_XDP_SOCKETS is not set, making it impossible for Suricata to load XDP programs. "
+ ERROR_XDP_SOCKETS+="Other eBPF features should work normally."
+ check_extra_config
+ fi
+}
+
+src_prepare() {
+ default
+ sed -ie 's/docdir =.*/docdir = ${datarootdir}\/doc\/'${PF}'\//' "${S}/doc/Makefile.am" || die
+ eautoreconf
+}
+
+src_configure() {
+ # Bug #861242
+ filter-lto
+
+ local myeconfargs=(
+ "--localstatedir=/var" \
+ "--runstatedir=/run" \
+ "--enable-non-bundled-htp" \
+ "--enable-gccmarch-native=no" \
+ "--enable-python" \
+ $(use_enable af-packet) \
+ $(use_enable af-xdp) \
+ $(use_enable bpf ebpf) \
+ $(use_enable control-socket unix-socket) \
+ $(use_enable cuda) \
+ $(use_enable detection) \
+ $(use_enable geoip) \
+ $(use_enable hardened gccprotect) \
+ $(use_enable hardened pie) \
+ $(use_enable hyperscan) \
+ $(use_enable lz4) \
+ $(use_enable nflog) \
+ $(use_enable nfqueue) \
+ $(use_enable redis hiredis) \
+ $(use_enable test unittests) \
+ "--disable-coccinelle"
+ )
+ if use lua; then
+ if use lua_single_target_luajit; then
+ myeconfargs+=( --enable-luajit )
+ else
+ myeconfargs+=( --enable-lua )
+ fi
+ fi
+
+ if use debug; then
+ myeconfargs+=( $(use_enable debug) )
+ # so we can get a backtrace according to "reporting bugs" on upstream web site
+ QA_FLAGS_IGNORED="usr/bin/${PN}"
+ CFLAGS="-ggdb -O0" econf ${myeconfargs[@]}
+ else
+ econf ${myeconfargs[@]}
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ python_optimize
+ # Bug #878855
+ python_fix_shebang "${ED}"/usr/bin/
+
+ if use bpf; then
+ rm -f ebpf/Makefile.{am,in} || die
+ dodoc -r ebpf/
+ keepdir /usr/libexec/suricata/ebpf
+ fi
+
+ insinto "/etc/${PN}"
+ doins etc/{classification,reference}.config threshold.config suricata.yaml
+
+ keepdir "/var/lib/${PN}/rules" "/var/lib/${PN}/update"
+ keepdir "/var/log/${PN}"
+
+ fowners -R ${PN}: "/var/lib/${PN}" "/var/log/${PN}" "/etc/${PN}"
+ fperms 750 "/var/lib/${PN}" "/var/log/${PN}" "/etc/${PN}"
+ fperms 6750 "/var/lib/${PN}/rules" "/var/lib/${PN}/update"
+
+ newinitd "${FILESDIR}/${PN}.initd" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+ systemd_dounit "${FILESDIR}"/${PN}.service
+ newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}.conf
+
+ insopts -m0644
+ insinto /etc/logrotate.d
+ newins etc/${PN}.logrotate ${PN}
+}
+
+pkg_postinst() {
+ tmpfiles_process ${PN}.conf
+
+ elog
+ if use systemd; then
+ elog "Suricata requires either the mode of operation (e.g. --af-packet) or the interface to listen on (e.g. -i eth0)"
+ elog "to be specified on the command line. The provided systemd unit launches Suricata in af-packet mode and relies"
+ elog "on file configuration to specify interfaces, should you prefer to run it differently you will have to customise"
+ elog "said unit. The simplest way of doing it is to override the Environment=OPTIONS='...' line using a .conf file"
+ elog "placed in the directory ${EPREFIX}/etc/systemd/system/suricata.service.d/ ."
+ elog "For details, see the section on drop-in directories in systemd.unit(5)."
+ else
+ elog "The ${PN} init script expects to find the path to the configuration"
+ elog "file as well as extra options in /etc/conf.d."
+ elog
+ elog "To create more than one ${PN} service, simply create a new .yaml file for it"
+ elog "then create a symlink to the init script from a link called"
+ elog "${PN}.foo - like so"
+ elog " cd /etc/${PN}"
+ elog " ${EDITOR##*/} suricata-foo.yaml"
+ elog " cd /etc/init.d"
+ elog " ln -s ${PN} ${PN}.foo"
+ elog "Then edit /etc/conf.d/${PN} and make sure you specify sensible options for foo."
+ elog
+ elog "You can create as many ${PN}.foo* services as you wish."
+ fi
+
+ if use bpf; then
+ elog
+ elog "eBPF/XDP files must be compiled (using sys-devel/clang[llvm_targets_BPF]) before use"
+ elog "because their configuration is hard-coded. You can find the default ones in"
+ elog " ${EPREFIX}/usr/share/doc/${PF}/ebpf"
+ elog "and the common location for eBPF bytecode is"
+ elog " ${EPREFIX}/usr/libexec/${PN}"
+ elog "For more information, see https://${PN}.readthedocs.io/en/${P}/capture-hardware/ebpf-xdp.html"
+ fi
+
+ if use debug; then
+ elog
+ elog "You have enabled the debug USE flag. Please read this link to report bugs upstream:"
+ elog "https://redmine.openinfosecfoundation.org/projects/suricata/wiki/Reporting_Bugs"
+ elog "You need to also ensure the FEATURES variable in make.conf contains the"
+ elog "'nostrip' option to produce useful core dumps or back traces."
+ fi
+
+ elog
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ elog "To download and install an initial set of rules, run:"
+ elog " suricata-update"
+ fi
+ elog
+}
next reply other threads:[~2023-08-16 17:08 UTC|newest]
Thread overview: 80+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-16 17:08 Marek Szuba [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-04-07 1:06 [gentoo-commits] repo/gentoo:master commit in: net-analyzer/suricata/ Marek Szuba
2024-01-23 5:07 Ionen Wolkens
2023-11-29 21:16 Petr Vaněk
2023-10-25 22:04 Marek Szuba
2023-10-25 22:04 Marek Szuba
2023-08-16 17:08 Marek Szuba
2023-06-27 21:56 Marek Szuba
2023-05-11 12:03 Marek Szuba
2023-04-16 20:03 Marek Szuba
2023-03-22 23:43 Marek Szuba
2023-03-01 23:12 Marek Szuba
2023-02-01 10:51 Marek Szuba
2023-02-01 10:51 Marek Szuba
2022-12-02 10:00 Marek Szuba
2022-11-10 0:42 Marek Szuba
2022-11-01 13:10 Marek Szuba
2022-11-01 0:36 Marek Szuba
2022-10-04 0:53 Marek Szuba
2022-09-01 12:27 Marek Szuba
2022-08-24 15:36 Marek Szuba
2022-08-24 15:36 Marek Szuba
2022-07-27 23:54 Marek Szuba
2022-07-13 15:55 Marek Szuba
2022-07-13 15:55 Marek Szuba
2022-04-25 22:57 Marek Szuba
2022-04-25 22:57 Marek Szuba
2022-03-23 1:24 Sam James
2021-11-19 14:59 Marek Szuba
2021-11-19 14:59 Marek Szuba
2021-09-25 19:08 Sam James
2021-09-03 12:15 Marek Szuba
2021-09-03 12:15 Marek Szuba
2021-08-23 21:29 Marek Szuba
2021-07-25 20:58 Marek Szuba
2021-07-01 9:47 Marek Szuba
2021-07-01 9:47 Marek Szuba
2021-06-21 16:03 Marek Szuba
2021-06-21 14:54 Marek Szuba
2021-06-21 14:54 Marek Szuba
2021-05-17 16:15 Marek Szuba
2021-04-03 19:53 Sam James
2021-03-04 14:47 Marek Szuba
2021-03-04 14:47 Marek Szuba
2021-01-25 17:38 Marek Szuba
2021-01-25 17:38 Marek Szuba
2020-12-06 22:02 Marek Szuba
2020-12-03 12:54 Marek Szuba
2020-10-14 14:44 Marek Szuba
2020-10-09 11:41 Marek Szuba
2020-07-17 20:10 Marek Szuba
2020-05-22 21:02 Marek Szuba
2020-04-23 21:11 Marek Szuba
2020-04-23 21:11 Marek Szuba
2020-03-04 9:46 Marek Szuba
2020-02-05 15:30 Marek Szuba
2019-12-20 10:18 Marek Szuba
2019-12-19 15:18 Marek Szuba
2019-12-16 16:05 Marek Szuba
2019-09-08 19:25 Slawek Lis
2018-06-11 14:04 Marek Szuba
2018-06-03 13:49 Aaron Bauman
2018-05-11 7:43 Slawek Lis
2018-03-26 19:33 Michał Górny
2018-01-24 7:00 Slawek Lis
2018-01-23 9:15 Slawek Lis
2017-07-24 8:30 Slawek Lis
2017-01-07 10:25 Slawek Lis
2016-12-28 13:25 Slawek Lis
2016-12-15 6:19 Slawek Lis
2016-11-29 12:05 Slawek Lis
2016-10-10 19:08 Slawek Lis
2016-06-30 19:03 Slawek Lis
2016-06-29 6:44 Slawek Lis
2016-04-26 6:18 Slawek Lis
2016-02-19 20:19 Slawek Lis
2016-02-19 5:59 Slawek Lis
2016-02-19 5:32 Slawek Lis
2015-12-28 5:53 Slawek Lis
2015-12-28 5:49 Slawek Lis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1692205719.6d239f1820f40bccbc6bee23e88c2ac5a2b1dc52.marecki@gentoo \
--to=marecki@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox