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

git at git.openembedded.org git at git.openembedded.org
Mon Jan 27 16:49:13 UTC 2020


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

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

commit 1133f3ab485031df6e107f826b7398e5133f9c4d
Author: Jean-Marie LEMETAYER <jean-marie.lemetayer at savoirfairelinux.com>
AuthorDate: Fri Jan 24 18:07:32 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