summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorStijn Seghers2020-05-03 18:23:44 +1200
committerStijn Seghers2020-05-03 18:23:44 +1200
commite1002f13fcc953ba01878dde179667c426a9d27d (patch)
tree5a6b94dccb9d5e64636f9103d00286ded28ae0d6
parent3c80c150644ceed5ae4d2edd17b9fe842136a5e0 (diff)
downloadaur-stylelint-config-standard.tar.gz
Ensure correct file ownership & permissions
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD11
2 files changed, 9 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2715edb88c0d..f8bc1da587a6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = stylelint-config-standard
pkgdesc = The standard shareable config for stylelint
pkgver = 20.0.0
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/stylelint/stylelint-config-standard
arch = any
license = MIT
diff --git a/PKGBUILD b/PKGBUILD
index 82b956ae38f4..5cca038c038b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=stylelint-config-standard
pkgver=20.0.0
-pkgrel=1
+pkgrel=2
pkgdesc='The standard shareable config for stylelint'
arch=('any')
url="https://github.com/stylelint/$pkgname"
@@ -14,11 +14,16 @@ noextract=("$pkgname-$pkgver.tgz")
sha256sums=('319be7098308a54e59148bd874eb97a25febf0b33c677d88b4adb87884720d79')
package() {
- npm install -g --prefix "$pkgdir/usr" "$srcdir/$pkgname-$pkgver.tgz"
+ npm install -g --user root --prefix "$pkgdir/usr" "$srcdir/$pkgname-$pkgver.tgz"
- # For some odd reason, npm makes some directories world writeable D:
+ # 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 {} +
+ # npm gives ownership of ALL FILES to build user
+ # https://bugs.archlinux.org/task/63396
+ chown -R root:root "$pkgdir"
+
# Install license in the usual place
local _npmdir="$pkgdir/usr/lib/node_modules/"
install -Dm644 "$_npmdir/$pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"