From 4cce89971bc299c8b6eb8e3e72fc8ca3191c86be Mon Sep 17 00:00:00 2001 From: akhila-guruju Date: Tue, 24 Dec 2024 04:50:06 +0000 Subject: [PATCH] Upgrade: python-rtslib version to 2.1.76 --- ...tely-import-kmod.error-and-kmod.Kmod.patch | 35 +++++++ .../python-rtslib.signatures.json | 5 +- .../python-rtslib/python-rtslib.spec | 94 +++++++++++++++++-- SPECS-EXTENDED/python-rtslib/target.service | 15 --- cgmanifest.json | 4 +- 5 files changed, 123 insertions(+), 30 deletions(-) create mode 100644 SPECS-EXTENDED/python-rtslib/0002-rtslib-explicitely-import-kmod.error-and-kmod.Kmod.patch delete mode 100644 SPECS-EXTENDED/python-rtslib/target.service diff --git a/SPECS-EXTENDED/python-rtslib/0002-rtslib-explicitely-import-kmod.error-and-kmod.Kmod.patch b/SPECS-EXTENDED/python-rtslib/0002-rtslib-explicitely-import-kmod.error-and-kmod.Kmod.patch new file mode 100644 index 00000000000..012d2add3b0 --- /dev/null +++ b/SPECS-EXTENDED/python-rtslib/0002-rtslib-explicitely-import-kmod.error-and-kmod.Kmod.patch @@ -0,0 +1,35 @@ +From c1378f28f7abce6f8993a43c34d5e287b092bb1e Mon Sep 17 00:00:00 2001 +From: Maurizio Lombardi +Date: Wed, 2 Aug 2023 12:00:41 +0200 +Subject: [PATCH] rtslib: explicitely import "kmod.error" and "kmod.Kmod" + +While updating python-kmod to be able to be compiled with Cython 3.0, +I encountered a failure due to rtslib not finding the "error" and "Kmod" +modules. + +$ targetcli +module 'kmod' has no attribute 'error' + +If I explicitely import those two modules the failure goes away. + +Signed-off-by: Maurizio Lombardi +--- + rtslib/utils.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/rtslib/utils.py b/rtslib/utils.py +index 61e486a80836..630ebb721465 100644 +--- a/rtslib/utils.py ++++ b/rtslib/utils.py +@@ -423,6 +423,8 @@ def modprobe(module): + + try: + import kmod ++ import kmod.error ++ import kmod.Kmod + except ImportError: + process = subprocess.Popen(("modprobe", module), + stdout=subprocess.PIPE, +-- +2.39.3 + diff --git a/SPECS-EXTENDED/python-rtslib/python-rtslib.signatures.json b/SPECS-EXTENDED/python-rtslib/python-rtslib.signatures.json index d5714722548..4d568f27a66 100644 --- a/SPECS-EXTENDED/python-rtslib/python-rtslib.signatures.json +++ b/SPECS-EXTENDED/python-rtslib/python-rtslib.signatures.json @@ -1,6 +1,5 @@ { "Signatures": { - "rtslib-fb-2.1.fb69.tar.gz": "9c87978af5ab109a6068d78f18d08bc63d63bd86c03f9bd46539c5bf2f02236b", - "target.service": "98d293a0e6061310551f735f768f0bb8bbca273762e2051782be723544b5da6b" + "python-rtslib-fb-2.1.76.tar.gz": "ac15c113d09209c7b0d14d94a12ed88205a7c2feadd1096f573049fd737f7e74" } -} +} \ No newline at end of file diff --git a/SPECS-EXTENDED/python-rtslib/python-rtslib.spec b/SPECS-EXTENDED/python-rtslib/python-rtslib.spec index fa977558605..80306d96f79 100644 --- a/SPECS-EXTENDED/python-rtslib/python-rtslib.spec +++ b/SPECS-EXTENDED/python-rtslib/python-rtslib.spec @@ -4,16 +4,16 @@ %bcond_with apidocs Name: python-rtslib -License: ASL 2.0 -Summary: API for Linux kernel LIO SCSI target -Version: 2.1.fb69 -Release: 9%{?dist} +License: Apache-2.0 Vendor: Microsoft Corporation Distribution: Azure Linux +Summary: API for Linux kernel LIO SCSI target +Version: 2.1.76 +Release: 10%{?dist} URL: https://github.com/open-iscsi/%{oname} -Source: %{url}/archive/v%{version}/%{oname}-%{version}.tar.gz -Source1: target.service +Source: %{url}/archive/v%{version}/%{oname}-%{version}.tar.gz#/python-%{oname}-%{version}.tar.gz Patch0: 0001-disable-xen_pvscsi.patch +Patch1: 0002-rtslib-explicitely-import-kmod.error-and-kmod.Kmod.patch BuildArch: noarch %if %{with apidocs} BuildRequires: epydoc @@ -72,7 +72,8 @@ on system restart. %prep %setup -q -n %{oname}-%{version} -%patch 0 -p1 +%patch -P0 -p1 +%patch -P1 -p1 %build @@ -93,7 +94,7 @@ mkdir -p %{buildroot}%{_unitdir} mkdir -p %{buildroot}%{_sysconfdir}/target/backup mkdir -p %{buildroot}%{_localstatedir}/target/pr mkdir -p %{buildroot}%{_localstatedir}/target/alua -install -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/target.service +install -m 644 systemd/target.service %{buildroot}%{_unitdir}/target.service install -m 644 doc/targetctl.8 %{buildroot}%{_mandir}/man8/ install -m 644 doc/saveconfig.json.5 %{buildroot}%{_mandir}/man5/ @@ -129,8 +130,81 @@ install -m 644 doc/saveconfig.json.5 %{buildroot}%{_mandir}/man5/ %endif %changelog -* Fri Oct 15 2021 Pawel Winogrodzki - 2.1.fb69-9 -- Initial CBL-Mariner import from Fedora 32 (license: MIT). +* Mon Dec 23 2024 Akhila Guruju - 2.1.76-10 +- Initial Azure Linux import from Fedora 41 (license: MIT). +- License verified. + +* Fri Jul 19 2024 Fedora Release Engineering - 2.1.76-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Fri Jun 07 2024 Python Maint - 2.1.76-8 +- Rebuilt for Python 3.13 + +* Mon Feb 12 2024 Maurizio Lombardi - 2.1.76-7 +- Migrated to SPDX license + +* Fri Jan 26 2024 Fedora Release Engineering - 2.1.76-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Jan 22 2024 Fedora Release Engineering - 2.1.76-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Wed Aug 02 2023 Maurizio Lombardi - 2.1.76-4 +- Fix kmod import + +* Fri Jul 21 2023 Fedora Release Engineering - 2.1.76-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Fri Jul 07 2023 Python Maint - 2.1.76-2 +- Rebuilt for Python 3.12 + + +* Tue Jun 06 2023 Maurizio Lombardi - 2.1.76-1 +- Rebase to version 2.1.76 + +* Fri Jan 20 2023 Fedora Release Engineering - 2.1.75-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Jul 22 2022 Fedora Release Engineering - 2.1.75-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 13 2022 Python Maint - 2.1.75-2 +- Rebuilt for Python 3.11 + +* Mon May 16 2022 Maurizio Lombardi - 2.1.75-1 +- Update to new upstream version + +* Wed Mar 30 2022 Maurizio Lombardi - 2.1.74-7 +- Add support for cpus_allowed_list attribute + +* Fri Jan 21 2022 Fedora Release Engineering - 2.1.74-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 2.1.74-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jun 04 2021 Python Maint - 2.1.74-4 +- Rebuilt for Python 3.10 + +* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 2.1.74-3 +- Rebuilt for updated systemd-rpm-macros + See https://pagure.io/fesco/issue/2583. + +* Wed Jan 27 2021 Fedora Release Engineering - 2.1.74-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Aug 31 2020 Maurizio Lombardi - 2.1.74-1 +- New upstream version + +* Wed Jul 29 2020 Fedora Release Engineering - 2.1.73-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Thu Jun 25 2020 Matt Coleman - 2.1.73-1 +- New upstream version +- Use upstream's systemd service + +* Tue May 26 2020 Miro Hrončok - 2.1.fb69-9 +- Rebuilt for Python 3.9 * Thu Jan 30 2020 Fedora Release Engineering - 2.1.fb69-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/SPECS-EXTENDED/python-rtslib/target.service b/SPECS-EXTENDED/python-rtslib/target.service deleted file mode 100644 index aa0a51b6744..00000000000 --- a/SPECS-EXTENDED/python-rtslib/target.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=Restore LIO kernel target configuration -Requires=sys-kernel-config.mount -After=sys-kernel-config.mount network.target local-fs.target - -[Service] -Type=oneshot -RemainAfterExit=yes -ExecStart=/usr/bin/targetctl restore -ExecStop=/usr/bin/targetctl clear -SyslogIdentifier=target - -[Install] -WantedBy=multi-user.target - diff --git a/cgmanifest.json b/cgmanifest.json index e724680b882..021efd9d03c 100644 --- a/cgmanifest.json +++ b/cgmanifest.json @@ -24293,8 +24293,8 @@ "type": "other", "other": { "name": "python-rtslib", - "version": "2.1.fb69", - "downloadUrl": "https://github.com/open-iscsi/rtslib-fb/archive/v2.1.fb69/rtslib-fb-2.1.fb69.tar.gz" + "version": "2.1.76", + "downloadUrl": "https://github.com/open-iscsi/rtslib-fb/archive/v2.1.76/rtslib-fb-2.1.76.tar.gz" } } },