summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChih-Hsuan Yen2018-04-01 01:03:33 +0800
committerChih-Hsuan Yen2018-04-01 01:03:33 +0800
commit0d82ba2cddd5dd89e0c24217d421d848fa0710b7 (patch)
treecd80d53181400fc7db186c0401bd8d5babf67d64
parent8c32184519175f8574f558b11a77c62023d97f30 (diff)
downloadaur-0d82ba2cddd5dd89e0c24217d421d848fa0710b7.tar.gz
add a workaround for npm's permission bug
Ref: https://github.com/npm/npm/issues/9359
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD9
2 files changed, 8 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7709937c046c..48830550d5a6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = nodejs-web-ext
pkgdesc = A command line tool to help build, run, and test web extensions
pkgver = 2.6.0
- pkgrel = 1
+ pkgrel = 2
url = https://developer.mozilla.org/en-US/Add-ons/WebExtensions
arch = any
license = MPL2
diff --git a/PKGBUILD b/PKGBUILD
index c1d9be681ad2..d6db27eb6d0a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,9 +1,9 @@
-# Maintainer: Yen Chi Hsuan <yan12125 at gmail dot com>
+# Maintainer: Chih-Hsuan Yen <yan12125@gmail.com>
_npmname=web-ext
pkgname=nodejs-$_npmname # All lowercase
pkgver=2.6.0
-pkgrel=1
+pkgrel=2
pkgdesc='A command line tool to help build, run, and test web extensions'
arch=(any)
url='https://developer.mozilla.org/en-US/Add-ons/WebExtensions'
@@ -26,6 +26,11 @@ package() {
mkdir -p "$pkgdir/usr/bin"
ln -s "/usr/lib/node_modules/$_npmname/bin/$_npmname" "$pkgdir/usr/bin/$_npmname"
+
+ # Ref: https://wiki.archlinux.org/index.php/Node.js_package_guidelines
+ # Non-deterministic race in npm gives 777 permissions to random directories.
+ # See https://github.com/npm/npm/issues/9359 for details.
+ find "${pkgdir}"/usr -type d -exec chmod 755 {} +
}
# vim:set ts=2 sw=2 et: