<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/bb/fetch2/npm.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: fetch2/npm: Remove special caracters that causes recipe tool to fail</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:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=55f2e2035035ac52c096018dbb38103c5301082c'/>
<id>urn:sha1:55f2e2035035ac52c096018dbb38103c5301082c</id>
<content type='text'>
Packages like @(._.)/execute causes problems because they generate names
that are not supported by yocto

(Bitbake rev: b2e1be67d2acca27451bed59874bc1c2a7ec44a6)

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/npm: evaluate PATH before patching HOME</title>
<updated>2023-05-25T12:16:24+00:00</updated>
<author>
<name>Arno Baumfalk</name>
<email>a.baumfalk@astro-kom.de</email>
</author>
<published>2023-05-16T15:18:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=34004afb65cd5c677b8e2c944144eeb91d86abfd'/>
<id>urn:sha1:34004afb65cd5c677b8e2c944144eeb91d86abfd</id>
<content type='text'>
When the user configures the TMPDIR variable in a way that it contains $HOME (in local.conf), the DataSmart (d) object's PATH variable will also contain $HOME.

As the NpmEnvironment patches HOME with a temporary directory, further evaluation of PATH will become invalid an the build breaks with an error (npm not found).

As countermeasure PATH is evaluated *before* patching HOME.

(Bitbake rev: 893f3b116b628457fe0bfaf4b8394b1cd05a90a5)

Signed-off-by: Arno Baumfalk &lt;a.baumfalk@astro-kom.de&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: Fix npm to use https rather than http</title>
<updated>2022-09-01T09:07:00+00:00</updated>
<author>
<name>Neil Horman</name>
<email>nhorman@gmail.com</email>
</author>
<published>2022-08-30T11:44:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=9e22a3cccf69a54384767c8d2f22b4badcdab36c'/>
<id>urn:sha1:9e22a3cccf69a54384767c8d2f22b4badcdab36c</id>
<content type='text'>
Hit this error while building nlf-native recently:
{
  "error": {
    "summary": "URI malformed",
    "detail": ""
  }
}

Some poking about led me to discover that:
1) The npm.py tool replaces npm:// with http://, not https://
2) Some versions of the npm tool don't handle 301 redirects properly,
   choosing to display the above error instead when using the default
   nodejs registry

It would be good to go fix npm to handle the redirect properly, but it
seems like it would also be good to assume secure http when contacting a
registry, hence, this patch

(Bitbake rev: 2cd76e8aabe4e803c760e60f06cfe1f470714ec7)

Signed-off-by: Neil Horman &lt;nhorman@gmail.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: fetch: npm: Use temporary file for empty user config</title>
<updated>2021-12-14T22:47:04+00:00</updated>
<author>
<name>Stefan Herbrechtsmeier</name>
<email>stefan.herbrechtsmeier@weidmueller.com</email>
</author>
<published>2021-12-13T11:13:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=31bc9cab25692fd0b07dbd994afd93802e93d6bf'/>
<id>urn:sha1:31bc9cab25692fd0b07dbd994afd93802e93d6bf</id>
<content type='text'>
Always use a temporary file for the user config 'NPM_CONFIG_USERCONFIG'
because npm otherwise failed if configs and npmrc aren't set:

double-loading config "/dev/null" as "global", previously loaded as "user"

(Bitbake rev: 9f272ad7f76c1559e745e9af686d0a529f917659)

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: fetch: npm: Quote destdir in run chmod command</title>
<updated>2021-12-14T22:47:04+00:00</updated>
<author>
<name>Stefan Herbrechtsmeier</name>
<email>stefan.herbrechtsmeier@weidmueller.com</email>
</author>
<published>2021-12-13T11:13:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=bb42e4b35601a2fe94c93b4c35c6d59a3e439606'/>
<id>urn:sha1:bb42e4b35601a2fe94c93b4c35c6d59a3e439606</id>
<content type='text'>
Quote destdir in run chmod command to support special characters in
package name and to avoid syntax error for packages like
'@(._.)/execute'.

(Bitbake rev: a701dfce3f0e74b4d7c687eeda83fe9c8e7240b1)

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: npm: Create config npmrc in environment instantiation</title>
<updated>2021-10-08T15:45:05+00:00</updated>
<author>
<name>Stefan Herbrechtsmeier</name>
<email>stefan.herbrechtsmeier@weidmueller.com</email>
</author>
<published>2021-10-06T14:35:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=00f2b6d0b70a067e88957585a50183548a0d92a4'/>
<id>urn:sha1:00f2b6d0b70a067e88957585a50183548a0d92a4</id>
<content type='text'>
Create a configuration npmrc per npm environment to avoid repeated
creation of the same configuration file. Create the file via python to
avoid multiple npm config calls and add the ability to pass a file
path instead of a temporary file.

Deprecate the npm configs argument of the run function. The configs
should be passed to npm environment or as command specific arguments.

(Bitbake rev: 2c2df49b06a2bad7a5b8872a9998338a4660498f)

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: npm: Support npm archives with missing search directory mode</title>
<updated>2021-10-08T15:45:05+00:00</updated>
<author>
<name>Stefan Herbrechtsmeier</name>
<email>stefan.herbrechtsmeier@weidmueller.com</email>
</author>
<published>2021-10-06T14:35:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d2d40e733248b94b28a1cb5a0f69dc8cb5860fd9'/>
<id>urn:sha1:d2d40e733248b94b28a1cb5a0f69dc8cb5860fd9</id>
<content type='text'>
Delay directory restore and set execute/search directory mode bits in
unpack to support npm archives with a missing search directory mode.

(Bitbake rev: 60cbd34d3da8f0f523281aad7eec93eec9cd4db8)

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/npm: refactor the npm fetcher</title>
<updated>2020-01-27T16:48:10+00:00</updated>
<author>
<name>Jean-Marie LEMETAYER</name>
<email>jean-marie.lemetayer@savoirfairelinux.com</email>
</author>
<published>2020-01-24T17:08:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d842e9e738e14fc54c21434755033d6eb6b6f3f2'/>
<id>urn:sha1:d842e9e738e14fc54c21434755033d6eb6b6f3f2</id>
<content type='text'>
This commit refactors the npm fetcher to improve some points and fix
others:

 - The big change is that the fetcher is only fetching the package
   source and no more the dependencies. Thus the npm fetcher act as the
   other fetchers e.g git, wget. The dependencies will be handled later.

 - The fetcher only resolves the url of the package using 'npm view' and
   then forwards it to a proxy fetcher.

 - This commit also fixes a lot of issues with the package names (exotic
   characters, scoped packages) which were badly handled.

 - The validation files - lockdown.json and npm-shrinkwrap.json - are no
   longer used by the fetcher. Instead, the downloaded tarball is
   verified with the 'integrity' and 'shasum' provided in the 'npm view'
   of the package [1][2].

1: https://docs.npmjs.com/files/package-lock.json#integrity
2: https://www.w3.org/TR/SRI

(Bitbake rev: 0f451cdc43130d503ada53ed1b4fc5a24943f6ef)

Signed-off-by: Jean-Marie LEMETAYER &lt;jean-marie.lemetayer@savoirfairelinux.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
