commit sca-server-report for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package sca-server-report for openSUSE:Factory checked in at 2024-01-30 18:25:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/sca-server-report (Old) and /work/SRC/openSUSE:Factory/.sca-server-report.new.1815 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "sca-server-report" Tue Jan 30 18:25:27 2024 rev:11 rq:1142628 version:1.6.2 Changes: -------- --- /work/SRC/openSUSE:Factory/sca-server-report/sca-server-report.changes 2024-01-10 21:52:01.099578184 +0100 +++ /work/SRC/openSUSE:Factory/.sca-server-report.new.1815/sca-server-report.changes 2024-01-30 18:25:43.982630335 +0100 @@ -1,0 +2,8 @@ +Mon Jan 29 19:56:43 UTC 2024 - jason.record@suse.com + +- Changes to version 1.6.2 + + Missing supportconfig key (bsc#1219252) + + Includes SLE Micro (bsc#1219255) + + SUMA detection (bsc#1219257) + +------------------------------------------------------------------- Old: ---- sca-server-report-1.6.1.tar.gz New: ---- sca-server-report-1.6.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sca-server-report.spec ++++++ --- /var/tmp/diff_new_pack.2EOq0D/_old 2024-01-30 18:25:44.694656023 +0100 +++ /var/tmp/diff_new_pack.2EOq0D/_new 2024-01-30 18:25:44.698656166 +0100 @@ -22,7 +22,7 @@ %define sca_python %{libbase}/python Name: sca-server-report -Version: 1.6.1 +Version: 1.6.2 Release: 0 Summary: Supportconfig Analysis Server Report License: GPL-2.0-only ++++++ sca-server-report-1.6.1.tar.gz -> sca-server-report-1.6.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sca-server-report-1.6.1/bin/scatool new/sca-server-report-1.6.2/bin/scatool --- old/sca-server-report-1.6.1/bin/scatool 2024-01-09 19:26:36.637930130 +0100 +++ new/sca-server-report-1.6.2/bin/scatool 2024-01-29 20:58:02.504236762 +0100 @@ -1,12 +1,12 @@ #!/usr/bin/python3 -SVER = '3.0.1' +SVER = '3.0.2' ############################################################################## # scatool - Supportconfig Analysis (SCA) Tool # Copyright (c) 2024 SUSE LLC # # Description: Analyzes supportconfig archives for known issues -# Modified: 2024 Jan 09 +# Modified: 2024 Jan 29 # ############################################################################## # @@ -296,6 +296,7 @@ self.required_element_count = len(self.REQUIRED_ELEMENTS) self.results = {} + self.supportconfig_keys = [] self.runtime_error_list = [] self.pattern_stats = { 'total': 0, @@ -583,10 +584,10 @@ pattern_directories = [self.sca_patterns_path + 'local/'] for product_included in self.products_list: base_pattern_path = str(self.sca_patterns_path) + str(product_included['patternTag']) + "/" - pattern_filter_path = base_pattern_path + str(product_included['tag']) + str(product_included['vermajor']) + "all/" + pattern_filter_path = base_pattern_path + str(product_included['use_tag']) + str(product_included['use_vermajor']) + "all/" if os.path.isdir(pattern_filter_path): pattern_directories.append(pattern_filter_path) - pattern_filter_path = base_pattern_path + str(product_included['tag']) + str(product_included['vermajor']) + "sp" + str(product_included['verminor']) + "/" + pattern_filter_path = base_pattern_path + str(product_included['use_tag']) + str(product_included['use_vermajor']) + "sp" + str(product_included['use_verminor']) + "/" if os.path.isdir(pattern_filter_path): pattern_directories.append(pattern_filter_path) @@ -616,8 +617,153 @@ pattern_file_dict[check_pattern] = generational_value return pattern_file_dict + def __get_products_summary_simple(self, this_pattern_tag, this_tag, re_name, summary_file): + # Extracts product information in the summary.xml file from supportconfig + # Pattern directory simple SP format: patterns/<patternTag>/<tag><vermajor>sp<verminor> + re_start = re.compile(r'<product\s|<product>', re.IGNORECASE) + re_end = re.compile(r'</product>', re.IGNORECASE) + re_version = re.compile(r'<version>.*</version>', re.IGNORECASE) + these_products = [] + in_product = False + summary_info = { + 'patternTag': this_pattern_tag, # Used to filter patterns for analysis + 'tag': this_tag, # The product's identity tag + 'vermajor': '', # The product's major version + 'verminor': '', # The product's minor version + 'use_tag': this_tag, # The tag used to select patterns + 'use_vermajor': '', # The major version used to select patterns + 'use_verminor': '', # The minor version used to select patterns + 'supportconfigKey': '', # Identifies the current supportconfig product + 'nameTag': 'Product:', # HTML report's nameTag, name pair + 'name': '', # HTML report's nameTag, name pair + 'versionTag': 'Version:', # HTML report's versionTag, version pair + 'version': '', # HTML report's versionTag, version pair + } + for line in summary_file: + if( in_product ): + if re_end.search(line): + in_product = False + elif re_name.search(line): + try: + summary_info['name'] = re.search(r'>(.+?)<', line).group(1).replace('-', ' ') + except: + True + elif re_version.search(line): + try: + summary_info['version'] = re.search(r'>(.+?)<', line).group(1) + if( "." in summary_info['version'] ): + (summary_info['vermajor'], summary_info['verminor']) = summary_info['version'].split(".") + else: + summary_info['vermajor'] = summary_info['version'] + summary_info['verminor'] = "0" + except: + True + if( summary_info['name'] and summary_info['version'] ): + in_product = False + summary_info['use_vermajor'] = summary_info['vermajor'] + summary_info['use_verminor'] = summary_info['verminor'] + summary_info['supportconfigKey'] = str(summary_info['tag']) + str(summary_info['vermajor']) + "sp" + str(summary_info['verminor']) + self.supportconfig_keys.append(summary_info['supportconfigKey']) + these_products.append(summary_info) + break + elif re_start.search(line): + in_product = True + return these_products + + def __get_products_summary_flat(self, this_pattern_tag, this_tag, use_this_tag, re_name, summary_file): + # Extracts product information in the summary.xml file from supportconfig + # Pattern directory flat format: patterns/<patternTag>/<use_tag><vermajor><verminor> + # Support + re_start = re.compile(r'<product\s|<product>', re.IGNORECASE) + re_end = re.compile(r'</product>', re.IGNORECASE) + re_version = re.compile(r'<version>.*</version>', re.IGNORECASE) + these_products = [] + in_product = False + summary_info = { + 'patternTag': this_pattern_tag, # Used to filter patterns for analysis + 'tag': this_tag, # The product's identity tag + 'vermajor': '', # The product's major version + 'verminor': '', # The product's minor version + 'use_tag': use_this_tag, # The tag used to select patterns + 'use_vermajor': '', # The major version used to select patterns + 'use_verminor': '', # The minor version used to select patterns + 'supportconfigKey': '', # Identifies the current supportconfig product + 'nameTag': 'Product:', # HTML report's nameTag, name pair + 'name': '', # HTML report's nameTag, name pair + 'versionTag': 'Version:', # HTML report's versionTag, version pair + 'version': '', # HTML report's versionTag, version pair + } + for line in summary_file: + if( in_product ): + if re_end.search(line): + in_product = False + elif re_name.search(line): + try: + summary_info['name'] = re.search(r'>(.+?)<', line).group(1).replace('-', ' ') + except: + True + elif re_version.search(line): + try: + summary_info['version'] = re.search(r'>(.+?)<', line).group(1) + if( "." in summary_info['version'] ): + (summary_info['vermajor'], summary_info['verminor']) = summary_info['version'].split(".") + else: + summary_info['vermajor'] = summary_info['version'] + summary_info['verminor'] = "0" + except: + True + if( summary_info['name'] and summary_info['version'] ): + in_product = False + summary_info['use_vermajor'] = summary_info['vermajor'] + summary_info['use_verminor'] = summary_info['verminor'] + summary_info['supportconfigKey'] = str(summary_info['tag']) + str(summary_info['vermajor']) + str(summary_info['verminor']) + self.supportconfig_keys.append(summary_info['supportconfigKey']) + these_products.append(summary_info) + break + elif re_start.search(line): + in_product = True + return these_products + def __get_products_list(self): products_found = [] + + #load summary.xml + try: + with open(self.location + "/summary.xml") as f: + summary_file = f.read().splitlines() + f.close() + except: + summary_file = [] + + #detect SLE for VMWARE + product_name = re.compile(r'<summary>SUSE Linux Enterprise Server .* for VMware</summary>', re.IGNORECASE) + product_list = self.__get_products_summary_simple('VMware', 'vmw', product_name, summary_file) + products_found = products_found + product_list + + #detect SLE for SAP + product_name = re.compile(r'<summary>SUSE LINUX Enterprise Server for SAP Applications.*</summary>', re.IGNORECASE) + product_list = self.__get_products_summary_simple('SAP', 'sap', product_name, summary_file) + products_found = products_found + product_list + + #get HAE information + product_name = re.compile(r'<summary>SUSE Linux Enterprise High Availability Extension.*</summary>', re.IGNORECASE) + product_list = self.__get_products_summary_simple('HAE', 'hae', product_name, summary_file) + products_found = products_found + product_list + + #get SUSE Manager Server information + product_name = re.compile(r'<summary>SUSE Manager Server.*</summary>', re.IGNORECASE) + product_list = self.__get_products_summary_flat('suma', 'sumasrv', 'suma', product_name, summary_file) + products_found = products_found + product_list + + #get SUSE Manager Retail Branch Server information + product_name = re.compile(r'<summary>SUSE Manager Retail Branch Server.*</summary>', re.IGNORECASE) + product_list = self.__get_products_summary_flat('suma', 'sumarbs', 'suma', product_name, summary_file) + products_found = products_found + product_list + + # email_to DO + del summary_file + + #load basic-environment.txt try: with open(self.location + "/basic-environment.txt") as f: @@ -626,7 +772,20 @@ except: basic_env_file = [] - product_info = {'tag': 'Unknown', 'patternTag': 'Unknown', 'nameTag': 'Distribution:', 'name': '', 'versionTag': 'Service Pack:', 'version': '', 'vermajor': '', 'verminor': ''} + product_info = { + 'patternTag': 'Unknown', # Used to filter patterns for analysis, format: patterns/<patternTag>/<use_tag><use_vermajor>sp<use_verminor> + 'tag': 'Unknown', # The product's identity tag + 'vermajor': '', # The product's major version + 'verminor': '', # The product's minor version + 'use_tag': 'Unknown', # The tag used to select patterns + 'use_vermajor': '', # The major version used to select patterns + 'use_verminor': '', # The minor version used to select patterns + 'supportconfigKey': '', # Identifies the current supportconfig product + 'nameTag': 'Distribution:', # HTML report's nameTag, name pair + 'name': '', # HTML report's nameTag, name pair + 'versionTag': 'Service Pack:', # HTML report's versionTag, version pair + 'version': '', # HTML report's versionTag, version pair + } #read basic-environment line by line to pull out data. in_date = False @@ -703,12 +862,23 @@ tmp_pretty_name = line.lower() if "suse alp" in tmp_pretty_name: product_info['tag'] = 'alp' + product_info['use_tag'] = product_info['tag'] product_info['patternTag'] = 'ALP' + elif "suse linux enterprise micro" in tmp_pretty_name: + product_info['tag'] = 'slem' + product_info['use_tag'] = 'sle' + product_info['patternTag'] = 'SLE' + elif "suse linux enterprise high performance computing" in tmp_pretty_name: + product_info['tag'] = 'hpc' + product_info['use_tag'] = 'sle' + product_info['patternTag'] = 'SLE' elif "suse linux enterprise" in tmp_pretty_name: product_info['tag'] = 'sle' + product_info['use_tag'] = product_info['tag'] product_info['patternTag'] = 'SLE' elif "opensuse leap" in tmp_pretty_name: product_info['tag'] = 'sle' + product_info['use_tag'] = product_info['tag'] product_info['patternTag'] = 'SLE' elif line.lower().startswith("version_id"): version_id = line.replace('"', "").strip().split('=')[1].split('.') @@ -738,117 +908,31 @@ else: self.distro_info['Summary'] = line.strip() - products_found.append(product_info) - - del basic_env_file - - - #load summary.xml - try: - with open(self.location + "/summary.xml") as f: - summary_file = f.read().splitlines() - f.close() - except: - summary_file = [] + if( product_info['tag'] == 'slem' ): + if( product_info['vermajor'] == "6" ): + product_info['patternTag'] = 'ALP' + product_info['use_tag'] = 'alp' + product_info['use_vermajor'] = "1" + else: + product_info['use_vermajor'] = "1" + str(product_info['vermajor']) + product_info['use_verminor'] = product_info['verminor'] + product_info['nameTag'] = 'Product:' + product_info['versionTag'] = 'Version:' + product_info['version'] = str(product_info['vermajor']) + "." + str(product_info['verminor']) + product_info['supportconfigKey'] = str(product_info['tag']) + str(product_info['vermajor']) + str(product_info['verminor']) + else: + product_info['use_vermajor'] = product_info['vermajor'] + product_info['use_verminor'] = product_info['verminor'] + product_info['supportconfigKey'] = str(product_info['tag']) + str(product_info['vermajor']) + "sp" + str(product_info['verminor']) - product_start = re.compile(r'<product\s|<product>', re.IGNORECASE) - product_end = re.compile(r'</product>', re.IGNORECASE) - in_product = False + self.supportconfig_keys.append(product_info['supportconfigKey']) - #detect SLE for VMWARE - product_name = re.compile(r'<summary>SUSE Linux Enterprise Server .* for VMware</summary>', re.IGNORECASE) - product_version = re.compile(r'<version>.*</version>', re.IGNORECASE) - summary_info = {'tag': 'vmw', 'patternTag': 'VMware', 'nameTag': 'Product:', 'name': '', 'versionTag': 'Version:', 'version': '', 'vermajor': '', 'verminor': ''} - for line in summary_file: - if( in_product ): - if product_end.search(line): - in_product = False - elif product_name.search(line): - try: - summary_info['name'] = re.search(r'>(.+?)<', line).group(1).replace('-', ' ') - except: - True - elif product_version.search(line): - try: - summary_info['version'] = re.search(r'>(.+?)<', line).group(1) - if( "." in summary_info['version'] ): - (summary_info['vermajor'], summary_info['verminor']) = summary_info['version'].split(".") - else: - summary_info['vermajor'] = summary_info['version'] - summary_info['verminor'] = "0" - except: - True - if( summary_info['name'] and summary_info['version'] ): - in_product = False - products_found.append(summary_info) - break - elif product_start.search(line): - in_product = True - - #detect SLE for SAP - product_name = re.compile(r'<summary>SUSE LINUX Enterprise Server for SAP Applications.*</summary>', re.IGNORECASE) - product_version = re.compile(r'<version>.*</version>', re.IGNORECASE) - summary_info = {'tag': 'sap', 'patternTag': 'SAP', 'nameTag': 'Product:', 'name': '', 'versionTag': 'Version:', 'version': '', 'vermajor': '', 'verminor': ''} - for line in summary_file: - if( in_product ): - if product_end.search(line): - in_product = False - elif product_name.search(line): - try: - summary_info['name'] = re.search(r'>(.+?)<', line).group(1).replace('-', ' ') - except: - True - elif product_version.search(line): - try: - summary_info['version'] = re.search(r'>(.+?)<', line).group(1) - if( "." in summary_info['version'] ): - (summary_info['vermajor'], summary_info['verminor']) = summary_info['version'].split(".") - else: - summary_info['vermajor'] = summary_info['version'] - summary_info['verminor'] = "0" - except: - True - if( summary_info['name'] and summary_info['version'] ): - in_product = False - products_found.append(summary_info) - break - elif product_start.search(line): - in_product = True + products_found.append(product_info) - #get HAE information - product_name = re.compile(r'<summary>SUSE Linux Enterprise High Availability Extension.*</summary>', re.IGNORECASE) - product_version = re.compile(r'<version>.*</version>', re.IGNORECASE) - summary_info = {'tag': 'hae', 'patternTag': 'HAE', 'nameTag': 'Product:', 'name': '', 'versionTag': 'Version:', 'version': '', 'vermajor': '', 'verminor': ''} - for line in summary_file: - if( in_product ): - if product_end.search(line): - in_product = False - elif product_name.search(line): - try: - summary_info['name'] = re.search(r'>(.+?)<', line).group(1).replace('-', ' ') - except: - True - elif product_version.search(line): - try: - summary_info['version'] = re.search(r'>(.+?)<', line).group(1) - if( "." in summary_info['version'] ): - (summary_info['vermajor'], summary_info['verminor']) = summary_info['version'].split(".") - else: - summary_info['vermajor'] = summary_info['version'] - summary_info['verminor'] = "0" - except: - True - if( summary_info['name'] and summary_info['version'] ): - in_product = False - products_found.append(summary_info) - break - elif product_start.search(line): - in_product = True + del basic_env_file - #get SUSE Manager information - # email_to DO + self.msg.min('Supportconfig Products', ' '.join(self.supportconfig_keys)) - del summary_file self.distro_info['name'] = os.path.basename(self.location) self.distro_info['path'] = os.path.dirname(self.location) self.json_data['sc_info'] = self.distro_info diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sca-server-report-1.6.1/spec/sca-server-report.changes new/sca-server-report-1.6.2/spec/sca-server-report.changes --- old/sca-server-report-1.6.1/spec/sca-server-report.changes 2024-01-09 19:30:42.600292275 +0100 +++ new/sca-server-report-1.6.2/spec/sca-server-report.changes 2024-01-29 20:57:22.443783464 +0100 @@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Mon Jan 29 19:56:43 UTC 2024 - jason.record@suse.com + +- Changes to version 1.6.2 + + Missing supportconfig key (bsc#1219252) + + Includes SLE Micro (bsc#1219255) + + SUMA detection (bsc#1219257) + +------------------------------------------------------------------- Tue Jan 9 18:29:47 UTC 2024 - jason.record@suse.com - Changes to version 1.6.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sca-server-report-1.6.1/spec/sca-server-report.spec new/sca-server-report-1.6.2/spec/sca-server-report.spec --- old/sca-server-report-1.6.1/spec/sca-server-report.spec 2024-01-09 19:29:05.543360155 +0100 +++ new/sca-server-report-1.6.2/spec/sca-server-report.spec 2024-01-29 20:57:33.871912765 +0100 @@ -1,6 +1,6 @@ # spec file for package sca-server-report # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2023-2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ %define sca_python %{libbase}/python Name: sca-server-report -Version: 1.6.1 +Version: 1.6.2 Release: 0 Summary: Supportconfig Analysis Server Report License: GPL-2.0
participants (1)
-
Source-Sync