diff --git a/sos-RHEL-22732-Fix-check_file_too_big.patch b/sos-RHEL-22732-Fix-check_file_too_big.patch new file mode 100644 index 0000000..ff540fd --- /dev/null +++ b/sos-RHEL-22732-Fix-check_file_too_big.patch @@ -0,0 +1,40 @@ +From c3b8bbcf7969999375d85c588c09d90d99ea41f3 Mon Sep 17 00:00:00 2001 +From: Jose Castillo +Date: Mon, 19 Aug 2024 11:37:08 +0100 +Subject: [PATCH] [redhat] Fix return of function check_file_too_big() + +Fix the return of the size checks for Red Hat uploads +to customer portal. Without this fix, uploads were failing +silently. + +Signed-off-by: Jose Castillo +--- + sos/policies/distros/redhat.py | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/sos/policies/distros/redhat.py b/sos/policies/distros/redhat.py +index fb22c313..5b794fde 100644 +--- a/sos/policies/distros/redhat.py ++++ b/sos/policies/distros/redhat.py +@@ -441,8 +441,7 @@ support representative. + f"{convert_bytes(self._max_size_request)} " + " via sos http upload. \n") + ) +- return RH_SFTP_HOST +- return RH_API_HOST ++ self.upload_url = RH_SFTP_HOST + + def upload_archive(self, archive): + """Override the base upload_archive to provide for automatic failover +@@ -450,7 +449,7 @@ support representative. + """ + try: + if self.get_upload_url().startswith(RH_API_HOST): +- self.upload_url = self.check_file_too_big(archive) ++ self.check_file_too_big(archive) + uploaded = super().upload_archive(archive) + except Exception as e: + uploaded = False +-- +2.46.0 + diff --git a/sos-Revert-changed-formatting.patch b/sos-Revert-changed-formatting.patch new file mode 100644 index 0000000..c018d46 --- /dev/null +++ b/sos-Revert-changed-formatting.patch @@ -0,0 +1,71 @@ +From 3886534b707211c69e1f0ee8592ae9f9125227f2 Mon Sep 17 00:00:00 2001 +From: Pavel Moravec +Date: Mon, 26 Aug 2024 18:59:36 +0200 +Subject: [PATCH] [report] Revert changed formatting of plugin+presets lists + +During conversion to f-strings in #3606, some changes in UI output +happen. That makes some output less readable and could break some +automated tests anticipating given preset or plugin output strings. + +This commit reverts back tto the original output, using f-strings. + +Resolves: #3762 + +Signed-off-by: Pavel Moravec +--- + sos/report/__init__.py | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/sos/report/__init__.py b/sos/report/__init__.py +index 15974817..24294069 100644 +--- a/sos/report/__init__.py ++++ b/sos/report/__init__.py +@@ -1029,7 +1029,7 @@ class SoSReport(SoSComponent): + self.ui_log.info(_("The following plugins are currently enabled:")) + self.ui_log.info("") + for (plugname, plug) in self.loaded_plugins: +- self.ui_log.info(f"{plugname:<20} {plug.get_description()}") ++ self.ui_log.info(f" {plugname:<20} {plug.get_description()}") + else: + self.ui_log.info(_("No plugin enabled.")) + self.ui_log.info("") +@@ -1039,7 +1039,7 @@ class SoSReport(SoSComponent): + "disabled:")) + self.ui_log.info("") + for (plugname, plugclass, reason) in self.skipped_plugins: +- self.ui_log.info(f"{plugname:<20} {reason:<14} " ++ self.ui_log.info(f" {plugname:<20} {reason:<14} " + f"{plugclass.get_description()}") + + self.ui_log.info("") +@@ -1060,7 +1060,7 @@ class SoSReport(SoSComponent): + val = TIMEOUT_DEFAULT + if opt.name == 'postproc': + val = not self.opts.no_postproc +- self.ui_log.info(f"{opt.name:<25} {val:<15} {opt.desc}") ++ self.ui_log.info(f" {opt.name:<25} {val:<15} {opt.desc}") + self.ui_log.info("") + + self.ui_log.info(_("The following plugin options are available:")) +@@ -1126,14 +1126,14 @@ class SoSReport(SoSComponent): + if not preset: + continue + preset = self.policy.find_preset(preset) +- self.ui_log.info(f"name: {preset.name:>14}") +- self.ui_log.info(f"description: {preset.desc:>14}") ++ self.ui_log.info(f"{'name:':>14} {preset.name}") ++ self.ui_log.info(f"{'description:':>14} {preset.desc}") + if preset.note: +- self.ui_log.info(f"note: {preset.note:>14}") ++ self.ui_log.info(f"{'note:':>14} {preset.note}") + + if self.opts.verbosity > 0: + args = preset.opts.to_args() +- options_str = f"{'options:':>14}" ++ options_str = f"{'options:':>14} " + lines = _format_list(options_str, args, indent=True, sep=' ') + for line in lines: + self.ui_log.info(line) +-- +2.46.0 + diff --git a/sos.spec b/sos.spec index 15d44c3..1bc6264 100644 --- a/sos.spec +++ b/sos.spec @@ -5,7 +5,7 @@ Summary: A set of tools to gather troubleshooting information from a system Name: sos Version: 4.8.0 -Release: 1%{?dist} +Release: 2%{?dist} Group: Applications/System Source0: https://github.com/sosreport/sos/archive/%{version}/sos-%{version}.tar.gz Source1: sos-audit-%{auditversion}.tgz @@ -22,6 +22,8 @@ Recommends: python3-pexpect Recommends: python3-pyyaml Conflicts: vdsm < 4.40 Obsoletes: sos-collector <= 1.9 +Patch0: sos-Revert-changed-formatting.patch +Patch1: sos-RHEL-22732-Fix-check_file_too_big.patch %description Sos is a set of tools that gathers information about system @@ -32,6 +34,8 @@ support technicians and developers. %prep %setup -qn %{name}-%{version} %setup -T -D -a1 -q +%patch -P 0 -p1 +%patch -P 1 -p1 %build %py3_build @@ -104,6 +108,10 @@ of the system. Currently storage and filesystem commands are audited. %changelog +* Thu Sep 19 2024 Jan Jansky = 4.8.0-2 +- Update to 4.8.0 + Resolves: RHEL-58096 + * Mon Sep 09 2024 Pierguido Lambri = 4.8.0-1 - New upstream release Resolves: RHEL-58096