Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 279550 - [prefix] portage does not deal correctly with backslashes in groupname
Summary: [prefix] portage does not deal correctly with backslashes in groupname
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: x86 OS X
: High major (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-29 04:36 UTC by Mike Sears
Modified: 2009-08-03 19:51 UTC (History)
1 user (show)

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


Attachments
stll fails (config.log,26.71 KB, text/plain)
2009-08-02 13:09 UTC, Mike Sears
Details
here's the build log (build.log,13.13 KB, text/plain)
2009-08-02 13:10 UTC, Mike Sears
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Sears 2009-07-29 04:36:06 UTC
After completing code listing 1.6 for "Gentoo Prefix Bootstrap Process for Mac OS X", emerge --oneshot sed fails (as does any other emerge).

Reproducible: Always

Steps to Reproduce:
1. emerge --oneshot sed

Actual Results:  
raceback (most recent call last):
  File "/Users/msears/Gentoo/usr/bin/emerge", line 36, in <module>
    import _emerge
  File "/Users/msears/Gentoo/usr/lib/portage/pym/_emerge/__init__.py", line 43, in <module>
    import portage
  File "/Users/msears/Gentoo/usr/lib/portage/pym/portage/__init__.py", line 97, in <module>
    from portage.data import ostype, lchown, userland, secpass, uid, wheelgid, \
  File "/Users/msears/Gentoo/usr/lib/portage/pym/portage/data.py", line 89, in <module>
    writemsg(  red("portage: "+portageuser+" user or "+portagegroup+" group missing.\n"))
NameError: name 'red' is not defined


Expected Results:  
sed emerged
Comment 1 Mike Sears 2009-07-30 14:03:19 UTC
Tried starting from scratch. Got the same results again.
Comment 2 Mike Sears 2009-07-30 14:09:12 UTC
Tried starting from scratch. Got the same results again.
Comment 3 Fabian Groffen gentoo-dev 2009-07-31 07:25:30 UTC
Hi Mike, thanks for the report, this is definitely a problem in the Portage sources.  However, the cause is some other problem that Portage is trying to tell you about.  In this case actually that the portage user or portage group are missing.

Can you tell a bit more on how you bootstrap portage (which/what user) and what's in your $EPREFIX/usr/lib/portage/const_autotool.py?
Comment 4 Mike Sears 2009-07-31 12:41:08 UTC
I am bootstrapping as a normal user (msears). 

const_autotool.py is found in /Users/msears/Gentoo/lib/portage/pym/portage/

Here is its contents:

# Copyright: 2005-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id: const_autotool.py 13398 2009-04-26 11:15:05Z grobian $

# all vars that are to wind up in portage_const must have their name listed in __all__

__all__ = ["EPREFIX", "SYSCONFDIR", "DATADIR", "PORTAGE_BASE",
                "portageuser", "portagegroup", "rootuser", "rootuid", "rootgid",
                "PORTAGE_BASH", "PORTAGE_MV"]

from os import path

EPREFIX      = "/Users/msears/Gentoo"
SYSCONFDIR   = "/Users/msears/Gentoo/etc"
DATADIR      = "/Users/msears/Gentoo/usr/share"
PORTAGE_BASE = "/Users/msears/Gentoo/usr/lib/portage"

portagegroup = "BRYNMAWRdomain users"
portageuser  = "msears"
rootuser     = "msears"
rootuid      = 273009453
rootgid      = 1612776775

PORTAGE_BASH = "/Users/msears/Gentoo/tmp/usr/bin/bash"
PORTAGE_MV   = "/Users/msears/Gentoo/tmp/usr/bin/mv"

Comment 5 Fabian Groffen gentoo-dev 2009-07-31 15:06:38 UTC
How do rootuid and rootgid relate to the output of `id`?  Are they the same?
Comment 6 Mike Sears 2009-07-31 21:39:48 UTC
wireless240-dhcp240:map64 msears$ id

uid=273009453(msears) gid=1612776775(BRYNMAWR\domain users) groups=1612776775(BRYNMAWR\domain users),98(_lpadmin),81(_appserveradm),101(com.apple.sharepoint.group.1),102(com.apple.sharepoint.group.2),79(_appserverusr),80(admin),20(staff)
Comment 7 Fabian Groffen gentoo-dev 2009-08-01 08:12:24 UTC
aha, the '\' is not stored properly in the const_autotool.py file.  Does portage work if you fix the entry for portagegroup?
Comment 8 Fabian Groffen gentoo-dev 2009-08-01 10:18:58 UTC
Mike, I need the config.log of portage from ./bootstrap-prefix.sh $EPREFIX portage.  In particular the head of this file which reports how configure was called.  You should be able to find it in /Users/msears/Gentoo/var/tmp/prefix-portage-*/config.log
Comment 9 Mike Sears 2009-08-01 12:32:11 UTC
Fixing the '\' allowed emerge to work properly.  Because of this, unfortunately, the config.log file doesn't exist. I can undo the fix and get you that file though.

Thanks for the help.

Mike
Comment 10 Fabian Groffen gentoo-dev 2009-08-01 12:33:47 UTC
Ehm, no, you better continue.  You will probably hit the same problem after you emerged portage.  Let's first see if that's the case.
Comment 11 Mike Sears 2009-08-01 13:09:18 UTC
OK.  I'll upload that log when I hit it.
Comment 12 Mike Sears 2009-08-02 13:09:37 UTC
Created attachment 199913 [details]
stll fails

Yup, portage did fail again.  Here is the config.log. Seemd that fixing the const_autotol.py doesn't help.

Here's the end of the emerge info:

Making install in bin
make[1]: Entering directory `/Users/msears/Gentoo/var/tmp/portage/sys-apps/portage-2.2.00.13683/work/prefix-portage-2.2.00.13683/bin'
/Users/msears/Gentoo/usr/bin/install -c -d -m 755 -o "msears" -g "BRYNMAWRdomain users" /Users/msears/Gentoo/var/tmp/portage/sys-apps/portage-2.2.00.13683/image//Users/msears/Gentoo/usr/lib/portage/bin
/Users/msears/Gentoo/usr/bin/install: invalid group `BRYNMAWRdomain users'
make[1]: *** [install] Error 1
make[1]: Leaving directory `/Users/msears/Gentoo/var/tmp/portage/sys-apps/portage-2.2.00.13683/work/prefix-portage-2.2.00.13683/bin'
make: *** [install-recursive] Error 1
 * ERROR: sys-apps/portage-2.2.00.13683 failed:
 *   make install failed.
 * 
 * Call stack:
 *               ebuild.sh:  42: <call src_install>
 *             environment:2602:     emake DESTDIR="${D}" install || die "make install failed.";
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.

>>> Failed to emerge sys-apps/portage-2.2.00.13683, Log file:

>>>  '/Users/msears/Gentoo/var/tmp/portage/sys-apps/portage-2.2.00.13683/temp/build.log'

 * Messages for package sys-apps/portage-2.2.00.13683:

 * ERROR: sys-apps/portage-2.2.00.13683 failed:
 *   make install failed.
 * 
 * Call stack:
 *               ebuild.sh:  42: <call src_install>
 *             environment:2602:     emake DESTDIR="${D}" install || die "make install failed.";
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
Comment 13 Mike Sears 2009-08-02 13:10:05 UTC
Created attachment 199914 [details]
here's the build log
Comment 14 Fabian Groffen gentoo-dev 2009-08-02 14:06:14 UTC
thanks, I think I found at least one problem that might cause the rest
Comment 15 Fabian Groffen gentoo-dev 2009-08-02 15:00:06 UTC
heh, I cannot commit any fix at the moment, because we have an expired certificate, sorry about that.
Comment 16 Mike Sears 2009-08-03 03:35:35 UTC
any quick fix I can implement here on the user side?
Comment 17 Mike Sears 2009-08-03 04:04:42 UTC
I figured out how to get around this for now
Comment 18 Mike Sears 2009-08-03 04:14:47 UTC
disregard that last comment...it is untrue.
Comment 19 Fabian Groffen gentoo-dev 2009-08-03 07:51:13 UTC
no, actually, you'll have to rebootstrap if you don't mind.  I'm creating the updated snapshot and bootstrap-prefix.sh script as I'm typing now
Comment 20 Fabian Groffen gentoo-dev 2009-08-03 07:54:26 UTC
ok, done, please make sure to refetch bootstrap-prefix.sh (you need revision 49284)
Comment 21 Mike Sears 2009-08-03 12:25:50 UTC
portage now emerges fine in the bootstrap. 

Now fails in code listing 1.6:

emerge --oneshot sed

Traceback (most recent call last):
  File "/Users/msears/Gentoo/usr/bin/emerge", line 42, in <module>
    retval = emerge_main()
  File "/Users/msears/Gentoo/usr/lib/portage/pym/_emerge/main.py", line 1036, in emerge_main
    settings, trees, mtimedb = load_emerge_config()
  File "/Users/msears/Gentoo/usr/lib/portage/pym/_emerge/actions.py", line 2646, in load_emerge_config
    settings = root_trees["vartree"].settings
  File "/Users/msears/Gentoo/usr/lib/portage/pym/portage/util.py", line 1066, in __getitem__
    result = lazy_item.func(*pargs, **kwargs)
  File "/Users/msears/Gentoo/usr/lib/portage/pym/portage/dbapi/vartree.py", line 2280, in __init__
    settings=settings, vartree=self)
  File "/Users/msears/Gentoo/usr/lib/portage/pym/portage/dbapi/vartree.py", line 1456, in __init__
    if self.settings.get('CHOST').find('darwin') >= 0:
AttributeError: 'NoneType' object has no attribute 'find'
Comment 22 Fabian Groffen gentoo-dev 2009-08-03 17:49:10 UTC
It appears there was a wrongly named file on the server which isn't noticed by the bootstrap script.  Can you check if you have any usr/portage/profiles?
Comment 23 Mike Sears 2009-08-03 19:15:45 UTC
No usr/portage profiles. 
Comment 24 Fabian Groffen gentoo-dev 2009-08-03 19:20:57 UTC
right, sorry.

Can you try the following:
rm ${EPREFIX}/usr/portage/.unpacked
refetch bootstrap-prefix.sh
./bootstrap-prefix.sh ${EPREFIX} tree
Comment 25 Mike Sears 2009-08-03 19:44:12 UTC
seems to be working...working on code listing 1.8.  Will update with any successes/failures.
Comment 26 Mike Sears 2009-08-03 19:47:51 UTC
make install in flex failed:

>>> Install flex-2.5.35 into /Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image/Users/msears/Gentoo/ category sys-devel
make install DESTDIR=/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image/ 
make  install-recursive
make[1]: Entering directory `/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/work/flex-2.5.35'
Making install in .
make[2]: Entering directory `/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/work/flex-2.5.35'
make[3]: Entering directory `/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/work/flex-2.5.35'
test -z "/Users/msears/Gentoo/usr/bin" || mkdir -p -- "/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/bin"
  /Users/msears/Gentoo/tmp/usr/bin/install -c 'flex' '/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/bin/flex'
test -z "/Users/msears/Gentoo/usr/lib" || mkdir -p -- "/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/lib"
 /Users/msears/Gentoo/tmp/usr/bin/install -c -m 644 'libfl.a' '/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/lib/libfl.a'
 /Users/msears/Gentoo/tmp/usr/bin/install -c -m 644 'libfl_pic.a' '/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/lib/libfl_pic.a'
 ranlib '/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/lib/libfl.a'
 ranlib '/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/lib/libfl_pic.a'
test -z "/Users/msears/Gentoo/usr/include" || mkdir -p -- "/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/include"
 /Users/msears/Gentoo/tmp/usr/bin/install -c -m 644 'FlexLexer.h' '/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/include/FlexLexer.h'
make[3]: Leaving directory `/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/work/flex-2.5.35'
make[2]: Leaving directory `/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/work/flex-2.5.35'
Making install in doc
make[2]: Entering directory `/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/work/flex-2.5.35/doc'
for i in flex.1 ; do \
	help2man --name='the fast lexical analyser generator' \
	--section=`echo $i | sed -e 's/.*\.\([^.]*\)$/\1/'` \
	 ../flex > $i || rm -f $i ; \
	done
/Users/msears/Gentoo/tmp/usr/bin/bash: line 1: help2man: command not found
make[3]: Entering directory `/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/work/flex-2.5.35/doc'
make[3]: Nothing to be done for `install-exec-am'.
test -z "/Users/msears/Gentoo/usr/share/info" || mkdir -p -- "/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/share/info"
 /Users/msears/Gentoo/tmp/usr/bin/install -c -m 644 './flex.info' '/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/share/info/flex.info'
 /Users/msears/Gentoo/tmp/usr/bin/install -c -m 644 './flex.info-1' '/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/share/info/flex.info-1'
 /Users/msears/Gentoo/tmp/usr/bin/install -c -m 644 './flex.info-2' '/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/share/info/flex.info-2'
 install-info --info-dir='/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/share/info' '/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/share/info/flex.info'
test -z "/Users/msears/Gentoo/usr/share/man/man1" || mkdir -p -- "/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/share/man/man1"
 /Users/msears/Gentoo/tmp/usr/bin/install -c -m 644 'flex.1' '/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/share/man/man1/flex.1'
/Users/msears/Gentoo/tmp/usr/bin/install: cannot stat `flex.1': No such file or directory
make[3]: *** [install-man1] Error 1
make[3]: Leaving directory `/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/work/flex-2.5.35/doc'
make[2]: *** [install-am] Error 2
make[2]: Leaving directory `/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/work/flex-2.5.35/doc'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/work/flex-2.5.35'
make: *** [install] Error 2
 * ERROR: sys-devel/flex-2.5.35 failed:
 *   make install failed
 * 
 * Call stack:
 *               ebuild.sh:  64: <call src_install>
 *             environment:2597:     emake install DESTDIR="${D}" || die "make install failed";
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * QA Notice: command not found:
 * 
 * 	/Users/msears/Gentoo/tmp/usr/bin/bash: line 1: help2man: command not found
 * 	/Users/msears/Gentoo/tmp/usr/bin/bash: line 1: help2man: command not found

>>> Failed to emerge sys-devel/flex-2.5.35, Log file:

>>>  '/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/temp/build.log'

 * Messages for package sys-devel/flex-2.5.35:

 * ERROR: sys-devel/flex-2.5.35 failed:
 *   make install failed
 * 
 * Call stack:
 *               ebuild.sh:  64: <call src_install>
 *             environment:2597:     emake install DESTDIR="${D}" || die "make install failed";
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.



Comment 27 Fabian Groffen gentoo-dev 2009-08-03 19:51:25 UTC
problem appears to be this:
/Users/msears/Gentoo/tmp/usr/bin/bash: line 1: help2man: command not found

However, that is unrelated to portage, so I think we can close this bug assuming we fixed the original issue.