<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/bb/utils.py, branch 4.3_M3</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=4.3_M3</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=4.3_M3'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2023-02-26T11:49:41+00:00</updated>
<entry>
<title>bitbake: utils: Use internal fetcher function to avoid duplication</title>
<updated>2023-02-26T11:49:41+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2023-02-24T15:52:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=c08e2c2e20e89f8d825c19ed3032d27fc0b022dc'/>
<id>urn:sha1:c08e2c2e20e89f8d825c19ed3032d27fc0b022dc</id>
<content type='text'>
We currently have two lists of "proxy" or "fetcher" environment exports.
Make the one in utils match the one on the fetcher which has a more complete
list of variables now.

(Bitbake rev: f9165a798a307a6f0fee120d5c3de660d3a44ae8)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bb/utils: include SSL certificate paths in export_proxies</title>
<updated>2023-01-26T21:50:31+00:00</updated>
<author>
<name>Ross Burton</name>
<email>ross.burton@arm.com</email>
</author>
<published>2023-01-26T16:49:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=b1ec98f71f196bce3042b6432d7767062529f547'/>
<id>urn:sha1:b1ec98f71f196bce3042b6432d7767062529f547</id>
<content type='text'>
bb.utils.export_proxies() is a poor-man's alternative for the
environment setup code in bb/fetch2, but it's used in several places
where recipes want to download manually (such as cve-update-db-native).

Notably, export_proxies() doesn't pass on the SSL certificate paths from
the original environment, so if SSL_CERT_FILE needs to be set (for
example, in a buildtools environment) then proxies work but SSL doesn't.

In an ideal world export_proxies and the same logic in fetch2 would
merge, but until then we can add the SSL_CERT_ variables and duplicate
the basic logic: check the datastore first and then the original
environment for variables.

Also remove the return value as nothing ever checked it.

[ YOCTO #15000 ]

(Bitbake rev: c19035e8e71c419c5688a86bfc9c946c96f638e8)

Signed-off-by: Ross Burton &lt;ross.burton@arm.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: lib/bb: Update thread/process locks to use a timeout</title>
<updated>2023-01-05T11:50:17+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2023-01-04T12:32:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=a19687acd12497d727203e63d74b2703387f34a6'/>
<id>urn:sha1:a19687acd12497d727203e63d74b2703387f34a6</id>
<content type='text'>
The thread/process locks we use translate to futexes in Linux. If a
process dies holding the lock, anything else trying to take the lock
will hang indefinitely. An example would be the OOM killer taking out
a parser process.

To avoid bitbake processes just hanging indefinitely, add a timeout to
our lock calls using a context manager. If we can't obtain the lock
after waiting 5 minutes, hard exit out using os._exit(1). Use _exit()
to avoid locking in any other places trying to write error messages to
event handler queues (which also need locks).

Whilst a bit harsh, this should mean we stop having lots of long running
processes in cases where things are never going to work out and also
avoids hanging builds on the autobuilder.

(Bitbake rev: d2a3f662b0eed900fc012a392bfa0a365df0df9b)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bin/utils: Ensure locale en_US.UTF-8 is available on the system</title>
<updated>2022-12-08T10:49:53+00:00</updated>
<author>
<name>Frank de Brabander</name>
<email>debrabander@gmail.com</email>
</author>
<published>2022-12-06T18:18:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=79d689f5da5bf5eb4c5a767e10d581554e100008'/>
<id>urn:sha1:79d689f5da5bf5eb4c5a767e10d581554e100008</id>
<content type='text'>
Get rid of the duplicate code and add extra check that the
locale en_US.UTF-8 is available on the system. This new helper
method is now located right above the method filter_environment()
which sets LC_ALL environment variable to 'en_US.UTF-8'.

[YOCTO #10165]

(Bitbake rev: a4ce040a6fd540a1cac52f808f909f9fcf8c961c)

Signed-off-by: Frank de Brabander &lt;debrabander@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: utils: Allow to_boolean to support int values</title>
<updated>2022-11-27T23:48:15+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-11-24T16:54:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=6e75972a1f0cadfc09721d853b2cb1135078627c'/>
<id>urn:sha1:6e75972a1f0cadfc09721d853b2cb1135078627c</id>
<content type='text'>
Some variables may be set as:

X = 1

as well the more usual

X = "1"

so add support to to_boolean to handle this case.

(Bitbake rev: ef9c033b011e68bbfedf7ddf118633c14388aaaf)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: utils/ply: Update md5 to better report errors with hashlib</title>
<updated>2022-10-26T11:32:08+00:00</updated>
<author>
<name>Mark Hatle</name>
<email>mark.hatle@kernel.crashing.org</email>
</author>
<published>2022-10-06T21:53:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=fc6f743c52d5769e665826128687ddbad9d4a5d7'/>
<id>urn:sha1:fc6f743c52d5769e665826128687ddbad9d4a5d7</id>
<content type='text'>
In the case where hashlib is not available, the try would fail and fall
through resulting in a backtrace on the usage of the 'sig'.  The backtrace
itself was confusing and made it difficult to determine what went wrong.

Update the import to be in it's own try block with an appropriate
message to indicate what went wrong.

Note, the current version of ply all of this code has been restructured
so this is not applicable upstream.

Additionally, some versions of hashlib don't appear to implement the
second FIPS related argument.  Detect this and support both versions.

(Bitbake rev: 484ab42f440070c0369b81f5c69da860fa47a798)

Signed-off-by: Mark Hatle &lt;mark.hatle@amd.com&gt;
Signed-off-by: Mark Hatle &lt;mark.hatle@kernel.crashing.org&gt;
Signed-off-by: Luca Ceresoli &lt;luca.ceresoli@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: utils: Add enable_loopback_networking()</title>
<updated>2022-09-29T20:26:09+00:00</updated>
<author>
<name>Mattias Jernberg</name>
<email>mattiasj@axis.com</email>
</author>
<published>2022-09-29T16:37:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=74877d2dc267c958d02342d16cebeaeded23df8c'/>
<id>urn:sha1:74877d2dc267c958d02342d16cebeaeded23df8c</id>
<content type='text'>
It can be used to enable the loopback interface, typically after calling
disable_network().

Also correct a typo in a debug message.

(Bitbake rev: 0d317209d4234c5f05a9fcdc13c52f502f104018)

Signed-off-by: Mattias Jernberg &lt;mattias.jernberg@axis.com&gt;
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>bitbake: utils: Pass lock argument in fileslocked</title>
<updated>2022-08-31T09:40:07+00:00</updated>
<author>
<name>Joshua Watt</name>
<email>JPEWhacker@gmail.com</email>
</author>
<published>2022-08-30T15:59:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=79cc8584e6e29574ce271eb4a43d0dd9c8879e2c'/>
<id>urn:sha1:79cc8584e6e29574ce271eb4a43d0dd9c8879e2c</id>
<content type='text'>
Pass additional arguments in the fileslocked() context manager to the
underlying lockfile() function. This allows the context manager to be
used for any types of locks (non-blocking, shared, etc.) that the
lockfile() function supports.

(Bitbake rev: 7a8eb8da8e8495051e174721062da08e06168024)

Signed-off-by: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: siggen: Fix insufficent entropy in sigtask file names</title>
<updated>2022-08-09T15:28:03+00:00</updated>
<author>
<name>Joshua Watt</name>
<email>JPEWhacker@gmail.com</email>
</author>
<published>2022-08-03T14:04:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=fdc9d9e4fc386e178800b15ea22a368749e90965'/>
<id>urn:sha1:fdc9d9e4fc386e178800b15ea22a368749e90965</id>
<content type='text'>
Signature generation uses mkstemp() to get a file descriptor to a unique
file and then write the signature into it. However, the unique file name
generation in glibc is based on the system timestamp, which means that
with highly parallel builds it is more likely than one might expect
expected that a conflict will occur between two different builder nodes.
When operating over NFS (such as a shared sstate cache), this can cause
race conditions and rare failures (particularly with NFS servers that
may not correctly implement O_EXCL).

The signature generation code is particularly susceptible to races since
a single "sigtask." prefix used for all signatures from all tasks, which
makes collision even more likely.

To work around this, add an internal implementation of mkstemp() that
adds additional truly random entropy to the file name to eliminate
conflicts.

(Bitbake rev: 97955f3c1c738aa4b4478a6ec10a08094ffc689d)

Signed-off-by: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Signed-off-by: Luca Ceresoli &lt;luca.ceresoli@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bb/utils: movefile: use the logger for printing</title>
<updated>2022-07-28T10:55:06+00:00</updated>
<author>
<name>Jose Quaresma</name>
<email>quaresma.jose@gmail.com</email>
</author>
<published>2022-07-19T09:40:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=ace415e6221cd9b60da6f476d9619214ec3c5c23'/>
<id>urn:sha1:ace415e6221cd9b60da6f476d9619214ec3c5c23</id>
<content type='text'>
(Bitbake rev: 274b2d7a2fa0b43b0b542cb5471ff832e692ea93)

Signed-off-by: Jose Quaresma &lt;jose.quaresma@foundries.io&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
