Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
eutils.eclass on Gentoo Prefix for Solaris
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
soltoo
n00b
n00b


Joined: 02 Jul 2011
Posts: 15

PostPosted: Thu Nov 03, 2011 12:00 pm    Post subject: eutils.eclass on Gentoo Prefix for Solaris Reply with quote

I have yet to submit a bug report requesting this yet since I haven't had a chance before to get feedback from the community about it.

This change to eutils.eclass deals with the fact that Solaris useradd and groupadd do not have the "-r" (system account) flag. If I try to run "emerge" as root in Gentoo Prefix on Solaris it tries to run /usr/sbin/useradd -r ... and that fails.

NetBSD tends to do things the Sun way so I thought that making Solaris use the NetBSD code would be OK.

What do people involved think?

Thanks

Code:

diff --git a/site-cookbooks/packages/files/solaris2/eutils.eclass b/site-cookbooks/packages/files/solaris2/eutils.eclass
index d9efbbf..50f0b03 100644
--- a/site-cookbooks/packages/files/solaris2/eutils.eclass
+++ b/site-cookbooks/packages/files/solaris2/eutils.eclass
@@ -758,7 +758,7 @@ enewuser() {
                fi
                ;;

-       *-netbsd*)
+       *-netbsd*|*-solaris*)
                if [[ -z $@ ]] ; then
                        useradd ${opts} ${euser} || die "enewuser failed"
                else
@@ -907,7 +907,7 @@ enewgroup() {
                pw groupadd ${egroup} -g ${egid} || die "enewgroup failed"
                ;;

-       *-netbsd*)
+       *-netbsd*|*-solaris*)
                case ${egid} in
                *[!0-9]*) # Non numeric
                        for ((egid = 101; egid <= 999; egid++)); do
Back to top
View user's profile Send private message
soltoo
n00b
n00b


Joined: 02 Jul 2011
Posts: 15

PostPosted: Thu Nov 03, 2011 12:19 pm    Post subject: Reply with quote

One more thing

in EPREFIX//usr/share/portage/config/make.globals

EXTRA_PATH="/usr/bin:/bin:/usr/sbin"

Needs "/usr/sbin" in order to find /usr/sbin/useradd
Back to top
View user's profile Send private message
grobian
Developer
Developer


Joined: 31 May 2006
Posts: 67

PostPosted: Sun Dec 04, 2011 7:32 pm    Post subject: Reply with quote

if you tested your code and verified it works correctly, it looks ok for inclusion to me.
_________________
Gentoo on a different level
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum