From 457bc758f43fbdf3425f5b78344d04fd32d0841f Mon Sep 17 00:00:00 2001 From: Jan Jansky Date: Wed, 1 Jul 2026 14:04:30 +0200 Subject: [PATCH] Update 4.11.2-1 Resolves: RHEL-189439 Signed-off-by: Jan Jansky --- .gitignore | 1 + 0001-revert-PR4092-and-PR4275.patch | 121 ++++++++++++++++++ 0001-revert-PR4092.patch | 49 ------- ...iner-support-for-containerized-deplo.patch | 28 ++++ sos.spec | 9 +- sources | 2 +- 6 files changed, 158 insertions(+), 52 deletions(-) create mode 100644 0001-revert-PR4092-and-PR4275.patch delete mode 100644 0001-revert-PR4092.patch create mode 100644 0002-valkey-Add-container-support-for-containerized-deplo.patch diff --git a/.gitignore b/.gitignore index 2f7670f..b560d48 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,4 @@ sos-2.2.tar.gz /sos-4.10.1.tar.gz /sos-4.10.2.tar.gz /sos-4.11.0.tar.gz +/sos-4.11.2.tar.gz diff --git a/0001-revert-PR4092-and-PR4275.patch b/0001-revert-PR4092-and-PR4275.patch new file mode 100644 index 0000000..5b3b417 --- /dev/null +++ b/0001-revert-PR4092-and-PR4275.patch @@ -0,0 +1,121 @@ +diff --git a/sos/upload/targets/__init__.py b/sos/upload/targets/__init__.py +index 9e905e1063..6f72d963ea 100644 +--- a/sos/upload/targets/__init__.py ++++ b/sos/upload/targets/__init__.py +@@ -540,36 +540,7 @@ def upload_sftp(self, user=None, password=None, user_dir=None): + raise Exception("Unable to connect via SFTP to " + f"{self.get_upload_url_string()}") + +- # user_dir indicates that we need to switch into a specific user +- # directory. If ChRootDirectory is set, this happens automatically +- # so check if the PWD contains the user. If it does, we are +- # already in the user directory so set user_dir to None +- if user_dir: +- user_match = False +- ret.sendline('pwd') +- pwd_expects = [ +- 'sftp>', +- 'Invalid command.', +- pexpect.TIMEOUT, +- pexpect.EOF +- ] +- pwd_cmd = ret.expect(pwd_expects, timeout=10) == 0 +- if pwd_cmd: +- # Extract the path from child.before +- raw_output = ret.before +- user_match = re.search(user, raw_output) +- else: +- self.ui_log.warning("This server does not support the PWD " +- "command - unable to verify user " +- "directory. Attempting upload without " +- "changing to user directory.") +- user_dir = None +- +- if user_match: +- user_dir = None +- + # certain implementations require file to be put in the user dir +- # so we prepend the user directory to the file path + put_cmd = ( + f"put {self.upload_archive_name} " + f"{f'{user_dir}/' if user_dir else ''}" +diff --git a/sos/upload/targets/redhat.py b/sos/upload/targets/redhat.py +index 636a645fe6..0cfb80eecd 100644 +--- a/sos/upload/targets/redhat.py ++++ b/sos/upload/targets/redhat.py +@@ -158,7 +158,6 @@ def upload_sftp(self, user=None, password=None, user_dir=None): + " for obtaining SFTP auth token.") + _token = None + _user = None +- _user_dir = None + + # We may have a device token already if we attempted + # to upload via http but the upload failed. So +@@ -192,7 +191,6 @@ def upload_sftp(self, user=None, password=None, user_dir=None): + # credentials are valid + _user = json.loads(ret.text)['username'] + _token = json.loads(ret.text)['token'] +- _user_dir = f"/users/{_user}" + else: + self.ui_log.debug( + f"DEBUG: auth attempt failed (status: {ret.status_code}): " +@@ -220,7 +218,7 @@ def upload_sftp(self, user=None, password=None, user_dir=None): + ) + if _user and _token: + return super().upload_sftp(user=_user, password=_token, +- user_dir=_user_dir) ++ user_dir=_user) + raise Exception("Could not retrieve valid or anonymous credentials") + + def check_file_too_big(self, archive): +-- +2.47.0 +--- a/sos/upload/targets/__init__.py 2025-09-16 19:57:27.294642506 +0200 ++++ b/sos/upload/targets/__init__.py 2025-09-16 19:59:44.498573843 +0200 +@@ -465,7 +465,7 @@ + self.upload_password or + self._upload_password) + +- def upload_sftp(self, user=None, password=None, user_dir=None): ++ def upload_sftp(self, user=None, password=None): + """Attempts to upload the archive to an SFTP location. + + Due to the lack of well maintained, secure, and generally widespread +@@ -540,13 +540,10 @@ + raise Exception("Unable to connect via SFTP to " + f"{self.get_upload_url_string()}") + +- # certain implementations require file to be put in the user dir +- put_cmd = ( +- f"put {self.upload_archive_name} " +- f"{f'{user_dir}/' if user_dir else ''}" +- f"{self._get_sftp_upload_name()}" +- ) ++ put_cmd = (f'put {self.upload_archive_name} ' ++ f'{self._get_sftp_upload_name()}') + ret.sendline(put_cmd) ++ + put_expects = [ + '100%', + pexpect.TIMEOUT, +--- a/sos/upload/targets/redhat.py 2025-09-16 19:57:36.804628207 +0200 ++++ b/sos/upload/targets/redhat.py 2025-09-16 20:00:52.578728154 +0200 +@@ -145,7 +145,7 @@ + return fname + + # pylint: disable=too-many-branches +- def upload_sftp(self, user=None, password=None, user_dir=None): ++ def upload_sftp(self, user=None, password=None): + """Override the base upload_sftp to allow for setting an on-demand + generated anonymous login for the RH SFTP server if a username and + password are not given +@@ -217,8 +217,7 @@ + f"{anon.status_code}): {anon.json()}" + ) + if _user and _token: +- return super().upload_sftp(user=_user, password=_token, +- user_dir=_user) ++ return super().upload_sftp(user=_user, password=_token) + raise Exception("Could not retrieve valid or anonymous credentials") + + def check_file_too_big(self, archive): diff --git a/0001-revert-PR4092.patch b/0001-revert-PR4092.patch deleted file mode 100644 index 04539d0..0000000 --- a/0001-revert-PR4092.patch +++ /dev/null @@ -1,49 +0,0 @@ ---- a/sos/upload/targets/__init__.py 2025-09-16 19:57:27.294642506 +0200 -+++ b/sos/upload/targets/__init__.py 2025-09-16 19:59:44.498573843 +0200 -@@ -465,7 +465,7 @@ - self.upload_password or - self._upload_password) - -- def upload_sftp(self, user=None, password=None, user_dir=None): -+ def upload_sftp(self, user=None, password=None): - """Attempts to upload the archive to an SFTP location. - - Due to the lack of well maintained, secure, and generally widespread -@@ -540,13 +540,10 @@ - raise Exception("Unable to connect via SFTP to " - f"{self.get_upload_url_string()}") - -- # certain implementations require file to be put in the user dir -- put_cmd = ( -- f"put {self.upload_archive_name} " -- f"{f'{user_dir}/' if user_dir else ''}" -- f"{self._get_sftp_upload_name()}" -- ) -+ put_cmd = (f'put {self.upload_archive_name} ' -+ f'{self._get_sftp_upload_name()}') - ret.sendline(put_cmd) -+ - put_expects = [ - '100%', - pexpect.TIMEOUT, ---- a/sos/upload/targets/redhat.py 2025-09-16 19:57:36.804628207 +0200 -+++ b/sos/upload/targets/redhat.py 2025-09-16 20:00:52.578728154 +0200 -@@ -145,7 +145,7 @@ - return fname - - # pylint: disable=too-many-branches -- def upload_sftp(self, user=None, password=None, user_dir=None): -+ def upload_sftp(self, user=None, password=None): - """Override the base upload_sftp to allow for setting an on-demand - generated anonymous login for the RH SFTP server if a username and - password are not given -@@ -217,8 +217,7 @@ - f"{anon.status_code}): {anon.json()}" - ) - if _user and _token: -- return super().upload_sftp(user=_user, password=_token, -- user_dir=_user) -+ return super().upload_sftp(user=_user, password=_token) - raise Exception("Could not retrieve valid or anonymous credentials") - - def check_file_too_big(self, archive): diff --git a/0002-valkey-Add-container-support-for-containerized-deplo.patch b/0002-valkey-Add-container-support-for-containerized-deplo.patch new file mode 100644 index 0000000..c50261d --- /dev/null +++ b/0002-valkey-Add-container-support-for-containerized-deplo.patch @@ -0,0 +1,28 @@ +From 3b6bbcb819e05aecf0fec4767588ea0376c9f218 Mon Sep 17 00:00:00 2001 +From: akumari +Date: Tue, 7 Jul 2026 14:06:40 +0530 +Subject: [PATCH] [valkey] Add container support for containerized deployments + +Adds container support to the valkey plugin to enable it +for containerized deployments using foremanctl/quadlet. + +Signed-off-by: akumari +--- + sos/report/plugins/valkey.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/sos/report/plugins/valkey.py b/sos/report/plugins/valkey.py +index 26a74a56..f7b49253 100644 +--- a/sos/report/plugins/valkey.py ++++ b/sos/report/plugins/valkey.py +@@ -19,6 +19,7 @@ class Valkey(Plugin, IndependentPlugin): + profiles = ('services',) + + packages = ('valkey',) ++ containers = ('valkey',) + + var_puppet_gen = "/var/lib/config-data/puppet-generated/valkey" + +-- +2.54.0 + diff --git a/sos.spec b/sos.spec index 4281c60..7b524b8 100644 --- a/sos.spec +++ b/sos.spec @@ -4,7 +4,7 @@ Summary: A set of tools to gather troubleshooting information from a system Name: sos -Version: 4.11.0 +Version: 4.11.2 Release: 1%{?dist} Group: Applications/System Source0: https://github.com/sosreport/sos/archive/%{version}/sos-%{version}.tar.gz @@ -22,7 +22,8 @@ Recommends: python3-pexpect Recommends: python3-pyyaml Conflicts: vdsm < 4.40 Obsoletes: sos-collector <= 1.9 -Patch1: 0001-revert-PR4092.patch +Patch1: 0001-revert-PR4092-and-PR4275.patch +Patch2: 0002-valkey-Add-container-support-for-containerized-deplo.patch %description Sos is a set of tools that gathers information about system @@ -34,6 +35,7 @@ support technicians and developers. %setup -qn %{name}-%{version} %setup -T -D -a1 -q %patch -P 1 -p1 +%patch -P 2 -p1 %build %py3_build @@ -105,6 +107,9 @@ of the system. Currently storage and filesystem commands are audited. %changelog +* Wed Jul 15 2026 Jan Jansky = 4.11.2-1 +- Update 4.11.2-1 + * Thu Apr 02 2026 Jan Jansky = 4.11.0-1 - Update 4.11.0-1 Resolves: RHEL-157812 diff --git a/sources b/sources index 8ec0cef..313faa5 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (sos-4.11.0.tar.gz) = ba35fdd460a28cc43cf5f693764aa577f643899a050a9e345e02e1c47e6199ae247133edf328ea71edd3f9ae71bb8b4d5c5ba8d73cc7ba8595f3b7679e4fedc6 +SHA512 (sos-4.11.2.tar.gz) = 740639c1cd163f4ad1db05cf5202ed2902e77c3610b14a3bd9f68d7ba8a3ae5efbb4be95af326d949b4ef8ff7bd4735bf658f2b0385f7a0adce3363425d4bf98 SHA512 (sos-audit-0.3-1.tgz) = 24c7bfec7e47a082ca1f2a96c5ad455c692d81dcc4339877de5bd324719609d91bc0ef6ddb95485fb75b81f90f8a7cc58370ada6f626c275bab36e9e2a409330