Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 388147 - Please review Prefix changes for sys-apps/findutils-4.5.10-r1
Summary: Please review Prefix changes for sys-apps/findutils-4.5.10-r1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: Inclusion, InVCS, PATCH
Depends on:
Blocks: prefix-gx86
  Show dependency tree
 
Reported: 2011-10-22 19:56 UTC by Fabian Groffen
Modified: 2012-11-14 05:51 UTC (History)
1 user (show)

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


Attachments
patch for findutils-4.5.10-r1.ebuild (findutils-4.5.10-r1.ebuild.patch,1.76 KB, patch)
2012-09-10 03:20 UTC, Christoph Junghans (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Groffen gentoo-dev 2011-10-22 19:56:43 UTC
EPREFIX is necessary to support offset installs in findutils-4.5.10-r1, like this:

-               --libexecdir=/usr/$(get_libdir)/find \
+               --libexecdir="${EPREFIX}"/usr/$(get_libdir)/find \

This, however, requires the ebuild to be EAPI-bumped to EAPI3.  The diff is straightforward doing the necessary bits for src_unpack to src_prepare, and splitting into src_compile and src_configure.  For completeness, complete diff pasted below.  Please review, would be applied to a new revision 4.5.10-r2 at the time of this writing.



@@ -2,6 +2,8 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/sys-apps/findutils/findutils-4.5.10-r1.ebuild,v 1.3 2011/07/05 21:12:54 aballier Exp $
 
+EAPI="3"
+
 inherit eutils flag-o-matic toolchain-funcs multilib
 
 DESCRIPTION="GNU utilities for finding files"
@@ -19,16 +21,13 @@
 DEPEND="${RDEPEND}
        nls? ( sys-devel/gettext )"
 
-src_unpack() {
-       unpack ${A}
-       cd "${S}"
-
+src_prepare() {
        # Don't build or install locate because it conflicts with slocate,
        # which is a secure version of locate.  See bug 18729
        sed -i '/^SUBDIRS/s/locate//' Makefile.in
 }
 
-src_compile() {
+src_configure() {
        use static && append-ldflags -static
 
        local myconf
@@ -36,9 +35,12 @@
 
        econf \
                $(use_enable nls) \
-               --libexecdir=/usr/$(get_libdir)/find \
+               --libexecdir="${EPREFIX}"/usr/$(get_libdir)/find \
                ${myconf} \
                || die "configure failed"
+}
+
+src_compile() {
        emake AR="$(tc-getAR)" || die "make failed"
 }
Comment 1 SpanKY gentoo-dev 2011-10-25 06:12:07 UTC
i wonder if --libexecdir='$(libdir)/find' would work
Comment 2 Fabian Groffen gentoo-dev 2011-10-25 14:47:30 UTC
Ehm, is it me, or doesn't 4.5.10 install /usr/lib/find/{code,bigram,frcode} any more?  It did on 4.5.9.  Would mean the entire thing could go, so no EAPI bump necessary from my point of view.
Comment 3 SpanKY gentoo-dev 2011-10-25 20:58:46 UTC
those tools are part of the locate stuff, and afaik, we've never installed them as part of Gentoo
Comment 4 Fabian Groffen gentoo-dev 2011-10-26 06:55:23 UTC
so that means setting the libexecdir argument is in principle not necessary for anything?
Comment 5 SpanKY gentoo-dev 2011-10-26 09:52:28 UTC
atm, that is true.  if locate is added in some form (which is feasible since slocate is dead now), it will be needed.

so i would just change it to '$(libdir)/find' and not worry about it.  if/when we add locate support and this line doesn't actually work, we'll notice/fix it then.
Comment 6 Christoph Junghans (RETIRED) gentoo-dev 2012-09-10 03:20:58 UTC
Created attachment 323360 [details, diff]
patch for findutils-4.5.10-r1.ebuild

(In reply to comment #1)
> i wonder if --libexecdir='$(libdir)/find' would work
No, configure expects an absolute path after libexecdir.

Here is an updated version of the patch to review.
Comment 7 Christoph Junghans (RETIRED) gentoo-dev 2012-10-18 10:05:06 UTC
@SpanKY: Ping.
Comment 8 SpanKY gentoo-dev 2012-11-12 23:04:14 UTC
(In reply to comment #6)

configure doesn't seem to care if it give it '$(libdir)/find'.  builds fine.
Comment 9 Christoph Junghans (RETIRED) gentoo-dev 2012-11-13 01:06:20 UTC
(In reply to comment #8)
> (In reply to comment #6)
> 
> configure doesn't seem to care if it give it '$(libdir)/find'.  builds fine.
findutils-4.5.10 $ ./configure --libexecdir=lib64/find
configure: error: expected an absolute directory name for --libexecdir: lib64/find

Doesn't work for me!
Comment 10 SpanKY gentoo-dev 2012-11-13 05:37:15 UTC
(In reply to comment #9)

ok, but i didn't say "lib64/find", i said '$(libdir)/find'
Comment 11 Christoph Junghans (RETIRED) gentoo-dev 2012-11-13 15:58:05 UTC
(In reply to comment #10)
> ok, but i didn't say "lib64/find", i said '$(libdir)/find'
Now I got it, so we are down to this change:
-		--libexecdir=/usr/$(get_libdir)/find \
+		--libexecdir='$(libdir)'/find \

No EAPI bump needed anymore. Can that be committed?
Comment 12 SpanKY gentoo-dev 2012-11-13 17:26:38 UTC
(In reply to comment #11)

yes, that change to --libexecdir looks fine to me
Comment 13 Christoph Junghans (RETIRED) gentoo-dev 2012-11-14 05:51:44 UTC
Finally added, thanks.