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

Bug 57900

Summary: eutils.eclass does not add users or groups in OSX
Product: Gentoo Linux Reporter: Joe Jezak (RETIRED) <josejx>
Component: New packagesAssignee: osx porters <osx>
Status: VERIFIED FIXED    
Severity: normal CC: tove
Priority: High    
Version: unspecified   
Hardware: PPC   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 56728    
Attachments: Patch for eutils.eclass to fix adding users and groups on OSX
Fix for adding users to groups

Description Joe Jezak (RETIRED) gentoo-dev 2004-07-21 14:37:58 UTC
In OSX, when emerging software that requires a user to be added, eutils.eclass tries to use the getent, useradd and groupadd commands which are not present.  This causes the ebuild to fail.  I've attached a fixed eutils.eclass.  The only thing missing from this is the eextra option, otherwise it should function exactly the same as on linux.  To fix this shortcoming, we would need to finish mapping the options from useradd and groupadd to their OSX equivalents.
Comment 1 Joe Jezak (RETIRED) gentoo-dev 2004-07-21 14:49:18 UTC
Created attachment 35921 [details, diff]
Patch for eutils.eclass to fix adding users and groups on OSX
Comment 2 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-07-23 04:12:45 UTC
Added to CVS. Thanks for your contribution.
Comment 3 Joe Jezak (RETIRED) gentoo-dev 2004-10-05 20:13:12 UTC
When the change was made from my original patch from [ "${ARCH}" == "macos" ] to use macos || use ppc-macos, code that depends upon the echo (egetent) broke.  So we need to replace use with useq until portage stops having use echo.  In addition, with ppc-macos set as my ACCEPT-KEYWORDS, I can't seem to get use ppc-macos to return true.  Is this a known problem?
Comment 4 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-10-05 21:33:35 UTC
Replaced use with useq. Thanks for the bug report. ARCH had been changed
to ppc from macos so this change was necessary but I hadn't tested the code
with the change. Sorry for that.

As for use ppc-macos, if you are using default-macos-10.x profile, use macos
returns true and use ppc-macos false while with default-macos/ppc/10.x profile
(stacked profile) use macos false and use ppc-macos true.
Comment 5 Joe Jezak (RETIRED) gentoo-dev 2004-10-05 22:12:48 UTC
Ah okay, that explains it.  There were a few other things that needed to be fixed as well, sorry about reopening the bug again, but even with the useq fixes it's not completely working.  I've attached another diff of the current eutils.eclass (after the useq changes).
Comment 6 Joe Jezak (RETIRED) gentoo-dev 2004-10-05 22:14:12 UTC
Created attachment 41201 [details, diff]
Fix for adding users to groups
Comment 7 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-10-05 23:29:32 UTC
I see, useq fixes only part of the problem (it will fail if more than one groups are specified).
I applied the patch you posted. Thanks. Feel free to reopen if there are any other problems ;)
Comment 8 Torsten Veller (RETIRED) gentoo-dev 2004-10-25 06:57:56 UTC
comment #4:
why do you use different ARCHes?

'macos' is not in arch.list and this results in QA notifications as in bug #66151.

If necessary i'll open another bug.
Comment 9 Joe Jezak (RETIRED) gentoo-dev 2004-10-25 07:26:43 UTC
We've been in transition from the macos keyword to the ppc-macos keyword as described in GLEP #22 (http://www.gentoo.org/proj/en/glep/glep-0022.html).  We should be able to remove this from the eclass now as the transition is nearly complete.  Besides eutils.eclass, the ruby eclass also should have macos removed.  I'll do this tomorrow if noone has any objections.
Comment 10 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-10-25 09:00:37 UTC
Please make sure you update profiles to set USE="ppc-macos"
at the same time. However, bug #67351 shows that 
USE="ppc-macos" is not but USE="macos" is set even though
he uses stacked profile. I don't know why :( If you remove
use macos from these eclasses he will have many problems.
(but I'd rather say it "WORKSFORME")
Comment 11 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-12-03 18:33:05 UTC
Fixed in the latest installer and cascading profiles.
Comment 12 Hasan Khalil (RETIRED) gentoo-dev 2005-02-06 13:33:14 UTC
Closing out bugs that've been resolved for a while now...