From 02130ec520fd587272ad3f16e7cc98c38c640f7c Mon Sep 17 00:00:00 2001 From: Jake Hunsaker Date: Wed, 29 Jan 2025 17:04:36 -0500 Subject: [PATCH] [build] Drop legacy redirectors Following on from earlier work that added a deprecation message to the `sosreport` and `sos-collector` redirectors about the commands being dropped in sos-4.9, drop the redirectors and their manpage symlinks so that only `sos` is available as an entry point. Closes: #3374 Signed-off-by: Jake Hunsaker --- bin/sos-collector | 36 ------------------------------------ bin/sosreport | 36 ------------------------------------ man/en/sos-collector.1 | 1 - man/en/sosreport.1 | 1 - sos.spec | 4 ---- 5 files changed, 78 deletions(-) delete mode 100755 bin/sos-collector delete mode 100755 bin/sosreport delete mode 120000 man/en/sos-collector.1 delete mode 120000 man/en/sosreport.1 diff --git a/bin/sos-collector b/bin/sos-collector deleted file mode 100755 index e04e38ba32..0000000000 --- a/bin/sos-collector +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/python3 -# This file is part of the sos project: https://github.com/sosreport/sos -# -# This copyrighted material is made available to anyone wishing to use, -# modify, copy, or redistribute it subject to the terms and conditions of -# version 2 of the GNU General Public License. -# -# See the LICENSE file in the source distribution for further information. - -""" sos entry point. """ - -import sys -import os -import time - -try: - # allow running from the git checkout, even though as of 4.0 we are moving - # binaries into a bin/ top-level directory. - sys.path.insert(0, os.getcwd()) - from sos import SoS -except KeyboardInterrupt: - raise SystemExit() - -if __name__ == '__main__': - msg = ("WARNING: the 'sos-collector' command has been deprecated in " - " favor of the new 'sos' command, E.G. 'sos collect', and will be " - "removed in the upcoming sos-4.9 release.\n" - "Redirecting to 'sos collect %s'" % (' '.join(sys.argv[1:]) or '')) - print(msg) - time.sleep(0.5) - args = sys.argv[1:] - args.insert(0, 'collect') - sos = SoS(args) - sos.execute() - -# vim:ts=4 et sw=4 diff --git a/bin/sosreport b/bin/sosreport deleted file mode 100755 index d2e818144f..0000000000 --- a/bin/sosreport +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/python3 -# This file is part of the sos project: https://github.com/sosreport/sos -# -# This copyrighted material is made available to anyone wishing to use, -# modify, copy, or redistribute it subject to the terms and conditions of -# version 2 of the GNU General Public License. -# -# See the LICENSE file in the source distribution for further information. - -""" sos entry point. """ - -import sys -import os -import time - -try: - # allow running from the git checkout, even though as of 4.0 we are moving - # binaries into a bin/ top-level directory. - sys.path.insert(0, os.getcwd()) - from sos import SoS -except KeyboardInterrupt: - raise SystemExit() - -if __name__ == '__main__': - msg = ("WARNING: the 'sosreport' command has been deprecated in favor " - "of the new 'sos' command, E.G. 'sos report', and will be removed " - "in the upcoming sos-4.9 release.\n" - "Redirecting to 'sos report %s'" % (' '.join(sys.argv[1:]) or '')) - print(msg) - time.sleep(0.5) - args = sys.argv[1:] - args.insert(0, 'report') - sos = SoS(args) - sos.execute() - -# vim:ts=4 et sw=4 diff --git a/man/en/sos-collector.1 b/man/en/sos-collector.1 deleted file mode 120000 index 4304b38009..0000000000 --- a/man/en/sos-collector.1 +++ /dev/null @@ -1 +0,0 @@ -sos-collect.1 \ No newline at end of file diff --git a/man/en/sosreport.1 b/man/en/sosreport.1 deleted file mode 120000 index d1716cce68..0000000000 --- a/man/en/sosreport.1 +++ /dev/null @@ -1 +0,0 @@ -sos-report.1 \ No newline at end of file diff --git a/sos.spec b/sos.spec index cf886699ae..7b4365a987 100644 --- a/sos.spec +++ b/sos.spec @@ -71,12 +71,8 @@ rm -rf %{buildroot}/usr/config/ %files %if 0%{?fedora} >= 39 %{_bindir}/sos -%{_bindir}/sosreport -%{_bindir}/sos-collector %else %{_sbindir}/sos -%{_sbindir}/sosreport -%{_sbindir}/sos-collector %endif %dir /etc/sos/cleaner %dir /etc/sos/presets.d