From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 234D0139085 for ; Sat, 28 Jan 2017 03:20:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DA61DE0C71; Sat, 28 Jan 2017 03:20:09 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 85EB1E0C64 for ; Sat, 28 Jan 2017 03:20:09 +0000 (UTC) Received: from [192.168.1.100] (c-98-218-46-55.hsd1.md.comcast.net [98.218.46.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mjo) by smtp.gentoo.org (Postfix) with ESMTPSA id 4B75A341670 for ; Sat, 28 Jan 2017 03:20:08 +0000 (UTC) Subject: Re: [gentoo-dev] Requirements for UID/GID management To: gentoo-dev@lists.gentoo.org References: <9558d41c-17c0-4bbd-e2f8-02575c6d0ecd@gentoo.org> <20170127183752.500f8910@patrickm> From: Michael Orlitzky Message-ID: <3f75b35c-8f39-9f7a-1e0c-e992853e91df@gentoo.org> Date: Fri, 27 Jan 2017 22:20:04 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 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 In-Reply-To: <20170127183752.500f8910@patrickm> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Archives-Salt: e4869784-9ac8-40e3-9b7c-d2b45c36afda X-Archives-Hash: dd5c5c019aaf5ba5974d6bed73d44efc On 01/27/2017 09:37 PM, Patrick McLean wrote: > > To make something to solve our problem (and I suspect everyone > else who cares about this), it would be sufficient to have a mechanism > to override the default random assignment with a fixed UID/GID. What I had in mind for this is that a "normal" user ebuild would look like... EAPI=6 # SYS_USER_NAME defaults to ${PN} SYS_USER_GROUPS="foo" # defaults empty or to ${PN}, not sure # SYS_USER_UID left undefined to get the next available # SYS_USER_HOME left undefined to get the default # SYS_USER_SHELL left undefined... etc. inherit sys-user.eclass ... # DEPEND set to "sys-group/foo" by the eclass # RDEPEND set to "sys-group/foo" by the eclass ... # src_install and pkg_prerm from the eclass. To override the UID behavior, I think package.env would work, but an overlay where the ebuild has SYS_USER_UID=42 is guaranteed to.