Update 4.11.2-1
Resolves: RHEL-189439 Signed-off-by: Jan Jansky <jjansky@redhat.com>
This commit is contained in:
parent
cc85bde5d7
commit
457bc758f4
1
.gitignore
vendored
1
.gitignore
vendored
@ -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
|
||||
|
||||
121
0001-revert-PR4092-and-PR4275.patch
Normal file
121
0001-revert-PR4092-and-PR4275.patch
Normal file
@ -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):
|
||||
@ -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):
|
||||
@ -0,0 +1,28 @@
|
||||
From 3b6bbcb819e05aecf0fec4767588ea0376c9f218 Mon Sep 17 00:00:00 2001
|
||||
From: akumari <akumari@redhat.com>
|
||||
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 <akumari@redhat.com>
|
||||
---
|
||||
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
|
||||
|
||||
9
sos.spec
9
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 <jjansky@redhat.com> = 4.11.2-1
|
||||
- Update 4.11.2-1
|
||||
|
||||
* Thu Apr 02 2026 Jan Jansky <jjansky@redhat.com> = 4.11.0-1
|
||||
- Update 4.11.0-1
|
||||
Resolves: RHEL-157812
|
||||
|
||||
2
sources
2
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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user