<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/bb/utils.py, branch uninative-3.6</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=uninative-3.6</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=uninative-3.6'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2022-03-24T17:45:28+00:00</updated>
<entry>
<title>bitbake: utils: Fix lockfile path length issues</title>
<updated>2022-03-24T17:45:28+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-03-23T14:48:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=09e826cfb021731c1b139046665d2d9fa24baa88'/>
<id>urn:sha1:09e826cfb021731c1b139046665d2d9fa24baa88</id>
<content type='text'>
If the path to bitbake.lock is in a deep directory, bitbake will hang. The
reason was that the max file length limiting code (to 255 chars) was including
the directory name and it should only act on the filename within the directory.
Fix it to just use the base filename.

[YOCTO #14766]

(Bitbake rev: 89d70e7b71eecfe06592202f326e566c579ba01d)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: utils/ply: Change md5 usages to work on FIPS enabled hosts</title>
<updated>2022-03-02T00:20:50+00:00</updated>
<author>
<name>Mark Hatle</name>
<email>mark.hatle@kernel.crashing.org</email>
</author>
<published>2022-03-01T01:30:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d895863af12e15bebd9fa0640290d9a649ece82b'/>
<id>urn:sha1:d895863af12e15bebd9fa0640290d9a649ece82b</id>
<content type='text'>
hashlib.md5() is not permitted on a FIPS enabled host system.  This is due
to md5 not being an approved hash algorithm.

Instead use:
 hashlib.new('MD5', usedforsecurity=False)

This is allowed, as it's clear the hash is used for a non-security purpose.

Note: utils.py version should never be used to verify file integrity, but
instead be used to identify if the file may have changed.  sha256 should be
used for integrity purposes.

(Bitbake rev: af866dd077867cba0129757bfcc689551445e9d7)

Signed-off-by: Mark Hatle &lt;mark.hatle@xilinx.com&gt;
Signed-off-by: Mark Hatle &lt;mark.hatle@kernel.crashing.org&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bitbake: Rename environment filtering variables</title>
<updated>2022-02-21T23:37:26+00:00</updated>
<author>
<name>Scott Murray</name>
<email>scott.murray@konsulko.com</email>
</author>
<published>2022-02-13T20:37:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=8e5a8a2b532214f605eb56375e183b0bc7408797'/>
<id>urn:sha1:8e5a8a2b532214f605eb56375e183b0bc7408797</id>
<content type='text'>
In line with the inclusive language migration defined at:

https://wiki.yoctoproject.org/wiki/Inclusive_language

rename:

BB_ENV_WHITELIST -&gt; BB_ENV_PASSTHROUGH
BB_ENV_EXTRAWHITE -&gt; BB_ENV_PASSTHROUGH_ADDITIONS

(Bitbake rev: fe60627839d4280cf0117ed1afbfccdff1181b6a)

(Bitbake rev: 87104b6a167188921da157c7dba45938849fb22a)

Signed-off-by: Scott Murray &lt;scott.murray@konsulko.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: utils: Ensure shell function failure in python logging is correct</title>
<updated>2022-02-21T21:53:52+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-02-21T15:36:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=59e87e380aa191b5bf256129a9444d6d1741ff67'/>
<id>urn:sha1:59e87e380aa191b5bf256129a9444d6d1741ff67</id>
<content type='text'>
If a python function exec_func() calls a shell task, the logging wasn't working
correctly in all cases since the exception was turned into a BBHandledException()
and the logfile piece was lost which is handled at the top task level.

The easiest way to avoid this is to allow the ExecutionError exceptions to
be raised to a higher level, we don't need the traceback for them.

(Bitbake rev: 7cae11f558f9ff5fd05ef23b789aaef92fb5a327)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: utils: Fix typo "dependency" and "spawning"</title>
<updated>2022-02-20T16:45:25+00:00</updated>
<author>
<name>Zygmunt Krynicki</name>
<email>zygmunt.krynicki@huawei.com</email>
</author>
<published>2022-02-19T16:40:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=fe1b1bffa54514b1971e29a478ef3f08fcd17e5e'/>
<id>urn:sha1:fe1b1bffa54514b1971e29a478ef3f08fcd17e5e</id>
<content type='text'>
(Bitbake rev: 8f76117816fa84367753d5eee0264b90e9f29a8c)

Signed-off-by: Zygmunt Krynicki &lt;zygmunt.krynicki@huawei.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: utils: Fix environment decorator logic error</title>
<updated>2022-02-20T16:45:24+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-02-17T15:28:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=427bfd5f8fad045432947c73c6007b7a79e5e7d6'/>
<id>urn:sha1:427bfd5f8fad045432947c73c6007b7a79e5e7d6</id>
<content type='text'>
  File "/home/pokybuild/yocto-worker/qemuarm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/core-image-sato/1.0-r0/testsdkext/layers/build/bitbake/lib/bb/fetch2/wget.py", line 328, in checkstatus
    with bb.utils.environment(**newenv):
  File "/home/pokybuild/yocto-worker/qemuarm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/core-image-sato/1.0-r0/testsdkext/buildtools/sysroots/x86_64-pokysdk-linux/usr/lib/python3.10/contextlib.py", line 142, in __exit__
    next(self.gen)
  File "/home/pokybuild/yocto-worker/qemuarm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/core-image-sato/1.0-r0/testsdkext/layers/build/bitbake/lib/bb/utils.py", line 1737, in environment
    del os.environ[var]
  File "/home/pokybuild/yocto-worker/qemuarm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/core-image-sato/1.0-r0/testsdkext/buildtools/sysroots/x86_64-pokysdk-linux/usr/lib/python3.10/os.py", line 695, in __delitem__
    raise KeyError(key) from None

It is possible the wrapped function might change the environment which can lead
to KeyError issues like this. The key may no longer be in the original environment
so handle that case correctly and avoid the tracebacks.

(Bitbake rev: ae4ce4c21998bb2a12a1e1f0b8e0af8d218b87e2)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bitbake: bitbake-worker: Preserve network non-local uid</title>
<updated>2022-02-01T07:31:48+00:00</updated>
<author>
<name>Robert Yang</name>
<email>liezhi.yang@windriver.com</email>
</author>
<published>2022-01-21T06:52:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d77178e8df213160d0fe58c5942507f01e7af2bd'/>
<id>urn:sha1:d77178e8df213160d0fe58c5942507f01e7af2bd</id>
<content type='text'>
The NIS can't work when network is dissable, so preserve network for it, the
error is like:

do_ypcall: clnt_call: RPC: Unable to send; errno = Network is unreachable

Note, enable nscd on the build machine might be a solution, but that isn't
reliable since it depends on whether the network function has been cached or
not.

(Bitbake rev: 4eafae7904bae6e5c6bc50356e8a9077f2e207fa)

Signed-off-by: Robert Yang &lt;liezhi.yang@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: utils: Add disable_network function</title>
<updated>2022-01-12T21:10:24+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2021-12-21T17:38:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=60d25f278c9cc4d6288166aba4b5c8927d32f84c'/>
<id>urn:sha1:60d25f278c9cc4d6288166aba4b5c8927d32f84c</id>
<content type='text'>
Add a function which uses the unshare glibc call to disable networking
in the current process. This doesn't work on older distros/kernels
but will on more recent ones so for now we simply ignore the cases we
can't execute on. uid/gid can be passed in externally so this can
work with pseudo/fakeroot contexts.

(Bitbake rev: 9d6341df611a1725090444f6f8eb0244aed08213)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: utils: Update to use exec_module() instead of load_module()</title>
<updated>2022-01-05T17:18:34+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-01-04T23:07:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=7c7e53570c8171cc0d3729e4d507b4bd0ca82167'/>
<id>urn:sha1:7c7e53570c8171cc0d3729e4d507b4bd0ca82167</id>
<content type='text'>
This is deprecated in python 3.12 and Fedora 35 is throwing warnings so
move to the new functions.

(Bitbake rev: 68a18fbcb5959e334cf307d7fa8dc63832edb942)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: utils: Handle lockfile filenames that are too long for filesystems</title>
<updated>2021-11-21T11:05:51+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2021-11-18T13:48:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=273b124bf6acd77b074fde2421be331721a68c11'/>
<id>urn:sha1:273b124bf6acd77b074fde2421be331721a68c11</id>
<content type='text'>
The fetcher mirror code can go crazy creating lock filenames which exceed the
filesystem limits. When this happens, the code will loop/hang.

Handle the filename too long exception correctly but also truncate lockfile
lengths to under 256 since the worst case situation is lockfile overlap
and lack of parallelism.

(Bitbake rev: 63baf3440b16e41ac6601de21ced94a94bdf1509)

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