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

@@ -8,6 +8,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### v3.9.x - [Unreleased]
### v3.9.8.4 - 2019-08-27
#### Added
- cht.sh stack : linux online cheatsheet. Usage : `cheat <command>`. Example for tar : `cheat tar`
@@ -27,6 +29,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- eXplorer filemanager isn't installed with WordOps dashboard anymore, and a flag `--extplorer` is available. But it's still installed when running the command `wo stack install`
- Template rendering function now check for a .custom file before overwriting a configuration by default.
- flag `--letsencrypt=subdomain` is not required anymore, you can use `--letsencrypt` or `-le`
- Simplify APT GPG Keys import
#### Fixed
- typo error in `wo site update` : [PR #126](https://github.com/WordOps/WordOps/pull/126)
### v3.9.8.3 - 2019-08-21

View File

@@ -67,6 +67,7 @@
- Debian 9 (Stretch)
- Debian 10 (Buster) - Not ready for production
- Raspbian 9 (Stretch)
- Raspbian 10 (Buster) - Testing
## Getting Started

View File

@@ -27,7 +27,7 @@ def pre_pref(self, apt_packages):
"""Pre settings to do before installation packages"""
if (set(WOVariables.wo_mysql).issubset(set(apt_packages)) or
set(WOVariables.wo_mysql_client).issubset(set(apt_packages)) or
set(WOVariables.wo_mysql_client).issubset(set(apt_packages))):
set(['mariadb-backup']).issubset(set(apt_packages))):
# add mariadb repository excepted on raspbian and ubuntu 19.04
if (not WOVariables.wo_distro == 'raspbian'):

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"]