From 905a7917f82d15585042b617a1d1485285db626a Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Fri, 23 Jul 2021 07:58:15 +0200 Subject: [PATCH] bundles/matrix*: fix directories/repos --- bundles/matrix-media-repo/metadata.py | 18 ++++++++++-------- bundles/matrix-synapse/metadata.py | 2 +- bundles/mautrix-telegram/items.py | 1 + bundles/mautrix-whatsapp/items.py | 1 + bundles/mx-puppet-discord/items.py | 10 +++++++++- 5 files changed, 22 insertions(+), 10 deletions(-) diff --git a/bundles/matrix-media-repo/metadata.py b/bundles/matrix-media-repo/metadata.py index 0b753db..f09dce7 100644 --- a/bundles/matrix-media-repo/metadata.py +++ b/bundles/matrix-media-repo/metadata.py @@ -5,14 +5,6 @@ defaults = { 'imagemagick': {}, 'ffmpeg': {}, }, - 'repos': { - 'backports': { - 'install_gpg_key': False, # default debian signing key - 'items': { - 'deb http://deb.debian.org/debian {os_release}-backports main', - }, - }, - }, }, 'backups': { 'paths': { @@ -75,6 +67,16 @@ defaults = { }, } +if node.os == 'debian' and node.os_version[0] <= 10: + defaults['apt']['repos'] = { + 'backports': { + 'install_gpg_key': False, # default debian signing key + 'items': { + 'deb http://deb.debian.org/debian {os_release}-backports main', + }, + }, + } + @metadata_reactor.provides( 'matrix-media-repo/workers', diff --git a/bundles/matrix-synapse/metadata.py b/bundles/matrix-synapse/metadata.py index 189483a..33ff576 100644 --- a/bundles/matrix-synapse/metadata.py +++ b/bundles/matrix-synapse/metadata.py @@ -5,7 +5,7 @@ defaults = { 'repos': { 'matrix': { 'items': { - 'deb https://packages.matrix.org/debian buster main', + 'deb https://packages.matrix.org/{os} {os_release} main', }, }, }, diff --git a/bundles/mautrix-telegram/items.py b/bundles/mautrix-telegram/items.py index 8446475..a8f1bde 100644 --- a/bundles/mautrix-telegram/items.py +++ b/bundles/mautrix-telegram/items.py @@ -32,6 +32,7 @@ users = { } directories = { + '/opt/mautrix-telegram': {}, '/opt/mautrix-telegram/src': {}, } diff --git a/bundles/mautrix-whatsapp/items.py b/bundles/mautrix-whatsapp/items.py index df88ab7..ae88365 100644 --- a/bundles/mautrix-whatsapp/items.py +++ b/bundles/mautrix-whatsapp/items.py @@ -5,6 +5,7 @@ users = { } directories = { + '/opt/mautrix-whatsapp': {}, '/opt/mautrix-whatsapp/src': {}, '/opt/mautrix-whatsapp/logs': { 'owner': 'mautrix-whatsapp', diff --git a/bundles/mx-puppet-discord/items.py b/bundles/mx-puppet-discord/items.py index 27bddea..a8a7593 100644 --- a/bundles/mx-puppet-discord/items.py +++ b/bundles/mx-puppet-discord/items.py @@ -1,6 +1,11 @@ repo.libs.tools.require_bundle(node, 'nodejs') directories = { + '/opt/mx-puppet-discord': {}, + '/opt/mx-puppet-discord/.npm': { + 'owner': 'mx-puppet-discord', + 'group': 'mx-puppet-discord', + }, '/opt/mx-puppet-discord/src': { 'owner': 'mx-puppet-discord', 'group': 'mx-puppet-discord', @@ -54,8 +59,11 @@ git_deploy = { actions = { 'mx-puppet-discord_chown': { - 'command': 'chown -R mx-puppet-discord:mx-puppet-discord /opt/mx-puppet-discord/src', + 'command': + 'chown -R mx-puppet-discord:mx-puppet-discord /opt/mx-puppet-discord/src && ' + 'chown -R mx-puppet-discord:mx-puppet-discord /opt/mx-puppet-discord/.npm', 'needs': { + 'directory:/opt/mx-puppet-discord/.npm', 'user:mx-puppet-discord', }, 'triggered': True,