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 E2358138A1F for ; Tue, 15 Apr 2014 08:13:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EAEA4E0B22; Tue, 15 Apr 2014 08:13:11 +0000 (UTC) Received: from secretive.ru (secretive.ru [78.47.99.242]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0683CE0A9D for ; Tue, 15 Apr 2014 08:13:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tsoy.me; s=secretive; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:To:From:Date; bh=JXHaC25wqD7gbcJ1yWaiHvbqSuKttAs3FHqrVeZHIIY=; b=TSr7xZARyBvCiAypLKEBU0x4g734QnF7MduT7WxemA+ibSFK9U0BK++MY5umFJmgZzr5FrgjhS/qv7FO16hyaG3SugrAU6bQu7BH38huJdYZkgUJkeLVcjIX2Wke3JpGFPZZ4LDvbCliifFXKJJhkEj22GyNb0mn0Uj0a6l1ylc=; Received: from 37-146-203-62.broadband.corbina.ru ([37.146.203.62] helo=home.puleglot) by secretive.ru with esmtpsa (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.80.1) (envelope-from ) id 1WZyUP-0001Q9-1E for gentoo-dev@lists.gentoo.org; Tue, 15 Apr 2014 12:13:09 +0400 Date: Tue, 15 Apr 2014 12:13:07 +0400 From: Alexander Tsoy To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [PATCH] fcaps.eclass: Group name portability Message-ID: <20140415121307.4a478171@home.puleglot> In-Reply-To: <20140415120644.4c204446@home.puleglot> References: <87fvlit738.fsf@elisp.net> <5349DD1A.2010901@gentoo.org> <87y4z7cpee.fsf@elisp.net> <20140415120644.4c204446@home.puleglot> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu) 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 0450c346-4c6c-460c-903e-bec05910a09d X-Archives-Hash: 18d21f95c506c4918ca05889f33416fe =D0=92 Tue, 15 Apr 2014 12:06:44 +0400 Alexander Tsoy =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > =D0=92 Tue, 15 Apr 2014 11:11:53 +0900 > Naohiro Aota =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >=20 > > Diego Elio Petten=C3=B2 writes: > >=20 > > > I'm pretty sure we have an eclass function to get the name of the > > > 0 group.=20 > >=20 > > I can't find one... but found qmail.eclass is using exactly same > > method. > >=20 > > > export GROUP_ROOT=3D"$(id -gn root)" >=20 > "id -gn root" prints initial group name of the user root. This is > exactly what you want in fcaps.eclass. In linux "id" accepts only > username as argument, it doesn't support uid. >=20 But if you really want to convert gid=3D0 to groupname, then use egetent() as also noted by Cyprien: inherit user ... local group=3D$(egetent group 0) group=3D${group%%:*} --=20 Alexander Tsoy