diff --git a/0002-restoreconfig-do-not-return-success.patch b/0002-restoreconfig-do-not-return-success.patch new file mode 100644 index 0000000..e3415f4 --- /dev/null +++ b/0002-restoreconfig-do-not-return-success.patch @@ -0,0 +1,14 @@ +diff --git a/targetcli/ui_root.py b/targetcli/ui_root.py +index 79ee985..2dd6614 100644 +--- a/targetcli/ui_root.py ++++ b/targetcli/ui_root.py +@@ -207,8 +207,7 @@ class UIRoot(UINode): + savefile = os.path.expanduser(savefile) + + if not os.path.isfile(savefile): +- self.shell.log.info("Restore file %s not found" % savefile) +- return ++ raise ExecutionError(f"Restore file {savefile} not found") + + target = self.ui_eval_param(target, 'string', None) + storage_object = self.ui_eval_param(storage_object, 'string', None) diff --git a/targetcli.spec b/targetcli.spec index af63c98..607cdac 100644 --- a/targetcli.spec +++ b/targetcli.spec @@ -4,7 +4,7 @@ Name: targetcli License: ASL 2.0 Summary: An administration shell for storage targets Version: 2.1.57 -Release: 2%{?dist} +Release: 3%{?dist} URL: https://github.com/open-iscsi/%{oname} Source: %{url}/archive/v%{version}/%{oname}-%{version}.tar.gz # Proposed upstream @@ -14,6 +14,7 @@ BuildRequires: python3-devel, python3-setuptools, systemd-rpm-macros Requires: python3-rtslib, target-restore, python3-configshell, python3-six, python3-dbus Requires: python3-gobject-base Patch0: 0001-Fix-mapping-the-new-LUN-to-the-node-ACL.patch +Patch1: 0002-restoreconfig-do-not-return-success.patch %description An administration shell for configuring iSCSI, FCoE, and other @@ -24,6 +25,7 @@ users will also need to install and use fcoe-utils. %prep %setup -q -n %{oname}-%{version} %patch0 -p1 +%patch1 -p1 %build %py3_build @@ -48,6 +50,9 @@ install -m 644 systemd/* %{buildroot}%{_unitdir}/ %dir %{_sysconfdir}/target/backup %changelog +* Wed Dec 10 2025 Maurizio Lombardi - 2.1.57-3 +- restoreconfig: Do not return success if the file doesn't exist + * Tue Jan 30 2024 Maurizio Lombardi - 2.1.57-2 - Fix a regression in LUN creation and ACL mapping Jira: RHEL-23294