<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/classes/useradd.bbclass, branch yocto-3.1.19</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=yocto-3.1.19</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=yocto-3.1.19'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2021-09-29T23:02:22+00:00</updated>
<entry>
<title>useradd: Ensure preinst data is expanded correctly in pkgdata</title>
<updated>2021-09-29T23:02:22+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2021-09-15T21:42:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=065ca6b7b04d6153e8d53aeda0e93a488e3c81e9'/>
<id>urn:sha1:065ca6b7b04d6153e8d53aeda0e93a488e3c81e9</id>
<content type='text'>
The preinst data in pkgdata will not expand out the ${XXX_PARAM} variables
since they don't use a package suffix. It happens that the final expansion
used for the packages is corrected by a second trip through the datastore.

The first version is used for calculation of the task output hash and
recent improvements in hash reuse showed this data wasn't using included
in the hashes, meaning for example builds with dynamic IDs were mixing
sstate with builds using static IDs. The result was a mess.

Fix this by expanding the data in the preinst correctly to use the
package specific _PARAM values.

(From OE-Core rev: fbd5a1f877d805d810562985c7a5dac4a5761263)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 375430f249e7e0b6622e566e2478b40ba7e606ab)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>useradd: Ensure do_populate_sysroot has dependency on useradd variables</title>
<updated>2019-06-01T10:27:06+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2019-05-31T16:45:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=44607330cdb3e426e6ea6ce9d6df682597b3ff88'/>
<id>urn:sha1:44607330cdb3e426e6ea6ce9d6df682597b3ff88</id>
<content type='text'>
The do_populate_sysroot task doesn't rerun if you change any of the USERADD_PARAM
or GROUPADD_PARAM variables, only do_package will.

If another task depends on the recipe, this means it won't see any updated changes.

This patch adds in the missing vardeps ensuring the code is deterministic.

[YOCTO #13232]

(From OE-Core rev: 37d0382a3c67f47f8cfdd977a041069bf912b8c3)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>useradd: Fix build architecture corruption of sstate artefacts</title>
<updated>2019-05-31T14:36:20+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2019-05-31T07:54:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=464a2fed0be067b0ad703b3474b9e01566bf80d3'/>
<id>urn:sha1:464a2fed0be067b0ad703b3474b9e01566bf80d3</id>
<content type='text'>
When mixing aarch64 and x86_64 host builds with common sstate, useradd failures
were found. This was due to references to:

/home/pokybuild/yocto-worker/qemuarm/build/build/tmp/sysroots-components/aarch64/pseudo-native/usr/bin/pseudo
or
/home/pokybuild/yocto-worker/qemuarm/build/build/tmp/sysroots-components/x86_64/pseudo-native/usr/bin/pseudo

on the wrong architecture within the useradd postinst files.

Instead of using COMPONENTS_DIR as the FIXME, use PSEUDO_SYSROOT which contains
the arch component as well to avoid this.

Add extra comments to cause the relavent sstate to be rebuilt.

(From OE-Core rev: 0384622f72a6c0bd8225cf06f692340fdef67d4a)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>useradd.bbclass: print a warn when useradd not found</title>
<updated>2017-11-07T13:30:22+00:00</updated>
<author>
<name>Robert Yang</name>
<email>liezhi.yang@windriver.com</email>
</author>
<published>2017-10-23T02:56:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=2c3d5968d9d4c915d58baeed6da8535990b70715'/>
<id>urn:sha1:2c3d5968d9d4c915d58baeed6da8535990b70715</id>
<content type='text'>
Exit quietly makes it very hard for debugging when user is not added as
expected, print a warning helps a lot.

(From OE-Core rev: 057885ed6f22781960bce4e082e3aa96e126764c)

Signed-off-by: Robert Yang &lt;liezhi.yang@windriver.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>staging.bbclass: handle postinst-useradd-* fixmes</title>
<updated>2017-10-07T22:20:40+00:00</updated>
<author>
<name>Mikko Ylinen</name>
<email>mikko.ylinen@linux.intel.com</email>
</author>
<published>2017-10-03T07:09:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=5b28fe163a177ee6aae94fc558bb248027e7460d'/>
<id>urn:sha1:5b28fe163a177ee6aae94fc558bb248027e7460d</id>
<content type='text'>
After 02457ef7f600ce954874e2d11e74b1c6daaa3bfc, PSEUDO for
postinst-useradd-* scripts get to use only one PSEUDO_LOCALSTATEDIR
which is set under recipes ${WORKDIR}.

When the those scripts are run in a clean build environment that
is built from the sstate (populate_sysroot_setscene run for
postinst-useradd-* providers), pseudo fails to run because it cannot
access the PSEUDO_LOCALSTATEDIR (recipe ${WORKDIR}s do not exist).
This triggers a sysroot staging error.

Previously, the PSEUDO_LOCALSTATEDIR setting in useradd.bbclass
worked because the RSS sstate/staging logic automagically processed
${STAGING_DIR_TARGET} in postinst-useradd-* scripts to point under
the sysroot being built.

The fix uses the same fixme processing by adding PSEUDO_LOCALSTATEDIR
variable to it. Furthermore, LOGFIFO is added to be able to use
the logging fifo of the recipe that actually runs postinst-useradd-*.

(From OE-Core rev: b28374cfad37db161b5ac5953b4a4638912f3f27)

Signed-off-by: Mikko Ylinen &lt;mikko.ylinen@linux.intel.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.bbclass: Unify writing of script file in useradd_sysroot_sstate()</title>
<updated>2017-09-18T10:07:30+00:00</updated>
<author>
<name>Peter Kjellerstedt</name>
<email>peter.kjellerstedt@axis.com</email>
</author>
<published>2017-09-15T14:48:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=1b0e9f8534acff5e9e6c3847e70af810e27edefc'/>
<id>urn:sha1:1b0e9f8534acff5e9e6c3847e70af810e27edefc</id>
<content type='text'>
There were two identical code blocks for writing the
postinst-useradd-${PN} scripts. This combines them into one.

(From OE-Core rev: 0c4259dd3c74d81f20b87417cecb1e636365ce10)

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: don't override pseudo environment</title>
<updated>2017-09-18T10:07:30+00:00</updated>
<author>
<name>Ross Burton</name>
<email>ross.burton@intel.com</email>
</author>
<published>2017-09-14T16:32:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=13b9cceabcb5fb841ebbaac8fd3b45fd13d969c4'/>
<id>urn:sha1:13b9cceabcb5fb841ebbaac8fd3b45fd13d969c4</id>
<content type='text'>
Back in the dark days before recipe-specific-sysroots the paths being passed in
this manual construction of the pseudo environment made sense, but now they're
incorrect and result in pseudo writing to two different databases during a
single build.  The result is that pseudo doesn't follow changes to /etc/passwd
in the sysroot, and warns in the logs.

Remove the PSEUDO_LOCALSTATEDIR assignment and inherit the correct assignment in
FAKEROOTENV.

(From OE-Core rev: 02457ef7f600ce954874e2d11e74b1c6daaa3bfc)

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: remove preinst script referring to recipe sysroot</title>
<updated>2017-05-11T15:56:00+00:00</updated>
<author>
<name>Maxin B. John</name>
<email>maxin.john@intel.com</email>
</author>
<published>2017-05-09T16:19:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=eb30ca2b316076e83e1a709015863670946d5bee'/>
<id>urn:sha1:eb30ca2b316076e83e1a709015863670946d5bee</id>
<content type='text'>
Remove recipe-specific-sysroot details from the preinst scripts
generated by useradd.bbclass.

This was added to match the default from bitbake.conf. Unlike the default
case, the dependencies used by useradd mean that a default passwd/group
file is always present. This means we don't need the native sysroot fallback.

Fixes [YOCTO #11460]

(From OE-Core rev: dfc9323c1cd7814989766be5bd1861fbaa739d2d)

Signed-off-by: Maxin B. John &lt;maxin.john@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>useradd.bbclass: Handle COMPONENTS_DIR when restoring state</title>
<updated>2017-05-11T15:56:00+00:00</updated>
<author>
<name>Peter Kjellerstedt</name>
<email>peter.kjellerstedt@axis.com</email>
</author>
<published>2017-05-03T21:13:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=7b56a4327bdef25b99e1376fc30f03a8dba45885'/>
<id>urn:sha1:7b56a4327bdef25b99e1376fc30f03a8dba45885</id>
<content type='text'>
The export of PSEUDO in useradd_sysroot() contains references to
${COMPONENTS_DIR}. These need to be handled when restoring
postinst-useradd-${PN} from the sstate cache.

(From OE-Core rev: 097875bc9ab9d60a452b01ac6825775983684d68)

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>base-passwd/useradd: Various improvements to useradd with RSS</title>
<updated>2017-04-14T08:47:08+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2017-04-12T17:29:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=b5c383074ae4e09b63f43066b25b5ccb0df00276'/>
<id>urn:sha1:b5c383074ae4e09b63f43066b25b5ccb0df00276</id>
<content type='text'>
Currently there are multiple issues with useradd:

* If base-passwd rebuilds, it wipes out recipe specific user/group additions
  to sysroots and causes errors
* If recipe A adds a user and recipe B depends on A, it can't see any of the
  users/groups A adds.

This patch changes base-passwd so it always works as a postinst script
within the sysroot and copies in the master files, then runs any
postinst-useradd-* scripts afterwards to add additional user/groups.

The postinst-useradd-* scripts are tweaked so that if /etc/passwd doesn't exist
they just exit, knowning they'll be executed later. We also add a dummy entry to
the dummy passwd file from pseudo so we can avoid this too.

There is a problem where if recipe A adds a user and recipe B depends on A but
doesn't care about users, it may not have a dependency on the useradd/groupadd
tools which would therefore not be available in B's sysroot. We therefore also
tweak postinst-useradd-* scripts so that if the tools aren't present we simply
don't add users. If you need the users, you add a dependency on the tools in the
recipe and they'll be added.

We add postinst-* to SSTATE_SCAN_FILES since almost any postinst script of this
kind is going to need relocation help.

We also ensure that the postinst-useradd script is written into the sstate
object as the current script was only being added in a recipe local way.

Thanks to Peter Kjellerstedt &lt;pkj@axis.com&gt; and Patrick Ohly for some pieces
of this patch.

[Yocto #11124]

(From OE-Core rev: 1b5afaf437f7a1107d4edca8eeb668b9618a5488)

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