Hello community, here is the log from the commit of package yast2 for openSUSE:Factory checked in at 2020-06-11 14:43:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2 (Old) and /work/SRC/openSUSE:Factory/.yast2.new.3606 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2" Thu Jun 11 14:43:55 2020 rev:483 rq:813265 version:4.3.6 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2/yast2.changes 2020-06-10 00:39:10.809520070 +0200 +++ /work/SRC/openSUSE:Factory/.yast2.new.3606/yast2.changes 2020-06-11 14:44:26.805337889 +0200 @@ -1,0 +2,6 @@ +Tue Jun 9 16:00:19 UTC 2020 - David Diaz <[email protected]> + +- Fix Xen detection (bsc#1172742). +- 4.3.6 + +------------------------------------------------------------------- Old: ---- yast2-4.3.5.tar.bz2 New: ---- yast2-4.3.6.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2.spec ++++++ --- /var/tmp/diff_new_pack.ReAs03/_old 2020-06-11 14:44:27.473339834 +0200 +++ /var/tmp/diff_new_pack.ReAs03/_new 2020-06-11 14:44:27.477339846 +0200 @@ -17,7 +17,7 @@ Name: yast2 -Version: 4.3.5 +Version: 4.3.6 Release: 0 Summary: YaST2 Main Package License: GPL-2.0-only ++++++ yast2-4.3.5.tar.bz2 -> yast2-4.3.6.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.3.5/library/general/src/modules/Arch.rb new/yast2-4.3.6/library/general/src/modules/Arch.rb --- old/yast2-4.3.5/library/general/src/modules/Arch.rb 2020-06-08 12:26:06.000000000 +0200 +++ new/yast2-4.3.6/library/general/src/modules/Arch.rb 2020-06-10 16:48:18.000000000 +0200 @@ -353,73 +353,52 @@ @_is_uml = Convert.to_boolean(SCR.Read(path(".probe.is_uml"))) if @_is_uml.nil? @_is_uml end + # ************************************************************ # XEN stuff - # true if Xen kernel is running (dom0 or domU) - # @return true if the Xen kernel is running + # Whether the Xen kernel is running + # + # @see https://wiki.xen.org/wiki/Xen_Project_Software_Overview + # + # @return [Boolean] true if the Xen kernel is running; false otherwise def is_xen - if @_is_xen.nil? - # XEN kernel has /proc/xen directory - stat = Convert.to_map(SCR.Read(path(".target.stat"), "/proc/xen")) - Builtins.y2milestone("stat /proc/xen: %1", stat) - - @_is_xen = Ops.greater_than(Builtins.size(stat), 0) - - if @_is_xen - Builtins.y2milestone("/proc/xen exists") - - # check also the running kernel - # a FV machine has also /proc/xen, but the kernel is kernel-default - out = Convert.to_map( - SCR.Execute(path(".target.bash_output"), "/usr/bin/uname -r", {}) - ) - - kernel_ver = Ops.get_string(out, "stdout", "") - l = Builtins.splitstring(kernel_ver, "\n") - kernel_ver = Ops.get(l, 0, "") - Builtins.y2milestone("Kernel version: %1", kernel_ver) - - if !Builtins.regexpmatch(kernel_ver, "-xen$") && - !Builtins.regexpmatch(kernel_ver, "-xenpae$") - # kernel default is running - @_is_xen = false - end - - Builtins.y2milestone("kernel-xen is running: %1", @_is_xen) - end - end + return @_is_xen unless @_is_xen.nil? - @_is_xen + @_is_xen = SCR.Read(path(".target.stat"), "/proc/xen")["isdir"] || false end - # true if dom0 Xen kernel is running - # @see #is_xenU + # Whether it is a Xen host (dom0) + # # @see #is_xen - # @return true if the Xen kernel is running in dom0 + # @see #is_xenU + # @see https://wiki.xen.org/wiki/Dom0 + # + # @return [Boolean] true if it is a Xen dom0; false otherwise def is_xen0 - if @_is_xen0.nil? - # dom0 Xen kernel has /proc/xen/xsd_port file - stat = Convert.to_map( - SCR.Read(path(".target.stat"), "/proc/xen/xsd_port") - ) - Builtins.y2milestone("stat /proc/xen/xsd_port: %1", stat) + return @_is_xen0 unless @_is_xen0.nil? - @_is_xen0 = Ops.greater_than(Builtins.size(stat), 0) - end - - @_is_xen0 + @_is_xen0 = is_xen && xen_capabilities.include?("control_d") end - # true if domU Xen kernel is running + # Whether it is a Xen guest (domU) # - # @see #is_xen0 # @see #is_xen - # @return true if the Xen kernel is running in another domain than dom0 + # @see #is_xen0 + # @see https://wiki.xen.org/wiki/DomU + # + # @return [Boolean] true if it is a Xen domU; false otherwise def is_xenU is_xen && !is_xen0 end + # Convenience method to retrieve the /proc/xen/capabilities content + # + # @return [String] + def xen_capabilities + SCR.Read(path(".target.string"), "/proc/xen/capabilities").to_s + end + # ************************************************************ # KVM stuff diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.3.5/library/general/test/arch_test.rb new/yast2-4.3.6/library/general/test/arch_test.rb --- old/yast2-4.3.5/library/general/test/arch_test.rb 2020-06-08 12:26:06.000000000 +0200 +++ new/yast2-4.3.6/library/general/test/arch_test.rb 2020-06-10 16:48:18.000000000 +0200 @@ -7,16 +7,99 @@ require "yast" describe Yast::Arch do + subject { described_class } - 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", __dir__) - load module_path + before do + # need to reset all initialization 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", __dir__) + load module_path + end + + describe ".is_xen" do + around do |example| + change_scr_root(File.join(GENERAL_DATA_PATH, "arch", scenario), &example) + end + + context "when running the XEN hypervisor" do + let(:scenario) { "xen_dom0" } + + it "returns true" do + expect(Yast::Arch.is_xen).to eq(true) + end + end + + context "when not running the XEN hypervisor" do + let(:scenario) { "default" } + + it "returns false" do + expect(Yast::Arch.is_xen).to eq(false) + end + end + end + + describe ".is_xen0" do + around do |example| + change_scr_root(File.join(GENERAL_DATA_PATH, "arch", scenario), &example) + end + + context "when not running in a XEN hypervisor" do + let(:scenario) { "default" } + + it "returns false" do + expect(Yast::Arch.is_xen0).to eq(false) + end + end + + context "when running in a XEN dom0" do + let(:scenario) { "xen_dom0" } + + it "returns true" do + expect(Yast::Arch.is_xen0).to eq(true) + end end + context "when running in a XEN domU" do + let(:scenario) { "xen_domU" } + + it "returns false" do + expect(Yast::Arch.is_xen0).to eq(false) + end + end + end + + describe ".is_xenU" do + around do |example| + change_scr_root(File.join(GENERAL_DATA_PATH, "arch", scenario), &example) + end + + context "when not running in a XEN hypervisor" do + let(:scenario) { "default" } + + it "returns false" do + expect(Yast::Arch.is_xenU).to eq(false) + end + end + + context "when running in a XEN dom0" do + let(:scenario) { "xen_dom0" } + + it "returns false" do + expect(Yast::Arch.is_xenU).to eq(false) + end + end + + context "when running in a XEN domU" do + let(:scenario) { "xen_domU" } + + it "returns true" do + expect(Yast::Arch.is_xenU).to eq(true) + end + end + end + + describe ".is_zkvm" do 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" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.3.5/library/general/test/data/arch/default/proc/meminfo new/yast2-4.3.6/library/general/test/data/arch/default/proc/meminfo --- old/yast2-4.3.5/library/general/test/data/arch/default/proc/meminfo 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-4.3.6/library/general/test/data/arch/default/proc/meminfo 2020-06-10 16:48:18.000000000 +0200 @@ -0,0 +1,43 @@ +MemTotal: 1882064 kB +MemFree: 1376380 kB +MemAvailable: 1535676 kB +Buffers: 2088 kB +Cached: 292324 kB +SwapCached: 0 kB +Active: 152944 kB +Inactive: 252628 kB +Active(anon): 111328 kB +Inactive(anon): 16508 kB +Active(file): 41616 kB +Inactive(file): 236120 kB +Unevictable: 0 kB +Mlocked: 0 kB +SwapTotal: 2097148 kB +SwapFree: 2097148 kB +Dirty: 40 kB +Writeback: 0 kB +AnonPages: 111180 kB +Mapped: 56396 kB +Shmem: 16676 kB +Slab: 54508 kB +SReclaimable: 25456 kB +SUnreclaim: 29052 kB +KernelStack: 2608 kB +PageTables: 5056 kB +NFS_Unstable: 0 kB +Bounce: 0 kB +WritebackTmp: 0 kB +CommitLimit: 3038180 kB +Committed_AS: 577664 kB +VmallocTotal: 34359738367 kB +VmallocUsed: 14664 kB +VmallocChunk: 34359717628 kB +HardwareCorrupted: 0 kB +AnonHugePages: 24576 kB +HugePages_Total: 0 +HugePages_Free: 0 +HugePages_Rsvd: 0 +HugePages_Surp: 0 +Hugepagesize: 2048 kB +DirectMap4k: 69632 kB +DirectMap2M: 2027520 kB diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.3.5/library/general/test/data/arch/xen_dom0/proc/meminfo new/yast2-4.3.6/library/general/test/data/arch/xen_dom0/proc/meminfo --- old/yast2-4.3.5/library/general/test/data/arch/xen_dom0/proc/meminfo 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-4.3.6/library/general/test/data/arch/xen_dom0/proc/meminfo 2020-06-10 16:48:18.000000000 +0200 @@ -0,0 +1,43 @@ +MemTotal: 1882064 kB +MemFree: 1376380 kB +MemAvailable: 1535676 kB +Buffers: 2088 kB +Cached: 292324 kB +SwapCached: 0 kB +Active: 152944 kB +Inactive: 252628 kB +Active(anon): 111328 kB +Inactive(anon): 16508 kB +Active(file): 41616 kB +Inactive(file): 236120 kB +Unevictable: 0 kB +Mlocked: 0 kB +SwapTotal: 2097148 kB +SwapFree: 2097148 kB +Dirty: 40 kB +Writeback: 0 kB +AnonPages: 111180 kB +Mapped: 56396 kB +Shmem: 16676 kB +Slab: 54508 kB +SReclaimable: 25456 kB +SUnreclaim: 29052 kB +KernelStack: 2608 kB +PageTables: 5056 kB +NFS_Unstable: 0 kB +Bounce: 0 kB +WritebackTmp: 0 kB +CommitLimit: 3038180 kB +Committed_AS: 577664 kB +VmallocTotal: 34359738367 kB +VmallocUsed: 14664 kB +VmallocChunk: 34359717628 kB +HardwareCorrupted: 0 kB +AnonHugePages: 24576 kB +HugePages_Total: 0 +HugePages_Free: 0 +HugePages_Rsvd: 0 +HugePages_Surp: 0 +Hugepagesize: 2048 kB +DirectMap4k: 69632 kB +DirectMap2M: 2027520 kB diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.3.5/library/general/test/data/arch/xen_dom0/proc/xen/capabilities new/yast2-4.3.6/library/general/test/data/arch/xen_dom0/proc/xen/capabilities --- old/yast2-4.3.5/library/general/test/data/arch/xen_dom0/proc/xen/capabilities 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-4.3.6/library/general/test/data/arch/xen_dom0/proc/xen/capabilities 2020-06-10 16:48:18.000000000 +0200 @@ -0,0 +1 @@ +control_d diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.3.5/library/general/test/data/arch/xen_domU/proc/meminfo new/yast2-4.3.6/library/general/test/data/arch/xen_domU/proc/meminfo --- old/yast2-4.3.5/library/general/test/data/arch/xen_domU/proc/meminfo 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-4.3.6/library/general/test/data/arch/xen_domU/proc/meminfo 2020-06-10 16:48:18.000000000 +0200 @@ -0,0 +1,43 @@ +MemTotal: 1882064 kB +MemFree: 1376380 kB +MemAvailable: 1535676 kB +Buffers: 2088 kB +Cached: 292324 kB +SwapCached: 0 kB +Active: 152944 kB +Inactive: 252628 kB +Active(anon): 111328 kB +Inactive(anon): 16508 kB +Active(file): 41616 kB +Inactive(file): 236120 kB +Unevictable: 0 kB +Mlocked: 0 kB +SwapTotal: 2097148 kB +SwapFree: 2097148 kB +Dirty: 40 kB +Writeback: 0 kB +AnonPages: 111180 kB +Mapped: 56396 kB +Shmem: 16676 kB +Slab: 54508 kB +SReclaimable: 25456 kB +SUnreclaim: 29052 kB +KernelStack: 2608 kB +PageTables: 5056 kB +NFS_Unstable: 0 kB +Bounce: 0 kB +WritebackTmp: 0 kB +CommitLimit: 3038180 kB +Committed_AS: 577664 kB +VmallocTotal: 34359738367 kB +VmallocUsed: 14664 kB +VmallocChunk: 34359717628 kB +HardwareCorrupted: 0 kB +AnonHugePages: 24576 kB +HugePages_Total: 0 +HugePages_Free: 0 +HugePages_Rsvd: 0 +HugePages_Surp: 0 +Hugepagesize: 2048 kB +DirectMap4k: 69632 kB +DirectMap2M: 2027520 kB diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.3.5/package/yast2.changes new/yast2-4.3.6/package/yast2.changes --- old/yast2-4.3.5/package/yast2.changes 2020-06-08 12:26:06.000000000 +0200 +++ new/yast2-4.3.6/package/yast2.changes 2020-06-10 16:48:18.000000000 +0200 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Tue Jun 9 16:00:19 UTC 2020 - David Diaz <[email protected]> + +- Fix Xen detection (bsc#1172742). +- 4.3.6 + +------------------------------------------------------------------- Fri Jun 5 15:13:42 UTC 2020 - José Iván López González <[email protected]> - Improve actions to stop and start a system service. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.3.5/package/yast2.spec new/yast2-4.3.6/package/yast2.spec --- old/yast2-4.3.5/package/yast2.spec 2020-06-08 12:26:06.000000000 +0200 +++ new/yast2-4.3.6/package/yast2.spec 2020-06-10 16:48:18.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2 -Version: 4.3.5 +Version: 4.3.6 Release: 0 Summary: YaST2 Main Package License: GPL-2.0-only
