<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/classes/useradd-staticids.bbclass, branch python3</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=python3</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=python3'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2016-01-18T11:47:07+00:00</updated>
<entry>
<title>useradd-staticids.bbclass: Remove unnecessary spaces</title>
<updated>2016-01-18T11:47:07+00:00</updated>
<author>
<name>Peter Kjellerstedt</name>
<email>peter.kjellerstedt@axis.com</email>
</author>
<published>2015-12-18T23:53:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4b4dea75b59e281bc023a1974f41124464edc022'/>
<id>urn:sha1:4b4dea75b59e281bc023a1974f41124464edc022</id>
<content type='text'>
This removes unnecessary spaces inserted before semicolons in the
modified USERADD_PARAM_${PN} and GROUPADD_PARAM_${PN} variables. This
should not affect the handling of the variables as the only one that
actually sees the semicolons is the code in useradd.bbclass that uses
cut to split the variables at them, and any whitespace preceeding or
following the semicolons will be properly ignored.

(From OE-Core rev: acc17ef91a6f506e3cacdc0d4ebfa268b3f3affd)

Signed-off-by: Peter Kjellerstedt &lt;peter.kjellerstedt@axis.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>useradd-staticids.bbclass: Read passwd/group files before parsing</title>
<updated>2016-01-18T11:47:06+00:00</updated>
<author>
<name>Peter Kjellerstedt</name>
<email>peter.kjellerstedt@axis.com</email>
</author>
<published>2015-12-18T23:53:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4f2c3525807f79d4e264d39bb70e0b8e4096355b'/>
<id>urn:sha1:4f2c3525807f79d4e264d39bb70e0b8e4096355b</id>
<content type='text'>
Read and merge the passwd/group files before parsing the user and
group definitions. This means they will only be read once per
recipe. This solves a problem where if a user was definied in multiple
files, it could generate group definitions for groups that should not
be created. E.g., if the first passwd file read defines a user as:

foobar::1234::::

and the second passwd file defines it as:

foobar:::nogroup:The foobar user:/:/bin/sh

then a foobar group would be created even if the user will use the
nogroup as its primary group.

(From OE-Core rev: 3149319ad997379a01d87f2b1b5d14f66541997f)

Signed-off-by: Peter Kjellerstedt &lt;peter.kjellerstedt@axis.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>useradd-staticids.bbclass: Simplify the logic for when to add groups</title>
<updated>2016-01-18T11:47:06+00:00</updated>
<author>
<name>Peter Kjellerstedt</name>
<email>peter.kjellerstedt@axis.com</email>
</author>
<published>2015-12-18T23:53:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4cbdb1577e34079550ace3d7dd8695a1934afbe1'/>
<id>urn:sha1:4cbdb1577e34079550ace3d7dd8695a1934afbe1</id>
<content type='text'>
The original code was near impossible to follow, and missed a couple
of cases. For example, if one added the following line to the passwd
file specified in USERADD_UID_TABLES:

foobar:x:12345:nogroup::/:/bin/sh

and then specified the user as:

USERADD_PARAM_${PN} = "--system foobar"

one would then assume that the foobar user would be created with the
primary group set to nogroup. However, it was not (the primary group
would be foobar), and the only way to get it correct was to explicitly
add --gid nogroup to the USERADD_PARAM_${PN}.

(From OE-Core rev: e98e98ce65cf9ffdef29462310a622ffddd1412b)

Signed-off-by: Peter Kjellerstedt &lt;peter.kjellerstedt@axis.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>useradd-staticids.bbclass: Simplify some logic</title>
<updated>2016-01-18T11:47:06+00:00</updated>
<author>
<name>Peter Kjellerstedt</name>
<email>peter.kjellerstedt@axis.com</email>
</author>
<published>2015-12-18T23:53:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=b18e40ce2f5859865d26a4010d78e65f6f2972fc'/>
<id>urn:sha1:b18e40ce2f5859865d26a4010d78e65f6f2972fc</id>
<content type='text'>
The [&lt;on_true&gt;, &lt;on_false&gt;][not &lt;condition&gt;] construct may solve the
problem of implementing a conditional operator, but it is not very
readable. At least I find this:

    uaargs.groupid = field[3] or uaargs.gid or uaargs.groupname

a lot more readable than this:

    uaargs.groupid = [uaargs.gid, uaargs.groupname][not uaargs.gid]
    uaargs.groupid = [field[3], uaargs.groupid][not field[3]]

Also, the official conditional operator since Python 2.5 (&lt;on_true&gt; if
&lt;condition&gt; else &lt;on_false&gt;) does not evaluate both &lt;on_false&gt; and
&lt;on_true&gt; as [&lt;on_true&gt;, &lt;on_false&gt;][not &lt;condition&gt;] does.

(From OE-Core rev: 274d38a6e2183ec88335a08b963f26c34b328558)

Signed-off-by: Peter Kjellerstedt &lt;peter.kjellerstedt@axis.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>useradd-staticids.bbclass: Make --no-user-group have effect</title>
<updated>2016-01-18T11:47:06+00:00</updated>
<author>
<name>Peter Kjellerstedt</name>
<email>peter.kjellerstedt@axis.com</email>
</author>
<published>2015-12-18T23:53:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=b689aa0df3c2cd36d3b54dd84ec3e264e8fd85ff'/>
<id>urn:sha1:b689aa0df3c2cd36d3b54dd84ec3e264e8fd85ff</id>
<content type='text'>
If --no-user-group is specified in USERADD_PARAM_${PN} for a user and
no --gid is specified, then we should not assume that the group name
for the user is the user name.

(From OE-Core rev: 0e5402c433739a416a76df532378533cb25365c7)

Signed-off-by: Peter Kjellerstedt &lt;peter.kjellerstedt@axis.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>useradd-staticids.bbclass: Treat mutually exclusive options as such</title>
<updated>2016-01-18T11:47:06+00:00</updated>
<author>
<name>Peter Kjellerstedt</name>
<email>peter.kjellerstedt@axis.com</email>
</author>
<published>2015-12-18T23:53:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=c03ea8dddc491770dbbc0e32a604924dfeb950bd'/>
<id>urn:sha1:c03ea8dddc491770dbbc0e32a604924dfeb950bd</id>
<content type='text'>
The useradd options --create-home/--no-create-home and
--user-group/--no-user-group are mutually exclusive and should be
treated as such.

(From OE-Core rev: 908eca7fb4af8a60026f53e2bb2cf1d5daf089ab)

Signed-off-by: Peter Kjellerstedt &lt;peter.kjellerstedt@axis.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>useradd-staticids.bbclass: Do not require trailing colons</title>
<updated>2015-10-29T07:31:16+00:00</updated>
<author>
<name>Peter Kjellerstedt</name>
<email>peter.kjellerstedt@axis.com</email>
</author>
<published>2015-10-24T09:50:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=1c3c76d78fd6261ef1919e87e5b19b0410ee976a'/>
<id>urn:sha1:1c3c76d78fd6261ef1919e87e5b19b0410ee976a</id>
<content type='text'>
Before, the users and groups specified in the passwd file and the
groups file had to have trailing colons to make sure there were enough
elements in the definitions, or bitbake would throw a Python
exception.  After this change one can omit the trailing colons, which
especially simplifies passwd files used only to specify static UIDs.

(From OE-Core rev: 7754e0f71eb794f0e06a1b005e3824fac4cdac6c)

Signed-off-by: Peter Kjellerstedt &lt;peter.kjellerstedt@axis.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>useradd-staticids.bbclass: Fix for Bug 6633</title>
<updated>2014-09-03T15:00:28+00:00</updated>
<author>
<name>Fabrice Coulon</name>
<email>fabrice@axis.com</email>
</author>
<published>2014-09-02T09:11:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=b02da021b122d969c8b22a1181c7cc3fb8250379'/>
<id>urn:sha1:b02da021b122d969c8b22a1181c7cc3fb8250379</id>
<content type='text'>
When using the useradd-staticids.bbclass under meta/classes,
this error occurs:
"&lt;username&gt; - &lt;username&gt;: Username  does not have a static uid defined."
There was a problem with the regular expression for parsing parameters,
it was sometimes returning an empty string.

I have fixed this by skipping empty strings.

(From OE-Core rev: f249ef32709069a2680b92dc5a5b4f6545d014b7)

Signed-off-by: Fabrice Coulon &lt;fabrice@axis.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>useradd{-static}: Ignore useradds on nativesdk</title>
<updated>2014-03-21T12:05:49+00:00</updated>
<author>
<name>Mark Hatle</name>
<email>mark.hatle@windriver.com</email>
</author>
<published>2014-03-20T19:19:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=29ee5c139eadd84fbb6b25b577e91bc4aa0c1038'/>
<id>urn:sha1:29ee5c139eadd84fbb6b25b577e91bc4aa0c1038</id>
<content type='text'>
The code was supposed to ignore both native and nativesdk operations when
using the useradd and useradd-static code.  However, somewhere along the way
the code was dropped.  This didn't cause any issues until someone enabled the
enforcing mode in the new useradd-static and various nativesdk packages
started to fail.

(From OE-Core rev: 6b9705892400a1da1fcd973c64d1911c7c4463f6)

Signed-off-by: Mark Hatle &lt;mark.hatle@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>useradd-staticids: Adjust USERADD_ERROR_DYNAMIC condition and error message</title>
<updated>2014-02-11T12:04:38+00:00</updated>
<author>
<name>Mark Hatle</name>
<email>mark.hatle@windriver.com</email>
</author>
<published>2014-02-10T19:28:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=287efe1494467e464f7867b91726e85b326c3178'/>
<id>urn:sha1:287efe1494467e464f7867b91726e85b326c3178</id>
<content type='text'>
The USERADD_ERROR_DYNAMIC needs to check that both users and groups that are
defined need to be represented as static ids, or an error should occur.

For the user check, we want to make sure the uid is a numeric value.  (The gid
can be name, as the GROUPADD check will validate for a number there -- or
during install useradd will fail if that group is not defined.)

For the group check, we verify that the gid is specified and not left as a name.

Also two statements that can be uncommented for debugging were added so that
future development work on this code would be easier to do.

(From OE-Core rev: f35bbba65e3e41f8dea1f9ff872d3a9fbd84bf6d)

Signed-off-by: Mark Hatle &lt;mark.hatle@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
