[oe-commits] [openembedded-core] 11/22: classes/npm: restrict the build to be offline

git at git.openembedded.org git at git.openembedded.org
Fri Jan 24 11:27:10 UTC 2020


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 0dd3270aa39ae29d6de62b52aa9204469db8c875
Author: Jean-Marie LEMETAYER <jean-marie.lemetayer at savoirfairelinux.com>
AuthorDate: Mon Jan 20 11:26:54 2020 +0100

    classes/npm: restrict the build to be offline
    
    After the do_fetch task, every other tasks must not access the network.
    In order to ensure this point every npm command must use the offline
    configuration. In addition setting an invalid proxy is used as a safety.
    
    Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer at savoirfairelinux.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/npm.bbclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/classes/npm.bbclass b/meta/classes/npm.bbclass
index 799b2a3..cf2c120 100644
--- a/meta/classes/npm.bbclass
+++ b/meta/classes/npm.bbclass
@@ -44,6 +44,9 @@ NPM_BUILD = "${WORKDIR}/npm-build"
 def npm_global_configs(d):
     """Get the npm global configuration"""
     configs = []
+    # Ensure no network access is done
+    configs.append(("offline", "true"))
+    configs.append(("proxy", "http://invalid"))
     # Configure the cache directory
     configs.append(("cache", d.getVar("NPM_CACHE")))
     return configs

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list