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

Bug 465226

Summary: app-shells/autojump-21.1.0: add Prefix support to /etc/profile.d/autojump.sh
Product: Gentoo/Alt Reporter: Leho Kraav (:macmaN @lkraav) <leho>
Component: Prefix SupportAssignee: Gentoo Prefix <prefix>
Status: RESOLVED FIXED    
Severity: normal CC: leho, xmw
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=665270
Whiteboard:
Package list:
Runtime testing required: ---

Description Leho Kraav (:macmaN @lkraav) 2013-04-09 08:49:11 UTC
...
# check global install
elif [ -s /etc/profile.d/autojump.${shell} ]; then
    source /etc/profile.d/autojump.${shell}
...

should probably get sedded with ${EPREFIX}?
Comment 1 Michael Weber (RETIRED) gentoo-dev 2013-05-04 10:44:13 UTC
+*autojump-21.3.0-r1 (04 May 2013)
+
+  04 May 2013; Michael Weber <xmw@gentoo.org> +autojump-21.3.0-r1.ebuild,
+  +files/autojump-21.3.0-supported-shells.patch, -autojump-21.3.0.ebuild:
+  Drop old, fix infinity loop sourcing shell=sh (thanks Kamil Kuduk, bug
+  446312), prefix support (thanks Leho Kraav, bug 465226), fix security issue
+  (bug 467262).
+
Comment 2 Leho Kraav (:macmaN @lkraav) 2013-08-06 21:09:55 UTC
Heya Michael


Got around to testing this now. Adding ${EPREFIX} as a variable is not the way, since this variable doesn't exist outside of portage. You need to sed the value of ${EPREFIX} instead, which effectively hardcodes the prefix path.
Comment 3 Michael Weber (RETIRED) gentoo-dev 2013-08-06 22:03:39 UTC
(In reply to Leho Kraav (:macmaN @lkraav) from comment #2)
> Heya Michael
Nice to hear from you ;-)

> Got around to testing this now. Adding ${EPREFIX} as a variable is not the
> way, since this variable doesn't exist outside of portage. You need to sed
> the value of ${EPREFIX} instead, which effectively hardcodes the prefix path.

shouldn't EPREFIX be set by startprefix?! anyway, i add the sed and a version bump.

+*autojump-21.6.9 (06 Aug 2013)
+
+  06 Aug 2013; Michael Weber <xmw@gentoo.org> +autojump-21.5.8-r1.ebuild,
+  +autojump-21.6.9.ebuild, -autojump-21.5.8.ebuild,
+  -files/autojump-21.5.8-eprefix.patch:
+  Fix EPREFIX handling (thanks Leho Kraav, bug 465226), version bump.
+

I hope this reso/fix is final, bye.
Comment 4 Leho Kraav (:macmaN @lkraav) 2013-08-06 22:09:27 UTC
Re startprefix, that's a good point, actually and it's something that I missed.

I have set /opt/prefix/bin/bash as my users login shell, which is why I don't get the startprefix goodies.

Hmmm I wonder what the proper prefix solution to that is..
Comment 5 Michael Weber (RETIRED) gentoo-dev 2013-08-06 22:36:03 UTC
(In reply to Leho Kraav (:macmaN @lkraav) from comment #4)
> Re startprefix, that's a good point, actually and it's something that I
> missed.
> 
> I have set /opt/prefix/bin/bash as my users login shell, which is why I
> don't get the startprefix goodies.
> 
> Hmmm I wonder what the proper prefix solution to that is..

Sorr, I just looked it up in my freshly installed archlinux-amd64-prefix, EPREFIX is a static local varable in startprefix, that influences PATH but doesn't get exported.

Given that `strings /less/michael/prefix/lib/cpp` lists /less/michael/prefix/etc/env.d/05gcc, i assume that EPREFIX is rather immutable.

@prefix: what do you think? Is patching EPREFIX into the shell script legit?
The - now removed - patch file was [1].

Thanks

[1] http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-shells/autojump/files/autojump-21.5.8-eprefix.patch?hideattic=0&revision=1.2&view=markup
Comment 6 Michael Weber (RETIRED) gentoo-dev 2013-08-06 22:41:55 UTC
second opinion on #gentoo-prefix
00:40:28 <+Zero_Chaos> xmw: EPREFIX is immutable so it should be hardcoded
Comment 7 Leho Kraav (:macmaN @lkraav) 2013-08-07 06:59:32 UTC
Fine with me, other stuff already hardcodes anyway. Thanks for looking into it