Hello community,

here is the log from the commit of package yast2 for openSUSE:Leap:15.2 checked 
in at 2020-04-08 12:47:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/yast2 (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.yast2.new.3248 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2"

Wed Apr  8 12:47:53 2020 rev:179 rq:791238 version:4.2.80

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/yast2/yast2.changes    2020-03-31 
07:22:59.226414102 +0200
+++ /work/SRC/openSUSE:Leap:15.2/.yast2.new.3248/yast2.changes  2020-04-08 
12:47:54.762328217 +0200
@@ -1,0 +2,15 @@
+Fri Apr  3 09:55:17 UTC 2020 - Knut Anderssen <kanders...@suse.com>
+
+- Modify the way YaST detects whether systemd is running or not
+  (bsc#1168307)
+- 4.2.80
+
+-------------------------------------------------------------------
+Fri Mar 27 13:12:00 UTC 2020 - Knut Anderssen <kanders...@suse.com>
+
+- Reread network interfaces configuration after writing it avoiding
+  wrong values when reopen network configuration dialog during an
+  installation (bsc#1166778)
+- 4.2.79
+
+-------------------------------------------------------------------

Old:
----
  yast2-4.2.78.tar.bz2

New:
----
  yast2-4.2.80.tar.bz2

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

Other differences:
------------------
++++++ yast2.spec ++++++
--- /var/tmp/diff_new_pack.ZXp0Fg/_old  2020-04-08 12:47:55.162328419 +0200
+++ /var/tmp/diff_new_pack.ZXp0Fg/_new  2020-04-08 12:47:55.166328422 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2
-Version:        4.2.78
+Version:        4.2.80
 Release:        0
 Summary:        YaST2 Main Package
 License:        GPL-2.0-only

++++++ yast2-4.2.78.tar.bz2 -> yast2-4.2.80.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.2.78/.travis.yml new/yast2-4.2.80/.travis.yml
--- old/yast2-4.2.78/.travis.yml        2020-03-26 14:18:52.000000000 +0100
+++ new/yast2-4.2.80/.travis.yml        2020-04-03 13:37:08.000000000 +0200
@@ -12,4 +12,4 @@
 script:
   # the "yast-travis-ruby" script is included in the base yastdevel/ruby image
   # see https://github.com/yast/docker-yast-ruby/blob/master/yast-travis-ruby
-  - docker run -it -e TRAVIS=1 -e TRAVIS_JOB_ID="$TRAVIS_JOB_ID" 
yast-yast2-image yast-travis-ruby
+  - docker run -it -e TRAVIS=1 --privileged -e TRAVIS_JOB_ID="$TRAVIS_JOB_ID" 
yast-yast2-image yast-travis-ruby
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-4.2.78/library/network/src/modules/NetworkInterfaces.rb 
new/yast2-4.2.80/library/network/src/modules/NetworkInterfaces.rb
--- old/yast2-4.2.78/library/network/src/modules/NetworkInterfaces.rb   
2020-03-26 14:18:52.000000000 +0100
+++ new/yast2-4.2.80/library/network/src/modules/NetworkInterfaces.rb   
2020-04-03 13:37:08.000000000 +0200
@@ -954,6 +954,9 @@
 
       # Finish him
       SCR.Write(path(".network"), nil)
+      # Reread all settings to avoid wrong values when reopen the network
+      # dialog during installation (bsc#1166778)
+      CleanCacheRead()
 
       true
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-4.2.78/library/network/test/data/etc/sysconfig/network/ifcfg-eth1 
new/yast2-4.2.80/library/network/test/data/etc/sysconfig/network/ifcfg-eth1
--- old/yast2-4.2.78/library/network/test/data/etc/sysconfig/network/ifcfg-eth1 
2020-03-26 14:18:52.000000000 +0100
+++ new/yast2-4.2.80/library/network/test/data/etc/sysconfig/network/ifcfg-eth1 
2020-04-03 13:37:08.000000000 +0200
@@ -1,4 +1,4 @@
-DEVICE=eth1
+DEVICE='eth1'
 BOOTPROTO='static'
 STARTMODE='auto'
-SLAVE=YES
+SLAVE='YES'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-4.2.78/library/network/test/data/etc/sysconfig/network/single_quote.test
 
new/yast2-4.2.80/library/network/test/data/etc/sysconfig/network/single_quote.test
--- 
old/yast2-4.2.78/library/network/test/data/etc/sysconfig/network/single_quote.test
  1970-01-01 01:00:00.000000000 +0100
+++ 
new/yast2-4.2.80/library/network/test/data/etc/sysconfig/network/single_quote.test
  2020-04-03 13:37:08.000000000 +0200
@@ -0,0 +1,5 @@
+DEVICE='single'
+BOOTPROTO='dhcp'
+STARTMODE='auto'
+DHCLIENT_SET_HOSTNAME='yes'
+NAME='single 'quoted' name'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-4.2.78/library/network/test/network_interfaces_test.rb 
new/yast2-4.2.80/library/network/test/network_interfaces_test.rb
--- old/yast2-4.2.78/library/network/test/network_interfaces_test.rb    
2020-03-26 14:18:52.000000000 +0100
+++ new/yast2-4.2.80/library/network/test/network_interfaces_test.rb    
2020-04-03 13:37:08.000000000 +0200
@@ -52,6 +52,9 @@
 
   describe "#Read" do
     let(:data_dir) { File.join(File.dirname(__FILE__), "data") }
+    let(:network_path) { File.join(data_dir, "etc/sysconfig/network") }
+    let(:single_template) { File.join(network_path, "single_quote.test") }
+    let(:single_file) { File.join(network_path, "ifcfg-single") }
     # Defined in test/data/etc/sysconfig/ifcfg-*
     let(:devices) { ["arc5", "bond0", "br1", "cold", "em1", "eth0", "eth1", 
"eth2", "ppp0", "vlan3"] }
 
@@ -89,6 +92,13 @@
       expect(subject.GetValue("eth0", "NETMASK")).to eql("255.255.255.0")
     end
 
+    # bsc#72164
+    it "reads the ifcfg files with single quote removed" do
+      ::FileUtils.cp(single_template, single_file)
+      subject.Read
+      expect(subject.GetValue("single", "NAME")).to eql("single quoted name")
+      ::FileUtils.rm(single_file)
+    end
   end
 
   describe "adapt_old_config!" do
@@ -306,4 +316,54 @@
       expect(subject.Devices[device_type]).to include(device => device_map, 
"eth1" => {})
     end
   end
+
+  describe "#Write" do
+    let(:data_dir) { File.join(File.dirname(__FILE__), "data") }
+    let(:network_path) { File.join(data_dir, "etc/sysconfig/network") }
+    let(:ifcfg_copy) { File.join(network_path, "ifcfg-copy") }
+    let(:ifcfg_file) { File.join(network_path, "ifcfg-eth1") }
+
+    before do
+      subject.CleanCacheRead()
+    end
+
+    around do |example|
+      ::FileUtils.cp(ifcfg_file, ifcfg_copy)
+      change_scr_root(data_dir, &example)
+      ::FileUtils.rm(ifcfg_copy)
+    end
+
+    context "when the configuration has changed" do
+      it "writes interfaces configuration changes to ifcfg files" do
+        devmap = subject.devmap("eth1")
+        devmap["SOME_VALUE"] = "yes"
+        subject.Write("")
+        expect(::FileUtils.compare_file(ifcfg_copy, ifcfg_file)).to eq(false)
+        devmap = subject.devmap("eth1")
+        devmap["SOME_VALUE"] = nil
+        subject.Write("")
+        expect(::FileUtils.compare_file(ifcfg_copy, ifcfg_file)).to eq(true)
+      end
+
+      it "cleans the cache and read again the configuration after writing" do
+        expect(subject).to receive(:CleanCacheRead).twice.and_call_original
+        devmap = subject.devmap("eth1")
+        devmap["DHCLIENT_SET_HOSTNAME"] = "yes"
+        subject.Write("")
+        devmap = subject.devmap("eth1")
+        expect(devmap["DHCLIENT_SET_HOSTNAME"]).to eq("yes")
+        devmap["DHCLIENT_SET_HOSTNAME"] = nil
+        subject.Write("")
+        expect(::FileUtils.compare_file(ifcfg_copy, ifcfg_file)).to eq(true)
+      end
+
+      it "deletes removed interfaces" do
+        size = subject.List("").size
+        subject.Delete("copy")
+        subject.Commit()
+        subject.Write("")
+        expect(subject.List("").size).to eq(size - 1)
+      end
+    end
+  end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.2.78/library/systemd/src/modules/Systemd.rb 
new/yast2-4.2.80/library/systemd/src/modules/Systemd.rb
--- old/yast2-4.2.78/library/systemd/src/modules/Systemd.rb     2020-03-26 
14:18:52.000000000 +0100
+++ new/yast2-4.2.80/library/systemd/src/modules/Systemd.rb     2020-04-03 
13:37:08.000000000 +0200
@@ -38,7 +38,6 @@
       @systemd_path = "/usr/lib/systemd/systemd"
       @default_target_symlink = "/etc/systemd/system/default.target"
       @systemd_targets_dir = "/usr/lib/systemd/system"
-      @systemd_mountdir = "/sys/fs/cgroup/systemd"
 
       textdomain "base"
     end
@@ -52,7 +51,7 @@
     # Check whether systemd init is currently running
     # @return boolean true if systemd init is running
     def Running
-      FileUtils.IsDirectory(@systemd_mountdir) == true
+      WFM.Read(path(".local.string"), "/proc/1/comm")&.chomp == "systemd"
     end
 
     # Set default runlevel for systemd (assumes systemd is installed)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.2.78/package/yast2.changes 
new/yast2-4.2.80/package/yast2.changes
--- old/yast2-4.2.78/package/yast2.changes      2020-03-26 14:18:52.000000000 
+0100
+++ new/yast2-4.2.80/package/yast2.changes      2020-04-03 13:37:08.000000000 
+0200
@@ -1,4 +1,19 @@
 -------------------------------------------------------------------
+Fri Apr  3 09:55:17 UTC 2020 - Knut Anderssen <kanders...@suse.com>
+
+- Modify the way YaST detects whether systemd is running or not
+  (bsc#1168307)
+- 4.2.80
+
+-------------------------------------------------------------------
+Fri Mar 27 13:12:00 UTC 2020 - Knut Anderssen <kanders...@suse.com>
+
+- Reread network interfaces configuration after writing it avoiding
+  wrong values when reopen network configuration dialog during an
+  installation (bsc#1166778)
+- 4.2.79
+
+-------------------------------------------------------------------
 Thu Mar 26 12:57:33 UTC 2020 - David Diaz <dgonza...@suse.com>
 
 - Remove no longer needed multi status selector since it
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.2.78/package/yast2.spec 
new/yast2-4.2.80/package/yast2.spec
--- old/yast2-4.2.78/package/yast2.spec 2020-03-26 14:18:52.000000000 +0100
+++ new/yast2-4.2.80/package/yast2.spec 2020-04-03 13:37:08.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2
-Version:        4.2.78
+Version:        4.2.80
 Release:        0
 Summary:        YaST2 Main Package
 License:        GPL-2.0-only


Reply via email to