[OE-core] [PATCH 1/5] useradd.bbclass: Strip trailing '; ' in cmd params

Richard Purdie richard.purdie at linuxfoundation.org
Mon May 23 09:35:05 UTC 2016


On Mon, 2016-05-23 at 10:07 +0200, Patrick Ohly wrote:
> On Wed, 2016-05-18 at 12:38 -0700, Khem Raj wrote:
> > This fix was not sufficient and there has to be extra fix done to
> > also
> > consider the case
> > when sysroot is created during image build time. I have updated it
> > in
> > pull request here
> > 
> > http://git.openembedded.org/openembedded-core-contrib/commit/?h=kra
> > j/pu&id=642c6cf0b6a0371de476513162bd0cefa9c438b3
> 
> That now fails for cases where the USERADD_PARAM ends in trailing
> white
> space after the last valid opts. The reason is that the 'if test "x
> $opts" = "x$remaining"; then break; fi' check does not get triggered
> anymore, because $remaining has the trailing white space whereas
> "$opts"
> does not.
> 
> I'm not sure what the best approach is in this case. Perhaps also
> strip
> trailing whitespace from all assignments to $remaining?
> 
> The case were we see this is:
> USERADD_PARAM_iot-rest-api-server="--system --home /var/lib/empty -
> -no-create-home --shell /bin/false --gid restful restful "
> 
> The build then hangs because the useradd preinst loops forever.

I've posted a patch which addresses this issue since its pretty nasty
for people to run into.

Cheers,

Richard



More information about the Openembedded-core mailing list