Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 397835 - app-arch/rpm2targz: add prefix support
Summary: app-arch/rpm2targz: add prefix support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: prefix-gx86
  Show dependency tree
 
Reported: 2012-01-06 03:27 UTC by Christoph Junghans (RETIRED)
Modified: 2012-08-20 20:15 UTC (History)
1 user (show)

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


Attachments
patch for rpm2targz-9.0.0.4g (rpm2targz-9.0.0.4g.ebuild.patch,1.23 KB, patch)
2012-01-06 03:27 UTC, Christoph Junghans (RETIRED)
Details | Diff
add memmem for OS's which mssing it (rpm2targz-9.0.0.4g-memmove.patch,905 bytes, patch)
2012-01-06 03:28 UTC, Christoph Junghans (RETIRED)
Details | Diff
add memmem for OS's which mssing it (rpm2targz-9.0.0.4g-memmove.patch,817 bytes, patch)
2012-04-13 19:28 UTC, Christoph Junghans (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Junghans (RETIRED) gentoo-dev 2012-01-06 03:27:23 UTC
Created attachment 298059 [details, diff]
patch for rpm2targz-9.0.0.4g

Changes in the ebuild are straight forward, the memmem patch has been in prefix for a year and it's only used for MacOs, Solaris and Interix.
Comment 1 Christoph Junghans (RETIRED) gentoo-dev 2012-01-06 03:28:14 UTC
Created attachment 298061 [details, diff]
add memmem for OS's which mssing it
Comment 2 SpanKY gentoo-dev 2012-04-12 22:35:10 UTC
Comment on attachment 298061 [details, diff]
add memmem for OS's which mssing it

you've got indentation errors in this.  please only use tabs.

also, cuddle up the braces on everything but the func def.
Comment 3 SpanKY gentoo-dev 2012-04-12 22:35:24 UTC
Comment on attachment 298059 [details, diff]
patch for rpm2targz-9.0.0.4g

ebuild changes look fine
Comment 4 Christoph Junghans (RETIRED) gentoo-dev 2012-04-13 19:28:52 UTC
Created attachment 308813 [details, diff]
add memmem for OS's which mssing it

(In reply to comment #2)
> Comment on attachment 298061 [details, diff] [details, diff]
> add memmem for OS's which mssing it
> 
> you've got indentation errors in this.  please only use tabs.
> 
> also, cuddle up the braces on everything but the func def.
Done
Comment 6 Christoph Junghans (RETIRED) gentoo-dev 2012-05-18 18:52:50 UTC
Reopened! 

prefix=$(EPREFIX) still needs to be an argument for the install.
Comment 7 SpanKY gentoo-dev 2012-06-08 05:19:16 UTC
the ebuild uses `default`
Comment 8 Christoph Junghans (RETIRED) gentoo-dev 2012-06-08 05:56:14 UTC
Still does not work on prefix without modification due to rpm2targz's buildsystem.

As default uses Makefile of rpm2targz, which defines bindir as '$(prefix)/bin' and prefix as '/usr'. 

emake install DESTDIR="${D}" prefix="${EPREFIX}/usr" instead of default should do the job.
Comment 9 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-06-08 16:06:29 UTC
Since we (base-system) control the source code, you code patch the Makefile if you wish too. "sed -i '/^prefix =/s:=.*:= '"${EPREFIX}"'/usr:' Makefile" - then you could use 'default' in src_install.
Comment 10 Christoph Junghans (RETIRED) gentoo-dev 2012-06-11 00:36:48 UTC
(In reply to comment #9)
> Since we (base-system) control the source code, you code patch the Makefile
> if you wish too. "sed -i '/^prefix =/s:=.*:= '"${EPREFIX}"'/usr:' Makefile"
> - then you could use 'default' in src_install.
That sounds also good, let's do whatever SpanKY prefers.
Comment 11 SpanKY gentoo-dev 2012-06-14 03:14:43 UTC
(In reply to comment #8)

i'm not seeing the problem here.  ED is $DESTDIR/$EPREFIX, so things that normally go into /usr/bin go into $EPREFIX/usr/bin.  since `default` installs with DESTDIR=$ED, the fact that prefix is hardcoded to /usr is irrelevant -- it is prefixed with $ED by way of $DESTDIR.
Comment 12 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-06-14 03:38:25 UTC
(In reply to comment #11)
> (In reply to comment #8)
> 
> i'm not seeing the problem here.  ED is $DESTDIR/$EPREFIX, so things that
> normally go into /usr/bin go into $EPREFIX/usr/bin.  since `default`
> installs with DESTDIR=$ED, the fact that prefix is hardcoded to /usr is
> irrelevant -- it is prefixed with $ED by way of $DESTDIR.

Hi. Will you please show me where default is defined? (I seriously want to learn.)

All I can really find is _eapi4_src_install() in phase-helpers.sh

_eapi4_src_install() {
    if [[ -f Makefile || -f GNUmakefile || -f makefile ]] ; then
        emake DESTDIR="${D}" install
    fi
<snip>
}

Is that "default" ?
Comment 13 Fabian Groffen gentoo-dev 2012-06-14 06:36:34 UTC
(In reply to comment #11)
> (In reply to comment #8)
> 
> i'm not seeing the problem here.  ED is $DESTDIR/$EPREFIX, so things that
> normally go into /usr/bin go into $EPREFIX/usr/bin.  since `default`
> installs with DESTDIR=$ED, the fact that prefix is hardcoded to /usr is
> irrelevant -- it is prefixed with $ED by way of $DESTDIR.

If the code stores somewhere the prefix argument (being /usr) for runtime use, it means that even though it should look in /a/usr, it will look in /usr.  (config files for example)

If you are on a platform that stores absolute path references to dependent libraries, you get a reference to /usr/lib/libX.*, iso /a/usr/lib/libX.*.

Therefore, get the input right, such that the default "DESTDIR=${D}" installs stuff in the right place.
Comment 14 Christoph Junghans (RETIRED) gentoo-dev 2012-07-30 16:13:15 UTC
(In reply to comment #13)
> (In reply to comment #11)
> > (In reply to comment #8)
> > 
> > i'm not seeing the problem here.  ED is $DESTDIR/$EPREFIX, so things that
> > normally go into /usr/bin go into $EPREFIX/usr/bin.  since `default`
> > installs with DESTDIR=$ED, the fact that prefix is hardcoded to /usr is
> > irrelevant -- it is prefixed with $ED by way of $DESTDIR.
> 
> If the code stores somewhere the prefix argument (being /usr) for runtime
> use, it means that even though it should look in /a/usr, it will look in
> /usr.  (config files for example)
> 
> If you are on a platform that stores absolute path references to dependent
> libraries, you get a reference to /usr/lib/libX.*, iso /a/usr/lib/libX.*.
> 
> Therefore, get the input right, such that the default "DESTDIR=${D}"
> installs stuff in the right place.

Ping @ SpanKY: adding 'emake install DESTDIR="${D}" prefix="${EPREFIX}/usr"' seems to be the cleanest and easiest solution. If you like, I can also write a small autotools buildsystem for tpm2targz, so that autotools-utils can take care of everything.
Comment 15 SpanKY gentoo-dev 2012-08-20 20:15:58 UTC
should be all set now in the tree; thanks for the report!

Commit message: Need to specify DESTDIR=$ED manually
http://sources.gentoo.org/app-arch/rpm2targz/rpm2targz-9.0.0.5g.ebuild?r1=1.1&r2=1.2