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
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: mario.haustein
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
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: ---


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

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:

https://github.com/radareorg/radare2/issues/21204

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

https://github.com/capstone-engine/capstone/commit/bc583a7da3008dd010e64f8cb517aeda2b58e281

And then I hit it when working on bumping radare2: 

https://github.com/gentoo/gentoo/pull/29223

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):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=309640e8da12494bdc227e238bdbd7435cb415f9

commit 309640e8da12494bdc227e238bdbd7435cb415f9
Author:     John Helmert III <ajak@gentoo.org>
AuthorDate: 2023-01-23 03:38:19 +0000
Commit:     John Helmert III <ajak@gentoo.org>
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.
    
    Bug: https://bugs.gentoo.org/885395
    Bug: https://bugs.gentoo.org/889026
    Bug: https://bugs.gentoo.org/891805
    Closes: https://github.com/gentoo/gentoo/pull/29223
    Signed-off-by: John Helmert III <ajak@gentoo.org>

 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 https://github.com/radareorg/radare2/issues/21204 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?