diff options
author | AlphaJack | 2022-09-05 17:51:22 +0200 |
---|---|---|
committer | AlphaJack | 2022-09-05 17:51:22 +0200 |
commit | a5641c7e5d4e3eccc7646fbd7e2314579a75d497 (patch) | |
tree | bc8b30ec3964110c1aac68f764fef47a64792b48 | |
parent | 5f23de0b957ea2a9c8d4a9a1af1cf8380afccf7a (diff) | |
download | aur-a5641c7e5d4e3eccc7646fbd7e2314579a75d497.tar.gz |
Updated required installation and maintenance steps
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 5 | ||||
-rw-r--r-- | dendrite.install | 39 | ||||
-rw-r--r-- | dendrite.tmpfiles | 2 |
4 files changed, 35 insertions, 15 deletions
@@ -1,7 +1,7 @@ pkgbase = dendrite pkgdesc = A second-generation Matrix homeserver written in Go pkgver = 0.9.6 - pkgrel = 1 + pkgrel = 2 url = https://matrix-org.github.io/dendrite/ install = dendrite.install arch = x86_64 @@ -18,7 +18,7 @@ pkgbase = dendrite source = dendrite.service sha256sums = 408adccc67545a91bab5a533bf8be6eb9773025290013c2f0adb8bcbad124af1 sha256sums = aba328d7a7244e82f866f9d0ead0a53e79e1590b9c449ad6d18ff2659cb5e035 - sha256sums = 8da956f9fcc7c6ea844cea53c823fcfa4376acf04ecd9bceb1a908a85846c90f + sha256sums = 620b634419e94cb09423d39ecd7edf859bf458e9d72c35be30610b37acc1e8bf sha256sums = 2ce2e6fd819087bc47f4b369205afeaf0070dacf3305efcfbec5365bd11af6e7 pkgname = dendrite @@ -3,7 +3,7 @@ pkgname="dendrite" pkgver=0.9.6 -pkgrel=1 +pkgrel=2 pkgdesc="A second-generation Matrix homeserver written in Go" url="https://matrix-org.github.io/dendrite/" license=("Apache") @@ -16,7 +16,7 @@ source=("$pkgname-$pkgver.tar.gz::https://github.com/matrix-org/dendrite/archive "$pkgname.service") sha256sums=('408adccc67545a91bab5a533bf8be6eb9773025290013c2f0adb8bcbad124af1' 'aba328d7a7244e82f866f9d0ead0a53e79e1590b9c449ad6d18ff2659cb5e035' - '8da956f9fcc7c6ea844cea53c823fcfa4376acf04ecd9bceb1a908a85846c90f' + '620b634419e94cb09423d39ecd7edf859bf458e9d72c35be30610b37acc1e8bf' '2ce2e6fd819087bc47f4b369205afeaf0070dacf3305efcfbec5365bd11af6e7') install="$pkgname.install" @@ -49,6 +49,7 @@ package(){ install -D -m 755 "generate-config" "$pkgdir/usr/bin/$pkgname-generate-config" install -D -m 755 "generate-keys" "$pkgdir/usr/bin/$pkgname-generate-keys" install -D -m 755 "create-account" "$pkgdir/usr/bin/$pkgname-create-account" + install -d -m 750 "$pkgdir/etc/$pkgname" install -D -m 644 "$pkgname-sample.monolith.yaml" "$pkgdir/etc/$pkgname/config-example.yaml" install -D -m 644 "$srcdir/$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service" install -D -m 644 "$srcdir/$pkgname.sysusers" "$pkgdir/usr/lib/sysusers.d/$pkgname.conf" diff --git a/dendrite.install b/dendrite.install index a14637dcf15e..ccafbc12696e 100644 --- a/dendrite.install +++ b/dendrite.install @@ -1,19 +1,27 @@ post_install(){ cat <<INFO -You should now generate a new configuration either with +Dendrite has been installed, you should now generate a new configuration and a private key files by running - sudo cp /etc/dendrite/config-example.yaml /etc/dendrite/config.yaml + dendrite-generate-config --dir "/var/lib/dendrite" | sudo -u dendrite tee "/etc/dendrite/config.yaml" + +and then -or + sudo -u dendrite dendrite-generate-keys --private-key "/var/lib/dendrite/matrix_key.pem" + +An example configuration file with comments can be found at - dendrite-generate-config | sudo tee /etc/dendrite/config.yaml + /etc/dendrite/config-example.yaml + +You can start the Dentrite server by running + + sudo systemctl start dendrite INFO } post_upgrade(){ - # notify about breaking changes + # notify about breaking changes from v1 to v2 # https://wiki.archlinux.org/title/PKGBUILD#install if [[ $1 != 0.6* ]] && [[ $2 == 0.6* ]]; then cat <<INFO @@ -23,14 +31,25 @@ You are advised to backup your previous configuration located at /etc/dendrite/config.yaml -and generate a new one either copying +and generate a new configuration by running - /etc/dendrite/config-example.yaml + dendrite-generate-config --dir "/var/lib/dendrite" | sudo -u dendrite tee "/etc/dendrite/config.yaml" -or by running +INFO + fi - dendrite-generate-config | sudo tee /etc/dendrite/config.yaml + # tee cannot be used to replace the input file, mv is necessary + cat <<INFO + +Dendrite has been updated, you should now update its configuration file by running + + sudo -u dendrite bash + cd "/var/lib/dendrite" + dendrite-generate-config --normalise "/etc/dendrite/config.yaml" | tee "/etc/dendrite/config.yaml.new" + mv "/etc/dendrite/config.yaml" "/etc/dendrite/config.yaml.bkp" + mv "/etc/dendrite/config.new" "/etc/dendrite/config.yaml" + exit + sudo systemctl restart dendrite INFO - fi } diff --git a/dendrite.tmpfiles b/dendrite.tmpfiles index c1ada22e671b..ca861742f338 100644 --- a/dendrite.tmpfiles +++ b/dendrite.tmpfiles @@ -1,3 +1,3 @@ -d /etc/dendrite 0750 root dendrite - +d /etc/dendrite 0750 dendrite dendrite - d /var/lib/dendrite 0700 dendrite dendrite - d /var/log/dendrite 0700 dendrite dendrite - |