summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@microsoft.com>2020-04-16 09:49:32 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-04-15 22:56:23 +0100
commit545c067f9a48dd91cde766e4ebcf5df3ab44d5df (patch)
tree26b9c9ce1bf8883e33892e0fca3282547165a4c3
parent5d47cdf448b6cff5bb7cc5b0ba0426b8235ec478 (diff)
downloadpoky-545c067f9a48dd91cde766e4ebcf5df3ab44d5df.tar.gz
dev-manual: basic updates for npm fetcher changes
Update the npm:// URL and the generated npm recipe, and remove references to NPM_SHRINKWRAP, NPM_LOCKDOWN and lockdown functionality in general. (From yocto-docs rev: bc09233543abbf28adfcc1e214f85ef4c7c56639) Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml52
1 files changed, 21 insertions, 31 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index 8bb8612e0f..fedc715712 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -10590,7 +10590,7 @@
10590 <filename>devtool</filename> and the NPM fetcher to 10590 <filename>devtool</filename> and the NPM fetcher to
10591 create the recipe: 10591 create the recipe:
10592 <literallayout class='monospaced'> 10592 <literallayout class='monospaced'>
10593 $ devtool add "npm://registry.npmjs.org;name=cute-files;version=1.0.2" 10593 $ devtool add "npm://registry.npmjs.org;package=cute-files;version=1.0.2"
10594 </literallayout> 10594 </literallayout>
10595 The <filename>devtool add</filename> command runs 10595 The <filename>devtool add</filename> command runs
10596 <filename>recipetool create</filename> and uses the 10596 <filename>recipetool create</filename> and uses the
@@ -10615,25 +10615,13 @@
10615 </para> 10615 </para>
10616 10616
10617 <para> 10617 <para>
10618 <filename>recipetool</filename> creates "shrinkwrap" and 10618 <filename>recipetool</filename> creates a "shrinkwrap" file
10619 "lockdown" files for your recipe. 10619 for your recipe.
10620 Shrinkwrap files capture the version of all dependent 10620 Shrinkwrap files capture the version of all dependent
10621 modules. 10621 modules.
10622 Many packages do not provide shrinkwrap files. 10622 Many packages do not provide shrinkwrap files.
10623 <filename>recipetool</filename> create a shrinkwrap 10623 <filename>recipetool</filename> create a shrinkwrap
10624 file as it runs. 10624 file as it runs.
10625 You can replace the shrinkwrap file with your own file
10626 by setting the <filename>NPM_SHRINKWRAP</filename>
10627 variable.
10628 </para>
10629
10630 <para>
10631 Lockdown files contain the checksum for each module
10632 to determine if your users download the same files when
10633 building with a recipe.
10634 Lockdown files ensure that dependencies have not been
10635 changed and that your NPM registry is still providing
10636 the same file.
10637 <note> 10625 <note>
10638 A package is created for each sub-module. 10626 A package is created for each sub-module.
10639 This policy is the only practical way to have the 10627 This policy is the only practical way to have the
@@ -10648,23 +10636,26 @@
10648 <literallayout class='monospaced'> 10636 <literallayout class='monospaced'>
10649 $ devtool edit-recipe cute-files 10637 $ devtool edit-recipe cute-files
10650 SUMMARY = "Turn any folder on your computer into a cute file browser, available on the local network." 10638 SUMMARY = "Turn any folder on your computer into a cute file browser, available on the local network."
10651 LICENSE = "BSD-3-Clause &amp; Unknown &amp; MIT &amp; ISC" 10639 LICENSE = "MIT &amp; ISC &amp; Unknown"
10652 LIC_FILES_CHKSUM = "file://LICENSE;md5=71d98c0a1db42956787b1909c74a86ca \ 10640 LIC_FILES_CHKSUM = "file://LICENSE;md5=71d98c0a1db42956787b1909c74a86ca \
10653 file://node_modules/content-disposition/LICENSE;md5=c6e0ce1e688c5ff16db06b7259e9cd20 \ 10641 file://node_modules/toidentifier/LICENSE;md5=1a261071a044d02eb6f2bb47f51a3502 \
10654 file://node_modules/express/LICENSE;md5=5513c00a5c36cd361da863dd9aa8875d \ 10642 file://node_modules/debug/LICENSE;md5=ddd815a475e7338b0be7a14d8ee35a99 \
10655 ... 10643 ...
10656 10644
10657 SRC_URI = "npm://registry.npmjs.org;name=cute-files;version=${PV}" 10645 SRC_URI = " \
10658 NPM_SHRINKWRAP := "${THISDIR}/${PN}/npm-shrinkwrap.json" 10646 npm://registry.npmjs.org/;package=cute-files;version=${PV} \
10659 NPM_LOCKDOWN := "${THISDIR}/${PN}/lockdown.json" 10647 npmsw://${THISDIR}/${BPN}/npm-shrinkwrap.json \
10648 "
10649
10650 S = "${WORKDIR}/npm"
10651
10660 inherit npm 10652 inherit npm
10661 # Must be set after inherit npm since that itself sets S
10662 S = "${WORKDIR}/npmpkg"
10663 10653
10664 LICENSE_${PN}-content-disposition = "MIT"
10665 ...
10666 LICENSE_${PN}-express = "MIT"
10667 LICENSE_${PN} = "MIT" 10654 LICENSE_${PN} = "MIT"
10655 LICENSE_${PN}-accepts = "MIT"
10656 LICENSE_${PN}-array-flatten = "MIT"
10657 ...
10658 LICENSE_${PN}-vary = "MIT"
10668 </literallayout> 10659 </literallayout>
10669 Three key points exist in the previous example: 10660 Three key points exist in the previous example:
10670 <itemizedlist> 10661 <itemizedlist>
@@ -10757,11 +10748,10 @@
10757 However, the <filename>SRC_URI</filename> looks like the 10748 However, the <filename>SRC_URI</filename> looks like the
10758 following: 10749 following:
10759 <literallayout class='monospaced'> 10750 <literallayout class='monospaced'>
10760 SRC_URI = "git://github.com/martinaglv/cute-files.git;protocol=https \ 10751 SRC_URI = " \
10761 npm://registry.npmjs.org;name=commander;version=2.9.0;subdir=node_modules/commander \ 10752 git://github.com/martinaglv/cute-files.git;protocol=https \
10762 npm://registry.npmjs.org;name=express;version=4.14.0;subdir=node_modules/express \ 10753 npmsw://${THISDIR}/${BPN}/npm-shrinkwrap.json \
10763 npm://registry.npmjs.org;name=content-disposition;version=0.3.0;subdir=node_modules/content-disposition \ 10754 "
10764 "
10765 </literallayout> 10755 </literallayout>
10766 In this example, the main module is taken from the Git 10756 In this example, the main module is taken from the Git
10767 repository and dependents are taken from the NPM registry. 10757 repository and dependents are taken from the NPM registry.