2023-06-21 09:20:51 |
nikhil kshirsagar |
bug |
|
|
added bug |
2023-06-21 09:22:16 |
nikhil kshirsagar |
description |
As described in https://github.com/sosreport/sos/issues/3261 , the flags=re.IGNORECASE argument cannot be passed with a compiled pattern.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/sos/report/__init__.py", line 1459, in postproc
plug.postproc()
File "/usr/lib/python3/dist-packages/sos/report/plugins/juju.py", line 69, in postproc
self.do_file_private_sub(agents_path)
File "/usr/lib/python3/dist-packages/sos/report/plugins/__init__.py", line 1257, in do_file_private_sub
self.do_file_sub(path, _certmatch, replace)
File "/usr/lib/python3/dist-packages/sos/report/plugins/__init__.py", line 1287, in do_file_sub
result, replacements = re.subn(regexp, subst, content,
File "/usr/lib/python3.8/re.py", line 221, in subn
return _compile(pattern, flags).subn(repl, string, count)
File "/usr/lib/python3.8/re.py", line 299, in _compile
raise ValueError(
ValueError: cannot process flags argument with a compiled pattern
The issue was introduced by this commit - https://github.com/sosreport/sos/commit/bb43ac3b0dddcecf9bf34e489490296e15a2addc
It is fixed by https://github.com/sosreport/sos/pull/3263 |
As described in https://github.com/sosreport/sos/issues/3261 , the flags=re.IGNORECASE argument cannot be passed with a compiled pattern. This affects sos upstream 4.5.4 and back.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/sos/report/__init__.py", line 1459, in postproc
plug.postproc()
File "/usr/lib/python3/dist-packages/sos/report/plugins/juju.py", line 69, in postproc
self.do_file_private_sub(agents_path)
File "/usr/lib/python3/dist-packages/sos/report/plugins/__init__.py", line 1257, in do_file_private_sub
self.do_file_sub(path, _certmatch, replace)
File "/usr/lib/python3/dist-packages/sos/report/plugins/__init__.py", line 1287, in do_file_sub
result, replacements = re.subn(regexp, subst, content,
File "/usr/lib/python3.8/re.py", line 221, in subn
return _compile(pattern, flags).subn(repl, string, count)
File "/usr/lib/python3.8/re.py", line 299, in _compile
raise ValueError(
ValueError: cannot process flags argument with a compiled pattern
The issue was introduced by this commit - https://github.com/sosreport/sos/commit/bb43ac3b0dddcecf9bf34e489490296e15a2addc
It is fixed by https://github.com/sosreport/sos/pull/3263 |
|
2023-06-21 09:22:29 |
nikhil kshirsagar |
description |
As described in https://github.com/sosreport/sos/issues/3261 , the flags=re.IGNORECASE argument cannot be passed with a compiled pattern. This affects sos upstream 4.5.4 and back.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/sos/report/__init__.py", line 1459, in postproc
plug.postproc()
File "/usr/lib/python3/dist-packages/sos/report/plugins/juju.py", line 69, in postproc
self.do_file_private_sub(agents_path)
File "/usr/lib/python3/dist-packages/sos/report/plugins/__init__.py", line 1257, in do_file_private_sub
self.do_file_sub(path, _certmatch, replace)
File "/usr/lib/python3/dist-packages/sos/report/plugins/__init__.py", line 1287, in do_file_sub
result, replacements = re.subn(regexp, subst, content,
File "/usr/lib/python3.8/re.py", line 221, in subn
return _compile(pattern, flags).subn(repl, string, count)
File "/usr/lib/python3.8/re.py", line 299, in _compile
raise ValueError(
ValueError: cannot process flags argument with a compiled pattern
The issue was introduced by this commit - https://github.com/sosreport/sos/commit/bb43ac3b0dddcecf9bf34e489490296e15a2addc
It is fixed by https://github.com/sosreport/sos/pull/3263 |
As described in https://github.com/sosreport/sos/issues/3261 , the flags=re.IGNORECASE argument cannot be passed with a compiled pattern. This affects sos upstream 4.5.4 and 4.5.3.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/sos/report/__init__.py", line 1459, in postproc
plug.postproc()
File "/usr/lib/python3/dist-packages/sos/report/plugins/juju.py", line 69, in postproc
self.do_file_private_sub(agents_path)
File "/usr/lib/python3/dist-packages/sos/report/plugins/__init__.py", line 1257, in do_file_private_sub
self.do_file_sub(path, _certmatch, replace)
File "/usr/lib/python3/dist-packages/sos/report/plugins/__init__.py", line 1287, in do_file_sub
result, replacements = re.subn(regexp, subst, content,
File "/usr/lib/python3.8/re.py", line 221, in subn
return _compile(pattern, flags).subn(repl, string, count)
File "/usr/lib/python3.8/re.py", line 299, in _compile
raise ValueError(
ValueError: cannot process flags argument with a compiled pattern
The issue was introduced by this commit - https://github.com/sosreport/sos/commit/bb43ac3b0dddcecf9bf34e489490296e15a2addc
It is fixed by https://github.com/sosreport/sos/pull/3263 |
|
2023-06-21 09:23:50 |
nikhil kshirsagar |
sosreport (Ubuntu): status |
New |
Fix Committed |
|
2023-06-21 09:23:56 |
nikhil kshirsagar |
sosreport (Ubuntu): assignee |
|
nikhil kshirsagar (nkshirsagar) |
|
2023-06-21 09:24:00 |
nikhil kshirsagar |
sosreport (Ubuntu): assignee |
nikhil kshirsagar (nkshirsagar) |
|
|
2023-06-21 09:40:07 |
Dariusz Gadomski |
nominated for series |
|
Ubuntu Lunar |
|
2023-06-21 09:40:07 |
Dariusz Gadomski |
bug task added |
|
sosreport (Ubuntu Lunar) |
|
2023-06-21 09:40:07 |
Dariusz Gadomski |
nominated for series |
|
Ubuntu Kinetic |
|
2023-06-21 09:40:07 |
Dariusz Gadomski |
bug task added |
|
sosreport (Ubuntu Kinetic) |
|
2023-06-21 09:40:07 |
Dariusz Gadomski |
nominated for series |
|
Ubuntu Focal |
|
2023-06-21 09:40:07 |
Dariusz Gadomski |
bug task added |
|
sosreport (Ubuntu Focal) |
|
2023-06-21 09:40:07 |
Dariusz Gadomski |
nominated for series |
|
Ubuntu Mantic |
|
2023-06-21 09:40:07 |
Dariusz Gadomski |
bug task added |
|
sosreport (Ubuntu Mantic) |
|
2023-06-21 09:40:07 |
Dariusz Gadomski |
nominated for series |
|
Ubuntu Jammy |
|
2023-06-21 09:40:07 |
Dariusz Gadomski |
bug task added |
|
sosreport (Ubuntu Jammy) |
|
2023-06-21 09:40:13 |
Dariusz Gadomski |
sosreport (Ubuntu Mantic): status |
Fix Committed |
Fix Released |
|
2023-06-21 09:40:17 |
Dariusz Gadomski |
sosreport (Ubuntu Mantic): importance |
Undecided |
Medium |
|
2023-06-21 09:40:20 |
Dariusz Gadomski |
sosreport (Ubuntu Lunar): importance |
Undecided |
Medium |
|
2023-06-21 09:40:24 |
Dariusz Gadomski |
sosreport (Ubuntu Kinetic): importance |
Undecided |
Medium |
|
2023-06-21 09:40:26 |
Dariusz Gadomski |
sosreport (Ubuntu Jammy): importance |
Undecided |
Medium |
|
2023-06-21 09:40:29 |
Dariusz Gadomski |
sosreport (Ubuntu Focal): importance |
Undecided |
Medium |
|
2023-06-21 09:40:42 |
Dariusz Gadomski |
sosreport (Ubuntu Focal): assignee |
|
nikhil kshirsagar (nkshirsagar) |
|
2023-06-21 09:40:51 |
Dariusz Gadomski |
sosreport (Ubuntu Jammy): assignee |
|
nikhil kshirsagar (nkshirsagar) |
|
2023-06-21 09:41:05 |
Dariusz Gadomski |
sosreport (Ubuntu Kinetic): assignee |
|
nikhil kshirsagar (nkshirsagar) |
|
2023-06-21 09:41:16 |
Dariusz Gadomski |
sosreport (Ubuntu Lunar): assignee |
|
nikhil kshirsagar (nkshirsagar) |
|
2023-06-21 09:41:24 |
Dariusz Gadomski |
sosreport (Ubuntu Mantic): assignee |
|
nikhil kshirsagar (nkshirsagar) |
|
2023-06-21 09:42:47 |
nikhil kshirsagar |
summary |
bug in do_file_private_sub for the juju plugin |
[sru] bug in do_file_private_sub for the juju plugin |
|
2023-06-21 09:49:47 |
nikhil kshirsagar |
description |
As described in https://github.com/sosreport/sos/issues/3261 , the flags=re.IGNORECASE argument cannot be passed with a compiled pattern. This affects sos upstream 4.5.4 and 4.5.3.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/sos/report/__init__.py", line 1459, in postproc
plug.postproc()
File "/usr/lib/python3/dist-packages/sos/report/plugins/juju.py", line 69, in postproc
self.do_file_private_sub(agents_path)
File "/usr/lib/python3/dist-packages/sos/report/plugins/__init__.py", line 1257, in do_file_private_sub
self.do_file_sub(path, _certmatch, replace)
File "/usr/lib/python3/dist-packages/sos/report/plugins/__init__.py", line 1287, in do_file_sub
result, replacements = re.subn(regexp, subst, content,
File "/usr/lib/python3.8/re.py", line 221, in subn
return _compile(pattern, flags).subn(repl, string, count)
File "/usr/lib/python3.8/re.py", line 299, in _compile
raise ValueError(
ValueError: cannot process flags argument with a compiled pattern
The issue was introduced by this commit - https://github.com/sosreport/sos/commit/bb43ac3b0dddcecf9bf34e489490296e15a2addc
It is fixed by https://github.com/sosreport/sos/pull/3263 |
[IMPACT]
As described in https://github.com/sosreport/sos/issues/3261 , the flags=re.IGNORECASE argument cannot be passed with a compiled pattern. This affects sos upstream 4.5.4 and 4.5.3.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/sos/report/__init__.py", line 1459, in postproc
plug.postproc()
File "/usr/lib/python3/dist-packages/sos/report/plugins/juju.py", line 69, in postproc
self.do_file_private_sub(agents_path)
File "/usr/lib/python3/dist-packages/sos/report/plugins/__init__.py", line 1257, in do_file_private_sub
self.do_file_sub(path, _certmatch, replace)
File "/usr/lib/python3/dist-packages/sos/report/plugins/__init__.py", line 1287, in do_file_sub
result, replacements = re.subn(regexp, subst, content,
File "/usr/lib/python3.8/re.py", line 221, in subn
return _compile(pattern, flags).subn(repl, string, count)
File "/usr/lib/python3.8/re.py", line 299, in _compile
raise ValueError(
ValueError: cannot process flags argument with a compiled pattern
The issue was introduced by this commit - https://github.com/sosreport/sos/commit/bb43ac3b0dddcecf9bf34e489490296e15a2addc
It is fixed by https://github.com/sosreport/sos/pull/3263
The patch is taken for the 4.5.4 sos release in https://bugs.launchpad.net/ubuntu/+source/sosreport/+bug/2022915, as d/p/0002-regex-flags.patch, pasted below for reference,
Description: Fix do_file_private_sub() bug related to regex flags
Origin: upstream
Bug: https://github.com/sosreport/sos/issues/3261
Applied-Upstream: https://github.com/sosreport/sos/pull/3263
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: sos-4.5.4/sos/report/plugins/__init__.py
===================================================================
--- sos-4.5.4.orig/sos/report/plugins/__init__.py
+++ sos-4.5.4/sos/report/plugins/__init__.py
@@ -1274,7 +1274,12 @@ class Plugin():
"""
try:
path = self._get_dest_for_srcpath(srcpath)
- pattern = regexp.pattern if hasattr(regexp, "pattern") else regexp
+ if hasattr(regexp, "pattern"):
+ pattern = regexp.pattern
+ flags = regexp.flags | re.IGNORECASE
+ else:
+ pattern = regexp
+ flags = re.IGNORECASE
self._log_debug("substituting scrpath '%s'" % srcpath)
self._log_debug("substituting '%s' for '%s' in '%s'"
% (subst, pattern, path))
@@ -1284,8 +1289,8 @@ class Plugin():
content = readable.read()
if not isinstance(content, str):
content = content.decode('utf8', 'ignore')
- result, replacements = re.subn(regexp, subst, content,
- flags=re.IGNORECASE)
+ result, replacements = re.subn(pattern, subst, content,
+ flags=flags)
if replacements:
self.archive.add_string(result, srcpath)
else:
[TEST PLAN]
The 4.5.4 ppa's built with this additional fix are tested as per the process described https://wiki.ubuntu.com/SosreportUpdates and verfied to have fixed the issue.
[WHERE PROBLEMS COULD OCCUR]
As this bug is in a method invoked by multiple plugins, verification also would need to performed in environments that ensures those plugins are enabled, particularly on other distributions. In our testing, we have found no issues, but there might be some disabled plugins that use that method with assumptions that are made invalid by the patch. However we have found no evidence so far of such occurences. |
|
2023-06-21 09:52:21 |
Dariusz Gadomski |
bug |
|
|
added subscriber Dariusz Gadomski |
2023-06-21 11:00:20 |
nikhil kshirsagar |
description |
[IMPACT]
As described in https://github.com/sosreport/sos/issues/3261 , the flags=re.IGNORECASE argument cannot be passed with a compiled pattern. This affects sos upstream 4.5.4 and 4.5.3.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/sos/report/__init__.py", line 1459, in postproc
plug.postproc()
File "/usr/lib/python3/dist-packages/sos/report/plugins/juju.py", line 69, in postproc
self.do_file_private_sub(agents_path)
File "/usr/lib/python3/dist-packages/sos/report/plugins/__init__.py", line 1257, in do_file_private_sub
self.do_file_sub(path, _certmatch, replace)
File "/usr/lib/python3/dist-packages/sos/report/plugins/__init__.py", line 1287, in do_file_sub
result, replacements = re.subn(regexp, subst, content,
File "/usr/lib/python3.8/re.py", line 221, in subn
return _compile(pattern, flags).subn(repl, string, count)
File "/usr/lib/python3.8/re.py", line 299, in _compile
raise ValueError(
ValueError: cannot process flags argument with a compiled pattern
The issue was introduced by this commit - https://github.com/sosreport/sos/commit/bb43ac3b0dddcecf9bf34e489490296e15a2addc
It is fixed by https://github.com/sosreport/sos/pull/3263
The patch is taken for the 4.5.4 sos release in https://bugs.launchpad.net/ubuntu/+source/sosreport/+bug/2022915, as d/p/0002-regex-flags.patch, pasted below for reference,
Description: Fix do_file_private_sub() bug related to regex flags
Origin: upstream
Bug: https://github.com/sosreport/sos/issues/3261
Applied-Upstream: https://github.com/sosreport/sos/pull/3263
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: sos-4.5.4/sos/report/plugins/__init__.py
===================================================================
--- sos-4.5.4.orig/sos/report/plugins/__init__.py
+++ sos-4.5.4/sos/report/plugins/__init__.py
@@ -1274,7 +1274,12 @@ class Plugin():
"""
try:
path = self._get_dest_for_srcpath(srcpath)
- pattern = regexp.pattern if hasattr(regexp, "pattern") else regexp
+ if hasattr(regexp, "pattern"):
+ pattern = regexp.pattern
+ flags = regexp.flags | re.IGNORECASE
+ else:
+ pattern = regexp
+ flags = re.IGNORECASE
self._log_debug("substituting scrpath '%s'" % srcpath)
self._log_debug("substituting '%s' for '%s' in '%s'"
% (subst, pattern, path))
@@ -1284,8 +1289,8 @@ class Plugin():
content = readable.read()
if not isinstance(content, str):
content = content.decode('utf8', 'ignore')
- result, replacements = re.subn(regexp, subst, content,
- flags=re.IGNORECASE)
+ result, replacements = re.subn(pattern, subst, content,
+ flags=flags)
if replacements:
self.archive.add_string(result, srcpath)
else:
[TEST PLAN]
The 4.5.4 ppa's built with this additional fix are tested as per the process described https://wiki.ubuntu.com/SosreportUpdates and verfied to have fixed the issue.
[WHERE PROBLEMS COULD OCCUR]
As this bug is in a method invoked by multiple plugins, verification also would need to performed in environments that ensures those plugins are enabled, particularly on other distributions. In our testing, we have found no issues, but there might be some disabled plugins that use that method with assumptions that are made invalid by the patch. However we have found no evidence so far of such occurences. |
[IMPACT]
As described in https://github.com/sosreport/sos/issues/3261 , the flags=re.IGNORECASE argument cannot be passed with a compiled pattern. This affects sos upstream 4.5.4 and 4.5.3.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/sos/report/__init__.py", line 1459, in postproc
plug.postproc()
File "/usr/lib/python3/dist-packages/sos/report/plugins/juju.py", line 69, in postproc
self.do_file_private_sub(agents_path)
File "/usr/lib/python3/dist-packages/sos/report/plugins/__init__.py", line 1257, in do_file_private_sub
self.do_file_sub(path, _certmatch, replace)
File "/usr/lib/python3/dist-packages/sos/report/plugins/__init__.py", line 1287, in do_file_sub
result, replacements = re.subn(regexp, subst, content,
File "/usr/lib/python3.8/re.py", line 221, in subn
return _compile(pattern, flags).subn(repl, string, count)
File "/usr/lib/python3.8/re.py", line 299, in _compile
raise ValueError(
ValueError: cannot process flags argument with a compiled pattern
The issue was introduced by this commit - https://github.com/sosreport/sos/commit/bb43ac3b0dddcecf9bf34e489490296e15a2addc
It is fixed by https://github.com/sosreport/sos/pull/3263
The patch is taken for the 4.5.4 sos release in https://bugs.launchpad.net/ubuntu/+source/sosreport/+bug/2022915, as d/p/0002-regex-flags.patch, pasted below for reference,
Description: Fix do_file_private_sub() bug related to regex flags
Origin: upstream
Bug: https://github.com/sosreport/sos/issues/3261
Applied-Upstream: https://github.com/sosreport/sos/pull/3263
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: sos-4.5.4/sos/report/plugins/__init__.py
===================================================================
--- sos-4.5.4.orig/sos/report/plugins/__init__.py
+++ sos-4.5.4/sos/report/plugins/__init__.py
@@ -1274,7 +1274,12 @@ class Plugin():
"""
try:
path = self._get_dest_for_srcpath(srcpath)
- pattern = regexp.pattern if hasattr(regexp, "pattern") else regexp
+ if hasattr(regexp, "pattern"):
+ pattern = regexp.pattern
+ flags = regexp.flags | re.IGNORECASE
+ else:
+ pattern = regexp
+ flags = re.IGNORECASE
self._log_debug("substituting scrpath '%s'" % srcpath)
self._log_debug("substituting '%s' for '%s' in '%s'"
% (subst, pattern, path))
@@ -1284,8 +1289,8 @@ class Plugin():
content = readable.read()
if not isinstance(content, str):
content = content.decode('utf8', 'ignore')
- result, replacements = re.subn(regexp, subst, content,
- flags=re.IGNORECASE)
+ result, replacements = re.subn(pattern, subst, content,
+ flags=flags)
if replacements:
self.archive.add_string(result, srcpath)
else:
[TEST PLAN]
The 4.5.4 ppa's built with this additional fix are tested as per the process described https://wiki.ubuntu.com/SosreportUpdates and verfied to have fixed the issue.
[WHERE PROBLEMS COULD OCCUR]
As this bug is in a method invoked by multiple plugins, verification also would need to performed in environments that ensures those plugins are enabled, particularly on other distributions. In our testing, we have found no issues, but there might be some disabled plugins that use that method with assumptions that are made invalid by the patch. However we have found no evidence so far of such occurences. |
|
2023-07-01 00:05:48 |
Steve Langasek |
sosreport (Ubuntu Lunar): status |
New |
Fix Committed |
|
2023-07-01 00:05:49 |
Steve Langasek |
bug |
|
|
added subscriber Ubuntu Stable Release Updates Team |
2023-07-01 00:05:53 |
Steve Langasek |
bug |
|
|
added subscriber SRU Verification |
2023-07-01 00:05:56 |
Steve Langasek |
tags |
|
verification-needed verification-needed-lunar |
|
2023-07-01 00:07:17 |
Steve Langasek |
sosreport (Ubuntu Kinetic): status |
New |
Fix Committed |
|
2023-07-01 00:07:22 |
Steve Langasek |
tags |
verification-needed verification-needed-lunar |
verification-needed verification-needed-kinetic verification-needed-lunar |
|
2023-07-01 00:08:56 |
Steve Langasek |
sosreport (Ubuntu Jammy): status |
New |
Fix Committed |
|
2023-07-01 00:09:01 |
Steve Langasek |
tags |
verification-needed verification-needed-kinetic verification-needed-lunar |
verification-needed verification-needed-jammy verification-needed-kinetic verification-needed-lunar |
|
2023-07-01 00:09:49 |
Steve Langasek |
sosreport (Ubuntu Focal): status |
New |
Fix Committed |
|
2023-07-01 00:09:54 |
Steve Langasek |
tags |
verification-needed verification-needed-jammy verification-needed-kinetic verification-needed-lunar |
verification-needed verification-needed-focal verification-needed-jammy verification-needed-kinetic verification-needed-lunar |
|
2023-07-21 08:15:25 |
Łukasz Zemczak |
tags |
verification-needed verification-needed-focal verification-needed-jammy verification-needed-kinetic verification-needed-lunar |
verification-needed verification-needed-focal verification-needed-jammy verification-needed-lunar |
|
2023-07-21 08:15:28 |
Łukasz Zemczak |
sosreport (Ubuntu Kinetic): status |
Fix Committed |
Confirmed |
|
2023-08-17 14:28:38 |
Andreas Hasenack |
sosreport (Ubuntu Kinetic): status |
Confirmed |
Won't Fix |
|