Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package yast2-update for openSUSE:Factory 
checked in at 2022-05-01 18:53:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-update (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-update.new.1538 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-update"

Sun May  1 18:53:22 2022 rev:148 rq:973738 version:4.5.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-update/yast2-update.changes        
2022-04-14 17:24:30.599196382 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-update.new.1538/yast2-update.changes      
2022-05-01 18:53:25.635153977 +0200
@@ -1,0 +2,7 @@
+Thu Apr 28 08:09:47 UTC 2022 - Ladislav Slez??k <[email protected]>
+
+- Use the "norecovery" mount option when searching the root
+  partitions (bsc#1195894)
+- 4.5.1
+
+-------------------------------------------------------------------

Old:
----
  yast2-update-4.5.0.tar.bz2

New:
----
  yast2-update-4.5.1.tar.bz2

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

Other differences:
------------------
++++++ yast2-update.spec ++++++
--- /var/tmp/diff_new_pack.j5Vvvg/_old  2022-05-01 18:53:27.219155447 +0200
+++ /var/tmp/diff_new_pack.j5Vvvg/_new  2022-05-01 18:53:27.223155451 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-update
-Version:        4.5.0
+Version:        4.5.1
 Release:        0
 Summary:        YaST2 - Update
 License:        GPL-2.0-only

++++++ yast2-update-4.5.0.tar.bz2 -> yast2-update-4.5.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-update-4.5.0/package/yast2-update.changes 
new/yast2-update-4.5.1/package/yast2-update.changes
--- old/yast2-update-4.5.0/package/yast2-update.changes 2022-04-12 
13:39:08.000000000 +0200
+++ new/yast2-update-4.5.1/package/yast2-update.changes 2022-04-28 
16:58:44.000000000 +0200
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Thu Apr 28 08:09:47 UTC 2022 - Ladislav Slez??k <[email protected]>
+
+- Use the "norecovery" mount option when searching the root
+  partitions (bsc#1195894)
+- 4.5.1
+
+-------------------------------------------------------------------
 Wed Apr 06 13:24:58 UTC 2022 - Ladislav Slez??k <[email protected]>
 
 - Bump version to 4.5.0 (bsc#1198109)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-update-4.5.0/package/yast2-update.spec 
new/yast2-update-4.5.1/package/yast2-update.spec
--- old/yast2-update-4.5.0/package/yast2-update.spec    2022-04-12 
13:39:08.000000000 +0200
+++ new/yast2-update-4.5.1/package/yast2-update.spec    2022-04-28 
16:58:44.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-update
-Version:        4.5.0
+Version:        4.5.1
 Release:        0
 Summary:        YaST2 - Update
 Group:          System/YaST
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-update-4.5.0/src/modules/RootPart.rb 
new/yast2-update-4.5.1/src/modules/RootPart.rb
--- old/yast2-update-4.5.0/src/modules/RootPart.rb      2022-04-12 
13:39:08.000000000 +0200
+++ new/yast2-update-4.5.1/src/modules/RootPart.rb      2022-04-28 
16:58:44.000000000 +0200
@@ -37,6 +37,9 @@
     include Logger
     NON_MODULAR_FS = ["devtmpfs", "none", "proc", "sysfs"].freeze
 
+    # filesystems which support the "norecovery" mount options
+    NORECOVERY_FS = [:btrfs, :ext3, :ext4, :xfs].freeze
+
     def main
       Yast.import "UI"
 
@@ -1303,13 +1306,16 @@
           SCR.Execute(path(".target.modprobe"), mount_type, "")
         end
 
+        mount_options = ["ro"]
+        mount_options << "norecovery" if NORECOVERY_FS.include?(freshman[:fs])
+
         # mount (read-only) partition to Installation::destdir
-        log.debug("Mounting #{[p_dev, Installation.destdir, 
Installation.mountlog].inspect}")
+        log.info "Mounting #{p_dev} with options #{mount_options}"
         mount =
           SCR.Execute(
             path(".target.mount"),
             [p_dev, Installation.destdir, Installation.mountlog],
-            "-o ro"
+            "-o #{mount_options.join(",")}"
           )
 
         if Convert.to_boolean(mount)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-update-4.5.0/test/root_part_test.rb 
new/yast2-update-4.5.1/test/root_part_test.rb
--- old/yast2-update-4.5.0/test/root_part_test.rb       2022-04-12 
13:39:08.000000000 +0200
+++ new/yast2-update-4.5.1/test/root_part_test.rb       2022-04-28 
16:58:44.000000000 +0200
@@ -400,4 +400,35 @@
       end
     end
   end
+
+  describe "#CheckPartition" do
+    before do
+      stub_storage(scenario)
+      allow(Yast::SCR).to receive(:Execute)
+    end
+
+    let(:scenario) { "two-disks-two-btrfs.xml" }
+
+    it "uses 'norecovery' mount option for Btrfs" do
+      # return failure to avoid scanning for /etc/fstab
+      expect(Yast::SCR).to receive(:Execute)
+        .with(Yast.path(".target.mount"), Array, "-o ro,norecovery")
+        .and_return(false)
+
+      fs = Y2Storage::StorageManager.instance.probed.blk_filesystems.first
+      subject.CheckPartition(fs)
+    end
+
+    it "does not use 'norecovery` mount option for Ext2" do
+      # return failure to avoid scanning for /etc/fstab
+      expect(Yast::SCR).to receive(:Execute)
+        .with(Yast.path(".target.mount"), Array, "-o ro")
+        .and_return(false)
+
+      fs = Y2Storage::StorageManager.instance.probed.blk_filesystems.first
+      allow(fs).to 
receive(:type).and_return(Y2Storage::Filesystems::Type::EXT2)
+
+      subject.CheckPartition(fs)
+    end
+  end
 end

Reply via email to