<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/classes/sstate.bbclass, branch hardknott</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=hardknott</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=hardknott'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2022-03-22T22:18:51+00:00</updated>
<entry>
<title>sstate: inside the threadedpool don't write to the shared localdata</title>
<updated>2022-03-22T22:18:51+00:00</updated>
<author>
<name>Jose Quaresma</name>
<email>quaresma.jose@gmail.com</email>
</author>
<published>2022-03-06T21:08:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=f0c3b282572d173c64febb196235668a62229784'/>
<id>urn:sha1:f0c3b282572d173c64febb196235668a62229784</id>
<content type='text'>
When inside the threadedpool we make a copy of the localdata
to avoid some race condition, so we need to use this new
localdata2 and stop write the shared localdata.

(From OE-Core rev: 3d05b9b419b629001933fad7ee53b9f3bb366305)

Signed-off-by: Jose Quaresma &lt;quaresma.jose@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 1fa763b2022822a76fde541724e83e1977833d03)
Signed-off-by: Anuj Mittal &lt;anuj.mittal@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sstate: A third fix for for touching files inside pseudo</title>
<updated>2022-02-10T13:25:48+00:00</updated>
<author>
<name>Peter Kjellerstedt</name>
<email>peter.kjellerstedt@axis.com</email>
</author>
<published>2022-01-29T21:44:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=7527a35037973348602eec89f0443ac729ef64bc'/>
<id>urn:sha1:7527a35037973348602eec89f0443ac729ef64bc</id>
<content type='text'>
This continues where commit676757f "sstate: fix touching files inside
pseudo" and commit 29fc8599 "sstate: another fix for touching files
inside pseudo" left off.

The previous changes switched from trying to check if the sstate file is
writable before touching it, to always touching the sstate file and
ignoring any errors. However, if the sstate file is actually a symbolic
link that links to nothing, this would actually result in an empty
sstate file being created. And this in turn leads to that future
setscene tasks will fail when they try to unpack the empty file.

Change the code so that if an sstate file linking to nothing already
exists, it is overwritten with the new sstate file. Also change it so
that the temporary file that is used is always removed, even if ln
fails to link the sstate file to it.

(From OE-Core rev: 3eceda67a1098ab9641cb1b7fc789048b7daeae8)

Signed-off-by: Peter Kjellerstedt &lt;peter.kjellerstedt@axis.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
Signed-off-by: Anuj Mittal &lt;anuj.mittal@intel.com&gt;
(cherry picked from commit b2a5d9bc61e0b2b7e0f187a262a514952ed30563)
Signed-off-by: Anuj Mittal &lt;anuj.mittal@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sstate: another fix for touching files inside pseudo</title>
<updated>2021-11-21T11:40:34+00:00</updated>
<author>
<name>Jose Quaresma</name>
<email>quaresma.jose@gmail.com</email>
</author>
<published>2021-11-07T11:36:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=03e2fa220c440c8e9224be95d6520f2183295334'/>
<id>urn:sha1:03e2fa220c440c8e9224be95d6520f2183295334</id>
<content type='text'>
This patch is a fixup for 676757f "sstate: fix touching files inside pseudo"

running the 'id' command inside the sstate_unpack_package
function shows that this funcion run inside the pseudo:

 uid=0(root) gid=0(root) groups=0(root)

The check for [ -w ${SSTATE_PKG} ] and [ -O ${SSTATE_PKG}.siginfo ]
will always return true and the touch can fail when the real user
don't have permission or in readonly filesystem.

As the documentation refers:
- the file test operator "-w" check if the file has write permission
(for the user running the test).
- the file test operator "-O" check if you are owner of file

We can avoid this test running the touch and mask any return errors
that we have.

(From OE-Core rev: 29fc85997ade490ae46ffca37ef8e1a56957c876)

(From OE-Core rev: a5240d78f287ff5f3c5831af69e6e0ca3feaf769)

Signed-off-by: Jose Quaresma &lt;quaresma.jose@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 5b9210d66c78bb3f79056e5586cea7b0edd714a9)
Signed-off-by: Anuj Mittal &lt;anuj.mittal@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sstate: Account for reserved characters when shortening sstate filenames</title>
<updated>2021-11-21T11:40:34+00:00</updated>
<author>
<name>Manuel Leonhardt</name>
<email>mleonhardt@arri.de</email>
</author>
<published>2021-11-02T18:48:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=e3b4686c27a85fc1a9cdac31da4d36d9b217166a'/>
<id>urn:sha1:e3b4686c27a85fc1a9cdac31da4d36d9b217166a</id>
<content type='text'>
Previously, when shortening sstate filenames, the reserved
characters for .siginfo were not considered, when siginfo=False,
resulting in differently shortend filenames for the sstate and siginfo
files. With this change, the filenames of the truncated sstate and
siginfo files have the same basename, just as is already the case for
untruncated filenames.

Making sure that the .siginfo files always have the filename of the
corresponding sstate file plus its .siginfo suffix, also when being
truncated, makes it easier to manage the sstate cache and an sstate
mirror outside of Bitbake/Yocto.

(From OE-Core rev: 186062278e2d1e129815c4f8cf3d9003f3ac2809)

Signed-off-by: Manuel Leonhardt &lt;mleonhardt@arri.de&gt;
Cc: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit c2e0e43b7123cf5149833e0072c8edaea3629112)
Signed-off-by: Anuj Mittal &lt;anuj.mittal@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sstate: fix touching files inside pseudo</title>
<updated>2021-11-03T11:19:04+00:00</updated>
<author>
<name>Jose Quaresma</name>
<email>quaresma.jose@gmail.com</email>
</author>
<published>2021-10-20T17:25:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=68078583b50495b1c653bb74526b3f5bd3c9a06a'/>
<id>urn:sha1:68078583b50495b1c653bb74526b3f5bd3c9a06a</id>
<content type='text'>
running the 'id' command inside the sstate_create_package
function shows that this funcion run inside the pseudo:

 uid=0(root) gid=0(root) groups=0(root)

The check for touch files [ ! -w ${SSTATE_PKG} ]
will always return true and the touch can fail
when the real user don't have permission or
in readonly filesystem.

As the documentation refers, the file test operator "-w"
check if the file has write permission (for the user running the test).

We can avoid this test running the touch and mask any return errors
that we have.

(From OE-Core rev: 8acd5626b5b89fb48d5d7f0e4eee263793ba383f)

Signed-off-by: Jose Quaresma &lt;quaresma.jose@gmail.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit f6e7445c94443544e92fda97a017ce93393c5f84)
Signed-off-by: Anuj Mittal &lt;anuj.mittal@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sstate: Avoid problems with recipes using SRCPV when fetching sstate</title>
<updated>2021-09-24T09:17:32+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2021-09-10T22:49:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=c84431993213d695ef99a388152d25eac4b70f9e'/>
<id>urn:sha1:c84431993213d695ef99a388152d25eac4b70f9e</id>
<content type='text'>
When fetching sstate, SRCPV can be expanded withuin PV which breaks the
sstate fetcher as other variables like SRC_URI are changed by the fetcher
code. Expand the variable before doing this to avoid those problems and
hence avoid setscene task failures with remote sstate storage in git
recipes.

(From OE-Core rev: 5232aa1c46380e7197098bed39fc6d5b8456caa7)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 0d9d7acebe0be42d4cf8a30ecbbbbcb2dfd16a4b)
Signed-off-by: Anuj Mittal &lt;anuj.mittal@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sstate.bbclass: fix error handling when sstate mirrors is ro</title>
<updated>2021-08-26T07:32:13+00:00</updated>
<author>
<name>Jose Quaresma</name>
<email>quaresma.jose@gmail.com</email>
</author>
<published>2021-08-08T13:11:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4a936d9bf5cf7599b1ec667015410547d93aa63f'/>
<id>urn:sha1:4a936d9bf5cf7599b1ec667015410547d93aa63f</id>
<content type='text'>
The commit dd555537fc35c5f934af09d601d70772eb5955ae
'sstate.bbclass: fix errors about read-only sstate mirrors'
adds an additional exception handler to silently mask read
only rootfs errors thrown during the touch.

The exception handler checks the error type with the python module errno
but this module needs to be imported as it don't exist.

Example of the error:

File: 'exec_python_func() autogenerated', lineno: 2, function: &lt;module&gt;
     0001:
 *** 0002:sstate_task_postfunc(d)
     0003:
File: '/home/builder/src/base/poky/meta/classes/sstate.bbclass', lineno: 778, function: sstate_task_postfunc
     0774:
     0775:    omask = os.umask(0o002)
     0776:    if omask != 0o002:
     0777:       bb.note("Using umask 0o002 (not %0o) for sstate packaging" % omask)
 *** 0778:    sstate_package(shared_state, d)
     0779:    os.umask(omask)
     0780:
     0781:    sstateinst = d.getVar("SSTATE_INSTDIR")
     0782:    d.setVar('SSTATE_FIXMEDIR', shared_state['fixmedir'])
File: '/home/builder/src/base/poky/meta/classes/sstate.bbclass', lineno: 708, function: sstate_package
     0704:        except PermissionError:
     0705:            pass
     0706:        except OSError as e:
     0707:            # Handle read-only file systems gracefully
 *** 0708:            if e.errno != errno.EROFS:
     0709:                raise e
     0710:
     0711:    return
     0712:
Exception: NameError: name 'errno' is not defined

(From OE-Core rev: 2e5cf13aa46f25d8976ece55fcb4129bfd75659f)

Signed-off-by: Jose Quaresma &lt;quaresma.jose@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 15f30ad144fbe25e9a5e71bc7e42e746d2039992)
Signed-off-by: Anuj Mittal &lt;anuj.mittal@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sstate: Fix rebuilds when changing layer config</title>
<updated>2021-08-14T11:01:44+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2021-08-01T12:47:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=1248b7166bca073e17cd9a50ccbb185447e60dcf'/>
<id>urn:sha1:1248b7166bca073e17cd9a50ccbb185447e60dcf</id>
<content type='text'>
When adding a layer which changed SSTATE_EXCLUDEDEPS_SYSROOT, the state
hashes were changing when they should not. This was caused by wider use
of setscene_depvalid which means the dependency on the variable was seen
when it was previously not.

Exclude the variable since this should be be included in the hashes.

(From OE-Core rev: 084d81058682e0c9074203c907f80d6eabe63534)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 09725a29365c69ccbd603fe3a1de72189f26d5ac)
Signed-off-by: Anuj Mittal &lt;anuj.mittal@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sstate: Drop pseudo exclusion</title>
<updated>2021-08-06T08:59:14+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2021-07-10T10:04:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=3ef5fe2b50ed652339dacfe41eb69fba1637eb2f'/>
<id>urn:sha1:3ef5fe2b50ed652339dacfe41eb69fba1637eb2f</id>
<content type='text'>
Now that pseudo-native always includes statx support and we have sanity
checks on pseudo-native to ensure it always contains a minimum feature set,
we no longer need to mark pseudo-native as distro specific. This fixes
eSDK build problems.

[YOCTO #14428]

(From OE-Core rev: 4c7c9326da92ea93fdef1ad804685c21a197f1d4)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 3279e43fcb469edb63c7c4eb60fdc565d5751f9d)
Signed-off-by: Anuj Mittal &lt;anuj.mittal@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sstate/staging: Handle directory creation race issue</title>
<updated>2021-07-20T18:05:45+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2021-06-30T12:02:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=a984121558f8d74a263657e29d0bf9d3521dc22f'/>
<id>urn:sha1:a984121558f8d74a263657e29d0bf9d3521dc22f</id>
<content type='text'>
The sstate code tries to be careful about racing around directory creation.
In particular, the copyhardlinktree code creates the directory tree first
allowing for "already exists" errors and ignoring them, then hardlinks the
files in.

Unfortunately the sstate removal code can race against this since it
will try and remove empty directories. If there is some bad timing,
a newly created directory can be removed before it was populated, leading
to build failures.

We could try and add locking but this would damage performance, we've been
there before. It is also unclear where to actually place locks just based on
the contents of a manifest file which may cover multiple sstate install
locations for a given task.

Instead, lets disable directory removal in the problematic "shared" core
path. This could result in a few more empty directories being left on disk
but those should be harmless and better than locking hurting performance
or rare build races.

[YOCTO #13999]
[YOCTO #14379]

(From OE-Core rev: 3bea0da687d28c80f0b63e2ad81573a3601bb482)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 4f94d9296394bc7ce241439f00df86eb5912875f)
Signed-off-by: Anuj Mittal &lt;anuj.mittal@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
