Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 323621 - gentoo prefix, invalid shebangs in misc-functions.sh, ebuild.sh, etc.
Summary: gentoo prefix, invalid shebangs in misc-functions.sh, ebuild.sh, etc.
Status: VERIFIED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
: 323633 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-06-12 00:15 UTC by Ray Song
Modified: 2010-07-18 11:15 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ray Song 2010-06-12 00:15:02 UTC
I could emerge nothing because some .sh files (misc-functions.sh, ebuild.sh, etc.) use invalid (possible non-prefixed) shebangs "#!@PORTAGE_BASH@"

Reproducible: Always

Steps to Reproduce:
1. Follow http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap-macos.xml
2. emerge ncurses which is bash's dependency

Actual Results:  
* QA Notice: the following files use invalid (possible non-prefixed) shebangs:
* home/*********/gentoo/usr/bin/ncurses5-config:/bin/sh
* home/********/gentoo/usr/bin/ncursesw5-config:/bin/sh
* ERROR: sys-libs/ncurses-5.7-r3 failed:
* Aborting due to QA concerns: invalid shebangs found
*
* Call stack:
* misc-functions.sh, line 1487: Called install_qa_check
* misc-functions.sh, line 94: Called install_qa_check_prefix
* misc-functions.sh, line 657: Called die
* The specific snippet of code:
* die "Aborting due to QA concerns: invalid shebangs found"
*

Expected Results:  
ncurses should be emerged

 $ emerge --info
Portage 2.2.00.15842-prefix (prefix/linux/x86, gcc-4.4.3, unavailable, 2.6.32-22-generic i686)
=================================================================
System uname: Linux-2.6.32-22-generic-i686-with-Ubuntu-10.04-lucid
Timestamp of tree: Sun, 09 May 2010 21:37:55 +0000
ACCEPT_KEYWORDS="~x86-linux"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe -m32"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf"
CPPFLAGS="-I/home/********/gentoo/usr/include"
CXXFLAGS="-O2 -march=i686 -pipe -m32"
DISTDIR="/home/********/gentoo/usr/portage/distfiles"
FEATURES="assume-digests collision-protect distlocks fixpackages news parallel-fetch preserve-libs protect-owned sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-L/home/********/gentoo/usr/lib -R/home/********/gentoo/usr/lib -L/home/********/gentoo/lib -R/home/********/gentoo/lib"
PKGDIR="/home/********/gentoo/usr/portage/packages"
PORTAGE_CONFIGROOT="/home/********/gentoo/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/home/********/gentoo/var/tmp"
PORTDIR="/home/********/gentoo/usr/portage"
SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"
USE="bootstrap bzip2 cli cracklib crypt cxx dri iconv ipv6 modules mudflap ncurses nptl nptlonly openmp perl pppd prefix readline reflection session spl sysfs tcpd unicode x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa via vmware voodoo" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset: CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2010-06-12 00:23:54 UTC
Hi,
I don't see how this is possible if you follow the bootstrapping instructions. Do you have *any* bash in your PATH? Explicitly, Code Listing 1.3 will install a bash in your PATH. Code Listing 1.6 will install bash without installing ncurses.
Comment 2 Ray Song 2010-06-12 04:18:00 UTC
(In reply to comment #1)
> Hi,
> I don't see how this is possible if you follow the bootstrapping instructions.
> Do you have *any* bash in your PATH? Explicitly, Code Listing 1.3 will install
> a bash in your PATH. Code Listing 1.6 will install bash without installing
> ncurses.
> 

Hi,
This is the dependency tree:
bash
  | bison
     | m4
I have successed to emerge m4 but failed to emerge bison, portage gave the same output: misc-functions.sh invalid shebangs
Comment 3 Daniel Pielmeier gentoo-dev 2010-06-12 10:24:37 UTC
*** Bug 323633 has been marked as a duplicate of this bug. ***
Comment 4 Jeremy Olexa (darkside) (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2010-07-07 13:52:36 UTC
Ok, sorry I never followed up here. Were you able to resolve the issue? If not, what host OS? what step are you on now? would you be interested in starting over and following the exact instructions then letting us know when it fails?
Comment 5 Ray Song 2010-07-08 10:30:37 UTC
(In reply to comment #4)
> Ok, sorry I never followed up here. Were you able to resolve the issue? If not,
> what host OS? what step are you on now? would you be interested in starting
> over and following the exact instructions then letting us know when it fails?
> 
The host OS is ubuntu 10.04. I was atempt to install Gentoo Prefix in my home directory.
It failed when I was imitating Code Listing 1.3 of the page http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap-macos.xml.
For I am not at school, i cannot tell exactly when it fails. But I am sure I could not emerge bash which depended on bison.
The output gave by Portage is like this: misc-functions.sh invalid shebangs
Comment 6 Jeremy Olexa (darkside) (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2010-07-08 14:56:08 UTC
Ok, it would be interesting to troubleshoot the issue on irc or mailing list but not here. No one else has reproduced the issue. Since you are no longer at school, I guess we can close this one out.
Comment 7 kacperw 2010-07-14 19:36:18 UTC
I'm following http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap-solaris.xml on amd64 debian squeeze and I'm having the same problems: bash and ncurses won't emerge due to bad shebangs. 

How do I work around it?
Comment 8 Fabian Groffen gentoo-dev 2010-07-14 19:41:07 UTC
can you please bootstrap using latest_tree instead of tree in the first bootstrap command of step 1.3?
Comment 9 kacperw 2010-07-16 15:49:52 UTC
this solved my problem yes:
$ bootstrap.sh $EPREFIX latest_tree
Comment 10 Fabian Groffen gentoo-dev 2010-07-16 18:31:51 UTC
thanks for testing