diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-11-29 22:58:59 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-11-29 22:58:59 +0000 |
commit | e7b6f003e8384cdfc8c0e7603329e969d8806c24 (patch) | |
tree | 43f634afff484e1aabb0f8eccbd7c8d109492bfe /net-analyzer | |
parent | 70a061c3f38986cf8f04a4c6567114cea348169e (diff) |
gentoo auto-resync : 29:11:2023 - 22:58:59
Diffstat (limited to 'net-analyzer')
-rw-r--r-- | net-analyzer/Manifest.gz | bin | 43247 -> 43244 bytes | |||
-rw-r--r-- | net-analyzer/suricata/Manifest | 1 | ||||
-rw-r--r-- | net-analyzer/suricata/suricata-7.0.2-r1.ebuild | 221 |
3 files changed, 222 insertions, 0 deletions
diff --git a/net-analyzer/Manifest.gz b/net-analyzer/Manifest.gz Binary files differindex 67c8d74cc803..2b17d19995d1 100644 --- a/net-analyzer/Manifest.gz +++ b/net-analyzer/Manifest.gz diff --git a/net-analyzer/suricata/Manifest b/net-analyzer/suricata/Manifest index fe9a7b774572..a41a148612cf 100644 --- a/net-analyzer/suricata/Manifest +++ b/net-analyzer/suricata/Manifest @@ -12,5 +12,6 @@ DIST suricata-6.0.15.tar.gz.sig 566 BLAKE2B f9f5fd9df55c9854f4da3765673df094a397 DIST suricata-7.0.2.tar.gz 23445403 BLAKE2B 5af50f6f0d91ba233b1cc373c073e72824f10d6df20c27041d5fd11d25c7be6b1941beccf0fb18612d6277eaa7bb1d47d8fedbd34f580ba87d352c45d4d51725 SHA512 bca6eb64495d36fcc83522e29a8ec24653752930d001191fca1d72de5513537fdb8c1805fc45afe55b5fb3a68cf3747af609eec46070505dcd5d9e53c0ed9b95 DIST suricata-7.0.2.tar.gz.sig 566 BLAKE2B 8a931361acfa5e945fe9a3a03b38c65ff7f59da88a9af9c3f5a4b15ec880de6f22038a45d27c480c75489df0a90373f3cee44c48a266226fae89c00ed78b6e5f SHA512 0a46c8fef1d68f76c08c314613e558027dc7700a72628b5708dbc36c5c1943d816120c569692103d75d284cd7027cdda0d4ef9ab436992d7d2ec101e18aa5056 EBUILD suricata-6.0.15.ebuild 6784 BLAKE2B e4c8adbfe5dd159a53ec01d9ba072cd6d619cc997934da9a0b17beea9374eac495322459e1a110fdd83e047acbd8918ac89879e2ac61be2368e30678fbb24219 SHA512 91925b71758b1850933faae4970119004a202e6abaf0a13717bf45583669ada11f1eafed41f6678f664861541af758dc7b3627971c63bffa6ef5a1b156529c0a +EBUILD suricata-7.0.2-r1.ebuild 6994 BLAKE2B 45261a7c8ce698ec49517d7698e961e469ce437eb94b8bfe474227c05f7509158a3089df1c61b751f8fde7188b8ec071b591291e18840d351dab03d4526077c2 SHA512 6e7e1833f397db7416dcccf40293528650bbcaa694cc64fbeedcaf36a66faedd5c69acb17ff8c9138f0d6e1b91f849c274ad719e83dbf27b1822febaf98d527a EBUILD suricata-7.0.2.ebuild 6996 BLAKE2B 093fe6ae329466f107f6cd20b3e5a8be464e22f78a78560a14251f62f0cb0e071c07a2e46f3b4301dca33542726789a257680751e88314354bf36667ced1362d SHA512 0743c46093f47cdf962a8835ca96225f9b9ef0dffdefc730ea23486c997669ed27ab3a38bf14f05a858999dd5b5414f0d8b3115777896b136d4ac35e075d5ad1 MISC metadata.xml 1100 BLAKE2B 22631c517f844f3528ff0347d1e05104a1be008e3c1c69f58879926f2c37a703d4fc329133e18d76e4e5b5b1d1037b1c17ecf1da251f76f7ad2e88537484f4e1 SHA512 8659ad58b929e8c5d7bd62e202edfce1ca11cee058ba80ca25eac881bcf82a498a22a794a3fce6a4d8e99e03d183cc6a0eab74924a6fc9c27527328fe6335531 diff --git a/net-analyzer/suricata/suricata-7.0.2-r1.ebuild b/net-analyzer/suricata/suricata-7.0.2-r1.ebuild new file mode 100644 index 000000000000..67cffa1955a5 --- /dev/null +++ b/net-analyzer/suricata/suricata-7.0.2-r1.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" +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="/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/vectorscan:= ) + 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.7_configure-no-hyperscan-automagic.patch" + "${FILESDIR}/${PN}-6.0.0_default-config.patch" + "${FILESDIR}/${PN}-7.0.2_configure-no-sphinx-pdflatex-automagic.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 +} |