Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package yast2-storage-ng for 
openSUSE:Factory checked in at 2025-04-14 12:55:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-storage-ng (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-storage-ng.new.1907 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-storage-ng"

Mon Apr 14 12:55:18 2025 rev:173 rq:1268545 version:5.0.29

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-storage-ng/yast2-storage-ng.changes        
2025-04-07 17:34:59.308736253 +0200
+++ 
/work/SRC/openSUSE:Factory/.yast2-storage-ng.new.1907/yast2-storage-ng.changes  
    2025-04-14 12:55:21.108613436 +0200
@@ -1,0 +2,6 @@
+Thu Apr 10 11:30:44 UTC 2025 - Ancor Gonzalez Sosa <an...@suse.com>
+
+- Create /etc/lvm/devices if needed (jsc#PED-7355, jsc#PED-12241).
+- 5.0.29
+
+-------------------------------------------------------------------

Old:
----
  yast2-storage-ng-5.0.28.tar.bz2

New:
----
  yast2-storage-ng-5.0.29.tar.bz2

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

Other differences:
------------------
++++++ yast2-storage-ng.spec ++++++
--- /var/tmp/diff_new_pack.7a1Iks/_old  2025-04-14 12:55:21.912647200 +0200
+++ /var/tmp/diff_new_pack.7a1Iks/_new  2025-04-14 12:55:21.912647200 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-storage-ng
-Version:        5.0.28
+Version:        5.0.29
 Release:        0
 Summary:        YaST2 - Storage Configuration
 License:        GPL-2.0-only OR GPL-3.0-only
@@ -26,8 +26,8 @@
 
 Source:         %{name}-%{version}.tar.bz2
 
-# Encryption#use_key_file_in_commit
-BuildRequires:  libstorage-ng-ruby >= 4.5.144
+# RB_FILESYSTEM_MOUNT_READ_ONLY
+BuildRequires:  libstorage-ng-ruby >= 4.5.246
 BuildRequires:  update-desktop-files
 # Replace PackageSystem with Package
 BuildRequires:  yast2 >= 4.4.38
@@ -48,8 +48,8 @@
 
 # findutils for xargs
 Requires:       findutils
-# Encryption#use_key_file_in_commit
-Requires:       libstorage-ng-ruby >= 4.5.144
+# RB_FILESYSTEM_MOUNT_READ_ONLY
+Requires:       libstorage-ng-ruby >= 4.5.246
 # Require libstorage bindings for the current Ruby version (bsc#1235598)
 Requires:       libstorage-ng-ruby-%{rb_ver}
 # Replace PackageSystem with Package

++++++ yast2-storage-ng-5.0.28.tar.bz2 -> yast2-storage-ng-5.0.29.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-ng-5.0.28/package/yast2-storage-ng.changes 
new/yast2-storage-ng-5.0.29/package/yast2-storage-ng.changes
--- old/yast2-storage-ng-5.0.28/package/yast2-storage-ng.changes        
2025-04-04 09:16:44.000000000 +0200
+++ new/yast2-storage-ng-5.0.29/package/yast2-storage-ng.changes        
2025-04-11 09:04:25.000000000 +0200
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Thu Apr 10 11:30:44 UTC 2025 - Ancor Gonzalez Sosa <an...@suse.com>
+
+- Create /etc/lvm/devices if needed (jsc#PED-7355, jsc#PED-12241).
+- 5.0.29
+
+-------------------------------------------------------------------
 Fri Apr  4 07:00:19 UTC 2025 - Ancor Gonzalez Sosa <an...@suse.com>
 
 - New environment variables YAST_STORAGE_TEST_MODE and
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-ng-5.0.28/package/yast2-storage-ng.spec 
new/yast2-storage-ng-5.0.29/package/yast2-storage-ng.spec
--- old/yast2-storage-ng-5.0.28/package/yast2-storage-ng.spec   2025-04-04 
09:16:44.000000000 +0200
+++ new/yast2-storage-ng-5.0.29/package/yast2-storage-ng.spec   2025-04-11 
09:04:25.000000000 +0200
@@ -16,7 +16,7 @@
 #
 
 Name:           yast2-storage-ng
-Version:        5.0.28
+Version:        5.0.29
 Release:        0
 Summary:        YaST2 - Storage Configuration
 License:        GPL-2.0-only OR GPL-3.0-only
@@ -25,8 +25,8 @@
 
 Source:         %{name}-%{version}.tar.bz2
 
-# Encryption#use_key_file_in_commit
-BuildRequires: libstorage-ng-ruby >= 4.5.144
+# RB_FILESYSTEM_MOUNT_READ_ONLY
+BuildRequires: libstorage-ng-ruby >= 4.5.246
 BuildRequires:  update-desktop-files
 # Replace PackageSystem with Package
 BuildRequires:  yast2 >= 4.4.38
@@ -47,8 +47,8 @@
 
 # findutils for xargs
 Requires:       findutils
-# Encryption#use_key_file_in_commit
-Requires:       libstorage-ng-ruby >= 4.5.144
+# RB_FILESYSTEM_MOUNT_READ_ONLY
+Requires:       libstorage-ng-ruby >= 4.5.246
 # Require libstorage bindings for the current Ruby version (bsc#1235598)
 Requires:       libstorage-ng-ruby-%{rb_ver}
 # Replace PackageSystem with Package
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-ng-5.0.28/src/lib/y2storage/clients/finish.rb 
new/yast2-storage-ng-5.0.29/src/lib/y2storage/clients/finish.rb
--- old/yast2-storage-ng-5.0.28/src/lib/y2storage/clients/finish.rb     
2025-04-04 09:16:44.000000000 +0200
+++ new/yast2-storage-ng-5.0.29/src/lib/y2storage/clients/finish.rb     
2025-04-11 09:04:25.000000000 +0200
@@ -1,4 +1,4 @@
-# Copyright (c) [2018-2019] SUSE LLC
+# Copyright (c) [2018-2025] SUSE LLC
 #
 # All Rights Reserved.
 #
@@ -17,9 +17,11 @@
 # To contact SUSE LLC about this file by physical or electronic mail, you may
 # find current contact information at www.suse.com.
 
+require "fileutils"
 require "yast"
 require "installation/finish_client"
 require "y2storage/used_filesystems"
+Yast.import "Mode"
 
 module Y2Storage
   module Clients
@@ -47,6 +49,7 @@
         enable_multipath
         update_sysconfig
         finish_devices
+        copy_lvm_devices
         true
       end
 
@@ -81,6 +84,23 @@
         staging.finish_installation
       end
 
+      LVM_DEVICES_DIR = "/etc/lvm/devices".freeze
+
+      # Copies the files from /etc/lvm/devices to the target system, if needed
+      def copy_lvm_devices
+        # No files should be generated during a system upgrade, since 
libstorage-ng is not
+        # involved. But better be safe and skip this in the update case.
+        return unless Yast::Mode.installation
+
+        files = Dir.glob(File.join(LVM_DEVICES_DIR, "*"))
+        target_path = File.join(Installation.destdir, LVM_DEVICES_DIR)
+        target_exists = File.exist?(target_path)
+        log.info("Trying to copy LVM devices files. Target: #{target_exists}. 
Files: #{files}")
+        return unless target_exists
+
+        files.each { |f| ::FileUtils.cp_r(f, target_path) }
+      end
+
       # Staging devicegraph
       #
       # @return [Devicegraph]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-ng-5.0.28/src/lib/y2storage/resize_info.rb 
new/yast2-storage-ng-5.0.29/src/lib/y2storage/resize_info.rb
--- old/yast2-storage-ng-5.0.28/src/lib/y2storage/resize_info.rb        
2025-04-04 09:16:44.000000000 +0200
+++ new/yast2-storage-ng-5.0.29/src/lib/y2storage/resize_info.rb        
2025-04-11 09:04:25.000000000 +0200
@@ -57,7 +57,8 @@
         RB_NO_SPACE_IN_LVM_VG:                             N_("No space left 
in the LVM volume group."),
         RB_MIN_SIZE_FOR_LVM_LV:                            N_("The LVM logical 
volume already has the minimum possible size."),
         RB_MAX_SIZE_FOR_LVM_LV_THIN:                       N_("The LVM thin 
logical volume already has the maximum size."),
-        RB_PASSWORD_REQUIRED:                              N_("The encryption 
password is required.")
+        RB_PASSWORD_REQUIRED:                              N_("The encryption 
password is required."),
+        RB_FILESYSTEM_MOUNT_READ_ONLY:                     N_("Filesystem 
mounted in read-only mode.")
       }.freeze
     # rubocop:enable Layout/LineLength
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-ng-5.0.28/src/lib/y2storage/storage_manager.rb 
new/yast2-storage-ng-5.0.29/src/lib/y2storage/storage_manager.rb
--- old/yast2-storage-ng-5.0.28/src/lib/y2storage/storage_manager.rb    
2025-04-04 09:16:44.000000000 +0200
+++ new/yast2-storage-ng-5.0.29/src/lib/y2storage/storage_manager.rb    
2025-04-11 09:04:25.000000000 +0200
@@ -1,4 +1,4 @@
-# Copyright (c) [2015-2022] SUSE LLC
+# Copyright (c) [2015-2025] SUSE LLC
 #
 # All Rights Reserved.
 #
@@ -342,6 +342,9 @@
       storage.commit(commit_options, callbacks)
       staging.post_commit
 
+      # Make sure /etc/lvm/devices is written in case it is missing
+      add_missing_lvm_devices
+
       @committed = true
     rescue Storage::Exception
       false
@@ -555,6 +558,16 @@
       root.configure_snapper
     end
 
+    # Generates the files at /etc/lvm/devices if they are not there but 
libstorage-ng considers
+    # they should be.
+    #
+    # See jsc#PED-7355
+    def add_missing_lvm_devices
+      return unless Storage::LvmDevicesFile.status == 
Storage::LvmDevicesFile::Status_MISSING
+
+      Storage::LvmDevicesFile.create(staging.to_storage_value)
+    end
+
     # Class methods
     class << self
       # Initializes storage with a specific access mode (read-only or 
read-write)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-ng-5.0.28/test/y2storage/clients/finish_test.rb 
new/yast2-storage-ng-5.0.29/test/y2storage/clients/finish_test.rb
--- old/yast2-storage-ng-5.0.28/test/y2storage/clients/finish_test.rb   
2025-04-04 09:16:44.000000000 +0200
+++ new/yast2-storage-ng-5.0.29/test/y2storage/clients/finish_test.rb   
2025-04-11 09:04:25.000000000 +0200
@@ -1,5 +1,5 @@
 #!/usr/bin/env rspec
-# Copyright (c) [2018-2019] SUSE LLC
+# Copyright (c) [2018-2025] SUSE LLC
 #
 # All Rights Reserved.
 #
@@ -46,7 +46,12 @@
 
     context "Write" do
       let(:args) { ["Write"] }
-      before { fake_scenario(scenario) }
+      before do
+        fake_scenario(scenario)
+        allow(Yast::Mode).to receive(:installation).and_return true
+        allow(Dir).to receive(:glob).and_call_original
+        allow(Dir).to receive(:glob).with("/etc/lvm/devices/*").and_return []
+      end
 
       let(:scenario) { "lvm-two-vgs" }
 
@@ -149,6 +154,40 @@
           end
         end
       end
+
+      context "if there are files at /etc/lvm/devices" do
+        around do |example|
+          @orig_root = Dir.mktmpdir
+          @orig_dir_path = File.join(@orig_root, "etc", "lvm", "devices")
+          FileUtils.mkdir_p(@orig_dir_path)
+          @orig_file_name = "system"
+          FileUtils.touch(File.join(@orig_dir_path, @orig_file_name))
+
+          @dest_root = Dir.mktmpdir
+          @dest_dir_path = File.join(@dest_root, "etc", "lvm", "devices")
+          FileUtils.mkdir_p(@dest_dir_path)
+
+          example.run
+        ensure
+          FileUtils.remove_entry @orig_root
+          FileUtils.remove_entry @dest_root
+        end
+
+        before do
+          allow(Dir).to receive(:glob).with("/etc/lvm/devices/*") do
+            Dir.glob(File.join(@orig_dir_path, "*"))
+          end
+          allow(Yast::Installation).to receive(:destdir).and_return @dest_root
+        end
+
+        it "copies the files to the corresponding path at the target system" do
+          file = File.join(Yast::Installation.destdir, "etc", "lvm", 
"devices", @orig_file_name)
+
+          expect(File.exist?(file)).to eq false
+          client.run
+          expect(File.exist?(file)).to eq true
+        end
+      end
     end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-ng-5.0.28/test/y2storage/storage_manager_test.rb 
new/yast2-storage-ng-5.0.29/test/y2storage/storage_manager_test.rb
--- old/yast2-storage-ng-5.0.28/test/y2storage/storage_manager_test.rb  
2025-04-04 09:16:44.000000000 +0200
+++ new/yast2-storage-ng-5.0.29/test/y2storage/storage_manager_test.rb  
2025-04-11 09:04:25.000000000 +0200
@@ -1,6 +1,6 @@
 #!/usr/bin/env rspec
 
-# Copyright (c) [2017-2022] SUSE LLC
+# Copyright (c) [2017-2025] SUSE LLC
 #
 # All Rights Reserved.
 #
@@ -27,9 +27,13 @@
 
   include Yast::Logger
 
+  let(:lvm_devs_disabled) { Storage::LvmDevicesFile::Status_DISABLED }
+  let(:lvm_devs_missing) { Storage::LvmDevicesFile::Status_MISSING }
+
   before do
     described_class.create_test_instance
     allow(Yast::Pkg).to receive(:SourceReleaseAll)
+    allow(Storage::LvmDevicesFile).to receive(:status).and_return 
lvm_devs_disabled
   end
 
   describe ".new" do
@@ -597,6 +601,22 @@
       manager.commit(force_rw: true)
     end
 
+    it "does not generate /etc/lvm/devices if not needed" do
+      expect(Storage::LvmDevicesFile).to_not receive(:create)
+      manager.commit
+    end
+
+    context "if there is a missing file at /etc/lvm/devices" do
+      before do
+        allow(Storage::LvmDevicesFile).to receive(:status).and_return 
lvm_devs_missing
+      end
+
+      it "generates the files at /etc/lvm/devices" do
+        expect(Storage::LvmDevicesFile).to receive(:create)
+        manager.commit
+      end
+    end
+
     it "returns true if everything goes fine" do
       expect(manager.commit).to eq true
     end

Reply via email to