Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package sca-patterns-base for openSUSE:Factory checked in at 2025-05-09 18:52:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/sca-patterns-base (Old) and /work/SRC/openSUSE:Factory/.sca-patterns-base.new.30101 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "sca-patterns-base" Fri May 9 18:52:15 2025 rev:14 rq:1276272 version:1.6.2 Changes: -------- --- /work/SRC/openSUSE:Factory/sca-patterns-base/sca-patterns-base.changes 2024-09-16 17:46:27.205449661 +0200 +++ /work/SRC/openSUSE:Factory/.sca-patterns-base.new.30101/sca-patterns-base.changes 2025-05-09 18:54:06.723952097 +0200 @@ -1,0 +2,6 @@ +Fri May 9 12:37:50 UTC 2025 - jason.rec...@suse.com + +- Changes to version 1.6.2 + + Fixed re syntax error (bsc#1241308) + +------------------------------------------------------------------- Old: ---- sca-patterns-base-1.6.1.tar.gz New: ---- sca-patterns-base-1.6.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sca-patterns-base.spec ++++++ --- /var/tmp/diff_new_pack.oDZtqZ/_old 2025-05-09 18:54:07.123968737 +0200 +++ /var/tmp/diff_new_pack.oDZtqZ/_new 2025-05-09 18:54:07.127968903 +0200 @@ -1,7 +1,7 @@ # # spec file for package sca-patterns-base # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -23,7 +23,7 @@ %define patgrp root Name: sca-patterns-base -Version: 1.6.1 +Version: 1.6.2 Release: 0 Summary: Supportconfig Analysis Pattern Base Libraries License: GPL-2.0-only ++++++ sca-patterns-base-1.6.1.tar.gz -> sca-patterns-base-1.6.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sca-patterns-base-1.6.1/libraries/python/Core.py new/sca-patterns-base-1.6.2/libraries/python/Core.py --- old/sca-patterns-base-1.6.1/libraries/python/Core.py 2023-06-30 13:43:55.764382204 +0200 +++ new/sca-patterns-base-1.6.2/libraries/python/Core.py 2025-05-09 15:04:31.337104942 +0200 @@ -4,7 +4,7 @@ Core library of functions for creating and processing python patterns """ ############################################################################## -# Copyright (C) 2021,2022 SUSE LLC +# Copyright (C) 2025 SUSE LLC ############################################################################## # # This program is free software; you can redistribute it and/or modify @@ -23,7 +23,7 @@ # David Hamner (ke7...@gmail.com) # Jason Record (jrec...@suse.com) # -# Modified: 2022 Oct 26 +# Modified: 2025 May 08 # ############################################################################## @@ -277,11 +277,11 @@ except Exception as error: updateStatus(ERROR, "ERROR: Cannot open " + FILE_OPEN + ": " + str(error)) - SECTION = re.compile('^#==\[') + SECTION = re.compile(r'^#==\[') for LINE in FILE: LINE = LINE.strip("\n") if inSection: - CONTENT[I] = re.sub('^#\s+', '', LINE) + CONTENT[I] = re.sub(r"^#\s+", '', LINE) I += 1 RESULT = True inSection = False @@ -341,7 +341,7 @@ except Exception as error: updateStatus(ERROR, "ERROR: Cannot open " + FILE_OPEN + ": " + str(error)) SectionTag = re.compile(SECTION) - CommentedLine = re.compile('^#|^\s+#') + CommentedLine = re.compile(r"^#|^\s+#") for line in FILE: line = line.strip("\n") if line.startswith('#==['): @@ -351,7 +351,7 @@ break elif ( SectionName == '' ): # print " SectionName before = " + str(line) - SectionName = re.sub('^#', '', line).strip() + SectionName = re.sub(r'^#', '', line).strip() # print " SectionName after = " + str(SectionName) elif SectionTag.search(SectionName): if( len(line) > 0 ): @@ -398,7 +398,7 @@ except Exception as error: updateStatus(ERROR, "ERROR: Cannot open " + FILE_OPEN + ": " + str(error)) SectionTag = re.compile(SECTION) - CommentedLine = re.compile('^#|^\s+#') + CommentedLine = re.compile(r"^#|^\s+#") for line in FILE: line = line.strip("\n") if line.startswith('#==['): @@ -408,7 +408,7 @@ break elif ( SectionName == '' ): # print " SectionName before = " + str(line) - SectionName = re.sub('^#', '', line).strip() + SectionName = re.sub(r'^#', '', line).strip() # print " SectionName after = " + str(SectionName) elif SectionTag.search(SectionName): if( len(line) > 0 ): @@ -463,7 +463,7 @@ break elif ( SectionName == '' ): # print " SectionName before = " + str(line) - SectionName = re.sub('^#', '', line).strip() + SectionName = re.sub(r'^#', '', line).strip() # print " SectionName after = " + str(SectionName) elif SectionTag.search(SectionName): if( len(line) > 0 ): @@ -504,7 +504,7 @@ FILE = open(path + "/" + FILE_OPEN, "rt", errors='ignore') except Exception as error: updateStatus(ERROR, "ERROR: Cannot open " + FILE_OPEN + ": " + str(error)) - CommentedLine = re.compile('^#|^\s+#') + CommentedLine = re.compile(r"^#|^\s+#") for line in FILE: line = line.strip("\n") if line.startswith('#==['): @@ -514,7 +514,7 @@ break elif ( SectionName == '' ): # print " SectionName before = " + str(line) - SectionName = re.sub('^#', '', line).strip() + SectionName = re.sub(r'^#', '', line).strip() # print " SectionName after = " + str(SectionName) elif( SECTION == SectionName ): if( len(line) > 0 ): @@ -538,13 +538,13 @@ Returns: A list of version string elements """ # print "normalizeVersionString ORIGINAL versionString = '" + versionString + "'" - versionString = re.sub("[\.,\-,_,+]", "|", versionString) + versionString = re.sub(r"[\.,\-,_,+]", "|", versionString) # print "normalizeVersionString SEPERATORS versionString = '" + versionString + "'" - versionString = re.sub("([A-Z,a-z]+)", "|\\1|", versionString) + versionString = re.sub(r"([A-Z,a-z]+)", "|\\1|", versionString) # print "normalizeVersionString LETTER GROUPS versionString = '" + versionString + "'" versionString = versionString.lstrip("0") # print "normalizeVersionString LEAD ZEROS versionString = '" + versionString + "'" - versionString = re.sub("\|\|", "|", versionString) + versionString = re.sub(r"\|\|", "|", versionString) # print "normalizeVersionString DOUBLE BARS versionString = '" + versionString + "'" versionString = versionString.rstrip("|") # print "normalizeVersionString TRAILING BARS versionString = '" + versionString + "'" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sca-patterns-base-1.6.1/libraries/python/HAE.py new/sca-patterns-base-1.6.2/libraries/python/HAE.py --- old/sca-patterns-base-1.6.1/libraries/python/HAE.py 2023-06-30 13:43:55.764382204 +0200 +++ new/sca-patterns-base-1.6.2/libraries/python/HAE.py 2025-05-09 15:04:31.337104942 +0200 @@ -5,7 +5,7 @@ High Availability Extension (HAE) clustering """ ############################################################################## -# Copyright (C) 2014, 2022 SUSE LLC +# Copyright (C) 2014, 2022, 2025 SUSE LLC ############################################################################## # # This program is free software; you can redistribute it and/or modify @@ -23,7 +23,7 @@ # Authors/Contributors: # Jason Record <jason.rec...@suse.com> # -# Modified: 2022 Oct 26 +# Modified: 2025 May 08 # ############################################################################## @@ -70,7 +70,7 @@ SECTION = 'cibadmin -Q' CONTENT = {} if Core.getSection(FILE_OPEN, SECTION, CONTENT): - CONNECTED = re.compile('<cib.*epoch=') + CONNECTED = re.compile(r'<cib.*epoch=') for LINE in CONTENT: if CONNECTED.search(CONTENT[LINE]): return True @@ -135,9 +135,9 @@ SBD_PATH = '' SBD_DEVICE = '' SBD_OPTS = '' - DUMPCMD = re.compile("/usr/sbin/sbd -d .* dump") - SYSCONFIG = re.compile("^# /etc/sysconfig/sbd") - INVALID = re.compile("Syntax", re.IGNORECASE) + DUMPCMD = re.compile(r"/usr/sbin/sbd -d .* dump") + SYSCONFIG = re.compile(r"^# /etc/sysconfig/sbd") + INVALID = re.compile(r"Syntax", re.IGNORECASE) for LINE in FILE: if DUMP_FOUND: # print "Dump: " + str(LINE) @@ -236,7 +236,7 @@ FILE_OPEN = 'ha.txt' CONTENT = {} inNode = False - endNode = re.compile('/>$') + endNode = re.compile(r'/>$') if Core.getSection(FILE_OPEN, 'cibadmin -Q', CONTENT): for LINE in CONTENT: DATA = CONTENT[LINE].strip() @@ -248,7 +248,7 @@ NODE = {} inNode = False elif "<nvpair" in CONTENT[LINE]: - PARTS = re.sub('^<nvpair|/>$|>$|"', '', DATA).strip().split() + PARTS = re.sub(r'^<nvpair|/>$|>$|"', '', DATA).strip().split() # print "cibadmin PARTS = " + str(PARTS) KEY = '' VALUE = '' @@ -256,13 +256,13 @@ if "name" in PARTS[I].lower(): KEY = PARTS[I].split("=")[IDX_VALUE] elif "value" in PARTS[I].lower(): - VALUE = re.sub('/>.*$', '', PARTS[I].split("=")[IDX_VALUE]) + VALUE = re.sub(r'/>.*$', '', PARTS[I].split("=")[IDX_VALUE]) NODE.update({KEY:VALUE}) elif "<node " in DATA: inNode = True if endNode.search(DATA): inNode = False - PARTS = re.sub('^<node|/>$|>$|"', '', DATA).strip().split() + PARTS = re.sub(r'^<node|/>$|>$|"', '', DATA).strip().split() # print "cibadmin PARTS = " + str(PARTS) KEY = '' VALUE = '' @@ -277,7 +277,7 @@ for LINE in CONTENT: if "<node_state " in CONTENT[LINE]: NODE_STATE = {} - PARTS = re.sub('<node_state|/>$|>$|"', '', CONTENT[LINE]).strip().split() + PARTS = re.sub(r'<node_state|/>$|>$|"', '', CONTENT[LINE]).strip().split() # print "cibadmin PARTS = " + str(PARTS) KEY = '' VALUE = '' @@ -302,7 +302,7 @@ NODE = {} inNode = False elif "<nvpair" in CONTENT[LINE]: - PARTS = re.sub('^<nvpair|/>$|>$|"', '', DATA).strip().split() + PARTS = re.sub(r'^<nvpair|/>$|>$|"', '', DATA).strip().split() # print "cib.xml PARTS = " + str(PARTS) KEY = '' VALUE = '' @@ -310,13 +310,13 @@ if "name" in PARTS[I].lower(): KEY = PARTS[I].split("=")[IDX_VALUE] elif "value" in PARTS[I].lower(): - VALUE = re.sub('/>.*$', '', PARTS[I].split("=")[IDX_VALUE]) + VALUE = re.sub(r'/>.*$', '', PARTS[I].split("=")[IDX_VALUE]) NODE.update({KEY:VALUE}) elif "<node " in DATA: inNode = True if endNode.search(DATA): inNode = False - PARTS = re.sub('^<node|/>$|>$|"', '', DATA).strip().split() + PARTS = re.sub(r'^<node|/>$|>$|"', '', DATA).strip().split() # print "cib.xml PARTS = " + str(PARTS) KEY = '' VALUE = '' @@ -372,13 +372,13 @@ if "name" in PARTS[I].lower(): KEY = PARTS[I].split("=")[IDX_VALUE] elif "value" in PARTS[I].lower(): - VALUE = re.sub('/>.*$', '', PARTS[I].split("=")[IDX_VALUE]) + VALUE = re.sub(r'/>.*$', '', PARTS[I].split("=")[IDX_VALUE]) CLUSTER.update({KEY:VALUE}) elif "<cluster_property_set" in CONTENT[LINE]: inBootStrap = True CLUSTER.update({'connected-to-cluster':True}) elif "<cib " in CONTENT[LINE]: - PARTS = re.sub('<cib|>', '', CONTENT[LINE]).strip().split('"') + PARTS = re.sub(r'<cib|>', '', CONTENT[LINE]).strip().split('"') if( len(PARTS[-1]) == 0 ): del(PARTS[-1]) # print "cibadmin PARTS = " + str(PARTS) @@ -406,17 +406,17 @@ if "name" in PARTS[I].lower(): KEY = PARTS[I].split("=")[IDX_VALUE] elif "value" in PARTS[I].lower(): - VALUE = re.sub('/>.*$', '', PARTS[I].split("=")[IDX_VALUE]) + VALUE = re.sub(r'/>.*$', '', PARTS[I].split("=")[IDX_VALUE]) CLUSTER.update({KEY:VALUE}) elif "<cluster_property_set" in CONTENT[LINE]: inBootStrap = True CLUSTER.update({'connected-to-cluster':False}) elif "<cib " in CONTENT[LINE]: - PARTS = re.sub('<cib|>', '', CONTENT[LINE]).strip().split('"') + PARTS = re.sub(r'<cib|>', '', CONTENT[LINE]).strip().split('"') if( len(PARTS[-1]) == 0 ): del(PARTS[-1]) # print "cib.xml PARTS = " + str(PARTS) - key = re.compile("=$") + key = re.compile(r"=$") for I in range(0, len(PARTS)): if key.search(PARTS[I]): KEY_STR = PARTS[I].strip().strip('=') @@ -455,7 +455,7 @@ for LINE in CONTENT: if( len(CONTENT[LINE]) > 0 ): KEY = CONTENT[LINE].split('=')[IDX_KEY].strip().upper() - VALUE = re.sub('"|\'', '', CONTENT[LINE].split('=')[IDX_VALUE]).strip() + VALUE = re.sub(r'"|\'', '', CONTENT[LINE].split('=')[IDX_VALUE]).strip() CONFIG.update({KEY:VALUE}) # print "CONFIG Size = " + str(len(CONFIG)) @@ -499,12 +499,12 @@ inMember = False if Core.getSection(FILE_OPEN, SECTION, CONTENT): - TAG = re.compile('^\S+\s+{') + TAG = re.compile(r"^\S+\s+{") IFACE_ID = 'interface' IFACE = re.compile(IFACE_ID + '\s+{', re.IGNORECASE) MEMBER_ID = 'member' MEMBER = re.compile(MEMBER_ID + '\s+{', re.IGNORECASE) - SKIP_LINE = re.compile('^#|^\s+$') + SKIP_LINE = re.compile(r"^#|^\s+$") for LINE in CONTENT: DATA = CONTENT[LINE].strip() if SKIP_LINE.search(DATA): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sca-patterns-base-1.6.1/libraries/python/MPIO.py new/sca-patterns-base-1.6.2/libraries/python/MPIO.py --- old/sca-patterns-base-1.6.1/libraries/python/MPIO.py 2023-06-30 13:43:55.764382204 +0200 +++ new/sca-patterns-base-1.6.2/libraries/python/MPIO.py 2025-05-09 15:04:31.337104942 +0200 @@ -4,7 +4,7 @@ Library of python functions used when dealing with issues incident to MPIO """ ############################################################################## -# Copyright (C) 2015 SUSE LLC +# Copyright (C) 2015, 2025 SUSE LLC ############################################################################## # # This program is free software; you can redistribute it and/or modify @@ -22,7 +22,7 @@ # Authors/Contributors: # Jason Record (jrec...@suse.com) # -# Modified: 2015 Jun 23 +# Modified: 2025 May 08 # ############################################################################## @@ -140,8 +140,8 @@ IN_DEVICE = False MPATH = {} ENTRIES = [] - DeviceStart = re.compile(" dm-\d+ ") - DeviceEntry = re.compile("\d+:\d+:\d+:\d+\s+\D+\s+\d+:\d+", re.IGNORECASE) + DeviceStart = re.compile(r" dm-\d+ ") + DeviceEntry = re.compile(r"\d+:\d+:\d+:\d+\s+\D+\s+\d+:\d+", re.IGNORECASE) if Core.getRegExSection(FILE_OPEN, SECTION, CONTENT): for LINE in CONTENT: if DeviceStart.search(LINE): @@ -220,7 +220,7 @@ """ ID = '' DEV = DEVICE_PATH.split("/")[-1] + " " - Digits = re.compile("\d+") + Digits = re.compile(r"\d+") #print "Evaluate", DEV if DEV.startswith("sd"): #check for system device name in the form sd? because they are easy to find ID = re.sub(Digits, "", DEV) @@ -237,8 +237,8 @@ ID = re.sub(Digits, "", LINKED_DEV) else: Core.getRegExSection('mpio.txt', '/udevadm info -e', UDEV_CONTENT) - BlockDev = re.compile('^P:\s+/devices/virtual/block/' + str(LINKED_DEV)) - EndBlockDev = re.compile('^$') + BlockDev = re.compile(fr"^P:\s+/devices/virtual/block/{LINKED_DEV}) + EndBlockDev = re.compile(r'^$') IN_DEV = False for UDEV_LINE in UDEV_CONTENT: if( IN_DEV ): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sca-patterns-base-1.6.1/libraries/python/SUSE.py new/sca-patterns-base-1.6.2/libraries/python/SUSE.py --- old/sca-patterns-base-1.6.1/libraries/python/SUSE.py 2023-06-30 13:43:55.764382204 +0200 +++ new/sca-patterns-base-1.6.2/libraries/python/SUSE.py 2025-05-09 15:04:31.341105005 +0200 @@ -4,7 +4,7 @@ Library of functions for creating python patterns specific to SUSE """ ############################################################################## -# Copyright (C) 2013-2023 SUSE LLC +# Copyright (C) 2013-2025 SUSE LLC ############################################################################## # # This program is free software; you can redistribute it and/or modify @@ -23,8 +23,8 @@ # Jason Record (jason.rec...@suse.com) # David Hamner (ke7...@gmail.com) # -# Modified: 2023 Jun 06 -# Version: 1.0.2 +# Modified: 2025 May 08 +# Version: 1.0.3 # ############################################################################## @@ -35,6 +35,7 @@ import ast # Kernel version constants +# https://www.suse.com/support/kb/doc/?id=000019587 SLE9GA = '2.6.5-7.97' SLE9SP0 = '2.6.5-7.97' SLE9SP1 = '2.6.5-7.139' @@ -68,7 +69,10 @@ SLE15SP2 = '5.3.18-22.2' SLE15SP3 = '5.3.18-57.3' SLE15SP4 = '5.14.21-150400.22.1' -SLE15SP5 = '5.995' #Update to actual version when/if applicable +SLE15SP5 = '5.14.21-150500.53.2' +SLE15SP6 = '6.4.0-150600.21.3' +SLE15SP7 = '5.999' #Update to actual version when/if applicable +ALP1SP0 = '6.0' #Update to actual version when/if applicable def packageInstalled(PackageName): """ @@ -119,7 +123,7 @@ if (Core.getSection(fileOpen, section, content)): for line in content: if content[line].startswith(PackageName + " "): - tmpContent = re.sub(' +', ' ', content[line]) + tmpContent = re.sub(r' +', ' ', content[line]) tmpContent = tmpContent.split(' ') # print "getRpmInfo: tmpContent = " + str(tmpContent) rpmInfo['name'] = tmpContent[0] #name @@ -223,7 +227,7 @@ self.patchlist.append(dict(PATCH_DICTIONARY)) if( len(self.patch_name) == 0 ): self.patch_name = PATCH_DICTIONARY['Name'] - PATCH = re.compile(r'\|\s+' + self.patch_name + '\s+\|') + PATCH = re.compile(fr"\|\s+{self.patch_name}\s+\|") self.valid = True self.patch_count = len(self.patchlist) # print "Total Patches: " + str(self.patch_count) + "\n" @@ -411,7 +415,7 @@ SERVICE_INFO['Running'] = 0 SECTION = "/etc/init.d/" + SERVICE_NAME + " status" if Core.getSection(FILE_OPEN, SECTION, CONTENT): - STATE = re.compile('running', re.IGNORECASE) + STATE = re.compile(r'running', re.IGNORECASE) for LINE in CONTENT: if STATE.search(CONTENT[LINE]): SERVICE_INFO['Running'] = 1 @@ -419,7 +423,7 @@ else: SECTION = '/bin/ps' if Core.getSection(FILE_OPEN, SECTION, CONTENT): - STATE = re.compile('/' + SERVICE_NAME + '\s|/' + SERVICE_NAME + '$', re.IGNORECASE) + STATE = re.compile(fr"/{SERVICE_NAME}\s|/{SERVICE_NAME}$", re.IGNORECASE) for LINE in CONTENT: if STATE.search(CONTENT[LINE]): # print "State Found: " + str(CONTENT[LINE]) @@ -431,7 +435,7 @@ CONTENT = {} IDX_RUN_LEVEL = 4 if Core.getSection(FILE_OPEN, SECTION, CONTENT): - STATE = re.compile("Master Resource Control: runlevel.*has been reached", re.IGNORECASE) + STATE = re.compile(r"Master Resource Control: runlevel.*has been reached", re.IGNORECASE) for LINE in CONTENT: if STATE.search(CONTENT[LINE]): SERVICE_INFO['RunLevel'] = CONTENT[LINE].strip().split()[IDX_RUN_LEVEL] @@ -442,7 +446,7 @@ CONTENT = {} IDX_RUN_LEVEL = 0 if Core.getSection(FILE_OPEN, SECTION, CONTENT): - STATE = re.compile("^" + SERVICE_NAME + " ", re.IGNORECASE) + STATE = re.compile(r"^" + SERVICE_NAME + " ", re.IGNORECASE) LINE_CONTENT = {} for LINE in CONTENT: if STATE.search(CONTENT[LINE]): @@ -626,7 +630,7 @@ import re SERVER = SUSE.getHostInfo() - SLE = re.compile("SUSE Linux Enterprise Server", re.IGNORECASE) + SLE = re.compile(r"SUSE Linux Enterprise Server", re.IGNORECASE) if SLE.search(SERVER['Distro']): if( SERVER['DistroVersion'] >= 11 and SERVER['DistroVersion'] < 12 ): Core.updateStatus(Core.WARN, "SLES" + str(SERVER['DistroVersion']) + "SP" + str(SERVER['DistroPatchLevel']) + ": Testing required") @@ -664,8 +668,8 @@ # print "getHostInfo: Error opening file: %s" % error Core.updateStatus(Core.ERROR, "ERROR: Cannot open " + FILE_OPEN) - OSRELEASE = re.compile('/etc/os-release', re.IGNORECASE) - RELEASE = re.compile('/etc/SuSE-release', re.IGNORECASE) + OSRELEASE = re.compile(r'/etc/os-release', re.IGNORECASE) + RELEASE = re.compile(r'/etc/SuSE-release', re.IGNORECASE) for LINE in FILE: if UNAME_FOUND: SERVER_DICTIONARY['Hostname'] = LINE.split()[IDX_HOSTNAME] @@ -933,9 +937,9 @@ Core.updateStatus(Core.IGNORE, "Not disabled repositories detected") """ fileOpen = "updates.txt" - section = "/zypper\s--.*\srepos" - startRepos = re.compile("^-*\+-*\+") - endRepos = re.compile("^#==|^$") + section = r'/zypper\s--.*\srepos' + startRepos = re.compile(r"^-*\+-*\+") + endRepos = re.compile(r"^#==|^$") REPOS = [] IN_REPOS = False content = {} @@ -994,9 +998,9 @@ Core.updateStatus(Core.CRIT, "No base products found") """ fileOpen = "updates.txt" - section = "/zypper\s--.*\sproducts" - startProducts = re.compile("^-*\+-*\+") - endProducts = re.compile("^#==|^$") + section = r'/zypper\s--.*\sproducts' + startProducts = re.compile(r"^-*\+-*\+") + endProducts = re.compile(r"^#==|^$") PRODUCTS = [] IN_PRODUCTS = False content = {} @@ -1387,8 +1391,8 @@ ARRAY_VALUES = [] ARRAY_KEY = '' LVM_SECTION_NAME = '' - LVM_SECTION = re.compile("^\S*\s*{", re.IGNORECASE) - SKIP_LINE = re.compile("^\s*#|^\s*$", re.IGNORECASE) + LVM_SECTION = re.compile(r"^\S*\s*{", re.IGNORECASE) + SKIP_LINE = re.compile(r"^\s*#|^\s*$", re.IGNORECASE) if Core.getRegExSection(FILE_OPEN, SECTION, CONTENT): for LINE in CONTENT: if SKIP_LINE.search(LINE): @@ -1536,7 +1540,7 @@ DEV = '' if( Core.isFileActive(NETWORK_FILE) ): - STARTNIC = re.compile("\d:.*: <.*>.* mtu ") + STARTNIC = re.compile(r"\d:.*: <.*>.* mtu ") if( Core.getRegExSection(NETWORK_FILE, '/ip addr', IPADDR) ): for LINE in IPADDR: if STARTNIC.search(LINE): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sca-patterns-base-1.6.1/libraries/python/suse_base2.py new/sca-patterns-base-1.6.2/libraries/python/suse_base2.py --- old/sca-patterns-base-1.6.1/libraries/python/suse_base2.py 2024-09-16 16:53:51.598791696 +0200 +++ new/sca-patterns-base-1.6.2/libraries/python/suse_base2.py 2025-05-09 15:04:31.341105005 +0200 @@ -4,7 +4,7 @@ Library of functions for creating python patterns specific to SUSE ''' ############################################################################## -# Copyright (C) 2023 SUSE LLC +# Copyright (C) 2025 SUSE LLC ############################################################################## # # This program is free software; you can redistribute it and/or modify @@ -21,8 +21,8 @@ # ############################################################################## __author__ = 'Jason Record <jason.rec...@suse.com>' -__date_modified__ = '2023 Nov 13' -__version__ = '2.0.0_dev10' +__date_modified__ = '2025 May 08' +__version__ = '2.0.1' import re import os @@ -33,6 +33,7 @@ import json # Kernel version constants +# https://www.suse.com/support/kb/doc/?id=000019587 SLE9GA = '2.6.5-7.97' SLE9SP0 = '2.6.5-7.97' SLE9SP1 = '2.6.5-7.139' @@ -66,8 +67,9 @@ SLE15SP2 = '5.3.18-22.2' SLE15SP3 = '5.3.18-57.3' SLE15SP4 = '5.14.21-150400.22.1' -SLE15SP5 = '5.14.21-150500.46.4' -SLE15SP6 = '5.999' #Update to actual version when/if applicable +SLE15SP5 = '5.14.21-150500.53.2' +SLE15SP6 = '6.4.0-150600.21.3' +SLE15SP7 = '5.999' #Update to actual version when/if applicable ALP1SP0 = '6.0' #Update to actual version when/if applicable def package_is_installed(package_name, _pat): @@ -652,8 +654,8 @@ Refresh - True (Yes) is the repository is set to refresh, otherwise False (No). ''' repos_section = core.get_file_section(_pat.get_supportconfig_path('updates.txt'), '/zypper\s--.*\srepos') - startrepos = re.compile("^-*\+-*\+") - endrepos = re.compile("^#==|^$") + startrepos = re.compile(r"^-*\+-*\+") + endrepos = re.compile(r"^#==|^$") repos = [] in_repos = False @@ -706,8 +708,8 @@ is_base - True (Yes) is the product is a base product, otherwise False (No). ''' prod_section = core.get_file_section(_pat.get_supportconfig_path('updates.txt'), '/zypper\s--.*\sproducts') - startProducts = re.compile("^-*\+-*\+") - endProducts = re.compile("^#==|^$") + startProducts = re.compile(r"^-*\+-*\+") + endProducts = re.compile(r"^#==|^$") products = [] in_products = False for line in prod_section: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sca-patterns-base-1.6.1/libraries/python/suse_core2.py new/sca-patterns-base-1.6.2/libraries/python/suse_core2.py --- old/sca-patterns-base-1.6.1/libraries/python/suse_core2.py 2024-09-16 16:53:51.598791696 +0200 +++ new/sca-patterns-base-1.6.2/libraries/python/suse_core2.py 2025-05-09 15:04:31.341105005 +0200 @@ -4,7 +4,7 @@ Core library of functions for creating and processing python patterns ''' ############################################################################## -# Copyright (C) 2023 SUSE LLC +# Copyright (C) 2025 SUSE LLC ############################################################################## # # This program is free software; you can redistribute it and/or modify @@ -21,8 +21,8 @@ # ############################################################################## __author__ = 'Jason Record <jason.rec...@suse.com>' -__date_modified__ = '2023 Oct 05' -__version__ = '2.0.0_dev3' +__date_modified__ = '2025 May 07' +__version__ = '2.0.1' import sys import os @@ -98,7 +98,7 @@ ''' section_list = [] in_section = False - section = re.compile('^#==\[') + section = re.compile(r'^#==[') entire_file = get_entire_file(_file) @@ -120,7 +120,7 @@ section_name = '' section_content = [] section_tag = re.compile(_section) - commented_line = re.compile('^#|^\s+#') + commented_line = re.compile(r"^#|^\s+#") for line in _content: line = line.strip("\n") @@ -162,10 +162,10 @@ Args: version_to_normalize Returns: A list of version string elements ''' - version_to_normalize = re.sub("[\.,\-,_,+]", "|", version_to_normalize) - version_to_normalize = re.sub("([A-Z,a-z]+)", "|\\1|", version_to_normalize) + version_to_normalize = re.sub(r"[\.,\-,_,+]", "|", version_to_normalize) + version_to_normalize = re.sub(r"([A-Z,a-z]+)", "|\\1|", version_to_normalize) version_to_normalize = version_to_normalize.lstrip("0") - version_to_normalize = re.sub("\|\|", "|", version_to_normalize) + version_to_normalize = re.sub(r"\|\|", "|", version_to_normalize) version_to_normalize = version_to_normalize.rstrip("|") return version_to_normalize.split("|")