Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 321623 - app-vim/gentoo-syntax-20100215: fail to install (vim-plugin.eclass) when user = root
Summary: app-vim/gentoo-syntax-20100215: fail to install (vim-plugin.eclass) when user...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All OS X
: High normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-27 04:28 UTC by Reilune
Modified: 2010-06-11 20:28 UTC (History)
0 users

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 Reilune 2010-05-27 04:28:09 UTC
app-vim/gentoo-syntax-20100215: when install this ebuild, it try to fix file permission by "find "${S}" -user 'portage' -exec chown root '{}' \; || die "chown failed";".
The problem is that user/group "portage" does not exist on a system with Portage-Prefix installed.

Reproducible: Always

Actual Results:  
 * CPV:  app-vim/gentoo-syntax-20100215
 * REPO: gentoo_prefix
 * USE:  elibc_Darwin kernel_Darwin prefix userland_GNU x64-macos
>>> Unpacking source...
>>> Unpacking gentoo-syntax-20100215.tar.bz2 to /Gentoo/tmp/portage/app-vim/gentoo-syntax-20100215/work
>>> Source unpacked in /Gentoo/tmp/portage/app-vim/gentoo-syntax-20100215/work
>>> Compiling source in /Gentoo/tmp/portage/app-vim/gentoo-syntax-20100215/work/gentoo-syntax-20100215 ...
>>> Source compiled.
>>> Test phase [not enabled]: app-vim/gentoo-syntax-20100215

>>> Install gentoo-syntax-20100215 into /Gentoo/tmp/portage/app-vim/gentoo-syntax-20100215/image/Gentoo/ category app-vim
 * Fixing file permissions ...
find: `portage' is not the name of a known user
 * ERROR: app-vim/gentoo-syntax-20100215 failed:
 *   chown failed
 * 
 * Call stack:
 *     ebuild.sh, line   54:  Called call-ebuildshell 'src_install'
 *   environment, line  263:  Called src_install
 *   environment, line 2393:  Called vim-plugin_src_install
 *   environment, line 3110:  Called die
 * The specific snippet of code:
 *           find "${S}" -user 'portage' -exec chown root '{}' \; || die "chown failed";
 * 
 * If you need support, post the output of 'emerge --info =app-vim/gentoo-syntax-20100215',
 * the complete build log and the output of 'emerge -pqv =app-vim/gentoo-syntax-20100215'.
 * The complete build log is located at '/Gentoo/tmp/portage/app-vim/gentoo-syntax-20100215/temp/build.log'.
 * The ebuild environment file is located at '/Gentoo/tmp/portage/app-vim/gentoo-syntax-20100215/temp/environment'.
 * S: '/Gentoo/tmp/portage/app-vim/gentoo-syntax-20100215/work/gentoo-syntax-20100215'



# emerge --info =app-vim/gentoo-syntax-20100215Portage 2.2.00.15842-prefix (prefix/darwin/macos/10.6/x64, gcc-4.2.1, unavailable, 10.3.0 i386)
=================================================================
                        System Settings
=================================================================
System uname: Darwin-10.3.0-i386-64bit
Timestamp of tree: Thu, 27 May 2010 03:13:33 +0000
distcc 3.1-toolwhip.1 i386-apple-darwin10.0 [disabled]
app-shells/bash:     4.0_p38
dev-lang/python:     2.6.5-r2
sys-devel/autoconf:  2.65
sys-devel/automake:  1.11.1
sys-devel/gcc-config: 1.4.1-r00.2
sys-devel/libtool:   2.2.6b
ACCEPT_KEYWORDS="~x64-macos"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-apple-darwin10"
CFLAGS="-O2 -pipe -march=core2"
CHOST="x86_64-apple-darwin10"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/eselect/postgresql /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=core2"
DISTDIR="/Gentoo/usr/portage/distfiles"
FEATURES="assume-digests collision-protect distlocks fixpackages news nostrip parallel-fetch preserve-libs protect-owned sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS=""
PKGDIR="/Gentoo/usr/portage/packages"
PORTAGE_CONFIGROOT="/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="/Gentoo/var/tmp"
PORTDIR="/Gentoo/usr/portage"
SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"
USE="aqua coreaudio cracklib cxx mmx mmxext modules ncurses nls objc objc++ prefix readline sse sse2 ssl threads unicode x64-macos zlib" 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="Darwin" INPUT_DEVICES="keyboard mouse" KERNEL="Darwin" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" 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:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-05-27 04:35:44 UTC
That specific part of code is guarded with:

"if use !prefix || [[ ${EUID} -eq 0 ]] ; then"

So, your EUID is 0? That is a recipe for disaster and not exactly supported. =/

Comment 2 Reilune 2010-05-27 04:43:53 UTC
(In reply to comment #1)
> That specific part of code is guarded with:
> 
> "if use !prefix || [[ ${EUID} -eq 0 ]] ; then"
> 
> So, your EUID is 0? That is a recipe for disaster and not exactly supported. =/
> 

Yes, I install Portage-Prefix with root user.
It should turn out to be a disaster? 
Portage-Prefix is designed to be used only by a non-super user?
Comment 3 Reilune 2010-05-27 05:19:00 UTC
I will mark this as "REMIND".

And, I wish your people will consider making portage-prefix working globally, just like macports or something like that.

I really like the portage.
Comment 4 Fabian Groffen gentoo-dev 2010-05-27 06:35:26 UTC
Wait, if your EUID == 0, then probably you should have a user portage too.  Perhaps baselayout-prefix could create that user for you (if your EUID == 0).

I agree with darkside that using it as root is asking for trouble (since it is hardly tested), but we can try to make these things work, I guess.

Just side-note: you can perfectly fine install "globally" without root user IMO.  Just create a special user if you like, and as that user bootstrap/install all stuff in a location.  Any user can use the tools, or even use the startprefix.sh script, they just can't emerge or modify stuff (exactly as you want).  I use it like this on some machines without problems.
Comment 5 Reilune 2010-05-27 07:21:48 UTC
(In reply to comment #4)
> Wait, if your EUID == 0, then probably you should have a user portage too. 
> Perhaps baselayout-prefix could create that user for you (if your EUID == 0).
> 
> I agree with darkside that using it as root is asking for trouble (since it is
> hardly tested), but we can try to make these things work, I guess.
> 
> Just side-note: you can perfectly fine install "globally" without root user
> IMO.  Just create a special user if you like, and as that user
> bootstrap/install all stuff in a location.  Any user can use the tools, or even
> use the startprefix.sh script, they just can't emerge or modify stuff (exactly
> as you want).  I use it like this on some machines without problems.
> 

Thank you, Fabian Groffen
I will try it out with a dedicated user.

BTW, no user/group "portage" exists, I check the file "/etc/passwd" or "dscl . readall /Users"/"dscl read all /Groups"
Comment 6 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-05-27 16:47:26 UTC
(In reply to comment #3)

> And, I wish your people will consider making portage-prefix working globally,
> just like macports or something like that.

The scary part, in my opinion, is that there is no sandbox concept that is working. So if you have a rouge build system and/or you use a non-trusted ebuild it could be very dangerous. (eg. rm -rf / or something equally stupid). Even a typo could result in bad things. 

Not trying to scare you, just saying some potential pitfalls.

A much safer approach is to use a normal user and adjust your PATH/SHELL globally.
Comment 7 Fabian Groffen gentoo-dev 2010-06-11 20:28:27 UTC
creation of portage group/user added to baselayout-prefix ebuild when using root privileges