Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 124568 - dobin in portage-2.1_pre5 does not work for others BSD's anymore.
Summary: dobin in portage-2.1_pre5 does not work for others BSD's anymore.
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All NetBSD
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS, REGRESSION
Depends on:
Blocks: 115839
  Show dependency tree
 
Reported: 2006-03-01 14:18 UTC by Benigno B. Junior (RETIRED)
Modified: 2006-03-01 20:12 UTC (History)
1 user (show)

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


Attachments
patch dobin and dosbin to use uid and gid 0 (dobin_uid_gid_0.patch,1.19 KB, patch)
2006-03-01 16:18 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benigno B. Junior (RETIRED) gentoo-dev 2006-03-01 14:18:47 UTC
Seems that somethings have been changed, and this piece of code:

case ${CHOST} in
        *-freebsd*) group=wheel ;;
        *)          group=root ;;
esac

is killing us, since we are with FreeBSD (there's no root group, but wheel).
Comment 1 Benigno B. Junior (RETIRED) gentoo-dev 2006-03-01 14:21:45 UTC
And the same for dosbin.
Comment 2 Robert Sebastian Gerus 2006-03-01 14:27:51 UTC
And same goes for DragonFly, *-dragonfly* for chost check.
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-03-01 14:31:06 UTC
The same will be for OSX...
Probably this time a linux or gnu check would be appropriate.
Comment 4 SpanKY gentoo-dev 2006-03-01 15:21:31 UTC
> Seems that somethings have been changed, and this piece of code:

correct, the code before would check to see if USERLAND was GNU and then default to using 'wheel' otherwise ... this goes against the general behavior in portage, that is, we check for non-GNU systems first and then assume everything else is GNU

> case ${CHOST} in
>         *-freebsd*) group=wheel ;;
>         *)          group=root ;;
> esac
> 
> is killing us, since we are with FreeBSD (there's no root group, but wheel).

how is this killing freebsd ?  does your CHOST not match *-freebsd* ?
Comment 5 Kito (RETIRED) gentoo-dev 2006-03-01 15:24:52 UTC
I'm moving these vars to make.conf in the prefix branch:
  rootuser
  rootuid
  wheelgroup
  wheelgid
  portageuser
  portagegroup

the last 2 have no merit for stable portage, but perhaps the root/wheel stuff would be better suited as a configuration option to avoid having to hardcode even more crap.
Comment 6 Benigno B. Junior (RETIRED) gentoo-dev 2006-03-01 15:30:12 UTC
(In reply to comment #4)
> how is this killing freebsd ?  does your CHOST not match *-freebsd* ?
> 

It's not killing FreeBSD. It's killing NetBSD, OpenBSD and DragonFly, afaik. We "follow" FreeBSD, in this case.
Comment 7 Zac Medico gentoo-dev 2006-03-01 15:38:38 UTC
In similar situtations we've used 0 as the UID or GID in order to sidestep the root/wheel difference.  Can that approach apply here or not?
Comment 8 Benigno B. Junior (RETIRED) gentoo-dev 2006-03-01 15:41:11 UTC
And what about putting "0" as the group for everyone, as Diego has recommended in documentations?
Comment 9 Benigno B. Junior (RETIRED) gentoo-dev 2006-03-01 15:41:33 UTC
(In reply to comment #7)
> In similar situtations we've used 0 as the UID or GID in order to sidestep the
> root/wheel difference.  Can that approach apply here or not?
> 

Sounds perfect setting this for everyone.
Comment 10 SpanKY gentoo-dev 2006-03-01 16:16:47 UTC
> And what about putting "0" as the group for everyone, as Diego has recommended
> in documentations?

i dont mind such hacks in backend portage, but i think it's a shitty solution for ebuilds
Comment 11 Zac Medico gentoo-dev 2006-03-01 16:18:04 UTC
Created attachment 81077 [details, diff]
patch dobin and dosbin to use uid and gid 0

Please test this patch and if it works for everyone then I'll roll it into 2.1_pre5-r3.
Comment 12 Benigno B. Junior (RETIRED) gentoo-dev 2006-03-01 16:26:23 UTC
(In reply to comment #11)
> Created an attachment (id=81077) [edit]
> patch dobin and dosbin to use uid and gid 0
> 
> Please test this patch and if it works for everyone then I'll roll it into
> 2.1_pre5-r3.
> 

It's fine.
Comment 13 Zac Medico gentoo-dev 2006-03-01 18:25:14 UTC
(In reply to comment #3)
> The same will be for OSX...
> Probably this time a linux or gnu check would be appropriate.

Are there any arguments against the assumption that both the uid and gid should be 0?

(In reply to comment #5)
> perhaps the root/wheel stuff would be better suited as a configuration option
> to avoid having to hardcode even more crap.

I agree that the hardcoded aspect sucks, but if it works I can live with it until we decide on a more unified approach like you have in the prefix branch.

(In reply to comment #10)
> i dont mind such hacks in backend portage, but i think it's a shitty solution
> for ebuilds

If you can find a unix system that this doesn't work on, then I'll agree that it's a bad solution.
Comment 14 Kito (RETIRED) gentoo-dev 2006-03-01 18:44:05 UTC
(In reply to comment #13)

> Are there any arguments against the assumption that both the uid and gid should
> be 0?
>

Fine for darwin/os x. 

> If you can find a unix system that this doesn't work on, then I'll agree that
> it's a bad solution.

 I don't see what is so hacky about using 0 (other than the aforementioned hardcoding), it works fine on every system I have tested on(linux,solaris, haiku, macos, and bsd)

Comment 15 Zac Medico gentoo-dev 2006-03-01 20:12:24 UTC
Released in 2.1_pre5-r2