<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/bb/tests/fetch.py, branch 4.2_M3</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=4.2_M3</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=4.2_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: 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>
<entry>
<title>bitbake: tests/fetch: Allow handling of a file:// url within a submodule</title>
<updated>2022-10-26T22:02:13+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=65779419ad26a3cf3a546e8a4b8603c1434119ef'/>
<id>urn:sha1:65779419ad26a3cf3a546e8a4b8603c1434119ef</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: 209f7ba352b60722830157054e3fc56cb9c693eb)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: tests: bb.tests.fetch.URLHandle: add 2 new tests</title>
<updated>2022-10-26T11:32:08+00:00</updated>
<author>
<name>Mark Asselstine</name>
<email>mark.asselstine@windriver.com</email>
</author>
<published>2022-10-21T02:20:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=cba4d320dc410ab68d01caab8fbc72bda80c27db'/>
<id>urn:sha1:cba4d320dc410ab68d01caab8fbc72bda80c27db</id>
<content type='text'>
Add a test for special characters in user and password to qualify
decodeurl() inspired by a bug report describing that '=' signs in a
password was problematic.

Add a second test to qualify decodeurl() as related to the change in
commit 628c4bf6c89b [fetch2/__init__: handle @ in package names].

Relates to [YOCTO #14476]

(Bitbake rev: ee04cf09c7022168c035affa654773652a49793e)

Signed-off-by: Mark Asselstine &lt;mark.asselstine@windriver.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: Add test for possible gitsm deadlock</title>
<updated>2022-09-01T09:07:00+00:00</updated>
<author>
<name>Pavel Zhukov</name>
<email>pavel@zhukoff.net</email>
</author>
<published>2022-08-26T08:40:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=af64b9b31ba92321537abc67edb54b4db8abc5cc'/>
<id>urn:sha1:af64b9b31ba92321537abc67edb54b4db8abc5cc</id>
<content type='text'>
(Bitbake rev: b0506480baa9bcf3ef645b0aed5a07ad9950245c)

Signed-off-by: Pavel Zhukov &lt;pavel@zhukoff.net&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: tests: Add Timeout class</title>
<updated>2022-09-01T09:07:00+00:00</updated>
<author>
<name>Pavel Zhukov</name>
<email>pavel@zhukoff.net</email>
</author>
<published>2022-08-26T08:40:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=492ec14a372f6504ad232f60334823af27366cef'/>
<id>urn:sha1:492ec14a372f6504ad232f60334823af27366cef</id>
<content type='text'>
The class and exception aim to test rare cases there deadlocks are
possible.
Can be used in context managers:
with Timeout(&lt;value&gt;):
        do_deadlock()

(Bitbake rev: c5fcdd804d422f959a189b270d72123a50e74da6)

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