diff options
author | Marek Szuba <marecki@gentoo.org> | 2021-06-21 16:59:50 +0100 |
---|---|---|
committer | Marek Szuba <marecki@gentoo.org> | 2021-06-21 17:03:38 +0100 |
commit | 7a2e9ee518178d40409d8d27384ac0c84b2b3ae9 (patch) | |
tree | a229c7b21d1ca83c45faaf156135148065305a47 /net-analyzer/suricata | |
parent | sys-cluster/lmod: fix on prefix (diff) | |
download | gentoo-7a2e9ee518178d40409d8d27384ac0c84b2b3ae9.tar.gz gentoo-7a2e9ee518178d40409d8d27384ac0c84b2b3ae9.tar.bz2 gentoo-7a2e9ee518178d40409d8d27384ac0c84b2b3ae9.zip |
net-analyzer/suricata: limit version of currently selected rust
While simply limiting the version of virtual/rust in dependencies is
likely enough for most users at present, if someone has got both rust
and rust-bin emerged the virtual will only affect the version of one of
them - and it is possible that the version currently set as active
by "eselect rust" is not a supported one.
Closes: https://bugs.gentoo.org/797370
Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'net-analyzer/suricata')
-rw-r--r-- | net-analyzer/suricata/suricata-6.0.2.ebuild | 14 |
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" |