From b1a02416099009bcfe9deb90675b212cfc84d623 Mon Sep 17 00:00:00 2001 From: yanshuai01 Date: Mon, 8 Apr 2024 15:13:39 +0800 Subject: [PATCH] avoild Ctrl+C print error stack (cherry picked from commit fa1d55a3d254a3b2aa97f8035ecda8f5ace33777) --- Avoild-print-error-stack.patch | 25 +++++++++++++++++++++++++ targetcli.spec | 6 +++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 Avoild-print-error-stack.patch diff --git a/Avoild-print-error-stack.patch b/Avoild-print-error-stack.patch new file mode 100644 index 0000000..96f7445 --- /dev/null +++ b/Avoild-print-error-stack.patch @@ -0,0 +1,25 @@ +From b4632c05d8c0a51460fb84ea70820f5136105fff Mon Sep 17 00:00:00 2001 +From: Mingzhe Zou +Date: Mon, 27 Mar 2023 16:42:43 +0800 +Subject: [PATCH] targetcli: avoild Ctrl+C print error stack + +--- + scripts/targetcli | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/scripts/targetcli b/scripts/targetcli +index f00bffc..89a8188 100755 +--- a/scripts/targetcli ++++ b/scripts/targetcli +@@ -326,4 +326,7 @@ def main(): + + + if __name__ == "__main__": +- main() ++ try: ++ main() ++ except KeyboardInterrupt: ++ pass +-- +2.27.0 + diff --git a/targetcli.spec b/targetcli.spec index 3c9d194..dea9cc0 100644 --- a/targetcli.spec +++ b/targetcli.spec @@ -2,10 +2,11 @@ Name: targetcli License: ASL 2.0 Summary: Generic SCSI target CLI shell Version: 2.1.54 -Release: 2 +Release: 3 URL: https://github.com/open-iscsi/targetcli-fb Source: https://github.com/open-iscsi/targetcli-fb/archive/v%{version}/targetcli-fb-%{version}.tar.gz Patch01: Fix-changing-savedir-directory-mode.patch +Patch02: Avoild-print-error-stack.patch BuildArch: noarch BuildRequires: python3-devel python3-setuptools systemd Requires: python3-rtslib target-restore python3-configshell python3-six python3-dbus python3-gobject-base @@ -48,6 +49,9 @@ install -m 644 systemd/* %{buildroot}%{_unitdir}/ %{_mandir}/man8/targetcli*.8* %changelog +* Mon Apr 8 2024 yanshuai - 2.1.54-3 +- avoild Ctrl+C print error stack + * Sun Apr 7 2024 yanshuai - 2.1.54-2 - Fix changing savedir directory mode -- Gitee