From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 602F7138A1F for ; Sun, 13 Apr 2014 06:29:35 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 00D49E0A5D; Sun, 13 Apr 2014 06:29:30 +0000 (UTC) Received: from mail-ie0-f173.google.com (mail-ie0-f173.google.com [209.85.223.173]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EDE7CE0A0B for ; Sun, 13 Apr 2014 06:29:28 +0000 (UTC) Received: by mail-ie0-f173.google.com with SMTP id rl12so7020317iec.18 for ; Sat, 12 Apr 2014 23:29:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=ifeubiFDocCVrvvFKMnWYidHGng5bX1+MX++Z54L3rI=; b=N/upsYY9rJR22Yf6+GGD8O4GZpfS/cuy9IeJLevvVNK4pJ+0z+QLVAzcv/vQVWlnD0 /mIV15CkeNm+xEZhlzRBIAzd/T/lr2I0uwVGMnMVJ9LkXYBkD1k1h2isNvcntjRGOb1k +Z9IxLtT60yaaFR/dc9geAbisLE2ZT0NDSXg20H6I5c2OUqrxKJfKQvCjvGdkqf6wnaL 1k/yqaQhaZMvsynfY97pRmnNXUWjJFx14VqQsWSNz72r4jF6vRdI5mAZBpnIR4v6/rlp CKPJXYTQKILIi92STZB0YlR+C2ImDb4LqkyA7Ppx9RdKnK8A6YjZvN9nc7ttxFV8o2kF BWsg== X-Gm-Message-State: ALoCoQn8QIli3kVQfvhfFfbwqfrpKt//23LIxkfya9fDLpdZcwB3Gcfe7SmFRIiK+gc+0tgX75Wo Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 X-Received: by 10.42.173.68 with SMTP id q4mr26857961icz.41.1397370567959; Sat, 12 Apr 2014 23:29:27 -0700 (PDT) Received: by 10.64.17.196 with HTTP; Sat, 12 Apr 2014 23:29:27 -0700 (PDT) Received: by 10.64.17.196 with HTTP; Sat, 12 Apr 2014 23:29:27 -0700 (PDT) In-Reply-To: <5349DD1A.2010901@gentoo.org> References: <87fvlit738.fsf@elisp.net> <5349DD1A.2010901@gentoo.org> Date: Sun, 13 Apr 2014 07:29:27 +0100 Message-ID: Subject: Re: [gentoo-dev] [PATCH] fcaps.eclass: Group name portability From: =?UTF-8?Q?Diego_Elio_Petten=C3=B2?= To: gentoo-dev@lists.gentoo.org Content-Type: multipart/alternative; boundary=90e6ba6e863a52bceb04f6e6b0ed X-Archives-Salt: 2d18e2c3-7b00-4f0b-8461-35428c34cb37 X-Archives-Hash: 3d0f605702753ce319abb6014a8d7456 --90e6ba6e863a52bceb04f6e6b0ed Content-Type: text/plain; charset=UTF-8 I'm pretty sure we have an eclass function to get the name of the 0 group. On 12 Apr 2014 17:41, "hasufell" wrote: > naota@gentoo.org: > > fcaps.eclass is using group name 'root' which is not available on BSD > > system. Instead you can use "0", or $(id -g -n 0) if you'd prefer "group > > name" > > > > Index: fcaps.eclass > > =================================================================== > > RCS file: /var/cvsroot/gentoo-x86/eclass/fcaps.eclass,v > > retrieving revision 1.8 > > diff -u -r1.8 fcaps.eclass > > --- fcaps.eclass 27 Jun 2013 01:18:57 -0000 1.8 > > +++ fcaps.eclass 13 Apr 2014 00:16:44 -0000 > > @@ -80,7 +80,7 @@ > > > > # Process the user options first. > > local owner='root' > > - local group='root' > > + local group=$(id -g -n 0) > > local mode='4711' > > local caps_mode='711' > > > > > > # id -g -n 0 > id: 0: no such user > > --90e6ba6e863a52bceb04f6e6b0ed Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

I'm pretty sure we have an eclass function to get the na= me of the 0 group.

On 12 Apr 2014 17:41, "hasufell" <<= a href=3D"mailto:hasufell@gentoo.org">hasufell@gentoo.org> wrote:
naota@gentoo.org:
> fcaps.eclass is using group name 'root' which is not available= on BSD
> system. Instead you can use "0", or $(id -g -n 0) if you'= ;d prefer "group
> name"
>
> Index: fcaps.eclass
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /var/cvsroot/gentoo-x86/eclass/fcaps.eclass,v
> retrieving revision 1.8
> diff -u -r1.8 fcaps.eclass
> --- fcaps.eclass =C2=A0 =C2=A0 =C2=A027 Jun 2013 01:18:57 -0000 =C2=A0= =C2=A0 =C2=A01.8
> +++ fcaps.eclass =C2=A0 =C2=A0 =C2=A013 Apr 2014 00:16:44 -0000
> @@ -80,7 +80,7 @@
>
> =C2=A0 =C2=A0 =C2=A0 # Process the user options first.
> =C2=A0 =C2=A0 =C2=A0 local owner=3D'root'
> - =C2=A0 =C2=A0 local group=3D'root'
> + =C2=A0 =C2=A0 local group=3D$(id -g -n 0)
> =C2=A0 =C2=A0 =C2=A0 local mode=3D'4711'
> =C2=A0 =C2=A0 =C2=A0 local caps_mode=3D'711'
>
>

# id -g -n 0
id: 0: no such user

--90e6ba6e863a52bceb04f6e6b0ed--