<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/bb/fetch2/npmsw.py, branch yocto-5.0</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=yocto-5.0</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=yocto-5.0'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2023-10-15T08:12:43+00:00</updated>
<entry>
<title>bitbake: fetch2: Add API for upstream source tracing</title>
<updated>2023-10-15T08:12:43+00:00</updated>
<author>
<name>Alberto Pianon</name>
<email>alberto@pianon.eu</email>
</author>
<published>2023-10-01T07:52:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=ef3e46afd910d4b7727d42c4c18b501525c65695'/>
<id>urn:sha1:ef3e46afd910d4b7727d42c4c18b501525c65695</id>
<content type='text'>
This patch adds an API to bb.fetch2 to enable users to plug in an unpack
tracer that can trace each source file back to its corresponding
upstream source url, even when multiple upstream sources are combined
together in the same unpack directory. This may be required for software
composition analysis, license compliance, and detailed SBoM generation.

This patch provides only the needed hooks in bb.fetch2 code and a dummy
abstract class defining the API; users may load their own unpack tracer
class by setting the BB_UNPACK_TRACER_CLASS config parameter.

(Bitbake rev: 05051152cc42acc52bcf9af9a696f632fac4307f)

Signed-off-by: Alberto Pianon &lt;alberto@pianon.eu&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bitbake: fetch2/npmsw: Check if there are dependencies before trying to fetch them</title>
<updated>2023-08-04T10:48:26+00:00</updated>
<author>
<name>BELOUARGA Mohamed</name>
<email>m.belouarga@technologyandstrategy.com</email>
</author>
<published>2023-07-20T23:41:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=1f92db2d2cadf623f8799d7c58495a6158d3d405'/>
<id>urn:sha1:1f92db2d2cadf623f8799d7c58495a6158d3d405</id>
<content type='text'>
When there are no dependencies, _foreach_proxy_method does not verify that there are
dependencies to fetch before fetching them.

(Bitbake rev: 48a102e49448656ef25fb689af7b0971fde523e3)

Signed-off-by: BELOUARGA Mohamed &lt;m.belouarga@technologyandstrategy.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/npmsw: Support old and new shrinkwrap formats</title>
<updated>2023-06-30T08:50:46+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2023-06-30T08:49:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=8ee607b9729b6bf0bcfce71d5072f4b0386ede4d'/>
<id>urn:sha1:8ee607b9729b6bf0bcfce71d5072f4b0386ede4d</id>
<content type='text'>
"fetch2/npmsw: Add support for the new format of the shrinkwrap file"
added support for the new format shrinkwrap files but this regressed
our tests which still use the old format.

Similar to how npm handles this, support both for now until we can
migrate our tests.

(Bitbake rev: 9941b480a0e2a8b57f2ed069cd583f2784394a2b)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: fetch2/npmsw: Don't fetch dev dependencies when they are not demanded</title>
<updated>2023-06-29T10:10:39+00:00</updated>
<author>
<name>BELOUARGA Mohamed</name>
<email>m.belouarga@technologyandstrategy.com</email>
</author>
<published>2023-06-04T01:39:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d3642c2d102787cd3b12a5ad319b37a3d58220b1'/>
<id>urn:sha1:d3642c2d102787cd3b12a5ad319b37a3d58220b1</id>
<content type='text'>
Dev dependencies should not be fetched only if it is specified in the
recipe.

(Bitbake rev: 224c2bb1fd3f16ac4063dc0eb8ba43eee34ba782)

Signed-off-by: BELOUARGA Mohamed &lt;m.belouarga@technologyandstrategy.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: fetch2/npmsw: Add support for the new format of the shrinkwrap file</title>
<updated>2023-06-29T10:10:39+00:00</updated>
<author>
<name>BELOUARGA Mohamed</name>
<email>m.belouarga@technologyandstrategy.com</email>
</author>
<published>2023-06-04T01:39:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d988d3157886e044358547bf1f504b86c9f560c7'/>
<id>urn:sha1:d988d3157886e044358547bf1f504b86c9f560c7</id>
<content type='text'>
Npm is a package manager that has its own manner to handle installation of packages.
But it is not yocto friendly, for instance NPM fetch dependencies in the middle of compilation.

The shrinkwrap file changed its format over npm versions, but npm does not version
this file, so we can use it properly.
The actual changes make NPM depencies work with the actual shrinkwrap format.

(Bitbake rev: 19b9f7f0f451a636f3fdcdc1bb283ab431ede612)

Signed-off-by: BELOUARGA Mohamed &lt;m.belouarga@technologyandstrategy.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: npmsw fetcher: Avoid instantiating Fetch class if url list is empty</title>
<updated>2023-04-20T10:59:14+00:00</updated>
<author>
<name>Svend Meyland Nicolaisen</name>
<email>public@smn.dk</email>
</author>
<published>2023-04-18T20:49:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=1a1025658c61d91b1f19663cdeb9432676f88787'/>
<id>urn:sha1:1a1025658c61d91b1f19663cdeb9432676f88787</id>
<content type='text'>
Recipes containing both git and npmsw sources in the SRC_URI fail
during fetch from the shrinkwrap. It seems that when the fetcher is
fetching from the shrinkwrap, the SRCREV variable has been deleted but it
till ends up fetching from the git source resulting in an error because
SRCREV is undefined. The root cause of this is that the Fetch class defaults
to urls from the SRC_URI when the urls parameter contains an empty list. This
patch will ensure that Fetch is not instantiated if the urls list is empty.

(Bitbake rev: e602963dfd505eef08702366383358d29ee20c4d)

Signed-off-by: Svend Meyland Nicolaisen &lt;public@smn.dk&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: 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: 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: npmsw: Add support for github prefix in npm shrinkwrap version</title>
<updated>2021-11-01T11:12:16+00:00</updated>
<author>
<name>Stefan Herbrechtsmeier</name>
<email>stefan.herbrechtsmeier@weidmueller.com</email>
</author>
<published>2021-10-28T12:41:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=e17d4895ca069d3d5b268f8be561c3651c132b5c'/>
<id>urn:sha1:e17d4895ca069d3d5b268f8be561c3651c132b5c</id>
<content type='text'>
(Bitbake rev: 1d8af6aed0a929f493d2c3e31b8d3ee3a70beb43)

Signed-off-by: Stefan Herbrechtsmeier &lt;stefan.herbrechtsmeier@weidmueller.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: fetch2: npmsw: Add support for duplicate dependencies without url</title>
<updated>2021-11-01T11:12:16+00:00</updated>
<author>
<name>Stefan Herbrechtsmeier</name>
<email>stefan.herbrechtsmeier@weidmueller.com</email>
</author>
<published>2021-10-28T13:55:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=a3a26e500a104ff6281f11c9846ec971526b190b'/>
<id>urn:sha1:a3a26e500a104ff6281f11c9846ec971526b190b</id>
<content type='text'>
(Bitbake rev: 9dcd9a3c671b24982aff9a994e31cb9f491471f5)

Signed-off-by: Stefan Herbrechtsmeier &lt;stefan.herbrechtsmeier@weidmueller.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
