<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/bb/tests/fetch.py, branch mickledore-4.2.2</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=mickledore-4.2.2</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=mickledore-4.2.2'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2023-04-06T13:28:59+00:00</updated>
<entry>
<title>bitbake: fetch2/crate: create versioned 'name' entries</title>
<updated>2023-04-06T13:28:59+00:00</updated>
<author>
<name>Enrico Scholz</name>
<email>enrico.scholz@sigma-chemnitz.de</email>
</author>
<published>2023-04-05T12:21:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=b92918eb0eb25e737e2ad044323a6607c37dab28'/>
<id>urn:sha1:b92918eb0eb25e737e2ad044323a6607c37dab28</id>
<content type='text'>
It is common for rust packages to depend on different versions of the
same crate.  E.g.

|    crate://crates.io/windows_x86_64_msvc/0.42.2 \
|    crate://crates.io/windows_x86_64_msvc/0.48.0 \

Identification only by the plain crate name makes the sha256sum
ambiguous

| SRC_URI[windows_x86_64_msvc.sha256sum] = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
| SRC_URI[windows_x86_64_msvc.sha256sum] = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"

and requires lot of manual work to fix the SRC_URI list.

Making the 'name' property unique by appending the version allows
direct copy &amp; paste of reported sha256sum errors to complete the
crates list.

(Bitbake rev: ae2efb05196f9e29ef56ad9a84e2eae5fbdd8030)

Signed-off-by: Enrico Scholz &lt;enrico.scholz@sigma-chemnitz.de&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: fetch2: Add checksum capability for crate fetcher</title>
<updated>2023-03-30T09:51:54+00:00</updated>
<author>
<name>Frederic Martinsons</name>
<email>frederic.martinsons@gmail.com</email>
</author>
<published>2023-03-17T08:19:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=2b12c58724d250d1faf24072128e2de75dfe2c15'/>
<id>urn:sha1:2b12c58724d250d1faf24072128e2de75dfe2c15</id>
<content type='text'>
This change brings checksum verification of each crate
in a recipe, e.g

| SRC_URI += " \
|     crate://crates.io/aho-corasick/0.7.20 \
|     crate://crates.io/atomic-waker/1.1.0 \
|     crate://crates.io/cc/1.0.79 \
| "
|
| SRC_URI[aho-corasick.sha256sum] = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac"
| SRC_URI[atomic-waker.sha256sum] = "debc29dde2e69f9e47506b525f639ed42300fc014a3e007832592448fa8e4599"
| SRC_URI[cc.sha256sum] = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"

That will require to move the checksum initialization
after the possible call to urldata_init method in order
for the crate fetcher to parse the url.

Another way of doing could have been implementing a decodeurl
method that would have been specific for each fetcher class.

(Bitbake rev: 4920686c13dd66f9bfa4f7dd38d6e955f153eeec)

Signed-off-by: Frederic Martinsons &lt;frederic.martinsons@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;
</content>
</entry>
<entry>
<title>bitbake: fetch2: Rename __BBSEENSRCREV -&gt; __BBSRCREV_SEEN</title>
<updated>2023-03-22T13:57:04+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2023-03-21T14:47:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=2b8761e5fc0cbef8e43a2246450098e9b48413c0'/>
<id>urn:sha1:2b8761e5fc0cbef8e43a2246450098e9b48413c0</id>
<content type='text'>
For readability of following patches, rename this internal variable to
allow for others in a similar format.

(Bitbake rev: 450b4a00895ed1f9396a8ff859dc1cc0eccc838f)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: crate.py: authorize crate url with parameters</title>
<updated>2023-03-17T17:20:05+00:00</updated>
<author>
<name>Frederic Martinsons</name>
<email>frederic.martinsons@gmail.com</email>
</author>
<published>2023-03-15T13:40:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=ee5e6a86fd0d2f81a6a3db4fba7ec5158555e595'/>
<id>urn:sha1:ee5e6a86fd0d2f81a6a3db4fba7ec5158555e595</id>
<content type='text'>
This allow to have classic fetch parameters
(like destsuffix, sha256, name ...) not being
considered by crate fetcher itself (and so mess
up its download)

Moreover, it allow to overload the name of the downloaded
crate (maybe usefull if there is a naming clash between
two crates coming from different repositories)

(Bitbake rev: 278bd2f1758b8af97552af8d23d16ffb5127a131)

Signed-off-by: Frederic Martinsons &lt;frederic.martinsons@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;
</content>
</entry>
<entry>
<title>bitbake: fetch/npmsw: add more short forms for git operations</title>
<updated>2023-02-26T11:49:41+00:00</updated>
<author>
<name>Mark Asselstine</name>
<email>mark.asselstine@windriver.com</email>
</author>
<published>2023-02-24T20:43:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=67d5541f65f4d2538b2d92a388af65d3f2fb14ee'/>
<id>urn:sha1:67d5541f65f4d2538b2d92a388af65d3f2fb14ee</id>
<content type='text'>
&gt;From the npm-install documentation [1] the CLI provides a set of
short forms when the install fetches from git. These include

"github:"
example: npm install github:mygithubuser/myproject

"gist:"
example: npm install gist:101a11beef

"gitlab:"
example: npm install gitlab:mygitlabuser/myproject

"bitbucket:"
example: npm install bitbucket:mybitbucketuser/myproject

Commit 1d8af6aed0a9 [fetch2: npmsw: Add support for github prefix in
npm shrinkwrap version] by Stefan Herbrechtsmeier added support for
the "github:" but the others would marked as 'Unsupported dependency'.

The other prefixes are added in this commit, along with extending the
tests to cover some of these.

However, there is one more short form for github which npm-install
allows which forgoes the prefix altogether.

example: npm install mygithubuser/myproject

Unfortunately this format is a bit problematic as it lacks any easily
identifiable 'marker' to match against, and it could be either the
github short form or install from folder format. Experimentation shows
that the folder format requires a leading './' or '/', so we use this
to rule out the ambiguity.

If this approach to folder and github formats disambiguation is
incorrect it won't matter anyways as the folder format is unrecognized
by the code as-is and thus with this change or without, things would
fail.

Since we have to be less strict in the check for git operations we
move it to be the last install format which we check, such that the
less ambiguous formats can be sorted out first.

[1] https://docs.npmjs.com/cli/v9/commands/npm-install

[Yocto #14236]

(Bitbake rev: 0ac6f6cb5d807919ed13a8b7bb3fb551b79c5a71)

Signed-off-by: Mark Asselstine &lt;mark.asselstine@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: tests/fetch: Add real git lfs tests and decorator</title>
<updated>2023-02-22T12:03:39+00:00</updated>
<author>
<name>Paulo Neves</name>
<email>paulo@myneves.com</email>
</author>
<published>2023-02-17T17:00:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=ffcc20770db8c6d5fcf67d8203b43203a4e7226e'/>
<id>urn:sha1:ffcc20770db8c6d5fcf67d8203b43203a4e7226e</id>
<content type='text'>
Added tests that verify that git-lfs works with an actual
real git-lfs server. This was not previously the case because
the repo in the test was a simulation of git-lfs but not
a real git lfs repo.

The 2 added tests are almost the same but test that the
git lfs file checkout is successfult with or without the
lfs=1 flag. The lfs=1 URI parameter is a quirk that triggers
2 different code paths for git lfs.

lfs=1, when used on git lfs repositories triggers the git lfs
downloading at the fetch bare stage.

lfs query parameter unset triggers the git lfs downloading only
on checkout as an implicit behavior of git. This leads to possible
network access on the unpack stage and outside the DL_DIR.

lfs=0 actually disables git-lfs functionality even if supported.

(Bitbake rev: d2be7f7f652360f13cd66d0850f3e19ffe2afb0a)

Signed-off-by: Paulo Neves &lt;paulo@myneves.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: tests/fetch: git-lfs restore _find_git_lfs</title>
<updated>2023-02-22T12:03:39+00:00</updated>
<author>
<name>Paulo Neves</name>
<email>paulo@myneves.com</email>
</author>
<published>2023-02-17T17:00:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=41c86ad30e2faec6ad286b9131578183b6a17d24'/>
<id>urn:sha1:41c86ad30e2faec6ad286b9131578183b6a17d24</id>
<content type='text'>
Not restoring the mocked _find_git_lfs leads to other tests
failing.

(Bitbake rev: 70f848631450bd723c223227c21c60e815ee033d)

Signed-off-by: Paulo Neves &lt;paulo@myneves.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: fetch2/tests: Add parameter to recipe_uri</title>
<updated>2023-01-20T17:49:26+00:00</updated>
<author>
<name>Pavel Zhukov</name>
<email>pavel@zhukoff.net</email>
</author>
<published>2023-01-18T07:28:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=f962c586fcdc3a4283f87b13c207053736fbce4c'/>
<id>urn:sha1:f962c586fcdc3a4283f87b13c207053736fbce4c</id>
<content type='text'>
While the parameter is not required it allows testing of possible
regression in fetcher code when parameter specified and mirrors are
used.

(Bitbake rev: 1a21918049091a6d77426dbf8868ffdc14ba1003)

Signed-off-by: Pavel Zhukov &lt;pavel@zhukoff.net&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: fetch2/tests: Add test for Mercurial</title>
<updated>2023-01-18T16:42:27+00:00</updated>
<author>
<name>Pavel Zhukov</name>
<email>pavel@zhukoff.net</email>
</author>
<published>2023-01-17T15:36:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=2ac1235b9b6b14644c6bd6ff820264ed49d70170'/>
<id>urn:sha1:2ac1235b9b6b14644c6bd6ff820264ed49d70170</id>
<content type='text'>
Basic test for mercurial functionality including PREMIRRORONLY with
disabled network

(Bitbake rev: c0e349a5fc92e9c90afc53800c7e83495393ff79)

Signed-off-by: Pavel Zhukov &lt;pavel@zhukoff.net&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: fetch2/wget.py: correctly match versioned directories</title>
<updated>2022-12-11T16:33:19+00:00</updated>
<author>
<name>Alexander Kanavin</name>
<email>alex.kanavin@gmail.com</email>
</author>
<published>2022-12-09T08:58:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=6257744d790dfe128ba1cb19b3b5676dc2dc0128'/>
<id>urn:sha1:6257744d790dfe128ba1cb19b3b5676dc2dc0128</id>
<content type='text'>
When obtaining latest upstream versions, the code needs
to check if the existing tarball is in a versioned directory
(e.g. component-name/x.y/component-name-x.y.z.tar.gz) and
if it is, it needs to first obtain the list of all
such versioned directories and then check all of them by going
one step up in the directory hierarchy.

Existing code was returning a correct match when the component
name did not have numbers, e.g. a check on 'source/epiphany/43/'
would return 43, but was stopping too soon when the component
name itself had numbers ('source/libxml2/2.10/' would return libxml2).

This change ensures the last match is taken instead of the first.

Also, adjust the fetcher tests to check that versioned directories
are correctly traversed in this case (e.g. the step to go one level
up is taken and a new tarball is discovered in a different versioned
directory).

(Bitbake rev: b6601be22c6d776327acdcd1fa931400f41ac786)

Signed-off-by: Alexander Kanavin &lt;alex@linutronix.de&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>
