From 6e69a3f6e6cab92956a03aba1a4c685c04d9234a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Pialasse Date: Tue, 23 Apr 2024 12:18:22 -0400 Subject: [PATCH] * Tue Apr 23 2024 Jean-Philippe Pialasse 11.0.0-11.sme - fix debuglevel=-2 not allowed [SME: 12637] - force modules needed for core [SME: 12618] php:remi-8.3 perl:5.26 python36:3.6 mariadb:10.5 --- createlinks | 2 ++ root/etc/e-smith/events/actions/dnf_modules | 14 ++++++++++++++ .../templates/etc/dnf/automatic.conf/50base | 2 +- .../site-packages/dnf-plugins/smeserver.py | 10 ++++++++++ smeserver-update.spec | 7 ++++++- 5 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 root/etc/e-smith/events/actions/dnf_modules diff --git a/createlinks b/createlinks index 51b533e..71753ec 100755 --- a/createlinks +++ b/createlinks @@ -31,6 +31,8 @@ event_link("systemd-default", $event, "88"); templates2events("/etc/rsyslog.conf",$event); safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/rsyslog"); +event_link("dnf_modules", 'post-install', "70"); + #-------------------------------------------------- # functions for manager panel #-------------------------------------------------- diff --git a/root/etc/e-smith/events/actions/dnf_modules b/root/etc/e-smith/events/actions/dnf_modules new file mode 100644 index 0000000..eba20f7 --- /dev/null +++ b/root/etc/e-smith/events/actions/dnf_modules @@ -0,0 +1,14 @@ +#!/usr/bin/python3 +import dnf + +base = dnf.Base() +base.read_all_repos() +base.fill_sack() + +module_base = dnf.module.module_base.ModuleBase(base) +module_base.switch_to(['php:remi-8.3']) +module_base.switch_to(['perl:5.26']) +module_base.switch_to(['python36:3.6']) +module_base.switch_to(['mariadb:10.5']) + +base.do_transaction() diff --git a/root/etc/e-smith/templates/etc/dnf/automatic.conf/50base b/root/etc/e-smith/templates/etc/dnf/automatic.conf/50base index 07ce721..a4dcef5 100644 --- a/root/etc/e-smith/templates/etc/dnf/automatic.conf/50base +++ b/root/etc/e-smith/templates/etc/dnf/automatic.conf/50base @@ -5,7 +5,7 @@ # -4: critical # -3: critical+errors # -2: critical+errors+warnings (default) -debuglevel = -{ $dnf{Debug} || '2' } +debuglevel = { $dnf{Debug} || '2' } # Uncomment to auto-import new gpg keys (dangerous) # assumeyes = True diff --git a/root/usr/lib/python3.6/site-packages/dnf-plugins/smeserver.py b/root/usr/lib/python3.6/site-packages/dnf-plugins/smeserver.py index 031dfef..5f69b51 100644 --- a/root/usr/lib/python3.6/site-packages/dnf-plugins/smeserver.py +++ b/root/usr/lib/python3.6/site-packages/dnf-plugins/smeserver.py @@ -122,9 +122,19 @@ class SMEServer(dnf.Plugin): global ourfile ourfile = True self.report_yum_status('sack') + module_base = dnf.module.module_base.ModuleBase(self.base) + module_base.switch_to(['php:remi-8.3']) + module_base.switch_to(['perl:5.26']) + module_base.switch_to(['python36:3.6']) + module_base.switch_to(['mariadb:10.5']) def resolved(self): self.report_yum_status('resolved') + module_base = dnf.module.module_base.ModuleBase(self.base) + module_base.switch_to(['php:remi-8.3']) + module_base.switch_to(['perl:5.26']) + module_base.switch_to(['python36:3.6']) + module_base.switch_to(['mariadb:10.5']) #2 PKG_DOWNGRADE = dnf.transaction.PKG_DOWNGRADE # :api #1 PKG_INSTALL = dnf.transaction.PKG_INSTALL # :api diff --git a/smeserver-update.spec b/smeserver-update.spec index 1fd6a62..ec754fa 100644 --- a/smeserver-update.spec +++ b/smeserver-update.spec @@ -2,7 +2,7 @@ Summary: Koozali SME Server rpm updater Name: %{name} %define version 11.0.0 -%define release 10 +%define release 11 Version: %{version} Release: %{release}%{?dist} License: GPL @@ -68,6 +68,11 @@ mkdir -p root/etc/yum.smerepos.d %changelog +* Tue Apr 23 2024 Jean-Philippe Pialasse 11.0.0-11.sme +- fix debuglevel=-2 not allowed [SME: 12637] +- force modules needed for core [SME: 12618] + php:remi-8.3 perl:5.26 python36:3.6 mariadb:10.5 + * Thu Apr 18 2024 Jean-Philippe Pialasse 11.0.0-10.sme - fix RuntimeError: dictionary changed size during iteration [SME: 12633]