Two patches: one for EAPI bump; The other for lddtree.py Reproducible: Always
Created attachment 361196 [details, diff] pax-utils.patch
Created attachment 361198 [details, diff] lddtree.patch There may be a better way to encode @GENTOO_PORTAGE_EPREFIX@ for etc/ld.so.conf. os.path.dirname(interp) can be prefixified.
Comment on attachment 361196 [details, diff] pax-utils.patch use EAPI=4. otherwise looks OK.
Comment on attachment 361198 [details, diff] lddtree.patch >- ldpaths['conf'] = ParseLdSoConf(root + 'etc/ld.so.conf', root=root) >+ ldpaths['conf'] = ParseLdSoConf(root + '@GENTOO_PORTAGE_EPREFIX@/etc/ld.so.conf', root=root) GENTOO_PORTAGE_EPREFIX has to be dynamic. tests get run locally w/out going through `emerge`. you'll also have to check the / usage. >+ slibdir=os.path.dirname(interp) your style is also incorrect. you need spaces around the =. >+ libdir=os.path.dirname(slibdir) + '/usr/' + os.path.basename(slibdir) this is confusing. use EPREFIX rather than deriving it via slibdir. i'm not sure this is even correct.
Created attachment 362466 [details, diff] pax-utils-0.7-lddtree-prefix.patch $ lddtree ~/gnto bin/ls /home/benda/gnto/bin/ls (interpreter => /home/benda/gnto/lib/ld-linux.so.2) libacl.so.1 => /home/benda/gnto/lib/libacl.so.1 libattr.so.1 => /home/benda/gnto/lib/libattr.so.1 libc.so.6 => /home/benda/gnto/lib/libc.so.6 $ lddtree -R ~/gnto/usr/armv7a-hardfloat-linux-gnueabi/ /usr/bin/rpcgen /home/benda/gnto/usr/armv7a-hardfloat-linux-gnueabi/usr/bin/rpcgen (interpreter => /home/benda/gnto/usr/armv7a-hardfloat-linux-gnueabi/lib/ld-linux-armhf.so.3) libc.so.6 => /home/benda/gnto/usr/armv7a-hardfloat-linux-gnueabi/lib/libc.so.6
Thanks, Mike. Got a better patch to make EPREFIX overridable.
This is a friendly reminder of RFC, Mike.
Comment on attachment 362466 [details, diff] pax-utils-0.7-lddtree-prefix.patch >+ parser.add_option('-P', '--prefix', >+ default=os.environ.get('EPREFIX', ''), type='string', >+ action='callback', callback=_NormalizePath, >+ help='Specify EPREFIX for binaries from Gentoo Prefix') it should default to the compile time eprefix default=os.environ.get('EPREFIX', '@EPREFIX@'), type='string', ... if options.prefix == '@''PREFIX''@': options.prefix = ''
Created attachment 365366 [details, diff] pax-utils-0.7-lddtree-prefix.patch updated as per comment 8. Will need prefix.eclass and "eprefixify lddtree.py" to replace @GENTOO_PORTAGE_EPREFIX@.
initial support merged: http://sources.gentoo.org/gentoo-projects/pax-utils/lddtree.py?r1=1.43&r2=1.44 i did not include the normpath() call on the interp as that doesn't make sense
Looks nice. Thanks Mike.
re-open if pax-utils-0.8.1 doesn't work for you
Works for me. Two things: - we need to force USE=python in prefix. Maybe REQUIRED_USE="prefix? ( python )" ? - add hpux magic --- /usr/portage/app-misc/pax-utils/pax-utils-0.8.1.ebuild 2014-03-20 23:36:34.000000000 -0600 +++ pax-utils-0.8.1.ebuild 2014-03-24 10:52:13.960048993 -0600 @@ -31,7 +32,14 @@ } src_compile() { - _emake CC="$(tc-getCC)" + local libs + if [[ ${CHOST} == *-hpux* ]]; then + append-flags -I"${EPREFIX}"/usr/$(get_libdir)/gnulib/include + append-ldflags -L"${EPREFIX}"/usr/$(get_libdir)/gnulib/lib + libs="-lgnu" + fi + use prefix && eprefixify lddtree.py + _emake CC="$(tc-getCC)" LIBS="${libs}" }
Created attachment 374924 [details, diff] patch against gx86 version Please review the leftover prefix changes.
Comment on attachment 374924 [details, diff] patch against gx86 version >+ local libs >+ if [[ ${CHOST} == *-hpux* ]]; then >+ append-flags -I"${EPREFIX}"/usr/$(get_libdir)/gnulib/include >+ append-ldflags -L"${EPREFIX}"/usr/$(get_libdir)/gnulib/lib >+ libs="-lgnu" >+ fi this is bug 413967 ... i'm not going to add gnulib stuff like this to the ebuild >+ use prefix && eprefixify lddtree.py wouldn't it be better to use a python eclass ? >+ use prefix && use !python && ewarn "With USE=-python lddtree will not work in Prefix" eh ?
(In reply to SpanKY from comment #15) > Comment on attachment 374924 [details, diff] [details, diff] > patch against gx86 version > > >+ local libs > >+ if [[ ${CHOST} == *-hpux* ]]; then > >+ append-flags -I"${EPREFIX}"/usr/$(get_libdir)/gnulib/include > >+ append-ldflags -L"${EPREFIX}"/usr/$(get_libdir)/gnulib/lib > >+ libs="-lgnu" > >+ fi > > this is bug 413967 ... i'm not going to add gnulib stuff like this to the > ebuild we can drop this considering that bug #413967 will hopefully attack this issue. > >+ use prefix && eprefixify lddtree.py > wouldn't it be better to use a python eclass ? Huh? Which python eclass are you thinking of? Wasn't Benda's patch made for eprefixify? (We could use `sed -i -e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}|g" lddtree.py` instead) > >+ use prefix && use !python && ewarn "With USE=-python lddtree will not work in Prefix" > eh ? The shell version of lddtree isn't prefix-save, but REQUIRED_USE="prefix? ( python )" might break bootstrapping. So a warning seems like a reasonable option. Not installing the shell version might work, too.
(In reply to Christoph Junghans from comment #16) > > >+ use prefix && eprefixify lddtree.py > > > > wouldn't it be better to use a python eclass ? > > Huh? Which python eclass are you thinking of? Wasn't Benda's patch made for > eprefixify? (We could use `sed -i -e > "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}|g" lddtree.py` instead) aren't there python eclasses specifically designed for installing python scripts with wrappers to the various implementation versions ? like the whole python-exec business. > > >+ use prefix && use !python && ewarn "With USE=-python lddtree will not work in Prefix" > > > > eh ? > > The shell version of lddtree isn't prefix-save why not ? it's just a bash script that runs `scanelf` and parses the output.
(In reply to SpanKY from comment #17) > (In reply to Christoph Junghans from comment #16) > > > >+ use prefix && eprefixify lddtree.py > > > > > > wouldn't it be better to use a python eclass ? > > > > Huh? Which python eclass are you thinking of? Wasn't Benda's patch made for > > eprefixify? (We could use `sed -i -e > > "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}|g" lddtree.py` instead) > > aren't there python eclasses specifically designed for installing python > scripts with wrappers to the various implementation versions ? like the > whole python-exec business. I am not sure how this relates, but if we install a wrapper (python_doexe) and derive EPREFIX from EPYTHON (EPRFIX=${EPYTHON%%/usr/bin/*}), that might work, too. > > > > >+ use prefix && use !python && ewarn "With USE=-python lddtree will not work in Prefix" > > > > > > eh ? > > > > The shell version of lddtree isn't prefix-save > why not ? it's just a bash script that runs `scanelf` and parses the output. It has a hard-coded ROOT in there, which we would need to change, too.
(In reply to Christoph Junghans from comment #18) the $ROOT is merely to make people's lives easier when running it by hand; it is not required for functional behavior. you can pass a different root with --root. it does hardcode /usr relative to whatever root the user gave them, but i don't think that qualifies as "will not work".
(In reply to SpanKY from comment #19) > (In reply to Christoph Junghans from comment #18) > > the $ROOT is merely to make people's lives easier when running it by hand; > it is not required for functional behavior. you can pass a different root > with --root. it does hardcode /usr relative to whatever root the user gave > them, but i don't think that qualifies as "will not work". A minor correction to Chris': It is EPREFIX instead of ROOT getting set by eprefixify. Otherwise it will work, but setting a default saves the extra typing of lddtree --prefix /prefix/dir/.
(In reply to Benda Xu from comment #20) > (In reply to SpanKY from comment #19) > > (In reply to Christoph Junghans from comment #18) > > > > the $ROOT is merely to make people's lives easier when running it by hand; > > it is not required for functional behavior. you can pass a different root > > with --root. it does hardcode /usr relative to whatever root the user gave > > them, but i don't think that qualifies as "will not work". > > A minor correction to Chris': It is EPREFIX instead of ROOT getting set by > eprefixify. Otherwise it will work, but setting a default saves the extra > typing of lddtree --prefix /prefix/dir/. We could weaken the warning to: use prefix && use !python && ewarn "Please use lddtree with --root=${EPREFIX}"
can we get a refresh/agreement on this ? i've lost track of what exactly still needs to be merged. please use the latest git repo too rather than the latest release.
1.1.6 was identical in Prefix and gx86, 1.1.7 fails to compile on Solaris, will have to check what latest git does + separate bug. Ebuild changes seem fine, so closing this bug.
i want to do a new release soonish (due to some other big changes), so if you want to send me some patches, now would be a good time :)
Well, adding "|| echo 1" for the getconf call made me able to at least start autogen.sh (and run into trouble with xmlto).