summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/suricata/suricata-6.0.2.ebuild14
1 files changed, 13 insertions, 1 deletions
diff --git a/net-analyzer/suricata/suricata-6.0.2.ebuild b/net-analyzer/suricata/suricata-6.0.2.ebuild
index 739d881823da..5a9b9a7ab1a8 100644
--- a/net-analyzer/suricata/suricata-6.0.2.ebuild
+++ b/net-analyzer/suricata/suricata-6.0.2.ebuild
@@ -51,7 +51,7 @@ RDEPEND="${PYTHON_DEPS}
redis? ( dev-libs/hiredis )"
DEPEND="${RDEPEND}
>=sys-devel/autoconf-2.69-r5
- <virtual/rust-1.53.0" # Bug #797370. Hopefully to be fixed come next release.
+ <virtual/rust-1.53.0" # Bug #797370 part one. Hopefully to be fixed come next release.
PATCHES=(
"${FILESDIR}/${PN}-5.0.1_configure-no-lz4-automagic.patch"
@@ -60,6 +60,18 @@ PATCHES=(
)
pkg_pretend() {
+ # Bug #797370 part deux, needed to address the edge case of both rust and rust-bin being present
+ # - in which case the version limit set on virtual/rust only affects one of them.
+ # Version-checking code shamelessly stolen from www-client/firefox.
+ local version_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'release:' | awk '{ print $2 }')
+ [[ -z ${version_rust} ]] && die "Failed to read version from rustc!"
+ if ver_test "${version_rust}" -ge "1.53.0"; then
+ eerror "This version of ${PN} does not support Rust 1.53.0+. Please switch to an older version using"
+ eerror " eselect rust"
+ eerror "before emerging ${PN}."
+ die "Unsupported version of Rust selected"
+ 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"