generated from smedev/Template-for-SMEServer-Core-Package
* Mon Apr 08 2024 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-7.sme
- fix python error in dnf plugin [SME: 12601] - fix server error in old manager [SME: 12602]
This commit is contained in:
parent
e1845339e5
commit
cc7626c868
@ -34,4 +34,4 @@ safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/rsyslog"
|
|||||||
#--------------------------------------------------
|
#--------------------------------------------------
|
||||||
# functions for manager panel
|
# functions for manager panel
|
||||||
#--------------------------------------------------
|
#--------------------------------------------------
|
||||||
panel_link("dnf", "manager");
|
panel_link("yum", "manager");
|
||||||
|
@ -15,16 +15,9 @@ events_path = '/etc/e-smith/events'
|
|||||||
initialize_database = events_path + '/actions/initialize-default-databases'
|
initialize_database = events_path + '/actions/initialize-default-databases'
|
||||||
navigation_conf = events_path + '/actions/navigation-conf'
|
navigation_conf = events_path + '/actions/navigation-conf'
|
||||||
systemctl = "/usr/bin/systemctl"
|
systemctl = "/usr/bin/systemctl"
|
||||||
# not used
|
|
||||||
#dnf_update_dbs = events_path + '/actions/yum-update-dbs'
|
|
||||||
#Conflicts=yum-cron.service dnf-automatic-notifyonly.service dnf-automatic.service
|
|
||||||
signal_event = '/sbin/e-smith/signal-event'
|
signal_event = '/sbin/e-smith/signal-event'
|
||||||
config_set = '/sbin/e-smith/config'
|
config_set = '/sbin/e-smith/config'
|
||||||
status_file = '/var/cache/dnf/dnf.status'
|
status_file = '/var/cache/dnf/dnf.status'
|
||||||
#not used
|
|
||||||
#expand_template = '/sbin/e-smith/expand-template'
|
|
||||||
#not used
|
|
||||||
#service = '/sbin/e-smith/service'
|
|
||||||
|
|
||||||
eventlist = dict()
|
eventlist = dict()
|
||||||
actionlist = dict()
|
actionlist = dict()
|
||||||
@ -68,7 +61,7 @@ servicenames['squid']='squid',
|
|||||||
servicenames['qmail']='qmail',
|
servicenames['qmail']='qmail',
|
||||||
servicenames['qpsmtpd']='qpsmtpd', 'sqpsmtpd',
|
servicenames['qpsmtpd']='qpsmtpd', 'sqpsmtpd',
|
||||||
|
|
||||||
DEBUG = True
|
DEBUG = False
|
||||||
smechange = False
|
smechange = False
|
||||||
smechangelist = dict()
|
smechangelist = dict()
|
||||||
ourfile = False
|
ourfile = False
|
||||||
@ -87,7 +80,6 @@ class SMEServer(dnf.Plugin):
|
|||||||
self.base = base
|
self.base = base
|
||||||
self.logger = logger
|
self.logger = logger
|
||||||
self.report_yum_status('init')
|
self.report_yum_status('init')
|
||||||
self.log("smeserver.py: __init__")
|
|
||||||
|
|
||||||
def log(self,s):
|
def log(self,s):
|
||||||
if DEBUG :
|
if DEBUG :
|
||||||
@ -122,21 +114,18 @@ class SMEServer(dnf.Plugin):
|
|||||||
|
|
||||||
def pre_config(self):
|
def pre_config(self):
|
||||||
self.report_yum_status('pre_config')
|
self.report_yum_status('pre_config')
|
||||||
self.log("smeserver.py: pre_config")
|
|
||||||
|
|
||||||
def config(self):
|
def config(self):
|
||||||
self.report_yum_status('config')
|
self.report_yum_status('config')
|
||||||
self.log("smeserver.py: config")
|
|
||||||
|
|
||||||
def sack(self):
|
def sack(self):
|
||||||
global ourfile
|
global ourfile
|
||||||
ourfile = True
|
ourfile = True
|
||||||
self.report_yum_status('sack')
|
self.report_yum_status('sack')
|
||||||
self.log("smeserver.py: sack")
|
|
||||||
|
|
||||||
def resolved(self):
|
def resolved(self):
|
||||||
self.report_yum_status('resolved')
|
self.report_yum_status('resolved')
|
||||||
self.log("smeserver.py: resolved")
|
|
||||||
#2 PKG_DOWNGRADE = dnf.transaction.PKG_DOWNGRADE # :api
|
#2 PKG_DOWNGRADE = dnf.transaction.PKG_DOWNGRADE # :api
|
||||||
#1 PKG_INSTALL = dnf.transaction.PKG_INSTALL # :api
|
#1 PKG_INSTALL = dnf.transaction.PKG_INSTALL # :api
|
||||||
#4 PKG_OBSOLETE = dnf.transaction.PKG_OBSOLETE # :api
|
#4 PKG_OBSOLETE = dnf.transaction.PKG_OBSOLETE # :api
|
||||||
@ -150,7 +139,6 @@ class SMEServer(dnf.Plugin):
|
|||||||
|
|
||||||
def pre_transaction(self):
|
def pre_transaction(self):
|
||||||
self.report_yum_status('pretrans')
|
self.report_yum_status('pretrans')
|
||||||
self.log("smeserver.py: Pretrans")
|
|
||||||
# Prefetch filelist for packages to be removed,
|
# Prefetch filelist for packages to be removed,
|
||||||
in_ts_items = []
|
in_ts_items = []
|
||||||
out_ts_items = []
|
out_ts_items = []
|
||||||
@ -207,7 +195,7 @@ class SMEServer(dnf.Plugin):
|
|||||||
n= str(tsmem.name)
|
n= str(tsmem.name)
|
||||||
# if the pkg.name is present on both IN and OUT, then we assume update/downgrade and continue to transaction
|
# if the pkg.name is present on both IN and OUT, then we assume update/downgrade and continue to transaction
|
||||||
if n in installs_dict :
|
if n in installs_dict :
|
||||||
self.log('updating ==> state ' + str(tsmem.pkg) + " to " + str(installs_dict[n].pkg) )
|
#self.log('updating ==> state ' + str(tsmem.pkg) + " to " + str(installs_dict[n].pkg) )
|
||||||
continue
|
continue
|
||||||
self.log('**Package: ' + str(tsmem.pkg) + ' to be removed')
|
self.log('**Package: ' + str(tsmem.pkg) + ' to be removed')
|
||||||
smeevent = n + '-update'
|
smeevent = n + '-update'
|
||||||
@ -292,7 +280,6 @@ class SMEServer(dnf.Plugin):
|
|||||||
|
|
||||||
def transaction(self):
|
def transaction(self):
|
||||||
self.report_yum_status('transaction')
|
self.report_yum_status('transaction')
|
||||||
self.log("smeserver.py: transaction")
|
|
||||||
|
|
||||||
#ts = self.getTsInfo()
|
#ts = self.getTsInfo()
|
||||||
#rpmdb = self.getRpmDB()
|
#rpmdb = self.getRpmDB()
|
||||||
@ -355,7 +342,7 @@ class SMEServer(dnf.Plugin):
|
|||||||
# either no exception or does not fit exceptions: we need reboot
|
# either no exception or does not fit exceptions: we need reboot
|
||||||
smechange = True
|
smechange = True
|
||||||
smechangelist[n]=str(n) + "-" + str(v) + "-" + str(r)
|
smechangelist[n]=str(n) + "-" + str(v) + "-" + str(r)
|
||||||
self.log("smechange set to True because of " + n + " with " + str(v) + "-" + str(r) + " " + str(tsmem.installed))
|
self.log("smechange set to True because of " + n + " with " + str(v) + "-" + str(r) )
|
||||||
#self.log("smechange set to True because of " + pkg)
|
#self.log("smechange set to True because of " + pkg)
|
||||||
|
|
||||||
# check if we're upgrading a restartpkgs rpm
|
# check if we're upgrading a restartpkgs rpm
|
||||||
@ -417,8 +404,8 @@ class SMEServer(dnf.Plugin):
|
|||||||
else:
|
else:
|
||||||
if (n.startswith('smeserver') or n.startswith('e-smith')) and not n.startswith('smeserver-locale') and not (n in removenorebootok):
|
if (n.startswith('smeserver') or n.startswith('e-smith')) and not n.startswith('smeserver-locale') and not (n in removenorebootok):
|
||||||
smechange = True
|
smechange = True
|
||||||
smechangelist[n]=str(tsmem.po.state) + " " + str(tsmem.current_state) + " " + str(tsmem.output_state)
|
smechangelist[n]=str(tsmem.name) + "-" + str(tsmem.version) + "-" + str(tsmem.release)
|
||||||
self.log("smechange set to True because of " + n + " with " + str(tsmem.po.state) + " " + str(tsmem.current_state) + " " + str(tsmem.output_state) )
|
self.log("smechange set to True because of " + n )
|
||||||
|
|
||||||
# as long as it is a sme pkg we need to rebuild panel
|
# as long as it is a sme pkg we need to rebuild panel
|
||||||
if "/etc/e-smith/web/panels/manager/cgi-bin" in tsmem.files :
|
if "/etc/e-smith/web/panels/manager/cgi-bin" in tsmem.files :
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Summary: Koozali SME Server rpm updater
|
Summary: Koozali SME Server rpm updater
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
%define version 11.0.0
|
%define version 11.0.0
|
||||||
%define release 6
|
%define release 7
|
||||||
Version: %{version}
|
Version: %{version}
|
||||||
Release: %{release}%{?dist}
|
Release: %{release}%{?dist}
|
||||||
License: GPL
|
License: GPL
|
||||||
@ -68,6 +68,10 @@ mkdir -p root/etc/yum.smerepos.d
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Apr 08 2024 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-7.sme
|
||||||
|
- fix python error in dnf plugin [SME: 12601]
|
||||||
|
- fix server error in old manager [SME: 12602]
|
||||||
|
|
||||||
* Wed Apr 04 2024 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-6.sme
|
* Wed Apr 04 2024 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-6.sme
|
||||||
- rewrite smeserver.py plugin [SME: 12113]
|
- rewrite smeserver.py plugin [SME: 12113]
|
||||||
- fix migrate template 39VisibleSmeContribs, 45RockyEOL [SME: 12549]
|
- fix migrate template 39VisibleSmeContribs, 45RockyEOL [SME: 12549]
|
||||||
|
Loading…
Reference in New Issue
Block a user