summaryrefslogtreecommitdiff
path: root/net-analyzer/suricata
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/suricata')
-rw-r--r--net-analyzer/suricata/Manifest7
-rw-r--r--net-analyzer/suricata/suricata-5.0.4.ebuild197
-rw-r--r--net-analyzer/suricata/suricata-5.0.5-r1.ebuild (renamed from net-analyzer/suricata/suricata-5.0.5.ebuild)43
-rw-r--r--net-analyzer/suricata/suricata-6.0.0.ebuild203
-rw-r--r--net-analyzer/suricata/suricata-6.0.1.ebuild203
5 files changed, 26 insertions, 627 deletions
diff --git a/net-analyzer/suricata/Manifest b/net-analyzer/suricata/Manifest
index 05b3b21a4b94..10c34c04db90 100644
--- a/net-analyzer/suricata/Manifest
+++ b/net-analyzer/suricata/Manifest
@@ -5,13 +5,8 @@ AUX suricata-5.0.1_default-config.patch 813 BLAKE2B 5758447f2dc6fa50bb6a388c2c83
AUX suricata-6.0.0_default-config.patch 833 BLAKE2B a8a63f838452531feb9f1b69e9756c0385338f4a1b8f6c36b22052cc7f8a41cd07e31b882e2e89402c5eb43e599390cf6922f9dcfc869416d57aa3426516f8f9 SHA512 8edff1be84dbe29a140889040a7d9310ee8dc5ab82cf9ff64298ecfab07a75853caa7ac907cf191a62a1c2de9833311fd090eb2f82c9d3745b5f3fc01adf6efd
AUX suricata.service 501 BLAKE2B 00631ada0d2993eae97a028ef950b031b91bb3af346ee3538bd7f0deb9d76bb8552761b4666a3ac80673fe31ffd95424f2ff71e35db0f5fe6667b32478fab4c4 SHA512 4e4e87735731fd0e18ab26e536e7904833a19ce8785ffdd15b22d494673c73044137908feee74800486960f9efd09d1ddc2c75a490a2e35ef06caf23c7439a0c
AUX suricata.tmpfiles 24 BLAKE2B 150b74a6775137704915015871ab4455b8d0b9204a75c398ea746e9194b0c0a787904f9015b98f36a685fac0dbb0fcb43746096dd403bf882afa5dfef12af94d SHA512 1530aed4efb35f988e2f0134388ea11ffc3ba1f217845a2c5dd47f947983ed4d343126e49d66a86ca7894ff60b5134464ddbe07509dcc80c001131f09cb7e2dd
-DIST suricata-5.0.4.tar.gz 29091046 BLAKE2B 38526ca39d2460d630fdd9e804f36c74bfcde54a529748896779b549ed1b55174d6080ddad8933ddfd26004f4e78748a503832f47ee5f52d84a133643aef482b SHA512 e5da14f80b628968e146839b828971e888fd0158b2ecbbcc15c0f42fda2bdcc8ad89632ba05cc45c88d88e537452e77f8e2f3a5e09ecd038d0d38b1a8cf8cea6
DIST suricata-5.0.5.tar.gz 29094537 BLAKE2B c2a5897836117abe9ca39b3a03de36c4d5667d3e64dc1befd77a7b777e4191439a497e3042e6d00b80ae31c8c4f18347cb2e6833e8db5f64b31c8ab1cf557ac5 SHA512 5f26731e0a0134fdecc8e76a68a69584bacb614ba4fd56b74f27abe62ab7d80135908eeaae38c9a03101f069d83597b3c7c69000bdd2a2e6bfe87f7a98de4e16
-DIST suricata-6.0.0.tar.gz 30832555 BLAKE2B 9cea05b07520924706e961efed6a45b9ba73388a25777f43c1a90497aa00ec200bad15863b7b17b84e622c79309365596853423776da9c3d103c2a8c1126a0d2 SHA512 3c30f6f57c0e8a24992ff2b4ce8ce166d3c0d4b28c8f5e79434d04de9f2016773be01a1689fedfc9e54ff1c8bc9838206bc28f3ff2e47d60102a7016f1062ec3
DIST suricata-6.0.1.tar.gz 30460439 BLAKE2B 55a24fa2f653a0a80f51e1ab102bb7046bd1f67d60c64c139b485086f4d8e0f5db58906bc33a7b5bdb76ba37b8206ded99b08034c4c292cf16d595bcafc7acc0 SHA512 be57150afc238b6627731e4463297e67469b66241779f5af3d1bd93bfad4fde41a5371298b54a06c7c3ea324e5642753ca57900173989ac738d663a85e9c33f4
-EBUILD suricata-5.0.4.ebuild 6183 BLAKE2B 00a0b81904e7225328307256cd22ace60677b947f31f99f0c2db2916695e35dc69399098ba395ebaad1ae838d1ffcefa3d9342dae9a1d06fd6eddf5c697fff79 SHA512 817214715a8925e3e217c1f847694d37bea28e4bef2198e4d5f111618d21d5cbcce630206869ffec6c0a4a778074aa6b676a14ec669249786a6767499497c2a1
-EBUILD suricata-5.0.5.ebuild 6183 BLAKE2B f97f394dbbfb9ddbe9c276742641ccab96dfa0da6324576b11189e6bf13ebbb1233f018f9c248f97c1d7fe766b2236c98e8facbe332bef8f1ef9611ea28d8970 SHA512 479dbbdf85088291c5af571aabe4bc86e0a5699402ce6e4e6076341c70c51adee49f01be0853d743ee999b3e28d45c6c96a2b73bb59fbd279687e00f5fcca2be
-EBUILD suricata-6.0.0.ebuild 6487 BLAKE2B 21e0ab1b2980ec2e77b8fef5086ed942b49b1107fa63351d1a059e52b090d8cded46b667ba82fb6e16191ca3fca8a14a76a4de90e30bb837202df157ee7589c9 SHA512 8aa777b9c64f7d1aa3b8b0affab01799085924ba2be4d899186ae3ddf032d76e2badb56b462bb2e5648be15d3667aa3eb8d92b53ed546835ab088298ed327dc2
+EBUILD suricata-5.0.5-r1.ebuild 6312 BLAKE2B 05a60dcb99c91f3aeb02a7afa8da290a3fc6a629fd73c60bc1aa5d5a71039a444ff3dc1d5ca73b9d2df12daf62f6ddbafe95db882a4aca1346907c95a5e2492c SHA512 ce92065ad158cbdf5c76181a20a865cf212d62a7c0fa0dc7f4fb92d73127dd89da444e384e333fd59dfbd917b56047be5b0c61e0da232208e8fed3ab8a8e593c
EBUILD suricata-6.0.1-r100.ebuild 6588 BLAKE2B 0c1aa2338a90b101a8470584af787e0a0575cc866eb8e9bfc04ee00d3a3746855444573454c3fba041dabd8e700b668087072d5bfb5f4946ec46642c37281a81 SHA512 8e2bb4d502ad9b6cc6beab62e250e83fa31b46a8061d7347d68f91e6f689b67d20e2538544691e33560e37918e83f248c8874c5e1130b870b641c3449e491f88
-EBUILD suricata-6.0.1.ebuild 6487 BLAKE2B 0f6477549e22b64277048640a9956727e6506bc2a1de2dbf98236393ff054d54b96b105ce52ee3e745adf6639fd65524645241e12fef8afc473c85d90f3a32d6 SHA512 dadce97a0b0c9d1099c71bd365ad0e4f66aad00a6d30e19096476f69b5daf5c92bf80508255eac0478099a077e505139ae2696ccbe13047039574c396beb74e2
MISC metadata.xml 1015 BLAKE2B 355c550ad2fe7a37d69b92f0bd710824d68a3353be687876449ad5b7d8e2c98b06b833e59ebcf479410aff09dce71e1f7f64be860c348f3d6c3519cd8fe2acf2 SHA512 0837e07a0130baff435e684b47a6b463991aec73b4f570672d0091a70adf163c5e83d19887e1575f12db783d6246050777011d25dc658fe4767cd3fe8fc1d4a5
diff --git a/net-analyzer/suricata/suricata-5.0.4.ebuild b/net-analyzer/suricata/suricata-5.0.4.ebuild
deleted file mode 100644
index 077c14ece6d3..000000000000
--- a/net-analyzer/suricata/suricata-5.0.4.ebuild
+++ /dev/null
@@ -1,197 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6..9} )
-
-inherit autotools flag-o-matic linux-info python-single-r1 systemd
-
-DESCRIPTION="High performance Network IDS, IPS and Network Security Monitoring engine"
-HOMEPAGE="https://suricata-ids.org/"
-SRC_URI="https://www.openinfosecfoundation.org/download/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="+af-packet bpf control-socket cuda debug +detection geoip hardened logrotate lua luajit lz4 nflog +nfqueue redis systemd test"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="${PYTHON_REQUIRED_USE}
- ?? ( lua luajit )
- bpf? ( af-packet )"
-
-RDEPEND="${PYTHON_DEPS}
- acct-group/suricata
- acct-user/suricata
- dev-libs/jansson
- dev-libs/libpcre
- 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.35
- net-libs/libpcap
- sys-apps/file
- sys-libs/libcap-ng
- bpf? ( >=dev-libs/libbpf-0.1.0 )
- cuda? ( dev-util/nvidia-cuda-toolkit )
- geoip? ( dev-libs/libmaxminddb )
- logrotate? ( app-admin/logrotate )
- lua? ( dev-lang/lua:0= )
- luajit? ( dev-lang/luajit:* )
- 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"
-
-PATCHES=(
- "${FILESDIR}/${PN}-5.0.1_configure-no-lz4-automagic.patch"
- "${FILESDIR}/${PN}-5.0.1_default-config.patch"
-)
-
-pkg_pretend() {
- 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() {
- local myeconfargs=(
- "--localstatedir=/var" \
- "--runstatedir=/run" \
- "--enable-non-bundled-htp" \
- "--enable-gccmarch-native=no" \
- "--enable-python" \
- $(use_enable af-packet) \
- $(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 lua) \
- $(use_enable luajit) \
- $(use_enable lz4) \
- $(use_enable nflog) \
- $(use_enable nfqueue) \
- $(use_enable redis hiredis) \
- $(use_enable test unittests) \
- "--disable-coccinelle"
- )
-
- if use debug; then
- myeconfargs+=( $(use_enable debug) )
- # so we can get a backtrace according to "reporting bugs" on upstream web site
- CFLAGS="-ggdb -O0" econf ${myeconfargs[@]}
- else
- econf ${myeconfargs[@]}
- fi
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- python_optimize
-
- if use bpf; then
- rm -f ebpf/Makefile.{am,in}
- 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 2750 "/var/lib/${PN}/rules" "/var/lib/${PN}/update"
-
- newinitd "${FILESDIR}/${PN}-5.0.1-init" ${PN}
- newconfd "${FILESDIR}/${PN}-5.0.1-conf" ${PN}
- systemd_dounit "${FILESDIR}"/${PN}.service
- systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}.conf
-
- if use logrotate; then
- insopts -m0644
- insinto /etc/logrotate.d
- newins etc/${PN}.logrotate ${PN}
- fi
-}
-
-pkg_postinst() {
- 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 ""
- elog "To download and install an initial set of rules, run:"
- elog " emerge --config =${CATEGORY}/${PF}"
- elog ""
-}
-
-pkg_config() {
- suricata-update
-}
diff --git a/net-analyzer/suricata/suricata-5.0.5.ebuild b/net-analyzer/suricata/suricata-5.0.5-r1.ebuild
index db9ee04aadb6..9fd6cb858948 100644
--- a/net-analyzer/suricata/suricata-5.0.5.ebuild
+++ b/net-analyzer/suricata/suricata-5.0.5-r1.ebuild
@@ -1,11 +1,12 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
+LUA_COMPAT=( lua5-1 luajit )
PYTHON_COMPAT=( python3_{6..9} )
-inherit autotools flag-o-matic linux-info python-single-r1 systemd
+inherit autotools flag-o-matic linux-info lua-single python-single-r1 systemd
DESCRIPTION="High performance Network IDS, IPS and Network Security Monitoring engine"
HOMEPAGE="https://suricata-ids.org/"
@@ -14,13 +15,13 @@ SRC_URI="https://www.openinfosecfoundation.org/download/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="+af-packet bpf control-socket cuda debug +detection geoip hardened logrotate lua luajit lz4 nflog +nfqueue redis systemd test"
+IUSE="+af-packet bpf control-socket cuda debug +detection geoip hardened logrotate lua lz4 nflog +nfqueue redis systemd test"
RESTRICT="!test? ( test )"
REQUIRED_USE="${PYTHON_REQUIRED_USE}
- ?? ( lua luajit )
- bpf? ( af-packet )"
+ bpf? ( af-packet )
+ lua? ( ${LUA_REQUIRED_USE} )"
RDEPEND="${PYTHON_DEPS}
acct-group/suricata
@@ -43,8 +44,7 @@ RDEPEND="${PYTHON_DEPS}
cuda? ( dev-util/nvidia-cuda-toolkit )
geoip? ( dev-libs/libmaxminddb )
logrotate? ( app-admin/logrotate )
- lua? ( dev-lang/lua:0= )
- luajit? ( dev-lang/luajit:* )
+ lua? ( ${LUA_DEPS} )
lz4? ( app-arch/lz4 )
nflog? ( net-libs/libnetfilter_log )
nfqueue? ( net-libs/libnetfilter_queue )
@@ -92,8 +92,6 @@ src_configure() {
$(use_enable geoip) \
$(use_enable hardened gccprotect) \
$(use_enable hardened pie) \
- $(use_enable lua) \
- $(use_enable luajit) \
$(use_enable lz4) \
$(use_enable nflog) \
$(use_enable nfqueue) \
@@ -101,6 +99,13 @@ src_configure() {
$(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) )
@@ -144,7 +149,7 @@ src_install() {
}
pkg_postinst() {
- elog ""
+ 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"
@@ -155,7 +160,7 @@ pkg_postinst() {
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
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"
@@ -164,12 +169,12 @@ pkg_postinst() {
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
elog "You can create as many ${PN}.foo* services as you wish."
fi
if use bpf; then
- elog ""
+ 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"
@@ -179,17 +184,19 @@ pkg_postinst() {
fi
if use debug; then
- elog ""
+ 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 ""
- elog "To download and install an initial set of rules, run:"
- elog " emerge --config =${CATEGORY}/${PF}"
- elog ""
+ elog
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ elog "To download and install an initial set of rules, run:"
+ elog " emerge --config =${CATEGORY}/${PF}"
+ fi
+ elog
}
pkg_config() {
diff --git a/net-analyzer/suricata/suricata-6.0.0.ebuild b/net-analyzer/suricata/suricata-6.0.0.ebuild
deleted file mode 100644
index 6a00d0c18c98..000000000000
--- a/net-analyzer/suricata/suricata-6.0.0.ebuild
+++ /dev/null
@@ -1,203 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6..9} )
-
-inherit autotools flag-o-matic linux-info python-single-r1 systemd
-
-DESCRIPTION="High performance Network IDS, IPS and Network Security Monitoring engine"
-HOMEPAGE="https://suricata-ids.org/"
-SRC_URI="https://www.openinfosecfoundation.org/download/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="+af-packet bpf control-socket cuda debug +detection geoip hardened logrotate lua luajit lz4 nflog +nfqueue redis systemd test"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="${PYTHON_REQUIRED_USE}
- ?? ( lua luajit )
- bpf? ( af-packet )"
-
-RDEPEND="${PYTHON_DEPS}
- acct-group/suricata
- acct-user/suricata
- dev-libs/jansson
- dev-libs/libpcre
- 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.35
- net-libs/libpcap
- sys-apps/file
- sys-libs/libcap-ng
- bpf? ( >=dev-libs/libbpf-0.1.0 )
- cuda? ( dev-util/nvidia-cuda-toolkit )
- geoip? ( dev-libs/libmaxminddb )
- logrotate? ( app-admin/logrotate )
- lua? ( dev-lang/lua:0= )
- luajit? ( dev-lang/luajit:* )
- 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"
-
-PATCHES=(
- "${FILESDIR}/${PN}-5.0.1_configure-no-lz4-automagic.patch"
- "${FILESDIR}/${PN}-6.0.0_default-config.patch"
-)
-
-pkg_pretend() {
- 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() {
- local myeconfargs=(
- "--localstatedir=/var" \
- "--runstatedir=/run" \
- "--enable-non-bundled-htp" \
- "--enable-gccmarch-native=no" \
- "--enable-python" \
- $(use_enable af-packet) \
- $(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 lua) \
- $(use_enable luajit) \
- $(use_enable lz4) \
- $(use_enable nflog) \
- $(use_enable nfqueue) \
- $(use_enable redis hiredis) \
- $(use_enable test unittests) \
- "--disable-coccinelle"
- )
-
- if use debug; then
- myeconfargs+=( $(use_enable debug) )
- # so we can get a backtrace according to "reporting bugs" on upstream web site
- CFLAGS="-ggdb -O0" econf ${myeconfargs[@]}
- else
- econf ${myeconfargs[@]}
- fi
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- python_optimize
-
- if use bpf; then
- rm -f ebpf/Makefile.{am,in}
- 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 2750 "/var/lib/${PN}/rules" "/var/lib/${PN}/update"
-
- newinitd "${FILESDIR}/${PN}-5.0.1-init" ${PN}
- newconfd "${FILESDIR}/${PN}-5.0.1-conf" ${PN}
- systemd_dounit "${FILESDIR}"/${PN}.service
- systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}.conf
-
- if use logrotate; then
- insopts -m0644
- insinto /etc/logrotate.d
- newins etc/${PN}.logrotate ${PN}
- fi
-}
-
-pkg_postinst() {
- 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 [[ -n "${REPLACING_VERSIONS}" ]]; then
- ewarn "Since version 6.0.0 Suricata no longer supports the unified2 output format commonly used"
- ewarn "in legacy, Snort-compatible IDS solutions, e.g. ones based on net-analyzer/barnyard2."
- ewarn "If you need unified2 support, please continue to use suricata-5."
- else
- elog "To download and install an initial set of rules, run:"
- elog " emerge --config =${CATEGORY}/${PF}"
- fi
- elog
-}
-
-pkg_config() {
- suricata-update
-}
diff --git a/net-analyzer/suricata/suricata-6.0.1.ebuild b/net-analyzer/suricata/suricata-6.0.1.ebuild
deleted file mode 100644
index 6602a4b80adc..000000000000
--- a/net-analyzer/suricata/suricata-6.0.1.ebuild
+++ /dev/null
@@ -1,203 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6..9} )
-
-inherit autotools flag-o-matic linux-info python-single-r1 systemd
-
-DESCRIPTION="High performance Network IDS, IPS and Network Security Monitoring engine"
-HOMEPAGE="https://suricata-ids.org/"
-SRC_URI="https://www.openinfosecfoundation.org/download/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="+af-packet bpf control-socket cuda debug +detection geoip hardened logrotate lua luajit lz4 nflog +nfqueue redis systemd test"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="${PYTHON_REQUIRED_USE}
- ?? ( lua luajit )
- bpf? ( af-packet )"
-
-RDEPEND="${PYTHON_DEPS}
- acct-group/suricata
- acct-user/suricata
- dev-libs/jansson
- dev-libs/libpcre
- 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.36
- net-libs/libpcap
- sys-apps/file
- sys-libs/libcap-ng
- bpf? ( >=dev-libs/libbpf-0.1.0 )
- cuda? ( dev-util/nvidia-cuda-toolkit )
- geoip? ( dev-libs/libmaxminddb )
- logrotate? ( app-admin/logrotate )
- lua? ( dev-lang/lua:0= )
- luajit? ( dev-lang/luajit:* )
- 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"
-
-PATCHES=(
- "${FILESDIR}/${PN}-5.0.1_configure-no-lz4-automagic.patch"
- "${FILESDIR}/${PN}-6.0.0_default-config.patch"
-)
-
-pkg_pretend() {
- 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() {
- local myeconfargs=(
- "--localstatedir=/var" \
- "--runstatedir=/run" \
- "--enable-non-bundled-htp" \
- "--enable-gccmarch-native=no" \
- "--enable-python" \
- $(use_enable af-packet) \
- $(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 lua) \
- $(use_enable luajit) \
- $(use_enable lz4) \
- $(use_enable nflog) \
- $(use_enable nfqueue) \
- $(use_enable redis hiredis) \
- $(use_enable test unittests) \
- "--disable-coccinelle"
- )
-
- if use debug; then
- myeconfargs+=( $(use_enable debug) )
- # so we can get a backtrace according to "reporting bugs" on upstream web site
- CFLAGS="-ggdb -O0" econf ${myeconfargs[@]}
- else
- econf ${myeconfargs[@]}
- fi
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- python_optimize
-
- if use bpf; then
- rm -f ebpf/Makefile.{am,in}
- 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 2750 "/var/lib/${PN}/rules" "/var/lib/${PN}/update"
-
- newinitd "${FILESDIR}/${PN}-5.0.1-init" ${PN}
- newconfd "${FILESDIR}/${PN}-5.0.1-conf" ${PN}
- systemd_dounit "${FILESDIR}"/${PN}.service
- systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}.conf
-
- if use logrotate; then
- insopts -m0644
- insinto /etc/logrotate.d
- newins etc/${PN}.logrotate ${PN}
- fi
-}
-
-pkg_postinst() {
- 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 [[ -n "${REPLACING_VERSIONS}" ]]; then
- ewarn "Since version 6.0.0 Suricata no longer supports the unified2 output format commonly used"
- ewarn "in legacy, Snort-compatible IDS solutions, e.g. ones based on net-analyzer/barnyard2."
- ewarn "If you need unified2 support, please continue to use suricata-5."
- else
- elog "To download and install an initial set of rules, run:"
- elog " emerge --config =${CATEGORY}/${PF}"
- fi
- elog
-}
-
-pkg_config() {
- suricata-update
-}