summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Chimento2021-04-16 21:39:17 +0300
committerDoug Chimento2021-04-16 21:39:17 +0300
commita24637ebd799a3ca3632a80754993df60d3c65b9 (patch)
treee877fdd6d8946aaaf02794846b581ed1dad321c8
parent56c0f32cfc17de38e608caba4f444fc4f36e5b7e (diff)
downloadaur-a24637ebd799a3ca3632a80754993df60d3c65b9.tar.gz
change ownership of files after package
-rw-r--r--PKGBUILD10
1 files changed, 8 insertions, 2 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 75ce493459bb..060b19cbb4e3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@ _npmname=btc-rpc-explorer
_npmver=3.1.0
pkgname=${_npmname}
pkgver=${_npmver}
-pkgrel=1
+pkgrel=2
pkgdesc="Simple, database-free Bitcoin blockchain explorer, via RPC to Bitcoin Core"
arch=(any)
url="https://github.com/janoside/btc-rpc-explorer"
@@ -19,9 +19,15 @@ sha256sums=('639f655f3f2e8dd230faa8807d4903c6f7d6c0425d1d9dbe8ae0559977dd95ea'
'98a6cdcf741807d2cc98825b074a882e520563b7b6528c24d2abd090bc007d0a')
package() {
- chown -R root:root "${pkgdir}"
npm install -g --prefix "${pkgdir}/usr" --cache "${srcdir}/npm-cache" "${srcdir}/$_npmname-$_npmver.tgz"
+ # Non-deterministic race in npm gives 777 permissions to random directories.
+ # See https://github.com/npm/cli/issues/1103 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 -Dm640 ${pkgname}.default "${pkgdir}/etc/default/${pkgname}"
install -Dm644 ${pkgname}.service "${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
echo "u ${pkgname} - - /var/lib/${pkgname}" | install -Dm644 /dev/stdin "${pkgdir}"/usr/lib/sysusers.d/"${pkgname}".conf