From dfd02f9da87fac7e0f3a0d1e473538a655793809 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Pialasse Date: Fri, 14 Mar 2025 23:11:46 -0400 Subject: [PATCH] * Fri Mar 14 2025 Jean-Philippe Pialasse 11.0.0-23.sme - deactivate mariadb 10.5 module (do it on update) [SME: 12955] - rewrite module setting to avoid failure [SME: 12962] * Wed Mar 12 2025 Jean-Philippe Pialasse 11.0.0-21.sme - fix not all gpg keys are imported [SME: 12960] --- root/etc/e-smith/events/actions/dnf_modules | 55 ++++++++++++++++----- smeserver-update.spec | 6 ++- 2 files changed, 48 insertions(+), 13 deletions(-) diff --git a/root/etc/e-smith/events/actions/dnf_modules b/root/etc/e-smith/events/actions/dnf_modules index 7398c78..59ad75e 100644 --- a/root/etc/e-smith/events/actions/dnf_modules +++ b/root/etc/e-smith/events/actions/dnf_modules @@ -1,14 +1,47 @@ -#!/usr/bin/python3 -import dnf +#!/bin/bash +#---------------------------------------------------------------------- +# copyright (C) 2025 Koozali Foundation Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +#---------------------------------------------------------------------- -base = dnf.Base() -base.read_all_repos() -base.fill_sack() +# set mariadb as disabled, as we use rpm directly from MariaDB +printf '[mariadb] +name=mariadb +stream= +profiles= +state=disabled' | crudini --merge /etc/dnf/modules.d/mariadb.module -module_base = dnf.module.module_base.ModuleBase(base) -module_base.switch_to(['php:remi-8.4']) -module_base.switch_to(['perl:5.26']) -module_base.switch_to(['python36:3.6']) -module_base.disable(['mariadb:10.5']) +# set perl 5.26 +printf '[perl] +name=perl +stream=5.26 +profiles= +state=enabled' | crudini --merge /etc/dnf/modules.d/perl.module + +# set php module to our default +printf '[php] +name=php +stream=remi-8.4 +profiles= +state=enabled' | crudini --merge /etc/dnf/modules.d/php.module php + +# set python to 3.6 +printf '[python36] +name=python36 +stream=3.6 +profiles= +state=enabled' | crudini --merge /etc/dnf/modules.d/python36.module -base.do_transaction() diff --git a/smeserver-update.spec b/smeserver-update.spec index 12e848e..eac9e71 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 22 +%define release 23 Version: %{version} Release: %{release}%{?dist} License: GPL @@ -25,6 +25,7 @@ Requires: python3-dnf-plugin-post-transaction-actions Requires: python3-dnf-plugin-versionlock Requires: perl(File::Slurp) Requires: mailx +Requires: crudini BuildRequires: smeserver-devtools BuildRequires: python3 AutoReqProv: no @@ -68,8 +69,9 @@ mkdir -p root/etc/yum.smerepos.d %changelog -* Fri Mar 14 2025 Jean-Philippe Pialasse 11.0.0-22.sme +* Fri Mar 14 2025 Jean-Philippe Pialasse 11.0.0-23.sme - deactivate mariadb 10.5 module (do it on update) [SME: 12955] +- rewrite module setting to avoid failure [SME: 12962] * Wed Mar 12 2025 Jean-Philippe Pialasse 11.0.0-21.sme - fix not all gpg keys are imported [SME: 12960]