All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Hatle <mark.hatle@windriver.com>
To: Saul Wold <sgw@linux.intel.com>,
	<openembedded-core@lists.openembedded.org>
Subject: Re: [v2 PATCH 2/2] useradd.bbclass: Add ability to select a static uid/gid automatically
Date: Wed, 5 Feb 2014 12:14:57 -0600	[thread overview]
Message-ID: <52F27FA1.50906@windriver.com> (raw)
In-Reply-To: <52F27C6C.3030408@linux.intel.com>

On 2/5/14, 12:01 PM, Saul Wold wrote:
> On 02/04/2014 03:39 PM, Mark Hatle wrote:
>> [YOCTO #5436]
>>
>> Automatic selection of static uid/gid is needed for a dynamically generated
>> passwd and group file to have a deterministic outcome.
>>
>> When a package is installed and instructs the system to add a new user or
>> group, unless it selects a static uid/gid value, the next available uid/gid
>> will be used.  The order in which packages are installed is dynamically
>> computed, and may change from one installation to the next.  This results
>> in a non-deterministic set of uid/gid values.
>>
>> Enabling USERADD_REWRITE_PARAMS, and providing a preconfigured passwd/group
>> file will allow the continued dynamic generation of the passwd/group file
>> on the target, but ensure a deterministic outcome.  (Dynamic generation is
>> desired so that user and groups that have no corresponding functionality
>> are not present within the final system image.)
>>
>> The rewrite params function will override each of the fields in the
>> useradd and groupadd calls with the values specified.  Note, the password
>> field is ignored as is the member groups field in the group file.  If the
>> field is empty, the value will not be overridden.  (Note, there is no way
>> to 'blank' a field, as this would only generally affect the 'comment' field
>> and there really is no reason to blank it.)
>>
>> Enabling USERADD_ERROR_DYNAMIC will cause packages without static uid/gid
>> to generate an error and be skipped for the purpose of building.  This is
>> used to prevent non-deterministic behavior.
>>
>> USERADD_UID_TABLES and USERADD_GID_TABLES may be used to specify the name
>> of the passwd and group files.  By default they are assumed to be
>> 'files/passwd' and 'files/group'.  Layers are searched in BBPATH order.
>>
>> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
>> ---
>>    meta/classes/useradd.bbclass         | 258 +++++++++++++++++++++++++++++++++++
>>    meta/conf/local.conf.sample.extended |  24 ++++
>>    2 files changed, 282 insertions(+)
>>
>
> This need to be split to 2 patches one for oe-core and the
> local.conf.sample.extended for poky.
>

This patch is specific to oe-core, and was NOT generated to apply to poky.

This includes the changes to the local.conf.sample.extended (located in 
meta/conf on oe-core).

http://git.openembedded.org/openembedded-core/tree/meta/conf/local.conf.sample.extended

Once this goes into oe-core, I can work on a patch for meta-yocto if desired, 
likely the hunk will just apply there as well.

--Mark



  reply	other threads:[~2014-02-05 18:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-04 23:39 [v2 PATCH 0/2] Implement deterministic uid/gid Mark Hatle
2014-02-04 23:39 ` [v2 PATCH 1/2] useradd.bbclass: Fix build time install issues Mark Hatle
2014-02-04 23:39 ` [v2 PATCH 2/2] useradd.bbclass: Add ability to select a static uid/gid automatically Mark Hatle
2014-02-05 18:01   ` Saul Wold
2014-02-05 18:14     ` Mark Hatle [this message]
2014-02-06 22:17   ` Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52F27FA1.50906@windriver.com \
    --to=mark.hatle@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=sgw@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.