<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/bb/fetch2/__init__.py, branch styhead-5.1.4</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=styhead-5.1.4</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=styhead-5.1.4'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2024-11-30T13:41:59+00:00</updated>
<entry>
<title>bitbake: fetch2: use persist_data context managers</title>
<updated>2024-11-30T13:41:59+00:00</updated>
<author>
<name>Chris Laplante</name>
<email>chris.laplante@agilent.com</email>
</author>
<published>2024-11-25T17:22:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=87e1004fc4d1274824b8ece09ea04876ac0126ca'/>
<id>urn:sha1:87e1004fc4d1274824b8ece09ea04876ac0126ca</id>
<content type='text'>
Python 3.13 emits a ResourceWarning for unclosed sqlite3 `Connection`s.
See https://docs.python.org/3/whatsnew/3.13.html#sqlite3

The previous commit fixed persist_data's context manager to close the
connection, but we were never actually using `with` in the first place.

This change is not necessary on 'master' because persist_data was
removed.

(Bitbake rev: 9602a684568910fd333ffce907fa020ad3661c26)

Signed-off-by: Chris Laplante &lt;chris.laplante@agilent.com&gt;
(cherry picked from commit 61f803c7d92a012b62837b0cdae4789a394b260e)
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
</content>
</entry>
<entry>
<title>bitbake: fetch2: don't try to preserve all attributes when unpacking files</title>
<updated>2024-10-01T13:54:16+00:00</updated>
<author>
<name>Ross Burton</name>
<email>ross.burton@arm.com</email>
</author>
<published>2024-09-25T11:10:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=9347bef90bb7c2d803f5ab304709f07b1f3d2290'/>
<id>urn:sha1:9347bef90bb7c2d803f5ab304709f07b1f3d2290</id>
<content type='text'>
When copying files as part of the unpack we currently use cp -p, which
is a shortcut for --preserve=mode,ownership,timestamps.

We do want to preserve timestamps, because some fetchers set these
explicitly.

We don't care about ownership. If the files are owned by us then they
ill remain owned by us, and if they're not then the attempt to change
ownership will be silently ignored.  In a shared DL_DIR where files have
group ownership this group access isn't relevant in the single-user build
tree.

We do want to preserve executable bits in the mode, but cp always does
this.  The difference between --preserve=mode and no --preserve is that
the mode isn't preserved exactly (no sticky bits, no suid, umask is
applied) but this also isn't a relevant difference in a build tree.

Also expand the arguments to be clearer about what options are being
passed.

The impetus for this is that coreutils 9.4 includes a change in gnulib[1]
and will now try to preserve permission-based xattrs if asked to preserve
the mode.  This can result in cp failing when copying a file from a
NFSv4 server with ACLs stored in xattrs to a non-NFS directory where
those xattrs cannot be written:

cp: preserving permissions for ‘./jquery-3.7.1.js’: Operation not supported

The error comes from the kernel refusing to write a system.nfs4_acl
xattr to a file on ext4.

This situation doesn't appear on all systems with coreutils 9.4, at the
time of writing it fails on Ubuntu 24.04 onwards but not Fedora 40. This
is because /etc/xattr.conf is used to determine which xattrs describe
permissions, and Fedora 40 has removed the NFSv4 attributes[2].

Also, use long-form options to make the cp command clearer.

[1] https://github.com/coreutils/gnulib/commit/eb6a8a4dfb
[2] https://src.fedoraproject.org/rpms/attr/blob/rawhide/f/0003-attr-2.4.48-xattr-conf-nfs4-acls.patch

[ YOCTO #15596 ]

(Bitbake rev: 2f35dac0c821ab231459922ed98e1b2cc599ca9a)

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: fetch2: Add gomodgit fetcher</title>
<updated>2024-09-10T12:05:00+00:00</updated>
<author>
<name>Christian Lindeberg</name>
<email>christian.lindeberg@axis.com</email>
</author>
<published>2024-09-06T09:27:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=87c29b5a947956ab64c3fe881dfbc7eee5fef9e4'/>
<id>urn:sha1:87c29b5a947956ab64c3fe881dfbc7eee5fef9e4</id>
<content type='text'>
Add a go module fetcher for downloading module dependencies to the
module cache directly from a git repository. The fetcher can be used
with the go-mod class in OE-Core.

A module dependency can be specified with:

  SRC_URI += "gomodgit://golang.org/x/net;version=v0.9.0;srcrev=..."

(Bitbake rev: 29ff38ccf0d5389a5bee81e252a78548361a9d7c)

Signed-off-by: Christian Lindeberg &lt;christian.lindeberg@axis.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: fetch2: Add gomod fetcher</title>
<updated>2024-09-10T12:05:00+00:00</updated>
<author>
<name>Christian Lindeberg</name>
<email>christian.lindeberg@axis.com</email>
</author>
<published>2024-09-06T09:27:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=dd7631426c1a7d0e6777540c81646777e712be26'/>
<id>urn:sha1:dd7631426c1a7d0e6777540c81646777e712be26</id>
<content type='text'>
Add a go module fetcher for downloading module dependencies to the
module cache from a module proxy. The fetcher can be used with the
go-mod class in OE-Core.

A module dependency can be specified with:

  SRC_URI += "gomod://golang.org/x/net;version=v0.9.0;sha256sum=..."

(Bitbake rev: 5ff4694bf305e266ebf0abab5d9745c6b6d07d67)

Signed-off-by: Christian Lindeberg &lt;christian.lindeberg@axis.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: fetch2: Fix misleading "no output" msg</title>
<updated>2024-03-22T16:26:45+00:00</updated>
<author>
<name>Viswanath Kraleti</name>
<email>quic_vkraleti@quicinc.com</email>
</author>
<published>2024-03-08T13:33:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=3a97792820935392a1adfddc3abbef7d741f6b98'/>
<id>urn:sha1:3a97792820935392a1adfddc3abbef7d741f6b98</id>
<content type='text'>
When a command is run with a non-null log, errors are only output to the
log and are not returned in the exception. In that case direct users to
that logfile instead of telling the command had no output.

(Bitbake rev: 944fe0a77932a5559e01ae6035c4bffa5185ea6a)

Signed-off-by: Viswanath Kraleti &lt;quic_vkraleti@quicinc.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: fetch2: handle URIs with single-valued query parameters</title>
<updated>2024-03-22T16:26:45+00:00</updated>
<author>
<name>Ross Burton</name>
<email>ross.burton@arm.com</email>
</author>
<published>2024-03-08T14:14:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=e20ee877ed41eaf186a108e11ea8fba42490a0e8'/>
<id>urn:sha1:e20ee877ed41eaf186a108e11ea8fba42490a0e8</id>
<content type='text'>
Whilst typically the URI query is a list of key-value pairs, that's not
actually required by the URI specification.

For example:  http://example.com/foo?bar is a valid query, but this will
result in the fetcher raising an exception:

  File "bitbake/lib/bb/fetch2/__init__.py", line 265, in __init__
    self.query = self._param_str_split(urlp.query, "&amp;")
  File "bitbake/lib/bb/fetch2/__init__.py", line 293, in _param_str_split
    for k, v in [x.split(kvdelim, 1) for x in string.split(elmdelim) if x]:
ValueError: not enough values to unpack (expected 2, got 1)

In this case the query is just "bar", but the fetcher is trying to split
it into a key-value pair.

The URI object exposes the parsed query explicitly as a dictionary of
key-value pairs, so we have to be a little creative here: if a value is
None then it isn't a key-value pair, but a bare key.

Fix this by handling elements without the deliminator in _param_str_split()
(by assigning the value to None), and handle a None value when formatting
the query in _param_str_join().

(Bitbake rev: eac583bd4c46f3bb9661852cb6a1448f16147ff1)

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: fetch/git: Avoid clean upon failure</title>
<updated>2024-03-03T16:26:17+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2024-02-28T11:27:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=2689d8cf22d3809923aad5bd87e5e3e1821ffc82'/>
<id>urn:sha1:2689d8cf22d3809923aad5bd87e5e3e1821ffc82</id>
<content type='text'>
Currently when git fetches fail, it destroys all the existing local clone data.
For large repositories this can introduce long build delays when for example,
you just typo'd the git revision hash.

The git fetcher should be able to recover most directories so when the fetch is
for a git repo, avoid removing things unless clean is explicitly called
(e.g. a -c cleanall task).

(Bitbake rev: 1b3cd039fe19b24bd4be9a0202a98cdcbb0e9443)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: support temporary AWS credentials</title>
<updated>2024-02-09T14:06:16+00:00</updated>
<author>
<name>Toni Lammi</name>
<email>toni.lammi@kone.com</email>
</author>
<published>2024-02-09T06:40:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=e834e8ee91b844bce1c0723ea0e0f94691d44074'/>
<id>urn:sha1:e834e8ee91b844bce1c0723ea0e0f94691d44074</id>
<content type='text'>
Support AWS_SESSION_TOKEN which is used in temporary
AWS credentials.

Fixes [YOCTO #15384].

(Bitbake rev: ae1e4c90bbc2002cb2728c64649c095c00220ceb)

Signed-off-by: Toni Lammi &lt;toni.lammi@kone.com&gt;
Reported-by: Toni Lammi &lt;toni.lammi@tl-software.fi&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: fetch/checkstatus(): do not print the URI twice in FetchError exception</title>
<updated>2024-01-10T13:55:33+00:00</updated>
<author>
<name>Alexander Kanavin</name>
<email>alex.kanavin@gmail.com</email>
</author>
<published>2024-01-08T14:26:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4890c6a7ca811fb7fd31ecad7fe7fae05f2c3340'/>
<id>urn:sha1:4890c6a7ca811fb7fd31ecad7fe7fae05f2c3340</id>
<content type='text'>
Previously, there was duplicate clutter in the output, particularly if the
URI points to sstate cache items:

bb.fetch2.FetchError: Fetcher failure for URL: {uri}. URL {uri} doesn't work

(Bitbake rev: 61537b8a98b963e4af265e046d41407b32fa5935)

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>bitbake: fetch2/aws: forward env-vars used in gitlab-ci K8s</title>
<updated>2023-11-23T17:55:08+00:00</updated>
<author>
<name>Felix Moessbauer</name>
<email>felix.moessbauer@siemens.com</email>
</author>
<published>2023-11-20T13:59:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=2696bf8cf35ca51b5147f6d462a1a9acea63097a'/>
<id>urn:sha1:2696bf8cf35ca51b5147f6d462a1a9acea63097a</id>
<content type='text'>
This patch adds the following variables to the allow-list, which are
used in the "IAM roles for AWS when using the GitLab chart":

- AWS_ROLE_ARN
- AWS_WEB_IDENTITY_TOKEN_FILE

These variables are set in the CI job environment and are needed to
access the sstate cache artifacts in a connected S3 bucket.

[1] https://docs.gitlab.com/charts/advanced/external-object-storage/aws-iam-roles.html

Reported-by: Zhi Bin Dong &lt;zhibin.dong@siemens.com&gt;
(Bitbake rev: c534526ea73805ee7cc16f3168b05ece10e0c03c)

Signed-off-by: Felix Moessbauer &lt;felix.moessbauer@siemens.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
