Hello community, here is the log from the commit of package yast2-installation for openSUSE:Factory checked in at 2018-05-17 19:32:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-installation (Old) and /work/SRC/openSUSE:Factory/.yast2-installation.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-installation" Thu May 17 19:32:31 2018 rev:404 rq:609807 version:4.0.60 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-installation/yast2-installation.changes 2018-05-13 15:58:24.824892313 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-installation.new/yast2-installation.changes 2018-05-17 19:32:35.460858289 +0200 @@ -1,0 +2,8 @@ +Wed May 16 12:50:36 UTC 2018 - jlo...@suse.com + +- Do not try to set read-only property to default BTRFS subvolume + if the filesystem already existed on disk (needed for + bsc#1091047). +- 4.0.60 + +------------------------------------------------------------------- Old: ---- yast2-installation-4.0.59.tar.bz2 New: ---- yast2-installation-4.0.60.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-installation.spec ++++++ --- /var/tmp/diff_new_pack.7UtZS7/_old 2018-05-17 19:32:36.080835638 +0200 +++ /var/tmp/diff_new_pack.7UtZS7/_new 2018-05-17 19:32:36.084835492 +0200 @@ -17,7 +17,7 @@ Name: yast2-installation -Version: 4.0.59 +Version: 4.0.60 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -28,7 +28,7 @@ Requires: yast2-ruby-bindings >= 4.0.6 Summary: YaST2 - Installation Parts -License: GPL-2.0 +License: GPL-2.0-only Group: System/YaST Source1: YaST2-Second-Stage.service ++++++ yast2-installation-4.0.59.tar.bz2 -> yast2-installation-4.0.60.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.0.59/package/yast2-installation.changes new/yast2-installation-4.0.60/package/yast2-installation.changes --- old/yast2-installation-4.0.59/package/yast2-installation.changes 2018-05-11 10:48:59.000000000 +0200 +++ new/yast2-installation-4.0.60/package/yast2-installation.changes 2018-05-16 15:51:12.000000000 +0200 @@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Wed May 16 12:50:36 UTC 2018 - jlo...@suse.com + +- Do not try to set read-only property to default BTRFS subvolume + if the filesystem already existed on disk (needed for + bsc#1091047). +- 4.0.60 + +------------------------------------------------------------------- Thu May 10 13:10:41 UTC 2018 - igonzalezs...@suse.com - Log a warning when umounting a filesystem fails after diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.0.59/package/yast2-installation.spec new/yast2-installation-4.0.60/package/yast2-installation.spec --- old/yast2-installation-4.0.59/package/yast2-installation.spec 2018-05-11 10:48:59.000000000 +0200 +++ new/yast2-installation-4.0.60/package/yast2-installation.spec 2018-05-16 15:51:12.000000000 +0200 @@ -16,7 +16,7 @@ # Name: yast2-installation -Version: 4.0.59 +Version: 4.0.60 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.0.59/src/lib/installation/clients/umount_finish.rb new/yast2-installation-4.0.60/src/lib/installation/clients/umount_finish.rb --- old/yast2-installation-4.0.59/src/lib/installation/clients/umount_finish.rb 2018-05-11 10:48:59.000000000 +0200 +++ new/yast2-installation-4.0.60/src/lib/installation/clients/umount_finish.rb 2018-05-16 15:51:12.000000000 +0200 @@ -404,7 +404,7 @@ devicegraph = Y2Storage::StorageManager.instance.staging ro_btrfs_filesystems = devicegraph.filesystems.select do |fs| - fs.is?(:btrfs) && fs.mount_point && fs.mount_options.include?("ro") + new_filesystem?(fs) && ro_btrfs_filesystem?(fs) end ro_btrfs_filesystems.each { |f| default_subvolume_as_ro(f) } @@ -445,5 +445,23 @@ end log.warn("Running processes using #{mount_point}: #{fuser}") end + + private + + # Check whether the given filesystem is going to be created + # + # @param filesystem [Y2Storage::Filesystems::Base] + # @return [Boolean] + def new_filesystem?(filesystem) + !filesystem.exists_in_probed? + end + + # Check whether the given filesystem is read-only BTRFS + # + # @param filesystem [Y2Storage::Filesystems::Base] + # @return [Boolean] + def ro_btrfs_filesystem?(filesystem) + filesystem.is?(:btrfs) && filesystem.mount_point && filesystem.mount_options.include?("ro") + end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.0.59/test/lib/clients/umount_finish_test.rb new/yast2-installation-4.0.60/test/lib/clients/umount_finish_test.rb --- old/yast2-installation-4.0.59/test/lib/clients/umount_finish_test.rb 2018-05-11 10:48:59.000000000 +0200 +++ new/yast2-installation-4.0.60/test/lib/clients/umount_finish_test.rb 2018-05-16 15:51:12.000000000 +0200 @@ -27,10 +27,11 @@ let(:root_fs) do instance_double( Y2Storage::Filesystems::Btrfs, - is?: true, mount_point: mount_point, mount_options: mount_options, - subvolumes_prefix: subvolumes_prefix + subvolumes_prefix: subvolumes_prefix, + is?: is_btrfs, + exists_in_probed?: !is_new ) end @@ -38,6 +39,8 @@ let(:mount_options) { ["ro"] } let(:subvolumes_prefix) { "@" } let(:get_default) { "ID 276 gen 1172 top level 275 path @/.snapshots/1/snapshot\n" } + let(:is_btrfs) { true } + let(:is_new) { true } context "when a Btrfs filesystem is mounted as read-only" do context "and there is no subvolume_prefix" do @@ -116,8 +119,18 @@ end end - context "when a non-Btrfs filesystem is mounted" do - let(:root_fs) { instance_double(Y2Storage::Filesystems::Base, is?: false) } + context "when Btrfs filesystem is not mounted as read-only" do + let(:mount_options) { [] } + + it "does not try to set 'ro' property" do + expect(Yast::Execute).to_not receive(:on_target) + .with("btrfs", "property", "set", any_args) + client.set_btrfs_defaults_as_ro + end + end + + context "when a Btrfs filesystem already exists on disk" do + let(:is_new) { false } it "does not try to set 'ro' property for that filesystem" do expect(Yast::Execute).to_not receive(:on_target) @@ -126,10 +139,10 @@ end end - context "when Btrfs filesystem is not mounted as read-only" do - let(:mount_options) { [] } + context "when a non-Btrfs filesystem is mounted" do + let(:is_btrfs) { false } - it "does not try to set 'ro' property" do + it "does not try to set 'ro' property for that filesystem" do expect(Yast::Execute).to_not receive(:on_target) .with("btrfs", "property", "set", any_args) client.set_btrfs_defaults_as_ro