Hello community,

here is the log from the commit of package yast2 for openSUSE:Factory checked 
in at 2015-12-27 01:57:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2 (Old)
 and      /work/SRC/openSUSE:Factory/.yast2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2/yast2.changes      2015-12-01 
10:02:52.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.yast2.new/yast2.changes 2015-12-27 
01:57:51.000000000 +0100
@@ -1,0 +2,6 @@
+Fri Dec 11 08:53:27 UTC 2015 - [email protected]
+
+- added detection of zKVM to Arch.rb (for proper fix of bsc#956736)
+- 3.1.162
+
+-------------------------------------------------------------------

Old:
----
  yast2-3.1.161.tar.bz2

New:
----
  yast2-3.1.162.tar.bz2

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

Other differences:
------------------
++++++ yast2.spec ++++++
--- /var/tmp/diff_new_pack.BSeTV6/_old  2015-12-27 01:57:53.000000000 +0100
+++ /var/tmp/diff_new_pack.BSeTV6/_new  2015-12-27 01:57:53.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2
-Version:        3.1.161
+Version:        3.1.162
 Release:        0
 Url:            https://github.com/yast/yast-yast2
 

++++++ yast2-3.1.161.tar.bz2 -> yast2-3.1.162.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-3.1.161/library/general/src/modules/Arch.rb 
new/yast2-3.1.162/library/general/src/modules/Arch.rb
--- old/yast2-3.1.161/library/general/src/modules/Arch.rb       2015-11-27 
13:27:01.000000000 +0100
+++ new/yast2-3.1.162/library/general/src/modules/Arch.rb       2015-12-17 
14:46:13.000000000 +0100
@@ -57,6 +57,9 @@
 
       # KVM
       @_is_kvm = nil
+
+      # zKVM
+      @_is_zkvm = nil
     end
 
     # ************************************************************
@@ -446,6 +449,22 @@
     end
 
     # ************************************************************
+    # zKVM stuff
+
+    # zKVM means KVM on IBM System z
+    # true if zKVM is running
+    #
+    # @return true if we are running on zKVM hypervisor
+    def is_zkvm
+      if @_is_zkvm.nil?
+        # using different check than on x86 as recommended by IBM
+        @_is_zkvm = s390 && Yast::WFM.Execute(".local.bash", "egrep 'Control 
Program: KVM' /proc/sysinfo") == 0
+      end
+
+      @_is_zkvm
+    end
+
+    # ************************************************************
     # SMP stuff
 
     # Set "Arch::has_smp ()". Since Alpha doesn't reliably probe smp,
@@ -516,6 +535,7 @@
     publish function: :is_xen0, type: "boolean ()"
     publish function: :is_xenU, type: "boolean ()"
     publish function: :is_kvm, type: "boolean ()"
+    publish function: :is_zkvm, type: "boolean ()"
     publish function: :has_smp, type: "boolean ()"
     publish function: :x11_setup_needed, type: "boolean ()"
   end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-3.1.161/library/general/test/arch_test.rb 
new/yast2-3.1.162/library/general/test/arch_test.rb
--- old/yast2-3.1.161/library/general/test/arch_test.rb 1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-3.1.162/library/general/test/arch_test.rb 2015-12-17 
14:46:13.000000000 +0100
@@ -0,0 +1,47 @@
+#! /usr/bin/env rspec
+
+require_relative "test_helper"
+
+Yast.import "Arch"
+
+require "yast"
+
+describe Yast::Arch do
+
+  describe ".is_zkvm" do
+    before do
+      # need to reset all initializeation of the module for individual
+      # test cases which mock different hardware
+      # otherwise values in Arch.rb remain cached
+      module_path = File.expand_path("../../src/modules/Arch.rb", __FILE__)
+      load module_path
+    end
+
+    it "returns true if on s390 and in the zKVM environment" do
+      allow(Yast::WFM).to receive(:Execute).and_return 0
+      allow(Yast::SCR).to receive(:Read).and_return "s390_64"
+
+      is_zkvm = Yast::Arch.is_zkvm
+
+      expect(is_zkvm).to eq(true)
+    end
+
+    it "returns false if on s390 and not in the zKVM environment" do
+      allow(Yast::WFM).to receive(:Execute).and_return 1
+      allow(Yast::SCR).to receive(:Read).and_return "s390_64"
+
+      is_zkvm = Yast::Arch.is_zkvm
+
+      expect(is_zkvm).to eq(false)
+    end
+
+    it "returns false on other architectures" do
+      allow(Yast::WFM).to receive(:Execute).and_return 0
+      allow(Yast::SCR).to receive(:Read).and_return "x86_64"
+
+      is_zkvm = Yast::Arch.is_zkvm
+
+      expect(is_zkvm).to eq(false)
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-3.1.161/package/yast2.changes 
new/yast2-3.1.162/package/yast2.changes
--- old/yast2-3.1.161/package/yast2.changes     2015-11-27 13:27:01.000000000 
+0100
+++ new/yast2-3.1.162/package/yast2.changes     2015-12-17 14:46:13.000000000 
+0100
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Fri Dec 11 08:53:27 UTC 2015 - [email protected]
+
+- added detection of zKVM to Arch.rb (for proper fix of bsc#956736)
+- 3.1.162
+
+-------------------------------------------------------------------
 Fri Nov 27 09:03:22 UTC 2015 - [email protected]
 
 - Renamed some arguments and methods in the UI::ServiceStatus API
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-3.1.161/package/yast2.spec 
new/yast2-3.1.162/package/yast2.spec
--- old/yast2-3.1.161/package/yast2.spec        2015-11-27 13:27:01.000000000 
+0100
+++ new/yast2-3.1.162/package/yast2.spec        2015-12-17 14:46:13.000000000 
+0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2
-Version:        3.1.161
+Version:        3.1.162
 Release:        0
 Url:            https://github.com/yast/yast-yast2
 


Reply via email to