<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/bb/tests/fetch.py, branch yocto-4.0.13</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=yocto-4.0.13</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=yocto-4.0.13'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2022-10-27T15:39:20+00:00</updated>
<entry>
<title>bitbake: tests/fetch: Allow handling of a file:// url within a submodule</title>
<updated>2022-10-27T15:39:20+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-10-26T14:53:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=886f8ebbe37fb1bee85eb1892ca1a14aef072900'/>
<id>urn:sha1:886f8ebbe37fb1bee85eb1892ca1a14aef072900</id>
<content type='text'>
CVE-2022-39253 in git meant file:// urls within submodules were disabled. Add
a parameter to the commands in the tests to allow this to continue to work.

(Bitbake rev: c90d57497b9bcd237c3ae810ee8edb5b0d2d575a)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: fetch2/git: canonicalize ids in generated tarballs</title>
<updated>2022-04-14T08:48:33+00:00</updated>
<author>
<name>Olaf Mandel</name>
<email>o.mandel@menlosystems.com</email>
</author>
<published>2022-04-08T14:50:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d1f254d56fc2fe337c44a79d2db6283283e71f4a'/>
<id>urn:sha1:d1f254d56fc2fe337c44a79d2db6283283e71f4a</id>
<content type='text'>
Change the owner information in the mirror tarballs generated using
BB_GENERATE_MIRROR_TARBALLS="1". This is an extension of commit
0178ab83, which used the original pokybuild:user information, but failed
to clean up the numerical user and group ids. Now set the more canonical
values of oe:oe and 0:0.

(Bitbake rev: 37437115d3fb1a9f5d8ed7356a0fc01a408e4f8c)

Signed-off-by: Olaf Mandel &lt;o.mandel@menlosystems.com&gt;
CC: Marek Vasut &lt;marex@denx.de&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: fetch2/git: stop generated tarballs from leaking info</title>
<updated>2022-03-26T09:27:43+00:00</updated>
<author>
<name>Olaf Mandel</name>
<email>o.mandel@menlosystems.com</email>
</author>
<published>2022-03-24T16:47:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=5cbdd2b4831fe069e5b441f0c6f427b2b9dc086b'/>
<id>urn:sha1:5cbdd2b4831fe069e5b441f0c6f427b2b9dc086b</id>
<content type='text'>
When using BB_GENERATE_MIRROR_TARBALLS="1" to generate mirror tarballs
of git repositories, they leaked local information: username, group and
time of the last fetch. Remove all these by setting fixed information:

 * uname = pokybuild
 * gname = users
 * mtime = committer time of newest commit in repo

The username and group value were taken from the archives available on
the downloads.yoctoproject.org mirror. The modification time is chosen
so it still retains some relationship to the contents of the archive.

(Bitbake rev: 0178ab83e6312e97e528aa8c5e12105f5165d896)

Signed-off-by: Olaf Mandel &lt;o.mandel@menlosystems.com&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>
<entry>
<title>bitbake: tests/fetch: Update for master -&gt; main change upstream</title>
<updated>2022-02-23T18:12:10+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-02-23T18:08:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=f4bfa6df2052fcd2106f6c0de638d6b30002199d'/>
<id>urn:sha1:f4bfa6df2052fcd2106f6c0de638d6b30002199d</id>
<content type='text'>
(Bitbake rev: f0fc0fe94161d4dd4f34df8426222ac590ef6736)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: fetch2/cooker: Fix source revision handling with floating upstreams</title>
<updated>2022-02-17T17:51:03+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-02-07T13:16:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=ebfa1700f41b3411aec040144605166c35b8dd14'/>
<id>urn:sha1:ebfa1700f41b3411aec040144605166c35b8dd14</id>
<content type='text'>
Where a git url uses a tag instead of a full source revision, breakage
can currently occur in builds. Issues include:

* the revision being looked up in multiple tasks (fetch and unpack)
* the risk a different revision may be obtained in those tasks
* that some tasks may not be allowed to access the network
* that a revision may not be consistent throughout a given build
* rerunning a specific task may given inconsistent results

To fix this, stop the workers from cleaning out the source revision store. This
should only be done in the cooker itself (based on current policy).

Also, where the code "sees" an upstream access, mark the recipe as not to be
cached. The reparse re-triggers the upstream lookup by the server.

Add a test to ensure that if get_srcrev isn't called, the user is told they're
using a configuration that is known to break.

(Bitbake rev: 4b5eed1626709ef3dc06b32fd55d40a2a6edd179)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: tests/fetch: Add missing branch param for git urls</title>
<updated>2022-02-12T17:05:58+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-02-11T15:51:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=82e6816024795bff3c447ae51d04bb2c9df8c4ab'/>
<id>urn:sha1:82e6816024795bff3c447ae51d04bb2c9df8c4ab</id>
<content type='text'>
We started to require the branch parameter for git urls. This updates
the tests to match and quieten some noise.

(Bitbake rev: e5144887f2b6ae266f7b52151005619480e80ec6)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: fetch2: npm: Put all downloaded files in the npm2 directory</title>
<updated>2022-02-05T17:46:44+00:00</updated>
<author>
<name>Peter Kjellerstedt</name>
<email>peter.kjellerstedt@axis.com</email>
</author>
<published>2022-01-29T02:29:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=bef3fe496969e79c8c44d3b1c41f60273a182104'/>
<id>urn:sha1:bef3fe496969e79c8c44d3b1c41f60273a182104</id>
<content type='text'>
Previously npm files that specify downloadfilename= in the SRC_URI
would be downloaded to the root of ${DL_DIR} rather than in the
${DL_DIR}/npm2 directory where all other npm files are downloaded.
This should make it simpler when setting up and configuring a
premirror with the downloaded npm packages.

(Bitbake rev: 73fa376d6502ab6f2cccfb25a1193d9b1c3c3bc8)

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: fetch2: Correct handling of replacing the basename in URIs</title>
<updated>2022-02-05T17:46:44+00:00</updated>
<author>
<name>Peter Kjellerstedt</name>
<email>peter.kjellerstedt@axis.com</email>
</author>
<published>2022-01-29T02:29:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=88993ae0308d74b4c78d28a1ff61cb20305f4e74'/>
<id>urn:sha1:88993ae0308d74b4c78d28a1ff61cb20305f4e74</id>
<content type='text'>
The solution implementated in commit 96c30007 (fetch2: fix
downloadfilename issue with premirror) missed two corner cases. The
first is if the basename of the original URI also appears somewhere
else in the replacement URI, in which case it would also be replaced.
The second is if the basename of the original URI partially matches
the basename of the replacement URI, in which case the inital part of
the basename from the replacement URI would be left behind.

The second case caused test_npm_premirrors_with_specified_filename to
fail.

The solution is to prefix the basename with a slash when matching to
avoid partial matches, and only replace the basename at the end of the
URI.

This also adds two test cases that test for these problems. Before
this they would give the following errors:

  - ['file:///mirror/example/1.0.0/some-example-1.0.0.tgz;downloadfilename=some-example-1.0.0.tgz']
  + ['file:///mirror/some-example-1.0.0.tgz/1.0.0/some-example-1.0.0.tgz;downloadfilename=some-example-1.0.0.tgz']
  ?                  +++++       ++++++++++

  - ['file:///mirror/some-example-1.0.0.tgz;downloadfilename=some-example-1.0.0.tgz']
  + ['file:///mirror/some-some-example-1.0.0.tgz;downloadfilename=some-example-1.0.0.tgz']
  ?                  +++++

(Bitbake rev: 5924c6f007519cd8ea6cc8b316814d17b43048ca)

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: tests/fetch: Make test_npm_premirrors work with the current fetcher</title>
<updated>2022-02-05T17:46:44+00:00</updated>
<author>
<name>Peter Kjellerstedt</name>
<email>peter.kjellerstedt@axis.com</email>
</author>
<published>2022-01-29T02:29:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=84963eb74ad8001b8a8961739339422c8411d79b'/>
<id>urn:sha1:84963eb74ad8001b8a8961739339422c8411d79b</id>
<content type='text'>
There are two totally opposite use cases for how a premirror is
expected to behave in combination with specifying a downloadfilename=
parameter in the SRC_URI. On the one hand there is the expectation
that it works like any other mirror, which means the premirror is
expected to contain a file with the original name specified in the
SRC_URI. On the other hand there is the expectation that one can use
the artefacts downloaded by bitbake in ${DL_DIR} as a premirror, in
which case it is expected to contain a file with the name from the
downloadfilename= parameter.

The latter case has been how downloaded files have been handled until
commit 8a3ff9f3 (fetch2: fix premirror URI when downloadfilename
defined), where the fetcher was changed to store files as per the
first case. This is also when the test_npm_premirrors test case was
modified in commit 5ba191a0 (tests/fetch: add and fix npm tests) to
expect the first case.

The above change was later reverted in commit 96c30007 (fetch2: fix
downloadfilename issue with premirror). However the
test_npm_premirrors test case was not updated to match, and has been
failing ever since. This has probably gone unnoticed because the npm
related test cases require that npm is installed on the host.

This commit updates test_npm_premirrors to expect that premirrors use
the filenames specified by downloadfilename= as this matches the
current fetcher implementation and also is the most likely use case
for premirrors. It also tries to mimic how one typically might setup
the premirror directory by simply copying the download directory.

(Bitbake rev: 9e913ade70474aaeb928814d4763e7105569d63a)

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: tests/fetch: Only set the Git user name/email if they are not already set</title>
<updated>2022-02-05T17:46:44+00:00</updated>
<author>
<name>Peter Kjellerstedt</name>
<email>peter.kjellerstedt@axis.com</email>
</author>
<published>2022-01-29T02:29:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d715e9105feba44116c42620919b32714bb14d2f'/>
<id>urn:sha1:d715e9105feba44116c42620919b32714bb14d2f</id>
<content type='text'>
If they are set, assume they are correct.

(Bitbake rev: a3a3a40b96c29051d97d0c96eb01784cbd1f5420)

Signed-off-by: Peter Kjellerstedt &lt;peter.kjellerstedt@axis.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
