commit:     34b54971e5f3bee07e077168aa4946b3438362e5
Author:     Brett A C Sheffield <bacs <AT> librecast <DOT> net>
AuthorDate: Sat Mar 14 11:30:26 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Mar 14 18:57:25 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34b54971

dev-util/rizin: add 0.8.2

This version fixes CVE-2026-22780.

Depend on dev-libs/blake3 instead of vendored library.

Bug: https://bugs.gentoo.org/971005
Closes: https://bugs.gentoo.org/971004
Signed-off-by: Brett A C Sheffield <bacs <AT> librecast.net>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/319
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-util/rizin/Manifest                            |   1 +
 .../rizin/files/rizin-0.8.2-use_sys_blake3.patch   |  50 ++++++++++
 dev-util/rizin/rizin-0.8.2.ebuild                  | 101 +++++++++++++++++++++
 3 files changed, 152 insertions(+)

diff --git a/dev-util/rizin/Manifest b/dev-util/rizin/Manifest
index c1a2a36e26a6..c6b1d943046b 100644
--- a/dev-util/rizin/Manifest
+++ b/dev-util/rizin/Manifest
@@ -1,4 +1,5 @@
 DIST rizin-src-v0.7.4.tar.xz 18613012 BLAKE2B 
0f55416fc73bf6122e3969aec286c1b77ee9d9495d71aee0c9dcdceb94d411aa9e12a05ad3a4aa8792f40d028e753c30b586bc397a9e72276b8e10fd058eab29
 SHA512 
47f077805d88ae10d69e9eb1a53a691b5c3c4b1604927934948cf8ff69731b23a1df8811297e2e5882a2d09b60a5601fcbc96abaa9342712f52335508f64a20a
 DIST rizin-src-v0.8.1.tar.xz 21334856 BLAKE2B 
52da4a3cb522e540ce03e61691e029fe1e81f5367fc38a32fc32e8a99c00aa91701af8acee8308b8369495f76b0131a65565c11fe9b9bbc04b1f8f6e2c10cbf4
 SHA512 
da0de01199e0d314fb5023267918d26ae4748547e60c6ce10a81f32a6e6e5453694a5261cb16b48df1412ef405e4835feb9598fafe75787dcacbf0a5fa6225f9
+DIST rizin-src-v0.8.2.tar.xz 21332596 BLAKE2B 
ca5345e28dbeb7a6dcdf8e76335d92b09f63add04b2022de34c44882bcf7f2adfa73143299fbef4960f0c52e503356d392baa08cc0274c554c7a7df36047e1c5
 SHA512 
cb51091c0e054add9a965596d693eb86f6d0f04147386a24a694f51f39702d4b8762272b094d7b103a9e413a158226b0366d982e46949807fb9c529b66ce8981
 DIST rizin-testbins-71482f7194847b4ece45a9e53f28085b6bab40a4.tar.gz 189968184 
BLAKE2B 
410c43c5d0e9d79d9f378fd04921ba4e07560e060ee3d73338c0f083b7cb0b651d49864b6b0b36c4d1161340287ed187b7e267ac58c6ca6c019a8734cb6a5ae0
 SHA512 
d8120bf213e7c55c4de4756fd7a80e0629f6719b30f661bd5826065c8fa7b570f62b376956ef24570ecaaa9c24b7241119d8d94bd2f60bb9155c5dd06faa729e
 DIST rizin-testbins-ced304a8d886b2ba189027a86b2e9d949ab311dd.tar.gz 187060498 
BLAKE2B 
612d6f13f609e1dcdd72e37ae18d96680cacbb788aebc101ca6e78e96712b7142ee73ba9157163a49152810a6223524d15e211a7db81c4aa2efcb4ed4572d1de
 SHA512 
07d9c66d7ffbe8954a6a8c8ac7da75e5a1d0258533e32d223d1267826c9e8b3182bf8e2d55ca8d683992059b1068044dbbb662774e533d70bad7806b0d343369

diff --git a/dev-util/rizin/files/rizin-0.8.2-use_sys_blake3.patch 
b/dev-util/rizin/files/rizin-0.8.2-use_sys_blake3.patch
new file mode 100644
index 000000000000..fdf334d58cfe
--- /dev/null
+++ b/dev-util/rizin/files/rizin-0.8.2-use_sys_blake3.patch
@@ -0,0 +1,50 @@
+Based on upstream commit:
+https://github.com/rizinorg/rizin/pull/5414/commits/191a24dcbef9a8336a930926a102d0f544b8a503
+From: Zephyr Lykos <[email protected]>
+Date: Sun, 28 Sep 2025 13:11:33 +0800
+Subject: [PATCH] Add option to use system BLAKE3 (#5414)
+
+--- a/doc/PACKAGERS.md
++++ b/doc/PACKAGERS.md
+@@ -82,6 +82,7 @@
+ * `use_sys_pcre2`
+ * `use_sys_tree_sitter`
+ * `use_sys_softfloat`
++* `use_sys_blake3`
+ 
+ See [meson_options.txt][] for a complete list of compile-time options.
+ 
+--- a/meson.build
++++ b/meson.build
+@@ -310,8 +310,11 @@ libdemangle_proj = subproject('libdemangle', 
default_options: libdemangle_option
+ libdemangle_dep = libdemangle_proj.get_variable('libdemangle_dep')
+ 
+ # handle blake3 algo
+-blake3_proj = subproject('blake3', default_options: 
['default_library=static', 'werror=false'])
+-blake3_dep = blake3_proj.get_variable('blake3_dep')
++blake3_dep = dependency('libblake3', required: get_option('use_sys_blake3'), 
static: is_static_build)
++if not blake3_dep.found()
++  blake3_proj = subproject('blake3', default_options: 
['default_library=static', 'werror=false'])
++  blake3_dep = blake3_proj.get_variable('blake3_dep')
++endif
+ 
+ # handle openssl library
+ sys_openssl = dependency('openssl', required: get_option('use_sys_openssl'), 
static: is_static_build)
+@@ -842,6 +845,7 @@ summary({
+   'System zlib library': zlib_dep.found() and zlib_dep.type_name() != 
'internal',
+   'System zstd library': libzstd_dep.found() and libzstd_dep.type_name() != 
'internal',
+   'System zip library': libzip_dep.found() and libzip_dep.type_name() != 
'internal',
++  'System blake3 library': blake3_dep.found() and blake3_dep.type_name() != 
'internal',
+   'Use ptrace-wrap': use_ptrace_wrap,
+   'Use RPATH': rpath_summary,
+ }, section: 'Configuration', bool_yn: true)
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -37,6 +37,7 @@
+ option('use_sys_tree_sitter', type: 'feature', value: 'disabled')
+ option('use_sys_pcre2', type: 'feature', value: 'disabled')
+ option('use_sys_softfloat', type: 'feature', value: 'disabled')
++option('use_sys_blake3', type: 'feature', value: 'disabled')
+ option('use_swift_demangler', type: 'boolean', value: true, description: 'If 
false, disables the swift demangler')
+ option('use_gpl', type: 'boolean', value: true, description: 'Set to false 
when you want to disable gpl code')
+ option('install_sigdb', type: 'boolean', value: false, description: 
'Downloads and installs rizin sigdb')

diff --git a/dev-util/rizin/rizin-0.8.2.ebuild 
b/dev-util/rizin/rizin-0.8.2.ebuild
new file mode 100644
index 000000000000..d8d7ef5fdf93
--- /dev/null
+++ b/dev-util/rizin/rizin-0.8.2.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11..14} )
+
+# This is the commit that the CI for the release commit used
+BINS_COMMIT="71482f7194847b4ece45a9e53f28085b6bab40a4"
+
+inherit meson python-any-r1
+
+DESCRIPTION="reverse engineering framework for binary analysis"
+HOMEPAGE="https://rizin.re/";
+
+SRC_URI="mirror+https://github.com/rizinorg/rizin/releases/download/v${PV}/rizin-src-v${PV}.tar.xz
+       test? ( 
https://github.com/rizinorg/rizin-testbins/archive/${BINS_COMMIT}.tar.gz -> 
rizin-testbins-${BINS_COMMIT}.tar.gz )"
+S="${WORKDIR}/${PN}-v${PV}"
+
+LICENSE="Apache-2.0 BSD LGPL-3 MIT"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="test"
+
+# Need to audit licenses of the binaries used for testing
+RESTRICT="test? ( fetch ) !test? ( test )"
+
+RDEPEND="
+       app-arch/lz4:0=
+       app-arch/xz-utils
+       app-arch/zstd:=
+       dev-libs/blake3:=
+       >=dev-libs/capstone-5:0=
+       dev-libs/libmspack
+       dev-libs/libzip:0=
+       dev-libs/openssl:0=
+       dev-libs/libpcre2:0=[jit]
+       >=dev-libs/tree-sitter-0.19.0:=
+       dev-libs/xxhash
+       sys-apps/file
+       virtual/zlib:=
+"
+DEPEND="${RDEPEND}"
+BDEPEND="${PYTHON_DEPS}"
+
+PATCHES=(
+       "${FILESDIR}/${PN}-0.4.0-never-rebuild-parser.patch"
+       "${FILESDIR}/${PN}-0.8.2-use_sys_blake3.patch"
+)
+
+src_prepare() {
+       default
+
+       local py_to_mangle=(
+               librz/core/cmd_descs/cmd_descs_generate.py
+               sys/clang-format.py
+               test/fuzz/scripts/fuzz_rz_asm.py
+               test/scripts/gdbserver.py
+       )
+
+       python_fix_shebang "${py_to_mangle[@]}"
+
+       # https://github.com/rizinorg/rizin/issues/3459
+       sed -ie '/dyld_chained_ptr_arm64e_auth/d' test/unit/test_bin_mach0.c || 
die
+
+       if use test; then
+               cp -r "${WORKDIR}/rizin-testbins-${BINS_COMMIT}" 
"${S}/test/bins" || die
+               cp -r "${WORKDIR}/rizin-testbins-${BINS_COMMIT}" "${S}" || die
+       fi
+}
+
+src_configure() {
+       local emesonargs=(
+               -Dcli=enabled
+               -Duse_sys_blake3=enabled
+               -Duse_sys_capstone=enabled
+               -Duse_sys_libmspack=enabled
+               -Duse_sys_libzip=enabled
+               -Duse_sys_libzstd=enabled
+               -Duse_sys_lz4=enabled
+               -Duse_sys_lzma=enabled
+               -Duse_sys_magic=enabled
+               -Duse_sys_openssl=enabled
+               -Duse_sys_pcre2=enabled
+               -Duse_sys_tree_sitter=enabled
+               -Duse_sys_xxhash=enabled
+               -Duse_sys_zlib=enabled
+
+               $(meson_use test enable_tests)
+               $(meson_use test enable_rz_test)
+       )
+       meson_src_configure
+}
+
+src_test() {
+       # We can select running either unit or integration tests, or all of
+       # them by not passing --suite. According to upstream, integration
+       # tests are more fragile and unit tests are sufficient for testing
+       # packaging, so only run those.
+       meson_src_test --suite unit
+}

Reply via email to