Improve repo gpg keys handling

This commit is contained in:
VirtuBox
2019-08-27 20:20:25 +02:00
parent b1df4ceb0f
commit 6ec91412c0
5 changed files with 24 additions and 10 deletions

View File

@@ -82,10 +82,7 @@ class WORepo():
default keyserver is hkp://keyserver.ubuntu.com
user can provide other keyserver with keyserver="hkp://xyz"
"""
WOShellExec.cmd_exec(self, "gpg --keyserver {serv}"
WOShellExec.cmd_exec(self, "apt-key adv --keyserver {serv}"
.format(serv=(keyserver or
"hkp://keyserver.ubuntu.com")) +
" --recv-keys {key}".format(key=keyids))
WOShellExec.cmd_exec(self, "gpg -a --export --armor {0}"
.format(keyids) +
" | apt-key add - ")

View File

@@ -101,9 +101,15 @@ class WOVariables():
wo_nginx_repo = ("deb http://download.opensuse.org"
"/repositories/home:"
"/virtubox:/WordOps/Debian_10/ /")
else:
wo_nginx_repo = ("deb http://download.opensuse.org/repositories/home:"
"/virtubox:/WordOps/Raspbian_9.0/ /")
elif wo_distro == 'raspbian':
if wo_platform_codename == 'stretch':
wo_nginx_repo = ("deb http://download.opensuse.org/"
"repositories/home:"
"/virtubox:/WordOps/Raspbian_9.0/ /")
if wo_platform_codename == 'buster':
wo_nginx_repo = ("deb http://download.opensuse.org/"
"repositories/home:"
"/virtubox:/WordOps/Raspbian_10/ /")
wo_nginx = ["nginx-custom", "nginx-wo"]
wo_nginx_key = '188C9FB063F0247A'
@@ -137,14 +143,17 @@ class WOVariables():
"http://sfo1.mirrors.digitalocean.com/mariadb/repo/"
"10.3/ubuntu {codename} main"
.format(codename=wo_platform_codename))
if wo_distro == 'raspbian':
wo_mysql = ["mariadb-server", "percona-toolkit",
"python3-mysqldb"]
else:
wo_mysql_repo = ("deb [arch=amd64,ppc64el] "
"http://sfo1.mirrors.digitalocean.com/mariadb/repo/"
"10.3/debian {codename} main"
.format(codename=wo_platform_codename))
wo_mysql = ["mariadb-server", "percona-toolkit",
"python3-mysqldb", "mariadb-backup"]
wo_mysql = ["mariadb-server", "percona-toolkit",
"python3-mysqldb", "mariadb-backup"]
wo_mysql_client = ["mariadb-client", "python3-mysqldb"]