diff options
author | BrainDamage | 2021-03-02 01:19:49 +0100 |
---|---|---|
committer | BrainDamage | 2021-03-02 01:19:49 +0100 |
commit | a62cc9a2c6ac8bd91b42ac66e4c195de034c37ec (patch) | |
tree | 9ac8c094ab369adc36f9eed487661c53bea00950 | |
parent | be97f09385eb18e92c32a67dba0278fe25312013 (diff) | |
download | aur-a62cc9a2c6ac8bd91b42ac66e4c195de034c37ec.tar.gz |
post install instructions take #2 since upstream changed behavior and won't overwrite existing files anymore
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 8 | ||||
-rw-r--r-- | mx-puppet-discord.install | 10 |
3 files changed, 11 insertions, 9 deletions
@@ -1,7 +1,7 @@ pkgbase = mx-puppet-discord-git pkgdesc = This is a Matrix bridge for Discord pkgver = r242.a3b493d - pkgrel = 2 + pkgrel = 3 url = https://github.com/matrix-discord/mx-puppet-discord install = mx-puppet-discord.install arch = x86_64 @@ -1,6 +1,6 @@ pkgname=mx-puppet-discord-git pkgver=r242.a3b493d -pkgrel=2 +pkgrel=3 # strip the -git suffix from name _dirname="${pkgname%-git}" _basename="${pkgname%-git}" @@ -31,11 +31,6 @@ pkgver() { # r1581.2b039da # else fallback } -prepare() { - cd "${srcdir}/${_dirname}" - touch registration.yaml -} - build(){ cd "${srcdir}/${_dirname}" export npm_config_jobs=$(echo "$MAKEFLAGS" | sed -E 's/.*-?-j(obs)? ?([[:digit:]]+).*/\2/') @@ -60,5 +55,4 @@ package() { install -Dm 644 "${srcdir}/${_basename}.service" "${pkgdir}/usr/lib/systemd/system/${_basename}.service" install -Dvm 640 sample.config.yaml "${pkgdir}/etc/${_basename}/config.yaml" - install -Dvm 640 registration.yaml "${pkgdir}/etc/${_basename}/registration.yaml" } diff --git a/mx-puppet-discord.install b/mx-puppet-discord.install index 6c7d8ee9e2dc..66662598eb4a 100644 --- a/mx-puppet-discord.install +++ b/mx-puppet-discord.install @@ -1,6 +1,14 @@ post_install() { cat <<- 'EOF' after editing /etc/mx-puppet-discord/config.yaml, generate a registration file using: - # node /usr/lib/node_modules/mx-puppet-discord/build/index.js -c /etc/mx-puppet-discord/config.yaml -r -f /etc/mx-puppet-discord/registration.yaml + # node /usr/lib/node_modules/mx-puppet-discord/build/index.js -c /etc/mx-puppet-discord/config.yaml -r -f /root/registration.yaml + # chmod 640 /root/registration.yaml + # chown root:mx-puppet-discord /root/registration.yaml + # mv /root/registration.yaml /etc/mx-puppet-discord/registration.yaml + + the instruction have been slightly altered from upstream to prevent shared secrets to be made world-readable on creation + + if synapse runs in the same machine, to grant it permission to access the registration file, all one needs is to add it to the mx-puppet-discord group: + # usermod -aG mx-puppet-discord synapse EOF } |