Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package yast2-iscsi-client for 
openSUSE:Factory checked in at 2025-07-06 17:00:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-iscsi-client (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-iscsi-client.new.1903 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-iscsi-client"

Sun Jul  6 17:00:12 2025 rev:150 rq:1290499 version:5.0.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-iscsi-client/yast2-iscsi-client.changes    
2025-01-24 13:38:37.858262678 +0100
+++ 
/work/SRC/openSUSE:Factory/.yast2-iscsi-client.new.1903/yast2-iscsi-client.changes
  2025-07-06 17:00:30.880576614 +0200
@@ -1,0 +2,14 @@
+Thu Jul  3 13:24:33 UTC 2025 - José Iván López González <jlo...@suse.com>
+
+- Avoid exception if discovering from a portal fails (related to
+  bsc#1245171).
+- 5.0.8
+
+-------------------------------------------------------------------
+Wed Jul  2 15:24:46 UTC 2025 - José Iván López González <jlo...@suse.com>
+
+- Add method for discovering from a portal (needed for Agama, see
+  bsc#1245171).
+- 5.0.7
+
+-------------------------------------------------------------------
@@ -47 +60,0 @@
-

Old:
----
  yast2-iscsi-client-5.0.6.tar.bz2

New:
----
  yast2-iscsi-client-5.0.8.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-iscsi-client.spec ++++++
--- /var/tmp/diff_new_pack.PO2y7e/_old  2025-07-06 17:00:31.696610419 +0200
+++ /var/tmp/diff_new_pack.PO2y7e/_new  2025-07-06 17:00:31.696610419 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-iscsi-client
-Version:        5.0.6
+Version:        5.0.8
 Release:        0
 Summary:        YaST2 - iSCSI Client Configuration
 License:        GPL-2.0-only

++++++ yast2-iscsi-client-5.0.6.tar.bz2 -> yast2-iscsi-client-5.0.8.tar.bz2 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-iscsi-client-5.0.6/package/yast2-iscsi-client.changes 
new/yast2-iscsi-client-5.0.8/package/yast2-iscsi-client.changes
--- old/yast2-iscsi-client-5.0.6/package/yast2-iscsi-client.changes     
2025-01-23 10:48:55.000000000 +0100
+++ new/yast2-iscsi-client-5.0.8/package/yast2-iscsi-client.changes     
2025-07-03 16:12:40.000000000 +0200
@@ -1,4 +1,18 @@
 -------------------------------------------------------------------
+Thu Jul  3 13:24:33 UTC 2025 - José Iván López González <jlo...@suse.com>
+
+- Avoid exception if discovering from a portal fails (related to
+  bsc#1245171).
+- 5.0.8
+
+-------------------------------------------------------------------
+Wed Jul  2 15:24:46 UTC 2025 - José Iván López González <jlo...@suse.com>
+
+- Add method for discovering from a portal (needed for Agama, see
+  bsc#1245171).
+- 5.0.7
+
+-------------------------------------------------------------------
 Wed Jan 22 16:31:35 UTC 2025 - Knut Anderssen <kanders...@suse.com>
 
 - Try to load the iscsi_ibft module in ARM arch as it should be 
@@ -44,7 +58,6 @@
 - 5.0.1
 
 -------------------------------------------------------------------
-
 Wed Aug 30 20:16:10 UTC 2023 - Josef Reidinger <jreidin...@suse.cz>
 
 - 5.0.0 (bsc#1185510)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-iscsi-client-5.0.6/package/yast2-iscsi-client.spec 
new/yast2-iscsi-client-5.0.8/package/yast2-iscsi-client.spec
--- old/yast2-iscsi-client-5.0.6/package/yast2-iscsi-client.spec        
2025-01-23 10:48:55.000000000 +0100
+++ new/yast2-iscsi-client-5.0.8/package/yast2-iscsi-client.spec        
2025-07-03 16:12:40.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-iscsi-client
-Version:        5.0.6
+Version:        5.0.8
 Release:        0
 Summary:        YaST2 - iSCSI Client Configuration
 License:        GPL-2.0-only
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-iscsi-client-5.0.6/src/modules/IscsiClientLib.rb 
new/yast2-iscsi-client-5.0.8/src/modules/IscsiClientLib.rb
--- old/yast2-iscsi-client-5.0.6/src/modules/IscsiClientLib.rb  2025-01-23 
10:48:55.000000000 +0100
+++ new/yast2-iscsi-client-5.0.8/src/modules/IscsiClientLib.rb  2025-07-03 
16:12:40.000000000 +0200
@@ -2,7 +2,7 @@
 
 # |***************************************************************************
 # |
-# | Copyright (c) [2012-2023] SUSE LLC
+# | Copyright (c) [2012-2025] SUSE LLC
 # | All Rights Reserved.
 # |
 # | This program is free software; you can redistribute it and/or
@@ -28,6 +28,7 @@
 require "y2iscsi_client/config"
 require "y2iscsi_client/timeout_process"
 require "y2iscsi_client/authentication"
+require "cheetah"
 
 require "shellwords"
 
@@ -523,6 +524,24 @@
       success
     end
 
+    # Discovers iSCSI targets from a portal.
+    #
+    # @note This method is required by Agama in order to mimic the AutoYaST 
behavior while importing
+    #   the iSCSI config.
+    #
+    # @param portal [String]
+    # @param interfaces [Array<String>]
+    #
+    # @return [Boolean] Whether the discovery action was done.
+    def discover_from_portal(portal, interfaces)
+      host, port = portal.split(":")
+      command = GetDiscoveryCmd(host, port, interfaces: interfaces)
+      Yast::Execute.locally!(*command, env: { "LC_ALL" => "POSIX" })
+      true
+    rescue Cheetah::ExecutionFailed
+      false
+    end
+
     def setISNSConfig(address, port)
       @config.set_isns(address, port)
     end
@@ -1379,10 +1398,12 @@
     #
     # @param ip [String] Portal IP address
     # @param port [String] Portal port number
+    # @param interfaces [Array<String>, nil] Interfaces for discovering. If 
nil, discover without a
+    #   specific interface.
     # @param use_fw [Boolean] whether the target should be fw or not
     # @param only_new [Boolean] whether a new record should be created
     # @return [Array<String>]
-    def GetDiscoveryCmd(ip, port, use_fw: false, only_new: false)
+    def GetDiscoveryCmd(ip, port, interfaces: nil, use_fw: false, only_new: 
false)
       log.info "GetDiscoveryCmd ip:#{ip} port:#{port} fw:#{use_fw} only 
new:#{only_new}"
 
       command = DISCOVERY_CMD.split
@@ -1390,9 +1411,9 @@
       if isns_info["use"]
         command << "-t" << "isns"
       else
-        ifs = GetDiscIfaces()
+        ifs = interfaces || GetDiscIfaces()
         log.info "ifs=#{ifs}"
-        ifs = ifs.each_with_object([]) { |s, res| res << "-I" << s }
+        ifs = ifs.map { |i| ["-I", i] }.flatten
         log.info "ifs=#{ifs}"
         tgt = "st"
         tgt = "fw" if use_fw

Reply via email to