Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 891805 - dev-libs/capstone: "next" patches required downstream
Summary: dev-libs/capstone: "next" patches required downstream
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: mario.haustein
Depends on:
Reported: 2023-01-23 04:22 UTC by John Helmert III
Modified: 2023-05-28 17:27 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---

Ebuild for capstone commit 12e8258f60647a997ffa72702a9e5b37bd622044 (capstone-5.0_rc2_p20221203.ebuild,1.77 KB, text/plain)
2023-02-25 09:16 UTC, mario.haustein
Ebuild for capstone commit 61cdc56159986e6d77be571b04c570cf2c378d13 (capstone-5.0_rc2_p20230308.ebuild,1.77 KB, text/plain)
2023-03-16 17:13 UTC, mario.haustein

Note You need to log in before you can comment on or make changes to this bug.
Description John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2023-01-23 04:22:27 UTC
Radare2 in particular has started to depend on capstone-5 from the "next" upstream branch:

Which is referring, I think, to this patch in particular:

And then I hit it when working on bumping radare2:

So, I'm wondering who's wrong here. Should Gentoo not have a capstone release candidate as stable? Should we add patches on top of capstone-5 for the reverse dependencies that depend on them? In the short term, we can obviously
Comment 1 Larry the Git Cow gentoo-dev 2023-01-23 04:32:48 UTC
The bug has been referenced in the following commit(s):

commit 309640e8da12494bdc227e238bdbd7435cb415f9
Author:     John Helmert III <>
AuthorDate: 2023-01-23 03:38:19 +0000
Commit:     John Helmert III <>
CommitDate: 2023-01-23 04:32:34 +0000

    dev-util/radare2: add 5.8.2
    Unbundle capstone to avoid upstream requirement of capstone-5 patches
    which are not shipped in Gentoo's capstone package.
    Signed-off-by: John Helmert III <>

 dev-util/radare2/Manifest                          |   5 +
 .../files/radare2-5.8.2-bundled-capstone.patch     |  21 ++++
 .../radare2/files/radare2-5.8.2-vector35.patch     |  24 ++++
 dev-util/radare2/radare2-5.8.2.ebuild              | 125 +++++++++++++++++++++
 4 files changed, 175 insertions(+)
Comment 2 mario.haustein 2023-02-25 09:16:54 UTC
Created attachment 854544 [details]
Ebuild for capstone commit 12e8258f60647a997ffa72702a9e5b37bd622044

From it seems radare2 only builds against specific commits of capstone. I extracted the commit 12e8258f60647a997ffa72702a9e5b37bd622044 from the build scripts and prepared the attached ebuild.

@ajak: Can you confirm radare2 builds against this capstone version? If so I will publish it and you have to pinpoint it in the radare2 ebuilds.
Comment 3 mario.haustein 2023-03-16 17:13:57 UTC
Created attachment 858015 [details]
Ebuild for capstone commit 61cdc56159986e6d77be571b04c570cf2c378d13

@ajak: Attached you will find a capstone ebuild suitable for radare 5.8.4 (Capstone commit 61cdc56159986e6d77be571b04c570cf2c378d13). Please check if it works and I will commit it to the tree.
Comment 4 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2023-05-28 17:27:18 UTC
Hi Mario, I apologize for the delay in responding.

It does seem that radare-5.8.{2,6} are able to compile with your capstone-5.0_rc2-r4. But is this really what we want to do? There seem to breaking changes in the next branch, which other revdeps of capstone shouldn't be subject to?