public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] root:root and fbsd
@ 2005-05-22  8:49 Diego 'Flameeyes' Pettenò
  2005-05-22  9:06 ` Ciaran McCreesh
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Diego 'Flameeyes' Pettenò @ 2005-05-22  8:49 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 829 bytes --]

Hi,
ok another problem for Gentoo/FreeBSD project :P
Currently there are a few places where, to fix permissions of files, the 
ebuilds does a chown -R root:root ${D} or something similar.
Unfortunately such a command is invalid on G/FBSD because there's no root 
group, instead wheel group has GID=0.

So I was wondering for a solution for this problem: we have a $USERLAND 
variable which can be used to select the way the chown must be done, if chown 
root:root or chown root:wheel; I think both BSD and Darwin userland prefers 
root:wheel above root:root, so maybe adding a function in eutils which fixes 
the permissions based on the current $USERLAND value is enough...

Comments?

-- 
Diego "Flameeyes" Pettenò
Gentoo Developer (Gentoo/FreeBSD, Video, Gentoo/AMD64)

http://dev.gentoo.org/~flameeyes/


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-dev] root:root and fbsd
  2005-05-22  8:49 [gentoo-dev] root:root and fbsd Diego 'Flameeyes' Pettenò
@ 2005-05-22  9:06 ` Ciaran McCreesh
  2005-05-22  9:20   ` Diego 'Flameeyes' Pettenò
  2005-05-22 11:27   ` Mike Frysinger
  2005-05-22  9:09 ` Stuart Longland
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 13+ messages in thread
From: Ciaran McCreesh @ 2005-05-22  9:06 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1015 bytes --]

On Sun, 22 May 2005 10:49:39 +0200 "Diego 'Flameeyes' Pettenò"
<flameeyes@gentoo.org> wrote:
| So I was wondering for a solution for this problem: we have a
| $USERLAND  variable which can be used to select the way the chown must
| be done, if chown  root:root or chown root:wheel; I think both BSD and
| Darwin userland prefers  root:wheel above root:root, so maybe adding a
| function in eutils which fixes  the permissions based on the current
| $USERLAND value is enough...

get_root_group() {
    if use userland_bsd ; then
        echo "wheel"
    else
        echo "root"
    fi
}

maybe?

The other option is to do a sneaky chown wrapper that automatically
detects that kind of thing. I'm against that on general principle
because it'll break too often.

I'll unofficial-document whatever's decided upon, anyway.

-- 
Ciaran McCreesh : Gentoo Developer (Vim, Shell tools, Fluxbox, Cron)
Mail            : ciaranm at gentoo.org
Web             : http://dev.gentoo.org/~ciaranm


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-dev] root:root and fbsd
  2005-05-22  8:49 [gentoo-dev] root:root and fbsd Diego 'Flameeyes' Pettenò
  2005-05-22  9:06 ` Ciaran McCreesh
@ 2005-05-22  9:09 ` Stuart Longland
  2005-05-24 20:26   ` Diego 'Flameeyes' Pettenò
  2005-05-22 14:38 ` Alec Warner
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 13+ messages in thread
From: Stuart Longland @ 2005-05-22  9:09 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 831 bytes --]

Diego 'Flameeyes' Pettenò wrote:
> Hi,
> ok another problem for Gentoo/FreeBSD project :P
> Currently there are a few places where, to fix permissions of files, the 
> ebuilds does a chown -R root:root ${D} or something similar.
> Unfortunately such a command is invalid on G/FBSD because there's no root 
> group, instead wheel group has GID=0.

Why not just use `chmod -R 0:0 ${D}`?  That should have the desired effect?

-- 
+-------------------------------------------------------------+
| Stuart Longland -oOo- http://stuartl.longlandclan.hopto.org |
| Atomic Linux Project     -oOo-    http://atomicl.berlios.de |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| I haven't lost my mind - it's backed up on a tape somewhere |
+-------------------------------------------------------------+


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-dev] root:root and fbsd
  2005-05-22  9:06 ` Ciaran McCreesh
@ 2005-05-22  9:20   ` Diego 'Flameeyes' Pettenò
  2005-05-22 15:04     ` Kito
  2005-05-22 11:27   ` Mike Frysinger
  1 sibling, 1 reply; 13+ messages in thread
From: Diego 'Flameeyes' Pettenò @ 2005-05-22  9:20 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 421 bytes --]

On Sunday 22 May 2005 11:06, Ciaran McCreesh wrote:
> get_root_group() {
That should do, so in ebuilds "chown -R root;$(get_root_group) blablah".
For me is ok for G/FBSD.

Now, if someone from G/OSX or G/Darwin can tell me how they manage that, we 
can be happy for all /alt archs :P

-- 
Diego "Flameeyes" Pettenò
Gentoo Developer (Gentoo/FreeBSD, Video, Gentoo/AMD64)

http://dev.gentoo.org/~flameeyes/


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-dev] root:root and fbsd
  2005-05-22  9:06 ` Ciaran McCreesh
  2005-05-22  9:20   ` Diego 'Flameeyes' Pettenò
@ 2005-05-22 11:27   ` Mike Frysinger
  1 sibling, 0 replies; 13+ messages in thread
From: Mike Frysinger @ 2005-05-22 11:27 UTC (permalink / raw
  To: gentoo-dev

On Sunday 22 May 2005 05:06 am, Ciaran McCreesh wrote:
> get_root_group() {

sounds like a lot of crap when i'm willing to bet most of these chowns 
probably dont need to specify the group at all ...
-mike
-- 
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-dev] root:root and fbsd
  2005-05-22  8:49 [gentoo-dev] root:root and fbsd Diego 'Flameeyes' Pettenò
  2005-05-22  9:06 ` Ciaran McCreesh
  2005-05-22  9:09 ` Stuart Longland
@ 2005-05-22 14:38 ` Alec Warner
  2005-05-22 14:48   ` Diego 'Flameeyes' Pettenò
  2005-05-23 16:23 ` Grant Goodyear
  2005-05-25 10:12 ` Paul de Vrieze
  4 siblings, 1 reply; 13+ messages in thread
From: Alec Warner @ 2005-05-22 14:38 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Diego 'Flameeyes' Pettenò wrote:
| Hi,
| ok another problem for Gentoo/FreeBSD project :P
| Currently there are a few places where, to fix permissions of files, the
| ebuilds does a chown -R root:root ${D} or something similar.
| Unfortunately such a command is invalid on G/FBSD because there's no root
| group, instead wheel group has GID=0.
|
| So I was wondering for a solution for this problem: we have a $USERLAND
| variable which can be used to select the way the chown must be done,
if chown
| root:root or chown root:wheel; I think both BSD and Darwin userland
prefers
| root:wheel above root:root, so maybe adding a function in eutils which
fixes
| the permissions based on the current $USERLAND value is enough...
|
| Comments?
|
Yeah, this means get working on GLEP 27 *cracks whip*.
http://www.gentoo.org/proj/en/glep/glep-0027.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iQIUAwUBQpCZWWzglR5RwbyYAQKkkA/2PI5A33U5de5tT5mgKQbZwifs3w5B+r8e
X3a0IoavdTh+lQu2b20gYmfyKmLxEwzS+kIsXtlKDx77NRptU+qHMLnntA4A+7kH
9KX/ghbCTljV3KTZfIwAt+oSj5IRt+pvcptusY53jI5vpKedmHQCudbGE8LmBseo
6dxeFHN2bZZiLVB1QsycOUwYijbQ01EUooTqb/zZ50duD/w7L2WuCQ+6cLfMbKMT
QMoWAlE37iCesltdieLwou+QWaMwfC1ZYaVVfZyy2Tm8+CcHgndNnXV2J3SfVFH2
DeDwlVw/Xxb4oirsaBiPGo6ndywYdQCBjTjkaYOoIJnOc13/HX9n7mPWSFbAIx9X
leGwhNi5ggqXp/s98+SuJAiauXuuVKq3Tn8OQxcY76c5A82gMnw++osri4CSXfVc
6BaOfr/0PmhlmpFzwH4RPI1yabrjfq2e7EYKtFjGQeEltCULxseMWhMuferiYciO
9D7pVSpkB+xTJSR7tTjT9Cwu4bt6IWSeqqTp8yy/w4PY2QntgiG5qvChvmJDrFgp
HKPJq4m84BLFFty4kwk68UgoKk6sb18IZtqU3lbUnjbr2IbZV2pl/KI3z4GcVJIY
n6ZAawYXHuWdCBzkMfGBomEAYbEbIiSYJ5D7VA1XAlUC6wX/4aICbqpYvBWsAKtO
hLYINVJJ7A==
=I/Ly
-----END PGP SIGNATURE-----
-- 
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-dev] root:root and fbsd
  2005-05-22 14:38 ` Alec Warner
@ 2005-05-22 14:48   ` Diego 'Flameeyes' Pettenò
  0 siblings, 0 replies; 13+ messages in thread
From: Diego 'Flameeyes' Pettenò @ 2005-05-22 14:48 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 394 bytes --]

On Sunday 22 May 2005 16:38, Alec Warner wrote:
> Yeah, this means get working on GLEP 27 *cracks whip*.
Don't think it's related.
That's related to new accounts/group added.
The problem we have is with the base accounts/groups present in the system 
itself.

-- 
Diego "Flameeyes" Pettenò
Gentoo Developer (Gentoo/FreeBSD, Video, Gentoo/AMD64)

http://dev.gentoo.org/~flameeyes/


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-dev] root:root and fbsd
  2005-05-22  9:20   ` Diego 'Flameeyes' Pettenò
@ 2005-05-22 15:04     ` Kito
  0 siblings, 0 replies; 13+ messages in thread
From: Kito @ 2005-05-22 15:04 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On May 22, 2005, at 4:20 AM, Diego 'Flameeyes' Pettenò wrote:

> On Sunday 22 May 2005 11:06, Ciaran McCreesh wrote:
>> get_root_group() {
> That should do, so in ebuilds "chown -R root;$(get_root_group) 
> blablah".
> For me is ok for G/FBSD.
>
> Now, if someone from G/OSX or G/Darwin can tell me how they manage 
> that, we
> can be happy for all /alt archs :P

Add the extra conditional for userland_Darwin and that should be good 
for all the Gentoo redheaded step-children.

>
> -- 
> Diego "Flameeyes" Pettenò
> Gentoo Developer (Gentoo/FreeBSD, Video, Gentoo/AMD64)
>
> http://dev.gentoo.org/~flameeyes/
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFCkJ9qJ0rMK/3OwgsRAvdxAJ9W7Bb1RmU3qUsZpRQEJL+dvjUWmQCdEj2X
WU/sF1HZur3JnRFZ8eAqjDA=
=yF9D
-----END PGP SIGNATURE-----


-- 
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-dev] root:root and fbsd
  2005-05-22  8:49 [gentoo-dev] root:root and fbsd Diego 'Flameeyes' Pettenò
                   ` (2 preceding siblings ...)
  2005-05-22 14:38 ` Alec Warner
@ 2005-05-23 16:23 ` Grant Goodyear
  2005-05-23 17:22   ` Mike Frysinger
  2005-05-25 10:12 ` Paul de Vrieze
  4 siblings, 1 reply; 13+ messages in thread
From: Grant Goodyear @ 2005-05-23 16:23 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 908 bytes --]

Diego 'Flameeyes' Pettenò wrote: [Sun May 22 2005, 03:49:39AM CDT]
> So I was wondering for a solution for this problem: we have a
> $USERLAND variable which can be used to select the way the chown must
> be done, if chown root:root or chown root:wheel; I think both BSD and
> Darwin userland prefers root:wheel above root:root, so maybe adding a
> function in eutils which fixes the permissions based on the current
> $USERLAND value is enough...

Of course, this issue is precisely what GLEP 27 was created to handle.
The portage devs have let us know that xml is a problem, but otherwise
this GLEP appears sound, and I believe that the portage team has
something along these lines as part of their long-range plans.

-g2boojum-
-- 
Grant Goodyear	
Gentoo Developer
g2boojum@gentoo.org
http://www.gentoo.org/~g2boojum
GPG Fingerprint: D706 9802 1663 DEF5 81B0  9573 A6DC 7152 E0F6 5B76

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-dev] root:root and fbsd
  2005-05-23 16:23 ` Grant Goodyear
@ 2005-05-23 17:22   ` Mike Frysinger
  0 siblings, 0 replies; 13+ messages in thread
From: Mike Frysinger @ 2005-05-23 17:22 UTC (permalink / raw
  To: gentoo-dev

On Monday 23 May 2005 12:23 pm, Grant Goodyear wrote:
> Of course, this issue is precisely what GLEP 27 was created to handle.
> The portage devs have let us know that xml is a problem

i thought i talked to them about your tweaks to use flat text files ... i'll 
have to check again i guess ...
-mike
-- 
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-dev] root:root and fbsd
  2005-05-22  9:09 ` Stuart Longland
@ 2005-05-24 20:26   ` Diego 'Flameeyes' Pettenò
  2005-05-24 21:51     ` Mike Frysinger
  0 siblings, 1 reply; 13+ messages in thread
From: Diego 'Flameeyes' Pettenò @ 2005-05-24 20:26 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 465 bytes --]

On Sunday 22 May 2005 11:09, Stuart Longland wrote:
> Why not just use `chmod -R 0:0 ${D}`?  That should have the desired effect?
Yes that will have so that should be good for all systems. For me that is 
ok... nobody disagrees?

If it's ok... Mike commit the eclass so that sys-devel/gcc will works (quite) 
out of the box :)

-- 
Diego "Flameeyes" Pettenò
Gentoo Developer (Gentoo/FreeBSD, Video, Gentoo/AMD64)

http://dev.gentoo.org/~flameeyes/


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-dev] root:root and fbsd
  2005-05-24 20:26   ` Diego 'Flameeyes' Pettenò
@ 2005-05-24 21:51     ` Mike Frysinger
  0 siblings, 0 replies; 13+ messages in thread
From: Mike Frysinger @ 2005-05-24 21:51 UTC (permalink / raw
  To: gentoo-dev

On Tuesday 24 May 2005 04:26 pm, Diego 'Flameeyes' Pettenò wrote:
> On Sunday 22 May 2005 11:09, Stuart Longland wrote:
> > Why not just use `chmod -R 0:0 ${D}`?  That should have the desired
> > effect?
>
> Yes that will have so that should be good for all systems. For me that is
> ok... nobody disagrees?

only other idea i'd consider is having portage scan $D before each merge 
looking for files owned by group portage ?  or perhaps making an eutils func 
for people to invoke ...

but this is probably just as much cruft as the get_root_group() idea ... i 
imagine if someone comes up with a reason down the road why using gid 0 is a 
bad idea, they'll let us know and we can review this again

Diego: feel free to commit the wheel -> 0 group change
-mike

-- 
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-dev] root:root and fbsd
  2005-05-22  8:49 [gentoo-dev] root:root and fbsd Diego 'Flameeyes' Pettenò
                   ` (3 preceding siblings ...)
  2005-05-23 16:23 ` Grant Goodyear
@ 2005-05-25 10:12 ` Paul de Vrieze
  4 siblings, 0 replies; 13+ messages in thread
From: Paul de Vrieze @ 2005-05-25 10:12 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1067 bytes --]

On Sunday 22 May 2005 10:49, Diego 'Flameeyes' Pettenò wrote:
> Hi,
> ok another problem for Gentoo/FreeBSD project :P
> Currently there are a few places where, to fix permissions of files,
> the ebuilds does a chown -R root:root ${D} or something similar.
> Unfortunately such a command is invalid on G/FBSD because there's no
> root group, instead wheel group has GID=0.
>
> So I was wondering for a solution for this problem: we have a $USERLAND
> variable which can be used to select the way the chown must be done, if
> chown root:root or chown root:wheel; I think both BSD and Darwin
> userland prefers root:wheel above root:root, so maybe adding a function
> in eutils which fixes the permissions based on the current $USERLAND
> value is enough...
>
> Comments?

Why not change the stuff to
chown -R 0:0 ${D}

That way it is user proof. The master accounts allways have id's 0:0 but 
user's might decide to change their names.

Paul

-- 
Paul de Vrieze
Gentoo Developer
Mail: pauldv@gentoo.org
Homepage: http://www.devrieze.net

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2005-05-25 10:13 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-22  8:49 [gentoo-dev] root:root and fbsd Diego 'Flameeyes' Pettenò
2005-05-22  9:06 ` Ciaran McCreesh
2005-05-22  9:20   ` Diego 'Flameeyes' Pettenò
2005-05-22 15:04     ` Kito
2005-05-22 11:27   ` Mike Frysinger
2005-05-22  9:09 ` Stuart Longland
2005-05-24 20:26   ` Diego 'Flameeyes' Pettenò
2005-05-24 21:51     ` Mike Frysinger
2005-05-22 14:38 ` Alec Warner
2005-05-22 14:48   ` Diego 'Flameeyes' Pettenò
2005-05-23 16:23 ` Grant Goodyear
2005-05-23 17:22   ` Mike Frysinger
2005-05-25 10:12 ` Paul de Vrieze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox