[OE-core] [PATCH 1/1] rootfs-postcommands.bbclass: sort passwd entries

Patrick Ohly patrick.ohly at intel.com
Sat Jan 7 08:06:54 UTC 2017


On Fri, 2017-01-06 at 21:17 +0000, Phil Blundell wrote:
> On Thu, 2017-01-05 at 16:38 +0100, Patrick Ohly wrote:
> > The /etc passwd files in a rootfs consist of the default entries from
> > base-passwd plus anything that gets added by preinst scripts or
> > extrausers.bbclass.
> > 
> > The execution order of preinst scripts is not perfectly
> > deterministic,
> > or at least unrelated changes caused it to change in a
> > non-deterministic way, resulting in irrelevant changes in the order
> > of
> > passwd entries.
> > 
> > Such re-ordering is bad for reproducible builds and file-based update
> > mechanisms like swupd which work best if changes are as minimal as
> > possible.
> > 
> > To achieve that, the files get sorted in a post-processing command,
> > enabled by default.
> 
> Won't the numeric UIDs still be non-deterministic, though?  If the goal
> is reproducible builds then it doesn't sound as though this quite fixes
> the problem.

Yes, but there's already a solution for that problem:
useradd-staticids.bbclass

I was assuming that someone who wants identical files is already using
that. Should it be mentioned in a comment next to the new feature?

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.






More information about the Openembedded-core mailing list