Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 391751

Summary: dev-util/radare2 ebuild addition request
Product: Gentoo Linux Reporter: Anton Kochkov <anton.kochkov>
Component: Current packagesAssignee: Sergei Trofimovich (RETIRED) <slyfox>
Status: RESOLVED FIXED    
Severity: enhancement CC: anton.bugs, anton.kochkov, asolokha, pacho, siarhei.siamashka, slyfox
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: radare2-0.8.8.ebuild
radare2-0.8.8.ebuild
radare2-0.9.ebuild
radare2 live ebuild
radare-0.8.8.ebuild
radare2-0.9.ebuild
radare2 live ebuild
radare2-0.9.ebuild
build.log
radare2 0.9 ebuild
radare2 live ebuild
radare2 0.9 ebuild
radare2 live ebuild
radare2-0.9.ebuild
radare2 live ebuild
radare2 live ebuild
radare2 0.9.2 ebuild
radare2-0.9.2.ebuild

Description Anton Kochkov 2011-11-24 00:31:56 UTC
Radare now have v2 branch/release.
But it have another versioning.

so, i think it can be dev-util/radare2-0.8.8

http://radare.org/get/radare2-0.8.8.tar.gz

release notes http://radare.org/get/changelog2-0.8.8-short
Comment 1 Anton Kochkov 2011-11-24 01:52:19 UTC
Also, it is nice to have bindings as USE flag. http://radare.org/get/r2-bindings-0.8.8.tar.gz
Comment 2 Anton Kochkov 2011-11-24 01:53:14 UTC
Created attachment 293591 [details]
radare2-0.8.8.ebuild
Comment 3 Anton Kochkov 2011-12-06 04:43:06 UTC
Created attachment 294927 [details]
radare2-0.8.8.ebuild
Comment 4 Anton Kochkov 2011-12-06 04:43:35 UTC
Created attachment 294929 [details]
radare2-0.9.ebuild
Comment 5 Anton Kochkov 2011-12-06 04:44:18 UTC
Created attachment 294931 [details]
radare2 live ebuild

And I want to be maintainer of this package
Comment 6 Anton Kochkov 2011-12-13 10:16:37 UTC
Created attachment 295643 [details]
radare-0.8.8.ebuild
Comment 7 Anton Kochkov 2011-12-13 10:17:06 UTC
Created attachment 295645 [details]
radare2-0.9.ebuild
Comment 8 Anton Kochkov 2011-12-13 10:17:26 UTC
Created attachment 295647 [details]
radare2 live ebuild
Comment 9 Pacho Ramos gentoo-dev 2012-03-26 08:40:38 UTC
Created attachment 306691 [details]
radare2-0.9.ebuild

I have tried attached ebuild:
- Uses eapi4
- Drops "emake -j1" usage as parallel compilation looks to work for me
- drops src_prepare because base_src_prepare is already used by default (exported by base.eclass)
- drops src_install because eapi4 already takes care of it automatically

But  (build.log attached):
- It installs pre-stripped files (I fail to see where is calling strip in Makefile :S)
- It doesn't respect LDFLAGS

Then, the ebuild can't be introduced with that known problem :(

Regarding live ebuild, I haven't tested it, are you should would be willing to maintain it? live ebuilds usually require more work as they can start to fail without notice due constant upstream changes
Comment 10 Pacho Ramos gentoo-dev 2012-03-26 08:42:11 UTC
Created attachment 306693 [details]
build.log

Other problems:
- with-readline configure option doesn't exist
- A lot of other configure options are not handled and could lead to automagic dependencies then (see "./configure --help")
Comment 11 Anton Kochkov 2012-03-26 09:23:07 UTC
(In reply to comment #9)
> Created attachment 306691 [details]
> radare2-0.9.ebuild
> 
> I have tried attached ebuild:
> - Uses eapi4
> - Drops "emake -j1" usage as parallel compilation looks to work for me
> - drops src_prepare because base_src_prepare is already used by default
> (exported by base.eclass)
> - drops src_install because eapi4 already takes care of it automatically
> 
> But  (build.log attached):
> - It installs pre-stripped files (I fail to see where is calling strip in
> Makefile :S)
> - It doesn't respect LDFLAGS
> 
> Then, the ebuild can't be introduced with that known problem :(
> 
> Regarding live ebuild, I haven't tested it, are you should would be willing
> to maintain it? live ebuilds usually require more work as they can start to
> fail without notice due constant upstream changes

Yes, i want, because i have nice relations with radare team, and actively using it.

About configure options - ok, i'll fix that today
Comment 12 Pacho Ramos gentoo-dev 2012-03-26 10:31:06 UTC
If you are in contact with radare team, please explain them LDFLAGS/stripping issues

Thanks :)
Comment 13 Anton Kochkov 2012-04-04 17:20:22 UTC
Created attachment 307803 [details]
radare2 0.9 ebuild

Fixed all issues
Comment 14 Anton Kochkov 2012-04-04 17:21:04 UTC
Created attachment 307805 [details]
radare2 live ebuild
Comment 15 Anton Kochkov 2012-04-04 17:27:11 UTC
Created attachment 307807 [details]
radare2 0.9 ebuild
Comment 16 Anton Kochkov 2012-04-04 17:27:33 UTC
Created attachment 307809 [details]
radare2 live ebuild
Comment 17 Pacho Ramos gentoo-dev 2012-04-04 21:30:38 UTC
src_configure() {
	econf $(use ssl || echo --without-ssl ) \
		$(use gmp || echo --without-gmp ) \
		$(use ewf || echo --without-ewf ) \
		$(use debug || echo --without-debug )
}

Doesn't standard:
$(use ssl) 

work as expected? (passing --with-ssl and --without-ssl)


src_compile() {
	emake || die "compile failed"
}

die is no longer needed with eapi4 ;)
http://devmanual.gentoo.org/ebuild-writing/eapi/index.html


src_install() {
	emake DESTDIR="${ED}" INSTALL_PROGRAM="install" install || die "install failed"
}

DESTDIR should be "D" and not "ED":
http://www.gentoo.org/proj/en/gentoo-alt/prefix/techdocs.xml#doc_chap2
Comment 18 Anton Kochkov 2012-04-04 23:57:49 UTC
(In reply to comment #17)
> src_configure() {
> 	econf $(use ssl || echo --without-ssl ) \
> 		$(use gmp || echo --without-gmp ) \
> 		$(use ewf || echo --without-ewf ) \
> 		$(use debug || echo --without-debug )
> }
> 
> Doesn't standard:
> $(use ssl) 
> 
> work as expected? (passing --with-ssl and --without-ssl)
> 

These options have only --without, but not --with in configure
Comment 19 Pacho Ramos gentoo-dev 2012-04-05 10:06:27 UTC
Created attachment 307867 [details]
radare2-0.9.ebuild

I have seen --without-debug is neither recognized by configure, maybe you should simply drop that USE then.

Regarding LDFLAGS, stripping issues, have you contacted upstream about them?
Comment 20 Anton Kochkov 2012-04-05 14:52:46 UTC
(In reply to comment #19)
> Created attachment 307867 [details]
> radare2-0.9.ebuild
> 
> I have seen --without-debug is neither recognized by configure, maybe you
> should simply drop that USE then.
> 
> Regarding LDFLAGS, stripping issues, have you contacted upstream about them?

Regarding LDFLAGS and Co - i've said them, but wontfix (at least now)
Comment 21 Anton Kochkov 2012-08-20 21:08:02 UTC
Created attachment 321822 [details]
radare2 live ebuild

Updated live ebuild due to migrating radare2 from mercurial to git: http://github.com/radare2/radare2

BTW: All issues regarding LDFLAGS are fixed in git upstream
Comment 22 Anton Kochkov 2013-01-13 13:52:44 UTC
Created attachment 335466 [details]
radare2 live ebuild
Comment 23 Anton Kochkov 2013-01-13 13:53:29 UTC
Created attachment 335468 [details]
radare2 0.9.2 ebuild
Comment 24 Pacho Ramos gentoo-dev 2013-01-17 16:22:09 UTC
(In reply to comment #23)
> Created attachment 335468 [details]
> radare2 0.9.2 ebuild

are ldflags issue fixed in 0.9.2 too?
Comment 25 Anton Kochkov 2013-01-17 17:27:56 UTC
(In reply to comment #24)
> (In reply to comment #23)
> > Created attachment 335468 [details]
> > radare2 0.9.2 ebuild
> 
> are ldflags issue fixed in 0.9.2 too?

yes
Comment 26 Pacho Ramos gentoo-dev 2013-01-17 17:45:37 UTC
Created attachment 335936 [details]
radare2-0.9.2.ebuild

I still get LDFLAGS failure:
 * QA Notice: Files built without respecting LDFLAGS have been detected
 *  Please include the following list of files in your report:
 * /usr/lib64/libr_th.so.0.9.2
 * /usr/lib64/radare2/0.9.2/io_malloc.so
 * /usr/lib64/radare2/0.9.2/parse_att2intel.so
 * /usr/lib64/radare2/0.9.2/io_debug.so
 * /usr/lib64/radare2/0.9.2/io_mach.so
 * /usr/lib64/radare2/0.9.2/io_w32dbg.so
 * /usr/lib64/radare2/0.9.2/bp_x86.so
 * /usr/lib64/radare2/0.9.2/parse_x86_pseudo.so
 * /usr/lib64/radare2/0.9.2/io_ptrace.so
 * /usr/lib64/radare2/0.9.2/io_shm.so
 * /usr/lib64/radare2/0.9.2/io_haret.so
 * /usr/lib64/radare2/0.9.2/cmd_dummy.so
 * /usr/lib64/radare2/0.9.2/bp_arm.so
 * /usr/lib64/radare2/0.9.2/parse_mreplace.so
 * /usr/lib64/radare2/0.9.2/io_procpid.so
 * /usr/lib64/radare2/0.9.2/debug_native.so

To get that QA warnings to need to add this to your make.conf:
LDFLAGS="${LDFLAGS} -Wl,--hash-style=gnu"

Also, looks like it installs docs in /usr/share/doc/${PN}, when it should do it at ${PF}
Comment 27 Anton Bolshakov 2014-05-07 15:11:33 UTC
Guys, 

just in case if somebody interested, we are maintaining
RCE tools in Pentoo overlay. The latest version of radare2, capstone and few other tools are there. Feel free to join and test it.
Comment 28 Sergei Trofimovich (RETIRED) gentoo-dev 2015-01-18 01:18:40 UTC
Needs some tweaking (better upstream), but looks very nice.

Watched LCA-2015 talk https://www.youtube.com/watch?v=R3sGlzXfEkU
and couldn't resist and pushed as:

>*radare2-0.9.8 (18 Jan 2015)
>
>  18 Jan 2015; Sergei Trofimovich <slyfox@gentoo.org> +metadata.xml,
>  +radare2-0.9.8.ebuild:
>  Initial import of a nice interactive disassembler. Initial work by Anton
>  Kochkov and Pacho Ramos in bug #391751.

Thanks guys!
Comment 29 Anton Kochkov 2015-01-27 17:01:45 UTC
(In reply to Pacho Ramos from comment #26)
> Created attachment 335936 [details]
> radare2-0.9.2.ebuild
> 
> I still get LDFLAGS failure:
>  * QA Notice: Files built without respecting LDFLAGS have been detected
>  *  Please include the following list of files in your report:
>  * /usr/lib64/libr_th.so.0.9.2
>  * /usr/lib64/radare2/0.9.2/io_malloc.so
>  * /usr/lib64/radare2/0.9.2/parse_att2intel.so
>  * /usr/lib64/radare2/0.9.2/io_debug.so
>  * /usr/lib64/radare2/0.9.2/io_mach.so
>  * /usr/lib64/radare2/0.9.2/io_w32dbg.so
>  * /usr/lib64/radare2/0.9.2/bp_x86.so
>  * /usr/lib64/radare2/0.9.2/parse_x86_pseudo.so
>  * /usr/lib64/radare2/0.9.2/io_ptrace.so
>  * /usr/lib64/radare2/0.9.2/io_shm.so
>  * /usr/lib64/radare2/0.9.2/io_haret.so
>  * /usr/lib64/radare2/0.9.2/cmd_dummy.so
>  * /usr/lib64/radare2/0.9.2/bp_arm.so
>  * /usr/lib64/radare2/0.9.2/parse_mreplace.so
>  * /usr/lib64/radare2/0.9.2/io_procpid.so
>  * /usr/lib64/radare2/0.9.2/debug_native.so
> 
> To get that QA warnings to need to add this to your make.conf:
> LDFLAGS="${LDFLAGS} -Wl,--hash-style=gnu"
> 
> Also, looks like it installs docs in /usr/share/doc/${PN}, when it should do
> it at ${PF}

Fixed in the mainstream: https://github.com/radare/radare2/commit/fb970bebb91999db15159f90dc2aa1b94b2a0853

Will be in the 0.9.9 release. And what about adding live ebuild - radare2-9999.ebuild too?
Comment 30 Sergei Trofimovich (RETIRED) gentoo-dev 2015-01-29 11:36:44 UTC
> Will be in the 0.9.9 release. And what about adding live ebuild -
> radare2-9999.ebuild too?

Sure. Added as:

> *radare2-9999 (29 Jan 2015)
>
>  29 Jan 2015; Sergei Trofimovich <slyfox@gentoo.org> +radare2-9999.ebuild:
>  Add live ebuild (bug #391751 by Anton Kochkov).

Thanks!