diff --git a/SOURCES/CP-43942.patch b/SOURCES/CP-43942.patch deleted file mode 100644 index cb587a0..0000000 --- a/SOURCES/CP-43942.patch +++ /dev/null @@ -1,839 +0,0 @@ -diff --git a/Makefile b/Makefile -index 6950a6a..eda21ba 100644 ---- a/Makefile -+++ b/Makefile -@@ -48,9 +48,6 @@ PLUGINS_BASE := - PLUGINS_BASE += XSFeatureChangePassword.py - PLUGINS_BASE += XSFeatureChangeTimeout.py - PLUGINS_BASE += XSFeatureCrashDumpSR.py --PLUGINS_BASE += XSFeatureDRBackup.py --PLUGINS_BASE += XSFeatureDRRestore.py --PLUGINS_BASE += XSFeatureDRSchedule.py - PLUGINS_BASE += XSFeatureDNS.py - PLUGINS_BASE += XSFeatureDisplayNICs.py - PLUGINS_BASE += XSFeatureEULA.py -@@ -91,10 +88,7 @@ PLUGINS_OEM := - PLUGINS_OEM += XSFeatureClaimSR.py - PLUGINS_OEM += XSFeatureLicenseNag.py - PLUGINS_OEM += XSFeatureManagementHelp.py --PLUGINS_OEM += XSFeatureOEMBackup.py --PLUGINS_OEM += XSFeatureOEMRestore.py - PLUGINS_OEM += XSFeatureReset.py --PLUGINS_OEM += XSFeatureUpdate.py - PLUGINS_OEM += XSFeatureVerboseBoot.py - PLUGINS_OEM += XSMenuOEMLayout.py - -diff --git a/plugins-base/XSFeatureDRBackup.py b/plugins-base/XSFeatureDRBackup.py -deleted file mode 100644 -index 55b2f2c..0000000 ---- a/plugins-base/XSFeatureDRBackup.py -+++ /dev/null -@@ -1,85 +0,0 @@ --# Copyright (c) 2008-2009 Citrix Systems 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; version 2 only. --# --# 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., --# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -- --if __name__ == "__main__": -- raise Exception("This script is a plugin for xsconsole and cannot run independently") -- --from XSConsoleStandard import * -- --class DRBackupDialogue(SRDialogue): -- def __init__(self): -- -- self.custom = { -- 'title' : Lang("Select Storage Repository for Backup"), -- 'prompt' : Lang("Please select a Storage Repository"), -- 'mode' : 'rw', -- 'capabilities' : 'vdi_create' -- } -- SRDialogue.__init__(self) # Must fill in self.custom before calling __init__ -- -- def DoAction(self, inSR): -- Layout.Inst().PopDialogue() -- try: -- # determine if there is a backup VDI or not, and if not just create one -- sr_uuid = inSR['uuid'] -- command = "%s/xe-backup-metadata -n -u %s" % (Config.Inst().HelperPath(), sr_uuid) -- -- status, output = getstatusoutput(command) -- initalize_vdi = "" -- if status == 3: -- initalize_vdi = "-c" -- elif status != 0 and status != 3: -- raise Exception(output) -- -- Layout.Inst().TransientBanner(Lang("Backing up metadata... This may take several minutes.")) -- command = "%s/xe-backup-metadata %s -u %s" % (Config.Inst().HelperPath(), initalize_vdi, sr_uuid) -- status, output = getstatusoutput(command) -- if status == 0: -- Layout.Inst().PushDialogue(InfoDialogue(Lang("Backup Successful"), output)) -- else: -- raise Exception(output) -- except Exception as e: -- Layout.Inst().PushDialogue(InfoDialogue(Lang("Metadata Backup failed: ")+Lang(e))) -- Data.Inst().Update() -- --class XSFeatureDRBackup: -- @classmethod -- def StatusUpdateHandler(cls, inPane): -- data = Data.Inst() -- inPane.AddTitleField(Lang("Backup Virtual Machine Metadata")) -- -- inPane.AddWrappedTextField(Lang( -- "Press to backup Virtual Machine metadata to a Storage Repository. This will back up the information associated with the VM configuration to a special backup disk on the Storage Repository. You can subsequently restore this metadata if you migrate the Storage Repository to another " + Language.Inst().Branding(data.host.software_version.product_brand('')) + " pool.")) -- inPane.AddKeyHelpField( { Lang("") : Lang("Backup") } ) -- -- @classmethod -- def ActivateHandler(cls): -- DialogueUtils.AuthenticatedOnly(lambda: Layout.Inst().PushDialogue(DRBackupDialogue())) -- -- def Register(self): -- Importer.RegisterNamedPlugIn( -- self, -- 'DRBACKUP', # Key of this plugin for replacement, etc. -- { -- 'menuname' : 'MENU_BUR', -- 'menupriority' : 80, -- 'menutext' : Lang('Backup Virtual Machine Metadata') , -- 'statusupdatehandler' : self.StatusUpdateHandler, -- 'activatehandler' : self.ActivateHandler -- } -- ) -- --# Register this plugin when module is imported --XSFeatureDRBackup().Register() -diff --git a/plugins-base/XSFeatureDRRestore.py b/plugins-base/XSFeatureDRRestore.py -deleted file mode 100644 -index 2fa6b8e..0000000 ---- a/plugins-base/XSFeatureDRRestore.py -+++ /dev/null -@@ -1,204 +0,0 @@ --# Copyright (c) 2008-2009 Citrix Systems 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; version 2 only. --# --# 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., --# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -- --if __name__ == "__main__": -- raise Exception("This script is a plugin for xsconsole and cannot run independently") -- --from XSConsoleStandard import * --import subprocess -- --class DRRestoreSelection(Dialogue): -- -- def __init__(self, date_choices, vdi_uuid, sr_uuid): -- Dialogue.__init__(self) -- -- choices = [] -- self.vdi_uuid = vdi_uuid -- self.sr_uuid = sr_uuid -- self.date_choices = date_choices.splitlines() -- index = 0 -- for choice in self.date_choices: -- cdef = ChoiceDef(choice, lambda i=index: self.HandleTestChoice(i)) -- index = index + 1 -- choices.append(cdef) -- -- self.testMenu = Menu(self, None, "", choices) -- -- self.methodMenu = Menu(self, None, "", [ -- ChoiceDef("Only VMs on This SR", lambda: self.HandleMethodChoice('sr', False)), -- ChoiceDef("All VM Metadata", lambda: self.HandleMethodChoice('all', False)), -- ChoiceDef("Only VMs on This SR (Dry Run)", lambda: self.HandleMethodChoice('sr', True)), -- ChoiceDef("All VM Metadata (Dry Run)", lambda: self.HandleMethodChoice('all', True)), -- ]) -- self.ChangeState('LISTDATES') -- -- def BuildPane(self): -- pane = self.NewPane(DialoguePane(self.parent)) -- pane.TitleSet(Lang('Restore Virtual Machine Metadata')) -- pane.AddBox() -- -- def UpdateFieldsLISTDATES(self): -- pane = self.Pane() -- pane.ResetFields() -- -- pane.TitleSet("Available Metadata Backups") -- pane.AddTitleField(Lang("Select Metadata Backup to Restore From")) -- pane.AddMenuField(self.testMenu) -- pane.AddKeyHelpField( { Lang("") : Lang("OK"), Lang("") : Lang("Cancel") } ) -- -- def UpdateFieldsCHOOSERESTORE(self): -- pane = self.Pane() -- pane.ResetFields() -- -- pane.TitleSet("Restore Backup from " + self.chosen_date) -- pane.AddTitleField("Select the set of VMs to restore from " + self.chosen_date) -- pane.AddMenuField(self.methodMenu) -- pane.AddKeyHelpField( { Lang("") : Lang("Restore VMs"), Lang("") : Lang("Cancel") } ) -- -- def UpdateFields(self): -- self.Pane().ResetPosition() -- getattr(self, 'UpdateFields'+self.state)() # Despatch method named 'UpdateFields'+self.state -- -- def ChangeState(self, inState): -- self.state = inState -- self.BuildPane() -- self.UpdateFields() -- -- def HandleTestChoice(self, inChoice): -- self.chosen_date = self.date_choices[inChoice] -- self.ChangeState('CHOOSERESTORE') -- -- def HandleMethodChoice(self, inChoice, dryRun): -- if inChoice != 'sr' and inChoice != 'all': -- Layout.Inst().PopDialogue() -- Layout.Inst().PushDialogue(InfoDialogue(Lang("Internal Error, unexpected choice: " + inChoice))) -- else: -- chosen_mode = inChoice -- if dryRun: -- dry_flag="-n " -- else: -- dry_flag="" -- Layout.Inst().TransientBanner(Lang("Restoring VM Metadata. This may take a few minutes...")) -- command = "%s/xe-restore-metadata -y %s -u %s -x %s -d %s -m %s" % (Config.Inst().HelperPath(), dry_flag, self.sr_uuid, self.vdi_uuid, self.chosen_date, chosen_mode) -- status, output = getstatusoutput(command) -- Layout.Inst().PopDialogue() -- if status == 0: -- Layout.Inst().PushDialogue(InfoDialogue(Lang("Metadata Restore Succeeded: ") + output)) -- else: -- XSLogFailure('Metadata restore failed: '+str(output)) -- Layout.Inst().PushDialogue(InfoDialogue(Lang("Metadata Restore Failed: ") + output)) -- -- def HandleKey(self, inKey): -- handled = False -- if hasattr(self, 'HandleKey'+self.state): -- handled = getattr(self, 'HandleKey'+self.state)(inKey) -- -- if not handled and inKey == 'KEY_ESCAPE': -- Layout.Inst().PopDialogue() -- handled = True -- -- return handled -- -- def HandleKeyLISTDATES(self, inKey): -- handled = self.testMenu.HandleKey(inKey) -- if not handled and inKey == 'KEY_LEFT': -- Layout.Inst().PopDialogue() -- handled = True -- return handled -- -- def HandleKeyCHOOSERESTORE(self, inKey): -- handled = self.methodMenu.HandleKey(inKey) -- if not handled and inKey == 'KEY_LEFT': -- Layout.Inst().PopDialogue() -- handled = True -- return handled -- --class DRRestoreDialogue(SRDialogue): -- def __init__(self): -- -- self.custom = { -- 'title' : Lang("Select Storage Repository to Restore From"), -- 'prompt' : Lang("Please select a Storage Repository"), -- 'mode' : 'rw', -- 'capabilities' : 'vdi_create' -- } -- SRDialogue.__init__(self) # Must fill in self.custom before calling __init__ -- -- def DoAction(self, inSR): -- Layout.Inst().PopDialogue() -- Layout.Inst().TransientBanner(Lang("Searching for backup VDI...\n\nCtrl-C to abort")) -- sr_uuid = inSR['uuid'] -- try: -- # probe for the restore VDI UUID -- command = "%s/xe-restore-metadata -p -u %s" % (Config.Inst().HelperPath(), sr_uuid) -- cmd = subprocess.Popen(command, -- stdout = subprocess.PIPE, -- stderr = subprocess.PIPE, -- shell = True) -- output = "".join(cmd.stdout).strip() -- errput = "".join(cmd.stderr).strip() -- status = cmd.wait() -- if status != 0: -- raise Exception("(%s,%s)" % (output,errput)) -- if len(output) == 0: -- raise Exception(errput) -- vdi_uuid = output -- -- # list the available backups -- Layout.Inst().TransientBanner(Lang("Found VDI, retrieving available backups...")) -- command = "%s/xe-restore-metadata -l -u %s -x %s" % (Config.Inst().HelperPath(), sr_uuid, vdi_uuid) -- cmd = subprocess.Popen(command, -- stdout = subprocess.PIPE, -- stderr = subprocess.PIPE, -- shell = True) -- output = "".join(cmd.stdout).strip() -- errput = "".join(cmd.stderr).strip() -- status = cmd.wait() -- if status != 0: -- raise Exception("(%s,%s)" % (output,errput)) -- Layout.Inst().PushDialogue(DRRestoreSelection(output, vdi_uuid, sr_uuid)) -- except Exception as e: -- Layout.Inst().PushDialogue(InfoDialogue( Lang("Metadata Restore failed: ")+Lang(e))) -- Data.Inst().Update() -- --class XSFeatureDRRestore: -- @classmethod -- def StatusUpdateHandler(cls, inPane): -- data = Data.Inst() -- inPane.AddTitleField(Lang("Restore Virtual Machine Metadata")) -- -- inPane.AddWrappedTextField(Lang( -- "Press to restore Virtual Machine metadata from a Storage Repository.")) -- inPane.AddKeyHelpField( { Lang("") : Lang("Backup") } ) -- -- @classmethod -- def ActivateHandler(cls): -- DialogueUtils.AuthenticatedOnly(lambda: Layout.Inst().PushDialogue(DRRestoreDialogue())) -- -- def Register(self): -- Importer.RegisterNamedPlugIn( -- self, -- 'DRRESTORE', # Key of this plugin for replacement, etc. -- { -- 'menuname' : 'MENU_BUR', -- 'menupriority' : 90, -- 'menutext' : Lang('Restore Virtual Machine Metadata') , -- 'statusupdatehandler' : self.StatusUpdateHandler, -- 'activatehandler' : self.ActivateHandler -- } -- ) -- --# Register this plugin when module is imported --XSFeatureDRRestore().Register() -diff --git a/plugins-base/XSFeatureDRSchedule.py b/plugins-base/XSFeatureDRSchedule.py -deleted file mode 100644 -index 339b657..0000000 ---- a/plugins-base/XSFeatureDRSchedule.py -+++ /dev/null -@@ -1,112 +0,0 @@ --# Copyright (c) 2008-2009 Citrix Systems 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; version 2 only. --# --# 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., --# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -- --if __name__ == "__main__": -- raise Exception("This script is a plugin for xsconsole and cannot run independently") -- --from XSConsoleStandard import * -- --class DRScheduleDialogue(Dialogue): -- -- def cronPath(self, freq): -- return "/etc/cron." + freq + "/backup-metadata" -- -- def findCurrent(self): -- found = 'never' -- for t in ['daily', 'weekly', 'monthly']: -- if os.path.exists(self.cronPath(t)): -- found=t -- return found -- -- def __init__(self): -- Dialogue.__init__(self) -- -- self.timeMenu = Menu(self, None, "", [ -- ChoiceDef("Daily", lambda: self.HandleMethodChoice('daily')), -- ChoiceDef("Weekly", lambda: self.HandleMethodChoice('weekly')), -- ChoiceDef("Monthly", lambda: self.HandleMethodChoice('monthly')), -- ChoiceDef("Never", lambda: self.HandleMethodChoice('never')), -- ]) -- -- pane = self.NewPane(DialoguePane(self.parent)) -- pane.TitleSet(Lang('Schedule Regular Metadata Backup')) -- pane.AddBox() -- currentSetting = self.findCurrent() -- if currentSetting == 'never': -- title=Lang("Scheduled Metadata Backups are currently disabled. Please select the desired frequency:") -- else: -- title=Lang("Scheduled Metadata Backups are currently set to occur ") + currentSetting + Lang(". Please select the desired frequency:") -- pane.AddTitleField(title) -- pane.AddMenuField(self.timeMenu) -- pane.AddKeyHelpField( { Lang("") : Lang("OK"), Lang("") : Lang("Cancel") } ) -- -- def HandleMethodChoice(self, inChoice): -- currentSetting = self.findCurrent() -- Layout.Inst().PopDialogue() -- # remove current setting -- if currentSetting != 'never': -- try: -- os.unlink(self.cronPath(currentSetting)) -- except: -- pass -- if inChoice != 'never': -- try: -- os.symlink("%s/backup-metadata-cron" % (Config.Inst().LibexecPath()), self.cronPath(inChoice)) -- Layout.Inst().PushDialogue(InfoDialogue(Lang("Metadata Backup Schedule successfully changed to occur ") + inChoice + ".")) -- except: -- XSLogFailure('Failed to create metadata schedule link') -- Layout.Inst().PushDialogue(InfoDialogue(Lang("Failed to create metadata schedule link"))) -- else: -- Layout.Inst().PushDialogue(InfoDialogue(Lang("Metadata Backup Schedule successfully disabled"))) -- -- -- def HandleKey(self, inKey): -- handled = self.timeMenu.HandleKey(inKey) -- -- if not handled and inKey == 'KEY_ESCAPE': -- Layout.Inst().PopDialogue() -- handled = True -- -- return handled -- --class XSFeatureDRSchedule: -- @classmethod -- def StatusUpdateHandler(cls, inPane): -- data = Data.Inst() -- inPane.AddTitleField(Lang("Schedule Virtual Machine Metadata Backup")) -- -- inPane.AddWrappedTextField(Lang( -- "Press to select how to schedule regular Virtual Machine metadata backups.")) -- inPane.AddKeyHelpField( { Lang("") : Lang("Change Schedule") } ) -- -- @classmethod -- def ActivateHandler(cls): -- DialogueUtils.AuthenticatedOnly(lambda: Layout.Inst().PushDialogue(DRScheduleDialogue())) -- -- def Register(self): -- Importer.RegisterNamedPlugIn( -- self, -- 'DRSCHEDULE', # Key of this plugin for replacement, etc. -- { -- 'menuname' : 'MENU_BUR', -- 'menupriority' : 70, -- 'menutext' : Lang('Schedule Virtual Machine Metadata') , -- 'statusupdatehandler' : self.StatusUpdateHandler, -- 'activatehandler' : self.ActivateHandler -- } -- ) -- --# Register this plugin when module is imported --XSFeatureDRSchedule().Register() -diff --git a/plugins-base/XSMenuLayout.py b/plugins-base/XSMenuLayout.py -index 5a592a0..fe9c1f1 100644 ---- a/plugins-base/XSMenuLayout.py -+++ b/plugins-base/XSMenuLayout.py -@@ -168,13 +168,6 @@ class XSMenuLayout: - inPane.AddWrappedTextField(Lang("This menu configures remote services, such as access by " - "remote shell (ssh) and remote logging (syslog) to other servers.")) - -- def UpdateFieldsBUR(self, inPane): -- inPane.AddTitleField(Lang("Backup, Restore and Update")) -- -- inPane.AddWrappedTextField(Lang( -- "From this menu you can backup and restore the system database and Virtual Machine metadata, and apply " -- "software updates to the system.")) -- - def ActivateHandler(self, inName): - Layout.Inst().TopDialogue().ChangeMenu(inName) - -@@ -198,8 +191,6 @@ class XSMenuLayout: - lambda: self.ActivateHandler('MENU_MANAGEMENT'), self.UpdateFieldsMANAGEMENT ], - [ 'MENU_REMOTE', Lang("Remote Service Configuration"), - lambda: self.ActivateHandler('MENU_REMOTE'), self.UpdateFieldsREMOTE ], -- [ 'MENU_BUR', Lang("Backup, Restore and Update"), -- lambda: self.ActivateHandler('MENU_BUR'), self.UpdateFieldsBUR ], - [ 'MENU_TECHNICAL', Lang("Technical Support"), - lambda: self.ActivateHandler('MENU_TECHNICAL'), self.UpdateFieldsTECHNICAL ], - [ 'MENU_REBOOTSHUTDOWN', Lang("Reboot or Shutdown"), -diff --git a/plugins-oem/XSFeatureOEMBackup.py b/plugins-oem/XSFeatureOEMBackup.py -deleted file mode 100644 -index 334181c..0000000 ---- a/plugins-oem/XSFeatureOEMBackup.py -+++ /dev/null -@@ -1,123 +0,0 @@ --# Copyright (c) 2008-2009 Citrix Systems 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; version 2 only. --# --# 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., --# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -- --if __name__ == "__main__": -- raise Exception("This script is a plugin for xsconsole and cannot run independently") -- --from XSConsoleStandard import * -- --class OEMBackupDialogue(FileDialogue): -- def __init__(self): -- -- self.custom = { -- 'title' : Lang("Backup Server State"), -- 'searchregexp' : r'.*\.xbk$', # Type of backup file is .xbk -- 'deviceprompt' : Lang("Select the backup device"), -- 'fileprompt' : Lang("Choose the backup filename"), -- 'filename' : 'backup.xbk', -- 'confirmprompt' : Lang("Press to begin the backup process"), -- 'mode' : 'rw' -- } -- FileDialogue.__init__(self) # Must fill in self.custom before calling __init__ -- -- def DoAction(self): -- filename = self.vdiMount.MountedPath(self.filename) -- if os.path.isfile(filename): -- Layout.Inst().PushDialogue(QuestionDialogue( -- Lang("File already exists. Do you want to overwrite it?"), lambda x: self.DoOverwriteChoice(x))) -- else: -- self.DoCommit() -- -- def DoOverwriteChoice(self, inChoice): -- if inChoice == 'y': -- filename = self.vdiMount.MountedPath(self.filename) -- os.remove(filename) -- self.DoCommit() -- else: -- self.ChangeState('FILES') -- -- def DoCommit(self): -- success = False -- -- Layout.Inst().PopDialogue() -- -- Layout.Inst().PushDialogue(BannerDialogue( -- Lang("Saving to backup... This may take several minutes. Press to abort."))) -- -- try: -- try: -- Layout.Inst().Refresh() -- Layout.Inst().DoUpdate() -- -- hostRef = Data.Inst().host.uuid(None) -- if hostRef is None: -- raise Exception("Internal error 1") -- -- filename = self.vdiMount.MountedPath(self.filename) -- FileUtils.AssertSafePath(filename) -- command = "/opt/xensource/bin/xe host-backup file-name='"+filename+"' host="+hostRef -- status, output = getstatusoutput(command) -- -- if status != 0: -- raise Exception(output) -- -- Layout.Inst().PopDialogue() -- Layout.Inst().PushDialogue(InfoDialogue( -- Lang("Backup Successful"))) -- XSLog('Backup successful') -- -- except Exception as e: -- try: os.unlink(filename) -- except: pass -- Layout.Inst().PopDialogue() -- Layout.Inst().PushDialogue(InfoDialogue( Lang("Backup Failed"), Lang(e))) -- -- finally: -- try: -- self.PreExitActions() -- except Exception as e: -- Layout.Inst().PushDialogue(InfoDialogue( Lang("Backup Failed"), Lang(e))) -- -- --class XSFeatureOEMBackup: -- @classmethod -- def StatusUpdateHandler(cls, inPane): -- data = Data.Inst() -- inPane.AddTitleField(Lang("Backup Server State")) -- -- inPane.AddWrappedTextField(Lang( -- "Press to backup the server state to removable media.")) -- -- inPane.AddKeyHelpField( { Lang("") : Lang("Backup") } ) -- -- @classmethod -- def ActivateHandler(cls): -- DialogueUtils.AuthenticatedOnly(lambda: Layout.Inst().PushDialogue(OEMBackupDialogue())) -- -- def Register(self): -- Importer.RegisterNamedPlugIn( -- self, -- 'BACKUP', # Key of this plugin for replacement, etc. -- { -- 'menuname' : 'MENU_BUR', -- 'menupriority' : 200, -- 'menutext' : Lang('Backup Server State') , -- 'statusupdatehandler' : self.StatusUpdateHandler, -- 'activatehandler' : self.ActivateHandler -- } -- ) -- --# Register this plugin when module is imported --XSFeatureOEMBackup().Register() -diff --git a/plugins-oem/XSFeatureOEMRestore.py b/plugins-oem/XSFeatureOEMRestore.py -deleted file mode 100644 -index 39770d2..0000000 ---- a/plugins-oem/XSFeatureOEMRestore.py -+++ /dev/null -@@ -1,114 +0,0 @@ --# Copyright (c) 2008-2009 Citrix Systems 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; version 2 only. --# --# 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., --# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -- --if __name__ == "__main__": -- raise Exception("This script is a plugin for xsconsole and cannot run independently") -- --from XSConsoleStandard import * -- --class OEMRestoreDialogue(FileDialogue): -- def __init__(self): -- -- self.custom = { -- 'title' : Lang("Restore Server State"), -- 'searchregexp' : r'.*\.xbk$', # Type of backup file is .xbk -- 'deviceprompt' : Lang("Select the device containing the backup file"), -- 'fileprompt' : Lang("Select the Backup File"), -- 'confirmprompt' : Lang("Press to Begin the Restore Process"), -- 'mode' : 'ro' -- } -- FileDialogue.__init__(self) # Must fill in self.custom before calling __init__ -- -- def DoAction(self): -- success = False -- -- Layout.Inst().PopDialogue() -- -- Layout.Inst().PushDialogue(BannerDialogue( -- Lang("Restoring from backup... This may take several minutes."))) -- -- hostEnabled = Data.Inst().host.enabled(False) -- -- try: -- try: -- Layout.Inst().Refresh() -- Layout.Inst().DoUpdate() -- -- if VMUtils.numLocalResidentVMs() > 0: -- raise Exception(Lang("One or more Virtual Machines are running on this host. Please migrate, shut down or suspend Virtual Machines before continuing.")) -- -- Data.Inst().LocalHostDisable() -- -- hostRef = Data.Inst().host.uuid(None) -- if hostRef is None: -- raise Exception("Internal error 1") -- -- filename = self.vdiMount.MountedPath(self.filename) -- FileUtils.AssertSafePath(filename) -- command = "/opt/xensource/bin/xe host-restore file-name='"+filename+"' host="+hostRef -- status, output = getstatusoutput(command) -- -- if status != 0: -- raise Exception(output) -- -- Layout.Inst().PopDialogue() -- Layout.Inst().PushDialogue(InfoDialogue( -- Lang("Restore Successful"), Lang("Please reboot to use the restored state."))) -- XSLog('Restore successful') -- hostEnabled = False -- -- except Exception as e: -- Layout.Inst().PopDialogue() -- Layout.Inst().PushDialogue(InfoDialogue( Lang("Restore Failed"), Lang(e))) -- -- finally: -- try: -- self.PreExitActions() -- if hostEnabled: -- # Dont leave the host disabled if restoration has failed -- Data.Inst().LocalHostEnable() -- except Exception as e: -- Layout.Inst().PushDialogue(InfoDialogue( Lang("Restore Failed"), Lang(e))) -- -- --class XSFeatureOEMRestore: -- @classmethod -- def StatusUpdateHandler(cls, inPane): -- data = Data.Inst() -- inPane.AddTitleField(Lang("Restore Server State")) -- -- inPane.AddWrappedTextField(Lang( -- "Press to restore the server state from removable media.")) -- inPane.AddKeyHelpField( { Lang("") : Lang("Restore") } ) -- -- @classmethod -- def ActivateHandler(cls): -- DialogueUtils.AuthenticatedOnly(lambda: Layout.Inst().PushDialogue(OEMRestoreDialogue())) -- -- def Register(self): -- Importer.RegisterNamedPlugIn( -- self, -- 'RESTORE', # Key of this plugin for replacement, etc. -- { -- 'menuname' : 'MENU_BUR', -- 'menupriority' : 300, -- 'menutext' : Lang('Restore Server State from Backup') , -- 'statusupdatehandler' : self.StatusUpdateHandler, -- 'activatehandler' : self.ActivateHandler -- } -- ) -- --# Register this plugin when module is imported --XSFeatureOEMRestore().Register() -diff --git a/plugins-oem/XSFeatureUpdate.py b/plugins-oem/XSFeatureUpdate.py -deleted file mode 100644 -index 538c1f6..0000000 ---- a/plugins-oem/XSFeatureUpdate.py -+++ /dev/null -@@ -1,113 +0,0 @@ --# Copyright (c) 2008-2009 Citrix Systems 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; version 2 only. --# --# 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., --# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -- --if __name__ == "__main__": -- raise Exception("This script is a plugin for xsconsole and cannot run independently") -- --from XSConsoleStandard import * -- --class UpdateDialogue(FileDialogue): -- def __init__(self): -- -- self.custom = { -- 'title' : Lang("Apply Software Update"), -- 'searchregexp' : r'.*\.xsoem$', # Type of system update file is .xsoem -- 'deviceprompt' : Lang("Select the device containing the update"), -- 'fileprompt' : Lang("Select the update file"), -- 'confirmprompt' : Lang("Press to begin the update process"), -- 'mode' : 'ro' -- } -- FileDialogue.__init__(self) # Must fill in self.custom before calling __init__ -- -- def DoAction(self): -- success = False -- -- Layout.Inst().PopDialogue() -- -- Layout.Inst().PushDialogue(BannerDialogue( -- Lang("Applying update... This may take several minutes. Press to abort."))) -- -- hostEnabled = Data.Inst().host.enabled(False) -- -- try: -- try: -- Layout.Inst().Refresh() -- Layout.Inst().DoUpdate() -- -- if VMUtils.numLocalResidentVMs() > 0: -- raise Exception(Lang("One or more Virtual Machines are running on this host. Please migrate, shut down or suspend Virtual Machines before continuing.")) -- -- Data.Inst().LocalHostDisable() -- -- hostRef = Data.Inst().host.uuid(None) -- if hostRef is None: -- raise Exception("Internal error 1") -- -- filename = self.vdiMount.MountedPath(self.filename) -- FileUtils.AssertSafePath(filename) -- command = "/opt/xensource/bin/xe update-upload file-name='"+filename+"' host-uuid="+hostRef -- status, output = getstatusoutput(command) -- -- if status != 0: -- raise Exception(output) -- -- Layout.Inst().PopDialogue() -- Layout.Inst().PushDialogue(InfoDialogue( -- Lang("Update Successful"), Lang("Please reboot to use the newly installed software."))) -- XSLog('Software updated') -- hostEnabled = False -- -- except Exception as e: -- Layout.Inst().PopDialogue() -- Layout.Inst().PushDialogue(InfoDialogue( Lang("Software Update Failed"), Lang(e))) -- -- finally: -- try: -- self.PreExitActions() -- if hostEnabled: -- # Dont leave the host disabled if the update has failed -- Data.Inst().LocalHostEnable() -- except Exception as e: -- Layout.Inst().PushDialogue(InfoDialogue( Lang("Software Update Failed"), Lang(e))) -- --class XSFeatureUpdate: -- @classmethod -- def StatusUpdateHandler(cls, inPane): -- data = Data.Inst() -- inPane.AddTitleField(Lang("Apply Update")) -- -- inPane.AddWrappedTextField(Lang( -- "Press to apply a software update.")) -- inPane.AddKeyHelpField( { Lang("") : Lang("Update") } ) -- -- @classmethod -- def ActivateHandler(cls): -- DialogueUtils.AuthenticatedOnly(lambda: Layout.Inst().PushDialogue(UpdateDialogue())) -- -- def Register(self): -- Importer.RegisterNamedPlugIn( -- self, -- 'UPDATE', # Key of this plugin for replacement, etc. -- { -- 'menuname' : 'MENU_BUR', -- 'menupriority' : 100, -- 'menutext' : Lang('Apply Update') , -- 'statusupdatehandler' : self.StatusUpdateHandler, -- 'activatehandler' : self.ActivateHandler -- } -- ) -- --# Register this plugin when module is imported --XSFeatureUpdate().Register() diff --git a/SOURCES/xsconsole-11.0.2.tar.gz b/SOURCES/xsconsole-11.0.2.tar.gz deleted file mode 100644 index de46d88..0000000 --- a/SOURCES/xsconsole-11.0.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ffacfde0e6dc78e920a0ff42e0fa06f41febe020dc83ecf30e12bb2157eab96e -size 170091 diff --git a/SOURCES/xsconsole-11.0.6.tar.gz b/SOURCES/xsconsole-11.0.6.tar.gz deleted file mode 100644 index ae0a9be..0000000 --- a/SOURCES/xsconsole-11.0.6.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a478e0793b264535ff2aa2ff83007d727a055535aaf070097b15fc3be422ae15 -size 171025 diff --git a/SOURCES/xsconsole-11.0.8.tar.gz b/SOURCES/xsconsole-11.0.8.tar.gz new file mode 100644 index 0000000..b0213e4 --- /dev/null +++ b/SOURCES/xsconsole-11.0.8.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:96a8aa9638283aa1e3437d66d067ccd3f462562cad55959479d706f969ba8573 +size 171800 diff --git a/SPECS/xsconsole.spec b/SPECS/xsconsole.spec index e235913..7360efa 100644 --- a/SPECS/xsconsole.spec +++ b/SPECS/xsconsole.spec @@ -1,17 +1,14 @@ -%global package_speccommit 866948553e31d5d98f3339d077fd835f15d0ba2b -%global usver 11.0.6 -%global xsver 1 -%global xsrel %{xsver}%{?xscount}%{?xshash} -%global package_srccommit v11.0.6 +%global package_speccommit 4180d42f5bdbceb1769b36a8c65a049950ba92b3 +%global package_srccommit v11.0.8 +%{!?xsrel: %global xsrel 1} Summary: XCP-ng Host Configuration Console Name: xsconsole -Version: 11.0.6 -Release: %{?xsrel}.2%{?dist} +Version: 11.0.8 +Release: %{?xsrel}.1%{?dist} License: GPL2 Group: Administration/System -Source0: xsconsole-11.0.6.tar.gz -Patch0: CP-43942.patch +Source0: xsconsole-11.0.8.tar.gz Provides: xsconsole0 BuildRequires: python3-devel BuildRequires: systemd @@ -24,6 +21,10 @@ Requires: ncurses >= 6.4-2 Requires: glibc-langpack-en %endif +# Metadata backup/restore functionality does not work with Xapi versions without +# the scripts present +Conflicts: xapi-core < 24.20.0 + Requires(post): systemd Requires(preun): systemd Requires(postun): systemd @@ -70,6 +71,14 @@ Console tool for configuring a XCP-ng installation. %{_unitdir}/xsconsole.service %changelog +* Wed Mar 05 2025 Samuel Verschelde - 11.0.8-1.1 +- Sync with 11.0.8-1 +- *** Upstream changelog *** + * Tue Jul 23 2024 Gerald Elder-Vass - 11.0.8-1 + - CA-390512: Improved xenapi error handling + * Tue Jul 23 2024 Alex Brett - 11.0.7-1 + - CP-49228: Reintroduce Portable SR feature + * Wed Sep 18 2024 Benjamin Reis - 11.0.6-1.2 - Add xsconsole-11.0.6-Ipv6-pool-join.XCP-ng.patch