<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/classes/useradd.bbclass, branch scarthgap-5.0.15</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=scarthgap-5.0.15</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=scarthgap-5.0.15'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2024-02-24T16:10:22+00:00</updated>
<entry>
<title>useradd.bbclass: Fix order of postinst-useradd-*</title>
<updated>2024-02-24T16:10:22+00:00</updated>
<author>
<name>Piotr Łobacz</name>
<email>p.lobacz@welotec.com</email>
</author>
<published>2024-02-23T13:25:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=f6daeba2e97e47550e959fb85d4639ef81d268e7'/>
<id>urn:sha1:f6daeba2e97e47550e959fb85d4639ef81d268e7</id>
<content type='text'>
postinst-useradd-* haven't been running in order of dependency.

This patch is reworked from Piotr Łobacz's patch and fixes:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=15084
https://bugzilla.yoctoproject.org/show_bug.cgi?id=13904

basepasswd_sysroot_postinst in base-passwd can install postinst-useradd-*
scripts with any order. Sometimes this means, for example a useradd postinst
will attempt to run without the corresponding group postinst causing errors.
This patch ensures that we first run groupadd, then useradd and then
group membership.

[RP: Tweaked to avoid removing previous fixes and for whitespace/style issues
     Also ensure the scripts are changed to execute with -e to highlight errors]

(From OE-Core rev: 322ef726132a47d977d2c6ee41de5358f1e85994)

Signed-off-by: Eilís 'pidge' Ní Fhlannagáin &lt;pidge@baylibre.com&gt;
Signed-off-by: Piotr Łobacz &lt;p.lobacz@welotec.com&gt;
Signed-off-by: Jan Górski &lt;j.gorski@welotec.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>useradd.bbclass: Fix missing space when appending vardeps.</title>
<updated>2024-02-19T11:34:33+00:00</updated>
<author>
<name>Siong W.LIM</name>
<email>wslim87@gmail.com</email>
</author>
<published>2024-02-18T19:11:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=9813515ff264cc257fa08b0b8f581a0a074a5267'/>
<id>urn:sha1:9813515ff264cc257fa08b0b8f581a0a074a5267</id>
<content type='text'>
(From OE-Core rev: c4658401f1331026dc47a859dd665aab74918bba)

Signed-off-by: Siong &lt;wslim87@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sysroot user management postinsts: run with /bin/sh -e to report errors when they happen</title>
<updated>2024-01-27T08:20:02+00:00</updated>
<author>
<name>Alexander Kanavin</name>
<email>alex.kanavin@gmail.com</email>
</author>
<published>2024-01-26T13:34:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=ed0818060868a7797ff287e1dee68bef718659c7'/>
<id>urn:sha1:ed0818060868a7797ff287e1dee68bef718659c7</id>
<content type='text'>
This exposes the following failure in a multilib setup, when everything
up to do_package_write_rpm is in sstate, but do_package_write_rpm is not
(there's a similar fail for lib64-man-db, and the failures themselves will be fixed separately
in the next commit):

Exception: subprocess.CalledProcessError: Command '/srv/storage/alex/yocto/build-multilib/tmp/work/x86_64-pokymllib64-linux/lib64-quilt/0.67/recipe-sysroot/usr/bin/postinst-base-passwd' returned non-zero exit status 1.

Subprocess output:
install: cannot stat '/srv/storage/alex/yocto/build-multilib/tmp/work/x86_64-pokymllib64-linux/lib64-quilt/0.67/lib64-recipe-sysroot/usr/share/base-passwd/passwd.master': No such file or directory

(From OE-Core rev: 5ffa333db28bc5d8e440c983fdf95589d332461d)

Signed-off-by: Alexander Kanavin &lt;alex@linutronix.de&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes/recipes: Switch to use inherit_defer</title>
<updated>2024-01-18T10:15:58+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2023-12-31T13:27:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=c917323a39da6fc3e8d92b2fe907d0357149c9bb'/>
<id>urn:sha1:c917323a39da6fc3e8d92b2fe907d0357149c9bb</id>
<content type='text'>
Now that bitbake supports the use of inherit_defer, switch all conditional
(variable based) inherits to use this instead. This leads to more a more
deterministic user experience since there is no longer an immediate expansion
and later changes to the variables in question (e.g. a bbappend) are
accounted for.

This patch tries to ensure the behaviour before/after remains as unchanged
as it reasonably can, e.g. by always inherting populate_sdk_base. native
and nativesdk continue to need to be inherited last, hence being used
with inherit_defer in a handful of very specific cases.

(From OE-Core rev: 451363438d38bd4552d5bcec4a92332f5819a5d4)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>useradd: Fix useradd do_populate_sysroot dependency bug</title>
<updated>2023-12-10T09:24:01+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2023-12-09T15:28:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4bb222e0d71a4cb159b8a4f1a90b65b1af32ac10'/>
<id>urn:sha1:4bb222e0d71a4cb159b8a4f1a90b65b1af32ac10</id>
<content type='text'>
If a task is adde which has a dependency on the do_populate_sysroot task of
the recipe, it will cause it to be installed into the sysroot (similar to
do_addto_recipe_sysroot). This fails since the postinst script is an overlapping
file:

Exception: FileExistsError: [Errno 17] File exists:
'tmp/sysroots-components/all/useraddbadtask/usr/bin/postinst-useradd-useraddbadtask'
  -&gt;
'tmp/work/all-poky-linux/useraddbadtask/1.0/recipe-sysroot/usr/bin/postinst-useradd-useraddbadtask'

The copy written out at do_prepare_recipe_sysroot time is just for debug so
rename it, meaning there are no longer overlapping files and the installation
can be successful, removing the error.

[YCOTO #14961]

With the bug fixed, enable the test.

(From OE-Core rev: 564339afb73fc52a66c1a08437587cad1c4d46e7)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>useradd: Fix issues with useradd dependencies</title>
<updated>2023-12-08T17:51:10+00:00</updated>
<author>
<name>Eilís 'pidge' Ní Fhlannagáin</name>
<email>pidge@baylibre.com</email>
</author>
<published>2023-12-07T12:45:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=ecef665062be55fcfa0915216335d08883aa86f7'/>
<id>urn:sha1:ecef665062be55fcfa0915216335d08883aa86f7</id>
<content type='text'>
If recipe A requires the useradd actions of recipe B we need to
ensure that recipe B is part of the recipe A dependancy chain. In
order to do that, we introduce USERADD_DEPENDS. This makes sure
that the do_populate_sysroot_setscene of recipe B exists for
recipe A in case of a missing TMPDIR. This requires changes made in
runqueue.py by RP.

This commit along with the runqueue fixes effects:
Bug 13419 - recipes that add users to groups cannot rely on other recipes creating those groups (when population from sstate happens)
Bug 13904 - do_prepare_recipe_sysroot: postinst-useradd-* does not run in order of dependency and sometimes fails
Bug 13279 - Make sure users/groups exist for package_write_* tasks
Bug 15084 - For some reason using of same user in two recipes does not work properly

I've included the start of self-testing for useradd by adding tests for
13419 (which ends up testing 13904, 13279, 15084 by virtue of them all
      having the same root cause)

(From OE-Core rev: b47f2352376bd16b7e7087b4dab143403e67e094)

Signed-off-by: Eilís 'pidge' Ní Fhlannagáin &lt;pidge@baylibre.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes: Add SPDX license identifiers</title>
<updated>2022-08-12T10:58:01+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-08-10T17:55:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=ff525695f27ce2d9033f6f03f6b22fe06aa01960'/>
<id>urn:sha1:ff525695f27ce2d9033f6f03f6b22fe06aa01960</id>
<content type='text'>
As stated in our top level license files, the license is MIT unless
otherwise stated. Add SPDX identifers accordingly. Replace older
license statementa with the standardised syntax. Also drop "All
Rights Reserved" expression as it isn't used now, doesn't mean anything
and is confusing.

(From OE-Core rev: 081a391fe09a21265881e39a2a496e4e10b4f80b)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes: Add copyright statements to files without one</title>
<updated>2022-08-12T10:58:01+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-08-10T17:21:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=971d5f7b81d535b2da0ae51a54f9ba6641f18304'/>
<id>urn:sha1:971d5f7b81d535b2da0ae51a54f9ba6641f18304</id>
<content type='text'>
Where there isn't a copyright statement, add one to make it explicit.
Also drop editor config lines where they were present.

(From OE-Core rev: 880c1ea3edc8edef974e65b2d424fc36809ea034)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>useradd: Ensure preinst data is expanded correctly in pkgdata</title>
<updated>2021-09-16T08:50:34+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=516bbba02fb60e762df6ff0df80372ddb72a2494'/>
<id>urn:sha1:516bbba02fb60e762df6ff0df80372ddb72a2494</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: 375430f249e7e0b6622e566e2478b40ba7e606ab)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>meta: Manual override fixes</title>
<updated>2021-08-02T14:44:10+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2021-07-28T13:27:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=65133015b1cf545a0c86177ce471a0b2b9340d5c'/>
<id>urn:sha1:65133015b1cf545a0c86177ce471a0b2b9340d5c</id>
<content type='text'>
The automated conversion of OE-Core to use the new override sytax isn't
perfect. This patches some mis-converted lines and some lines which were missed
by the automation.

(From OE-Core rev: 4e9a06b64b43131b731fb59a0305f78a98e27fbd)

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