fix: Failed to create tempfile to write updated config to disk

This commit is contained in:
nick 2022-10-16 20:12:48 +02:00
parent 7bfe426415
commit 4bcd24ec80
5 changed files with 20 additions and 18 deletions

View file

@ -1,7 +1,7 @@
pkgbase = maubot
pkgdesc = A plugin-based Matrix bot system
pkgver = 0.3.1
pkgrel = 2
pkgrel = 3
url = https://github.com/maubot/maubot
install = maubot.install
arch = any
@ -29,14 +29,14 @@ pkgbase = maubot
optdepends = python-olm: e2be
optdepends = python-pycryptodome: e2be
optdepends = python-unpaddedbase64: e2be
backup = etc/maubot.yaml
backup = etc/maubot/config.yaml
source = maubot-0.3.1.tar.gz::https://github.com/maubot/maubot/archive/v0.3.1.tar.gz
source = sysusers-maubot.conf
source = tmpfiles-maubot.conf
source = maubot.service
sha256sums = f3189ab1846274efe20649ecd31943a1c7b12ecb52d845e62d8e7a0fdf3db933
sha256sums = e2f01fd60338dd576bb72dee2f536210cb54540ace4a40aa94b5aebe6944ba0f
sha256sums = 5735aedc078a0363e40f03b6be79f3bee406565d648b3529a828e6e133b034ab
sha256sums = 4be80b61a0278bfc15434d32d1f38e8ebb67695782294560c2683c0bfbb4482b
sha256sums = 3fda190e5e5a2dff7c6192c27427a902c286069fac6b56e9abf61b021d49bf9a
sha256sums = 8dfbed8ad630cc5ab0e111a7e5da3245ddf82881a00ed6b540bfdcb7ece33083
pkgname = maubot

View file

@ -6,7 +6,7 @@
pkgname=maubot
pkgver=0.3.1
pkgrel=2
pkgrel=3
pkgdesc="A plugin-based Matrix bot system"
arch=(any)
license=(AGPLv3)
@ -18,7 +18,7 @@ optdepends=(
"python-pycryptodome: e2be"
"python-unpaddedbase64: e2be"
)
backup=(etc/${pkgname}.yaml)
backup=(etc/${pkgname}/config.yaml)
install=${pkgname}.install
source=("${pkgname}-${pkgver/_rc/-rc}.tar.gz"::"${url}/archive/v${pkgver/_rc/-rc}.tar.gz"
"sysusers-${pkgname}.conf"
@ -26,8 +26,8 @@ source=("${pkgname}-${pkgver/_rc/-rc}.tar.gz"::"${url}/archive/v${pkgver/_rc/-rc
"${pkgname}.service")
sha256sums=('f3189ab1846274efe20649ecd31943a1c7b12ecb52d845e62d8e7a0fdf3db933'
'e2f01fd60338dd576bb72dee2f536210cb54540ace4a40aa94b5aebe6944ba0f'
'5735aedc078a0363e40f03b6be79f3bee406565d648b3529a828e6e133b034ab'
'4be80b61a0278bfc15434d32d1f38e8ebb67695782294560c2683c0bfbb4482b')
'3fda190e5e5a2dff7c6192c27427a902c286069fac6b56e9abf61b021d49bf9a'
'8dfbed8ad630cc5ab0e111a7e5da3245ddf82881a00ed6b540bfdcb7ece33083')
prepare() {
cd "${pkgname}-${pkgver/_rc/-rc}"
@ -47,8 +47,8 @@ package() {
install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
cd "${pkgname}"
install -Dm640 example-config.yaml ${pkgdir}/etc/${pkgname}.yaml
install -Dm640 example-config.yaml ${pkgdir}/usr/share/${pkgname}/example-config.yaml
install -Dm600 example-config.yaml ${pkgdir}/etc/${pkgname}/config.yaml
install -Dm600 example-config.yaml ${pkgdir}/usr/share/${pkgname}/example-config.yaml
cd "${srcdir}/"
install -Dm644 maubot.service -t ${pkgdir}/usr/lib/systemd/system/

View file

@ -1,6 +1,6 @@
post_upgrade() {
msg2 'upgrade database'
sudo -u maubot python -m maubot -c etc/maubot.yaml upgrade head
sudo -u maubot python -m maubot -c etc/maubot/config.yaml upgrade head
}
post_remove() {

View file

@ -6,9 +6,10 @@ Type=simple
User=maubot
Group=maubot
WorkingDirectory=/var/lib/maubot/
ExecStart=/bin/python -m maubot -c /etc/maubot.yaml
ExecStart=/bin/python -m maubot -c /etc/maubot/config.yaml
Restart=always
RestartSec=3
RestartSec=30
SyslogIdentifier=maubot
[Install]
WantedBy=multi-user.target

View file

@ -1,5 +1,6 @@
d /var/lib/maubot 0740 maubot maubot -
d /var/lib/maubot/logs 0740 maubot maubot -
d /var/lib/maubot/plugins 0740 maubot maubot -
d /var/lib/maubot/trash 0740 maubot maubot -
f /etc/maubot.yaml 0640 maubot maubot -
d /var/lib/maubot 0700 maubot maubot -
d /var/lib/maubot/logs 0700 maubot maubot -
d /var/lib/maubot/plugins 0700 maubot maubot -
d /var/lib/maubot/trash 0700 maubot maubot -
d /etc/maubot 0700 maubot maubot -
f /etc/maubot/config.yaml 0600 maubot maubot -