<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openembedded-core.git/meta/classes/useradd.bbclass, branch fido</title>
<subtitle>Mirror of openembedded-core</subtitle>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/'/>
<entry>
<title>useradd.bbclass: avoid do_rootfs error for debian package backend</title>
<updated>2015-02-17T22:29:04+00:00</updated>
<author>
<name>Chen Qi</name>
<email>Qi.Chen@windriver.com</email>
</author>
<published>2015-02-17T02:08:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=d98e5ec575f542b3afaabd96b07ae9a21e1c22f4'/>
<id>d98e5ec575f542b3afaabd96b07ae9a21e1c22f4</id>
<content type='text'>
If /etc/login.defs is treated as a configuration file, then we would meet
errors at do_rootfs time telling us that useradd/groupadd cannot execute
correctly.

This is because the dpkg handles config file specially, the login.defs
is temporarily renamed as login.defs.dpkg-new.

How ubuntu deals the user/group adding problem? They do it at postinst of the
package. And, the postinst script of a package would possibly do `chown' of
its files or directories.

The above strategy is not suitable for OE. Because we do chown in do_install
and add user/group in preinst scripts of the packages.

That's why we need this patch so that do_rootfs don't fail.

Signed-off-by: Chen Qi &lt;Qi.Chen@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If /etc/login.defs is treated as a configuration file, then we would meet
errors at do_rootfs time telling us that useradd/groupadd cannot execute
correctly.

This is because the dpkg handles config file specially, the login.defs
is temporarily renamed as login.defs.dpkg-new.

How ubuntu deals the user/group adding problem? They do it at postinst of the
package. And, the postinst script of a package would possibly do `chown' of
its files or directories.

The above strategy is not suitable for OE. Because we do chown in do_install
and add user/group in preinst scripts of the packages.

That's why we need this patch so that do_rootfs don't fail.

Signed-off-by: Chen Qi &lt;Qi.Chen@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>useradd.bbclass: set PSEUDO_PASSWD consistent with root directory</title>
<updated>2014-11-25T12:58:21+00:00</updated>
<author>
<name>Peter A. Bigot</name>
<email>pab@pabigot.com</email>
</author>
<published>2014-11-15T19:53:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=ec3417ad825c52f5137d38b91d8fcb4637a50f4c'/>
<id>ec3417ad825c52f5137d38b91d8fcb4637a50f4c</id>
<content type='text'>
When installing into a sysroot this class examines $D/etc/passwd for
content, then invokes useradd to make changes.  Under pseudo useradd
attempts to look up user information in directories specified by
$PSEUDO_PASSWD.  For opkg multilib installs $D is not always the same as
$IMAGE_ROOT, and the user might already be in the IMAGE_ROOT files,
causing a failure during rootfs population.

Fix this by ensuring the files pseudo looks at when doing useradd stuff
are the same ones that useradd.bbclass will be manipulating.

Signed-off-by: Peter A. Bigot &lt;pab@pabigot.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When installing into a sysroot this class examines $D/etc/passwd for
content, then invokes useradd to make changes.  Under pseudo useradd
attempts to look up user information in directories specified by
$PSEUDO_PASSWD.  For opkg multilib installs $D is not always the same as
$IMAGE_ROOT, and the user might already be in the IMAGE_ROOT files,
causing a failure during rootfs population.

Fix this by ensuring the files pseudo looks at when doing useradd stuff
are the same ones that useradd.bbclass will be manipulating.

Signed-off-by: Peter A. Bigot &lt;pab@pabigot.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>useradd: Add setscene dep on pseudo-native</title>
<updated>2014-08-29T22:44:12+00:00</updated>
<author>
<name>Jate Sujjavanich</name>
<email>jatedev@gmail.com</email>
</author>
<published>2014-08-10T21:00:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=2bb244e9e18124b3b86195e0e10b2ebd40cd4f81'/>
<id>2bb244e9e18124b3b86195e0e10b2ebd40cd4f81</id>
<content type='text'>
A recipe will sometimes be rebuilt unnecessarily if it adds users via
useradd and the pseudo-native task has not been populated.

This patch adds the correct dependency.

Signed-off-by: Jate Sujjavanich &lt;jatedev@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A recipe will sometimes be rebuilt unnecessarily if it adds users via
useradd and the pseudo-native task has not been populated.

This patch adds the correct dependency.

Signed-off-by: Jate Sujjavanich &lt;jatedev@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>update-rc.d/useradd: Add additional dependecies</title>
<updated>2014-06-06T09:25:38+00:00</updated>
<author>
<name>Saul Wold</name>
<email>sgw@linux.intel.com</email>
</author>
<published>2014-06-06T00:09:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=bba835fed88c3bd5bb5bd58962034aef57c408d8'/>
<id>bba835fed88c3bd5bb5bd58962034aef57c408d8</id>
<content type='text'>
These dependcies are needed to ensure that thier packages are created
correctly since these classes have runtime dependiences in their packages
but they are not actually created yet at rootfs time.

[YOCTO #6072]

Signed-off-by: Saul Wold &lt;sgw@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These dependcies are needed to ensure that thier packages are created
correctly since these classes have runtime dependiences in their packages
but they are not actually created yet at rootfs time.

[YOCTO #6072]

Signed-off-by: Saul Wold &lt;sgw@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>useradd{-static}: Ignore useradds on nativesdk</title>
<updated>2014-03-20T22:17:43+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.multitech.net/cgit/openembedded-core.git/commit/?id=6b9705892400a1da1fcd973c64d1911c7c4463f6'/>
<id>6b9705892400a1da1fcd973c64d1911c7c4463f6</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.

Signed-off-by: Mark Hatle &lt;mark.hatle@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.

Signed-off-by: Mark Hatle &lt;mark.hatle@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>meta/recipes: Remove virtclass references</title>
<updated>2014-02-12T14:18:00+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2014-02-12T12:11:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=d1c073d2813bd913617990cd047507353ea0c09e'/>
<id>d1c073d2813bd913617990cd047507353ea0c09e</id>
<content type='text'>
The virtclass overrides will go away at some point (apart from the multilib one).
Change them all to class-xxx instead since people enjoy copy and pasting them.

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The virtclass overrides will go away at some point (apart from the multilib one).
Change them all to class-xxx instead since people enjoy copy and pasting them.

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>useradd.bbclass: Add ability to select a static uid/gid automatically</title>
<updated>2014-02-08T21:02:25+00:00</updated>
<author>
<name>Mark Hatle</name>
<email>mark.hatle@windriver.com</email>
</author>
<published>2014-02-06T23:37:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=18c99dac52b746b88cd084eb4c2a2ef0329a6ff3'/>
<id>18c99dac52b746b88cd084eb4c2a2ef0329a6ff3</id>
<content type='text'>
[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 this code by adding USERADDEXTENSION = "useradd-staticids", and
adding a preconfigured passwd/group file will allow the continued dynamic
generation of the rootfs passwd/group files, but will ensure a deterministic
outcome.  (Dynamic generation is desired so that users 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 &lt;mark.hatle@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[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 this code by adding USERADDEXTENSION = "useradd-staticids", and
adding a preconfigured passwd/group file will allow the continued dynamic
generation of the rootfs passwd/group files, but will ensure a deterministic
outcome.  (Dynamic generation is desired so that users 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 &lt;mark.hatle@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>useradd.bbclass: Fix build time install issues</title>
<updated>2014-02-08T21:02:25+00:00</updated>
<author>
<name>Mark Hatle</name>
<email>mark.hatle@windriver.com</email>
</author>
<published>2014-02-06T23:37:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=99fd0f14fd774c9194f62795e6023880e3aa5612'/>
<id>99fd0f14fd774c9194f62795e6023880e3aa5612</id>
<content type='text'>
When the system attempts to populate the sysroot's passwd/group files, it
does so in a single block.  However, with the way it was previously
implemented, the system would always run through the code necessary to
populate the sysroot, even in the case of target packages.  This had
the side effect that a cross-installed filesystem may not match a
target installed filesystem.

The code was slightly reorganized to ensure that the cross/target installed
pre-install script behavior is the same.  It also moves the block that
configures the sysroot parameters to the sysroot specific section of
the code.

Also some minor validation was occuring even on nativesdk packages.
Nativesdk packages should be skipped when processing useradd ops.

Signed-off-by: Mark Hatle &lt;mark.hatle@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the system attempts to populate the sysroot's passwd/group files, it
does so in a single block.  However, with the way it was previously
implemented, the system would always run through the code necessary to
populate the sysroot, even in the case of target packages.  This had
the side effect that a cross-installed filesystem may not match a
target installed filesystem.

The code was slightly reorganized to ensure that the cross/target installed
pre-install script behavior is the same.  It also moves the block that
configures the sysroot parameters to the sysroot specific section of
the code.

Also some minor validation was occuring even on nativesdk packages.
Nativesdk packages should be skipped when processing useradd ops.

Signed-off-by: Mark Hatle &lt;mark.hatle@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>useradd.bbclass: add dependency on base-files</title>
<updated>2013-12-18T17:06:57+00:00</updated>
<author>
<name>Ross Burton</name>
<email>ross.burton@intel.com</email>
</author>
<published>2013-12-18T16:20:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=556368ba8a1f933a86b69be024bd0711d4bfe0a3'/>
<id>556368ba8a1f933a86b69be024bd0711d4bfe0a3</id>
<content type='text'>
Packages that use useradd.bbclass should have a dependency on base-files so that
the /etc/skel directory is populated.  Without this dependency base-files may or
may not be installed when the postinst runs, and the skel content may or may not
be copied.

Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Packages that use useradd.bbclass should have a dependency on base-files so that
the /etc/skel directory is populated.  Without this dependency base-files may or
may not be installed when the postinst runs, and the skel content may or may not
be copied.

Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>useradd: Handle users from a package being used in others</title>
<updated>2013-09-06T22:01:50+00:00</updated>
<author>
<name>Thomas Fitzsimmons</name>
<email>fitzsim@cisco.com</email>
</author>
<published>2013-09-05T22:41:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=5871337da49f8cd1eaf53f7cd0aacc026dc7bcdb'/>
<id>5871337da49f8cd1eaf53f7cd0aacc026dc7bcdb</id>
<content type='text'>
If there is a package A (TUNE_PKGARCH) which is depended upon by B which
is MACHINE_ARCH and you build B for machine X, then Y, the user isn't
present in the sysroot for machine Y since the useradd code is never
triggered.

The change ensures the code does get triggered and the user is present.

[YOCTO 4739]

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If there is a package A (TUNE_PKGARCH) which is depended upon by B which
is MACHINE_ARCH and you build B for machine X, then Y, the user isn't
present in the sysroot for machine Y since the useradd code is never
triggered.

The change ensures the code does get triggered and the user is present.

[YOCTO 4739]

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
