Hello community, here is the log from the commit of package yast2-update for openSUSE:Factory checked in at 2018-09-04 22:50:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-update (Old) and /work/SRC/openSUSE:Factory/.yast2-update.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-update" Tue Sep 4 22:50:17 2018 rev:123 rq:631045 version:4.1.1 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-update/yast2-update.changes 2018-07-27 10:55:03.653510915 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-update.new/yast2-update.changes 2018-09-04 22:50:18.855797576 +0200 @@ -1,0 +2,12 @@ +Wed Aug 22 09:55:27 CEST 2018 - sch...@suse.de + +- Switched license in spec file from SPDX2 to SPDX3 format. + +------------------------------------------------------------------- +Tue Aug 21 05:13:58 UTC 2018 - lsle...@suse.cz + +- Do not crash at upgrade when the original /etc/resolv.conf + file is set to immutable (bsc#1096142) +- 4.1.1 + +------------------------------------------------------------------- Old: ---- yast2-update-4.1.0.tar.bz2 New: ---- yast2-update-4.1.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-update.spec ++++++ --- /var/tmp/diff_new_pack.xK79QN/_old 2018-09-04 22:50:19.579800063 +0200 +++ /var/tmp/diff_new_pack.xK79QN/_new 2018-09-04 22:50:19.583800076 +0200 @@ -17,7 +17,7 @@ Name: yast2-update -Version: 4.1.0 +Version: 4.1.1 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -68,7 +68,7 @@ Requires: pigz Summary: YaST2 - Update -License: GPL-2.0 +License: GPL-2.0-only Group: System/YaST %package FACTORY ++++++ yast2-update-4.1.0.tar.bz2 -> yast2-update-4.1.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-update-4.1.0/package/yast2-update.changes new/yast2-update-4.1.1/package/yast2-update.changes --- old/yast2-update-4.1.0/package/yast2-update.changes 2018-07-25 14:00:47.000000000 +0200 +++ new/yast2-update-4.1.1/package/yast2-update.changes 2018-08-23 10:03:34.000000000 +0200 @@ -1,4 +1,16 @@ ------------------------------------------------------------------- +Wed Aug 22 09:55:27 CEST 2018 - sch...@suse.de + +- Switched license in spec file from SPDX2 to SPDX3 format. + +------------------------------------------------------------------- +Tue Aug 21 05:13:58 UTC 2018 - lsle...@suse.cz + +- Do not crash at upgrade when the original /etc/resolv.conf + file is set to immutable (bsc#1096142) +- 4.1.1 + +------------------------------------------------------------------- Wed Jul 25 13:21:22 CEST 2018 - sch...@suse.de - Wrong fstype "Windows Data Partition" will not be shown anymore diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-update-4.1.0/package/yast2-update.spec new/yast2-update-4.1.1/package/yast2-update.spec --- old/yast2-update-4.1.0/package/yast2-update.spec 2018-07-25 14:00:47.000000000 +0200 +++ new/yast2-update-4.1.1/package/yast2-update.spec 2018-08-23 10:03:34.000000000 +0200 @@ -17,14 +17,14 @@ Name: yast2-update -Version: 4.1.0 +Version: 4.1.1 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build Source0: %{name}-%{version}.tar.bz2 Group: System/YaST -License: GPL-2.0 +License: GPL-2.0-only BuildRequires: update-desktop-files BuildRequires: yast2-devtools >= 3.1.15 BuildRequires: yast2-ruby-bindings >= 1.0.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-update-4.1.0/src/modules/RootPart.rb new/yast2-update-4.1.1/src/modules/RootPart.rb --- old/yast2-update-4.1.0/src/modules/RootPart.rb 2018-07-25 14:00:47.000000000 +0200 +++ new/yast2-update-4.1.1/src/modules/RootPart.rb 2018-08-23 10:03:34.000000000 +0200 @@ -1718,7 +1718,17 @@ # the network connection works for the chrooted scripts def inject_intsys_files # the original file is backed up and restored later - ::FileUtils.cp(RESOLV_CONF, File.join(Installation.destdir, RESOLV_CONF)) if File.exist?(RESOLV_CONF) + target = File.join(Installation.destdir, RESOLV_CONF) + # use copy entry as we need to remove_destination 5th param in case of symlink to dynamic + # resolver like systemd-resolver and some configuration of network manager. So we not modify + # symlink target and instead just replace symlink with our file that can resolve and from + # backup we later restore original symlink. + ::FileUtils.copy_entry(RESOLV_CONF, target, false, false, true) if File.exist?(RESOLV_CONF) + rescue Errno::EPERM => e + # just log a warning when rewriting the file is not permitted, + # e.g. it has the immutable flag set (bsc#1096142) + # assume that the user locked content works properly + log.warn("Cannot update #{target}, keeping the original content, #{e.class}: #{e}") end # Get architecture of an elf file. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-update-4.1.0/test/root_part_test.rb new/yast2-update-4.1.1/test/root_part_test.rb --- old/yast2-update-4.1.0/test/root_part_test.rb 2018-07-25 14:00:47.000000000 +0200 +++ new/yast2-update-4.1.1/test/root_part_test.rb 2018-08-23 10:03:34.000000000 +0200 @@ -248,4 +248,40 @@ subject.MountFSTab(fstab, "") end end + + describe "#inject_intsys_files" do + before do + allow(Yast::Installation).to receive(:destdir).and_return("/mnt") + end + + context "resolv.conf exists in inst-sys" do + before do + expect(File).to receive(:exist?).with("/etc/resolv.conf").and_return(true) + allow(FileUtils).to receive(:copy_entry) + end + + it "copies the resolv.conf from inst-sys to the target" do + expect(FileUtils).to receive(:copy_entry).with("/etc/resolv.conf", "/mnt/etc/resolv.conf", false, false, true) + subject.inject_intsys_files + end + + # (bsc#1096142) + it "does not crash on the EPERM exception" do + expect(FileUtils).to receive(:copy_entry).with("/etc/resolv.conf", "/mnt/etc/resolv.conf", false, false, true) \ + .and_raise(Errno::EPERM) + expect { subject.inject_intsys_files }.to_not raise_error + end + end + + context "resolv.conf does not exist in inst-sys" do + before do + expect(File).to receive(:exist?).with("/etc/resolv.conf").and_return(false) + end + + it "does not copy the resolv.conf" do + expect(FileUtils).to_not receive(:copy_entry).with("/etc/resolv.conf", "/mnt/etc/resolv.conf", false, false, true) + subject.inject_intsys_files + end + end + end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-update-4.1.0/test/update_test.rb new/yast2-update-4.1.1/test/update_test.rb --- old/yast2-update-4.1.0/test/update_test.rb 2018-07-25 14:00:47.000000000 +0200 +++ new/yast2-update-4.1.1/test/update_test.rb 2018-08-23 10:03:34.000000000 +0200 @@ -107,7 +107,7 @@ paths = ["/path_with_slash"] expect(Yast::SCR).to receive(:Execute).with(Yast::Path.new(".target.bash_output"), /tar/). and_return({"exit" => 1}) - expect{Yast::Update.create_backup(name, paths)}.to raise_error + expect{Yast::Update.create_backup(name, paths)}.to raise_error(RuntimeError, "Failed to create backup") end it "create restore script" do @@ -154,9 +154,9 @@ it "returns true as there is no upgrade path defined" do allow(Yast::ProductFeatures).to receive(:GetFeature).with("software","upgrade").and_return(nil) - expect(Yast::Y2Logger.instance).to receive(:info) do |msg| - expect(msg).to match(/upgrade is not handled by this product/i) - end.and_call_original + expect(Yast::Y2Logger.instance).to receive(:info)\ + .with(/upgrade is not handled by this product/i)\ + .and_call_original expect(Yast::Update.SetDesktopPattern).to eq(true) end @@ -167,9 +167,9 @@ default_product_control_desktop allow(Yast::FileUtils).to receive(:Exists).with(/windowmanager/).and_return(false) - expect(Yast::Y2Logger.instance).to receive(:warn) do |msg| - expect(msg).to match(/(Sysconfig file .* does not exist|cannot read default window manager)/i) - end.twice.and_call_original + expect(Yast::Y2Logger.instance).to receive(:warn)\ + .with(/(Sysconfig file .* does not exist|cannot read default window manager)/i)\ + .twice.and_call_original expect(Yast::Update.SetDesktopPattern).to eq(true) end @@ -181,9 +181,9 @@ installed_desktop = "desktop-not-supported-for-upgrade" allow(Yast::Update).to receive(:installed_desktop).and_return(installed_desktop) - expect(Yast::Y2Logger.instance).to receive(:info) do |msg| - expect(msg).to match(/no matching desktop found .* #{installed_desktop}/i) - end.and_call_original + expect(Yast::Y2Logger.instance).to receive(:info)\ + .with(/no matching desktop found .* #{installed_desktop}/i)\ + .and_call_original expect(Yast::Update.SetDesktopPattern).to eq(true) end @@ -196,9 +196,9 @@ allow(Yast::SCR).to receive(:Execute).and_return(0) allow(Yast::SCR).to receive(:Execute).with(kind_of(Yast::Path), /rpm -q/).and_return(-1) - expect(Yast::Y2Logger.instance).to receive(:info) do |msg| - expect(msg).to match(/(package .* installed: false|not all packages .* are installed)/i) - end.twice.and_call_original + expect(Yast::Y2Logger.instance).to receive(:info)\ + .with(/(package .* installed: false|not all packages .* are installed)/i)\ + .twice.and_call_original expect(Yast::Update.SetDesktopPattern).to eq(true) end