From b6101bf73fdcdc7e0e8ff2d75175a52eb490a952 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Mon, 2 Oct 2023 14:02:29 +0200 Subject: [PATCH] Drop github.com/coreos/toolbox compatibility from RHEL 10 onwards Some limited compatibility with github.com/coreos/toolbox was added to RHEL 8.5 when the implementation of the toolbox RPM was changed from github.com/coreos/toolbox to github.com/containers/toolbox. This was carried forward to RHEL 9 to give everybody some extra time to adjust. This compatibility involved setting the HOST environment variable inside the Toolbx containers for 'sos report' to work, and replicating the command line interface from github.com/coreos/toolbox. The problem with setting the HOST environment variable in Toolbx containers is that it's a very generic name without any namespacing. Not every user is going to use 'sos report', and it can easily conflict with a variable of the same name being used for a different purpose. This is similar to the NAME and VERSION environment variables that used to be set inside Toolbx containers due to outdated or wrong information in Fedora's container guidelines [1]. They were a constant source of complaints and were recently fixed [2]. The same logic applies to HOST. Instead of expecting the Toolbx container to have the HOST environment variable, sos(1) should be taught how to work inside a Toolbx container without requiring any extra configuration [3]. The problem with replicating the command line interface from github.com/coreos/toolbox is that it's difficult to document it, because it's so different from the native interface that users on non-RHEL operating systems, including Fedora, have come to expect. So, it's an undocumented easter egg that receives very limited, if any, testing. RHEL 8.5 was released on the 9th of November in 2021, which was almost two years ago. RHEL 10 is going to be a fresh new operating system. It's time to ship a version of sos(1) in RHEL that works without any extra configuration inside Toolbx containers, and to inform RHEL users to adapt to the native command line interface. [1] https://docs.fedoraproject.org/en-US/containers/guidelines/creation/ [2] Upstream commit 9506173f88dc26bf https://github.com/containers/toolbox/commit/9506173f88dc26bf https://github.com/containers/toolbox/issues/188 [3] https://github.com/sosreport/sos/pull/3370 --- toolbox.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/toolbox.spec b/toolbox.spec index e56fbfa..682fc3c 100644 --- a/toolbox.spec +++ b/toolbox.spec @@ -11,7 +11,7 @@ Version: 0.0.99.4 %gometa -f %endif -Release: 4%{?dist} +Release: 5%{?dist} Summary: Tool for containerized command line environments on Linux License: ASL 2.0 @@ -188,8 +188,10 @@ The %{name}-tests package contains system tests for %{name}. %patch201 -p1 %endif +%if 0%{?rhel} <= 9 %patch202 -p1 %endif +%endif %gomkdir -s %{_builddir}/%{extractdir}/src %{?rhel:-k} @@ -202,7 +204,9 @@ export CGO_CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_ %meson \ %if 0%{?rhel} -Dfish_completions_dir=%{_datadir}/fish/vendor_completions.d \ +%if 0%{?rhel} <= 9 -Dmigration_path_for_coreos_toolbox=true \ +%endif %endif -Dprofile_dir=%{_sysconfdir}/profile.d \ -Dtmpfiles_dir=%{_tmpfilesdir} \ @@ -250,6 +254,9 @@ install -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/containers/%{name}.conf %changelog +* Mon Oct 02 2023 Debarshi Ray - 0.0.99.4-5 +- Drop github.com/coreos/toolbox compatibility from RHEL 10 onwards + * Mon Oct 02 2023 Debarshi Ray - 0.0.99.4-4 - Be aware of security hardened mount points - Simplify removing the user's password