From c7029a50b5c5dc73a1ca0d19ecacb41c51d1429d Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Mon, 31 Jul 2023 12:44:12 +0200 Subject: [PATCH 1/5] Update dependencies for Debian 12 --- install | 6 ++++-- setup.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/install b/install index 98b8baf..3778338 100755 --- a/install +++ b/install @@ -9,7 +9,7 @@ # ------------------------------------------------------------------------- # wget -qO wo wops.cc && sudo -E bash wo # ------------------------------------------------------------------------- -# Version 3.16.4 - 2023-06-25 +# Version 3.17.0 - 2023-07-21 # ------------------------------------------------------------------------- # CONTENTS @@ -461,7 +461,7 @@ wo_install() { elif [ "$wo_distro_codename" = "bullseye" ]; then python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@2.2.1#egg=python-apt elif [ "$wo_distro_codename" = "bookworm" ]; then - python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@2.2.1#egg=python-apt + python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@2.5.3#egg=python-apt else python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@1.8.4.y#egg=python-apt fi @@ -527,6 +527,8 @@ wo_travis_install() { python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@1.4.y#egg=python-apt elif [ "$wo_distro_codename" = "bullseye" ]; then python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@2.2.1#egg=python-apt + elif [ "$wo_distro_codename" = "bookworm" ]; then + python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@2.5.3#egg=python-apt else python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@1.8.4.y#egg=python-apt fi diff --git a/setup.py b/setup.py index 81718bf..e234017 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ if os.geteuid() == 0: os.makedirs('/var/lib/wo/tmp/') setup(name='wordops', - version='3.16.3', + version='3.17.0', description='An essential toolset that eases server administration', long_description=LONG, long_description_content_type='text/markdown', From 1d527e84ffda047edffad3d5acabf1dbeefeb3a7 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 1 Aug 2023 18:25:59 +0200 Subject: [PATCH 2/5] Update gpg keys for debian 12 --- wo/cli/plugins/stack_pref.py | 16 +++++++++------- wo/core/variables.py | 4 ++-- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/wo/cli/plugins/stack_pref.py b/wo/cli/plugins/stack_pref.py index 424b869..b71b47f 100644 --- a/wo/cli/plugins/stack_pref.py +++ b/wo/cli/plugins/stack_pref.py @@ -125,13 +125,15 @@ def pre_pref(self, apt_packages): Log.debug(self, 'Adding ppa for nano') WORepo.add(self, ppa=WOVar.wo_ubuntu_backports) else: - if (not WOFileUtils.grepcheck( - self, '/etc/apt/sources.list/wo-repo.list', - 'WordOps')): - Log.info(self, "Adding repository for Nano, please wait...") - Log.debug(self, 'Adding repository for Nano') - WORepo.add_key(self, WOVar.wo_nginx_key) - WORepo.add(self, repo_url=WOVar.wo_nginx_repo) + if WOVar.wo_platform_codename == 'buster': + if (not WOFileUtils.grepcheck( + self, '/etc/apt/sources.list/wo-repo.list', + 'WordOps')): + Log.info(self, + "Adding repository for Nano, please wait...") + Log.debug(self, 'Adding repository for Nano') + WORepo.add_key(self, WOVar.wo_nginx_key) + WORepo.add(self, repo_url=WOVar.wo_nginx_repo) def post_pref(self, apt_packages, packages, upgrade=False): diff --git a/wo/core/variables.py b/wo/core/variables.py index 93a92e2..95cbe5c 100644 --- a/wo/core/variables.py +++ b/wo/core/variables.py @@ -148,7 +148,7 @@ class WOVar(): .format(wo_deb_repo)) wo_nginx = ["nginx-custom", "nginx-wo"] - wo_nginx_key = '188C9FB063F0247A' + wo_nginx_key = 'FB898660' wo_module = ["bcmath", "cli", "common", "curl", "fpm", "gd", "igbinary", "imagick", "imap", "intl", "mbstring", "memcached", "msgpack", @@ -211,7 +211,7 @@ class WOVar(): wo_php_repo = ( "deb https://packages.sury.org/php/ {codename} main" .format(codename=wo_platform_codename)) - wo_php_key = 'AC0E47584A7A714D' + wo_php_key = '95BD4743' wo_redis_key_url = "https://packages.redis.io/gpg" wo_redis_repo = ("deb https://packages.redis.io/deb {codename} main" .format(codename=wo_platform_codename)) From e6095ce97a71fbefcc93bb00157be57d0746a9f4 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 1 Aug 2023 18:31:40 +0200 Subject: [PATCH 3/5] Fix install script on debian 12 --- install | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/install b/install index 3778338..3c94fa1 100755 --- a/install +++ b/install @@ -438,7 +438,12 @@ wo_install() { if [ -d /usr/local/lib/python3."$python_ver"/dist-packages ]; then cd /usr/local/lib/python3."$python_ver"/dist-packages || exit 1 fi - python3 -m pip uninstall -yq wo wordops ee + if [ "$wo_distro_codename" = "bookworm" ]; then + python3 -m pip uninstall -yq wo wordops ee --break-system-packages + else + python3 -m pip uninstall -yq wo wordops ee + fi + cd || exit 1 if [ -d /opt/wo/lib/python3."$python_ver"/site-packages/apt ]; then source /opt/wo/bin/activate From 49d26e5656c43e485e2b94047aa75475e73d70af Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 1 Aug 2023 18:35:48 +0200 Subject: [PATCH 4/5] Do not add mariadb repo on debian 12 --- wo/cli/plugins/stack_pref.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wo/cli/plugins/stack_pref.py b/wo/cli/plugins/stack_pref.py index b71b47f..f76a37f 100644 --- a/wo/cli/plugins/stack_pref.py +++ b/wo/cli/plugins/stack_pref.py @@ -29,7 +29,8 @@ def pre_pref(self, apt_packages): if ("mariadb-server" in apt_packages or "mariadb-client" in apt_packages): # add mariadb repository excepted on raspbian and ubuntu 19.04 - if not WOVar.wo_distro == 'raspbian': + if not (WOVar.wo_distro == 'raspbian' or + WOVar.wo_platform_codename == 'bookworm'): Log.info(self, "Adding repository for MySQL, please wait...") mysql_pref = ( "Package: *\nPin: origin mariadb.mirrors.ovh.net" From 9b8befed18a04077089e78262e8bb17c7fcf6700 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Thu, 3 Aug 2023 07:38:34 +0200 Subject: [PATCH 5/5] Fix install on Debian 12 --- install | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/install b/install index 3c94fa1..7d23ce3 100755 --- a/install +++ b/install @@ -229,17 +229,17 @@ wo_install_dep() { if [ ! -f /etc/apt/apt.conf.d/20auto-upgrades ]; then cp -f /usr/share/unattended-upgrades/20auto-upgrades /etc/apt/apt.conf.d/20auto-upgrades fi - # upgrade pip - python3 -m pip install --upgrade pip } wo_timesync() { # set default ntp pools - if [ -f /etc/systemd/timesyncd.conf ]; then - if ! grep -q "time.cloudflare.com" /etc/systemd/timesyncd.conf; then - sed -e 's/^#NTP=/NTP=time.cloudflare.com 0.ubuntu.pool.ntp.org 1.ubuntu.pool.ntp.org 2.ubuntu.pool.ntp.org 3.ubuntu.pool.ntp.org/' -i /etc/systemd/timesyncd.conf - # enable ntp - timedatectl set-ntp 1 + if [ "$wo_distro_codename" != "bookworm" ]; then + if [ -f /etc/systemd/timesyncd.conf ]; then + if ! grep -q "time.cloudflare.com" /etc/systemd/timesyncd.conf; then + sed -e 's/^#NTP=/NTP=time.cloudflare.com 0.ubuntu.pool.ntp.org 1.ubuntu.pool.ntp.org 2.ubuntu.pool.ntp.org 3.ubuntu.pool.ntp.org/' -i /etc/systemd/timesyncd.conf + # enable ntp + timedatectl set-ntp 1 + fi fi fi } @@ -438,9 +438,7 @@ wo_install() { if [ -d /usr/local/lib/python3."$python_ver"/dist-packages ]; then cd /usr/local/lib/python3."$python_ver"/dist-packages || exit 1 fi - if [ "$wo_distro_codename" = "bookworm" ]; then - python3 -m pip uninstall -yq wo wordops ee --break-system-packages - else + if [ "$wo_distro_codename" != "bookworm" ]; then python3 -m pip uninstall -yq wo wordops ee fi