Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 320717 - app-shells/zsh-4.3.10-r1 QA concern
Summary: app-shells/zsh-4.3.10-r1 QA concern
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Solaris
: High normal (vote)
Assignee: Torsten Veller (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-20 12:34 UTC by Eric Meddaugh
Modified: 2010-08-15 12:24 UTC (History)
1 user (show)

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


Attachments
new fix for QA concern (zsh-prefix.patch,4.18 KB, text/plain)
2010-06-03 17:30 UTC, Jeremy Olexa (darkside) (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Meddaugh 2010-05-20 12:34:40 UTC
Trying to just update the emerge tree, updates zsh, builds ok, won't install gives this error:

>>> Completed installing zsh-4.3.10-r1 into /sys_tools/var/tmp/portage/app-shells/zsh-4.3.10-r1/image/sys_tools/

ecompressdir: bzip2 -9 /sys_tools/usr/share/man
 * QA Notice: the following files use invalid (possible non-prefixed) shebangs:
 *   sys_tools/usr/share/zsh/4.3.10/Util/reporter:/sys_tools/usr/bin/zsh (explicit EPREFIX but target not found)
 *   sys_tools/usr/share/zsh/4.3.10/Misc/globtests:/sys_tools/usr/bin/zsh (explicit EPREFIX but target not found)
 *   sys_tools/usr/share/zsh/4.3.10/Misc/globtests.ksh:/sys_tools/usr/bin/zsh (explicit EPREFIX but target not found)
 * ERROR: app-shells/zsh-4.3.10-r1 failed:
 *   Aborting due to QA concerns: invalid shebangs found
Comment 1 Fabian Groffen gentoo-dev 2010-05-20 12:36:45 UTC
interesting bug.  Is there a /sys_tools/var/tmp/portage/app-shells/zsh-4.3.10-r1/image/sys_tools/usr/bin/zsh?
Comment 2 Eric Meddaugh 2010-05-20 12:41:08 UTC
No, there are these

/sys_tools/var/tmp/portage/app-shells/zsh-4.3.10-r1/image/sys_tools/bin/zsh

/sys_tools/var/tmp/portage/app-shells/zsh-4.3.10-r1/image/sys_tools/bin/zsh-4.3.10

there though. (/bin, not /usr/bin)
Comment 3 Fabian Groffen gentoo-dev 2010-05-20 12:43:29 UTC
Ah, phew!  So the bug is valid.  The scripts indeed point to non-existing interpreters.  I quite forgot why this is an error and not just a warning instead.
I think because if an app explicitly sets the EPREFIX, it should do it right.
Comment 4 Eric Meddaugh 2010-05-20 12:45:47 UTC
Well, this only seemed to affect Solaris sparc, and x86.  I have a Centos 32/64 bits OS that it emerged correctly on both of them.
Comment 5 Fabian Groffen gentoo-dev 2010-05-20 12:48:13 UTC
The configure script probably has some logic that places zsh in /usr/bin on Solaris, and in /bin on Linux to better match the OS.
Comment 6 Fabian Groffen gentoo-dev 2010-05-21 16:46:01 UTC
Ok, I committed a patch to portage to just warn about this when the script is not in PATH.
Comment 7 Fabian Groffen gentoo-dev 2010-05-21 16:55:09 UTC
    # install miscellaneous scripts; bug #54520
    local i
    sed -i -e "s:/usr/local:${EPREFIX}/usr:g" "${S}"/{Util,Misc}/* || die
    for i in Util Misc ; do
        insinto /usr/share/zsh/${PV%_*}/${i}
        doins ${i}/* || die
    done

Uhm, that suggests it should be the same everywhere
Comment 8 Fabian Groffen gentoo-dev 2010-05-21 17:28:04 UTC
ok, after going left and right, this just appears to be a problem in the ebuild.

I installed zsh-4.3.10-r1 on a Gentoo Linux system and I have no /usr/bin/zsh, yet still /usr/share/zsh/4.3.10/Util/reporter has shebang "#!/usr/bin/zsh".

The
    sed -i -e "s:/usr/local:/usr:g" "${S}"/{Util,Misc}/* || die
should probably just read
    sed -i -e "s:/usr/local::g" "${S}"/{Util,Misc}/* || die
Comment 9 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-06-03 17:29:04 UTC
(In reply to comment #8)
> ok, after going left and right, this just appears to be a problem in the
> ebuild.
> 
> I installed zsh-4.3.10-r1 on a Gentoo Linux system and I have no /usr/bin/zsh,
> yet still /usr/share/zsh/4.3.10/Util/reporter has shebang "#!/usr/bin/zsh".
> 
> The
>     sed -i -e "s:/usr/local:/usr:g" "${S}"/{Util,Misc}/* || die
> should probably just read
>     sed -i -e "s:/usr/local::g" "${S}"/{Util,Misc}/* || die
> 

Not ideal as it switches /usr/local/bin/perl to /bin/perl (incorrect). New patch in a second.
Comment 10 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-06-03 17:30:14 UTC
Created attachment 234009 [details]
new fix for QA concern

Also, this is a diff from gentoo-x86 repo to Gentoo Prefix repo. Is it ok to commmit to gentoo-x86?
Comment 11 Torsten Veller (RETIRED) gentoo-dev 2010-06-07 17:55:24 UTC
+	cp "${FILESDIR}"/zprofile "${T}"/zprofile

Renamed "${FILESDIR}"/zprofile to zprofile-r1, because the other non-prefixed zsh versions wouldn't be happy with this zprofile version.



| if [ -e ""/etc/profile.env ] ; then
| for sh in ""/etc/profile.d/*.sh ; do
look ugly.


I don't think we want to remove /usr/local/{sbin,bin} from PATH.
Comment 12 Fabian Groffen gentoo-dev 2010-06-08 09:20:41 UTC
(In reply to comment #11)
> | if [ -e ""/etc/profile.env ] ; then
> | for sh in ""/etc/profile.d/*.sh ; do
> look ugly.

Yep.  Cheap alternatives are "/etc/profile.env" and "/etc/profile.d"/*.sh

> I don't think we want to remove /usr/local/{sbin,bin} from PATH.

For non-Prefix, yes we should keep it, however for Prefix, it should be removed.
Comment 13 Torsten Veller (RETIRED) gentoo-dev 2010-08-15 12:24:07 UTC
Fixed. Thanks.