Mailinglist Archive: opensuse-commit (1903 mails)

< Previous Next >
commit yast2-bootloader for openSUSE:Factory
Hello community,

here is the log from the commit of package yast2-bootloader for
openSUSE:Factory checked in at 2019-04-08 10:34:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-bootloader (Old)
and /work/SRC/openSUSE:Factory/.yast2-bootloader.new.3908 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-bootloader"

Mon Apr 8 10:34:10 2019 rev:278 rq:691556 version:4.1.24

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-bootloader/yast2-bootloader.changes
2019-03-27 16:14:27.879620707 +0100
+++
/work/SRC/openSUSE:Factory/.yast2-bootloader.new.3908/yast2-bootloader.changes
2019-04-08 10:34:13.835207945 +0200
@@ -1,0 +2,6 @@
+Thu Apr 4 11:57:27 UTC 2019 - Stefan Hundhammer <shundhammer@xxxxxxxx>
+
+- Propagate serial console params to XEN kernels (bsc#1080928)
+- 4.1.24
+
+-------------------------------------------------------------------

Old:
----
yast2-bootloader-4.1.23.tar.bz2

New:
----
yast2-bootloader-4.1.24.tar.bz2

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

Other differences:
------------------
++++++ yast2-bootloader.spec ++++++
--- /var/tmp/diff_new_pack.bj8rYp/_old 2019-04-08 10:34:14.459208515 +0200
+++ /var/tmp/diff_new_pack.bj8rYp/_new 2019-04-08 10:34:14.475208531 +0200
@@ -17,7 +17,7 @@


Name: yast2-bootloader
-Version: 4.1.23
+Version: 4.1.24
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build

++++++ yast2-bootloader-4.1.23.tar.bz2 -> yast2-bootloader-4.1.24.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-bootloader-4.1.23/Dockerfile
new/yast2-bootloader-4.1.24/Dockerfile
--- old/yast2-bootloader-4.1.23/Dockerfile 2019-03-25 16:25:17.000000000
+0100
+++ new/yast2-bootloader-4.1.24/Dockerfile 2019-04-04 16:28:47.000000000
+0200
@@ -1,2 +1,2 @@
-FROM yastdevel/ruby
+FROM registry.opensuse.org/yast/head/containers/yast-ruby:latest
COPY . /usr/src/app
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-bootloader-4.1.23/package/yast2-bootloader.changes
new/yast2-bootloader-4.1.24/package/yast2-bootloader.changes
--- old/yast2-bootloader-4.1.23/package/yast2-bootloader.changes
2019-03-25 16:25:17.000000000 +0100
+++ new/yast2-bootloader-4.1.24/package/yast2-bootloader.changes
2019-04-04 16:28:47.000000000 +0200
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Thu Apr 4 11:57:27 UTC 2019 - Stefan Hundhammer <shundhammer@xxxxxxxx>
+
+- Propagate serial console params to XEN kernels (bsc#1080928)
+- 4.1.24
+
+-------------------------------------------------------------------
Mon Mar 25 15:45:54 CET 2019 - schubi@xxxxxxx

- Removed double "smt" entry from *.rnc file (bsc#1128707).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-bootloader-4.1.23/package/yast2-bootloader.spec
new/yast2-bootloader-4.1.24/package/yast2-bootloader.spec
--- old/yast2-bootloader-4.1.23/package/yast2-bootloader.spec 2019-03-25
16:25:17.000000000 +0100
+++ new/yast2-bootloader-4.1.24/package/yast2-bootloader.spec 2019-04-04
16:28:47.000000000 +0200
@@ -17,7 +17,7 @@


Name: yast2-bootloader
-Version: 4.1.23
+Version: 4.1.24
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-bootloader-4.1.23/src/lib/bootloader/grub2base.rb
new/yast2-bootloader-4.1.24/src/lib/bootloader/grub2base.rb
--- old/yast2-bootloader-4.1.23/src/lib/bootloader/grub2base.rb 2019-03-25
16:25:17.000000000 +0100
+++ new/yast2-bootloader-4.1.24/src/lib/bootloader/grub2base.rb 2019-04-04
16:28:47.000000000 +0200
@@ -28,6 +28,7 @@

module Bootloader
# Common base for GRUB2 specialized classes
+ # rubocop:disable Metrics/ClassLength
class Grub2Base < BootloaderBase
include Yast::Logger
include Yast::I18n
@@ -46,6 +47,10 @@
# @return [Boolean]
attr_accessor :trusted_boot

+ # @!attribute console
+ # @return [::Bootloader::SerialConsole] serial console or nil if none
+ attr_reader :console
+
def initialize
super

@@ -160,9 +165,9 @@
self.trusted_boot = other.trusted_boot unless other.trusted_boot.nil?
end

- def enable_serial_console(console)
- console = SerialConsole.load_from_console_args(console)
- raise ::Bootloader::InvalidSerialConsoleArguments unless console
+ def enable_serial_console(console_arg_string)
+ @console = SerialConsole.load_from_console_args(console_arg_string)
+ raise ::Bootloader::InvalidSerialConsoleArguments unless @console

grub_default.serial_console = console.console_args

@@ -172,10 +177,15 @@
end

def disable_serial_console
+ @console = nil
grub_default.kernel_params.remove_parameter(serial_console_matcher)
grub_default.serial_console = ""
end

+ def serial_console?
+ !console.nil?
+ end
+
private

def systemwide_locale
@@ -307,13 +317,22 @@
end

def propose_serial
- console = SerialConsole.load_from_kernel_args(grub_default.kernel_params)
- return unless console
+ @console =
SerialConsole.load_from_kernel_args(grub_default.kernel_params)
+ return unless @console

grub_default.serial_console = console.console_args
+ propose_xen_serial
+ end
+
+ def propose_xen_serial
+ return unless serial_console?
+
+ grub_default.xen_kernel_params.replace(console.xen_kernel_args)
+ grub_default.xen_hypervisor_params.replace(console.xen_hypervisor_args)
end

def propose_xen_hypervisor
+ return if serial_console?
return if Dir["/dev/fb*"].empty?

matcher = CFA::Matcher.new(key: "vga")
@@ -338,4 +357,5 @@
grub_default.cryptodisk.value = !!Yast::BootStorage.encrypted_boot?
end
end
+ # rubocop:enable Metrics/ClassLength
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-bootloader-4.1.23/src/lib/bootloader/serial_console.rb
new/yast2-bootloader-4.1.24/src/lib/bootloader/serial_console.rb
--- old/yast2-bootloader-4.1.23/src/lib/bootloader/serial_console.rb
2019-03-25 16:25:17.000000000 +0100
+++ new/yast2-bootloader-4.1.24/src/lib/bootloader/serial_console.rb
2019-04-04 16:28:47.000000000 +0200
@@ -97,12 +97,27 @@
"#{serial_console}#{@unit},#{@speed}#{@parity[0]}#{@word}"
end

- # generates serial command for grub2
+ # generates serial command for grub2 GRUB_SERIAL_COMMAND
def console_args
res = "serial --unit=#{@unit} --speed=#{@speed} --parity=#{@parity}"
res << " --word=#{@word}" unless @word.empty?

res
end
+
+ # generates serial console parameters for grub2
+ # GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT
+ def xen_kernel_args
+ # This is always hvc0 (for HyperVisor Console).
+ "console=hvc0"
+ end
+
+ # generates serial console parameters for grub2
+ # GRUB_CMDLINE_XEN_DEFAULT
+ def xen_hypervisor_args
+ # Notice that this is always com1, even if the host uses another serial
tty.
+ # See also https://wiki.xenproject.org/wiki/Xen_Serial_Console
+ "console=com1 com1=#{@speed}"
+ end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-bootloader-4.1.23/test/grub2base_test.rb
new/yast2-bootloader-4.1.24/test/grub2base_test.rb
--- old/yast2-bootloader-4.1.23/test/grub2base_test.rb 2019-03-25
16:25:17.000000000 +0100
+++ new/yast2-bootloader-4.1.24/test/grub2base_test.rb 2019-04-04
16:28:47.000000000 +0200
@@ -324,7 +324,7 @@
end
end

- context "xen hyperviser kernel parameters proposal" do
+ context "xen hypervisor kernel parameters proposal" do
it "do nothing if there is no framebuffer" do
allow(Dir).to receive(:[]).and_return([])

@@ -360,20 +360,35 @@
expect(subject.grub_default.distributor).to eq ""
end

- it "proposes serial console from its usage on kernel command line on
non-s390" do
- allow(Yast::Arch).to receive(:architecture).and_return("x86_64")
- kernel_params = "console=ttyS1,4800n8"
- allow(Yast::Kernel).to receive(:GetCmdLine).and_return(kernel_params)
-
+ it "proposes to disable trusted boot" do
subject.propose

- expect(subject.grub_default.serial_console).to eq "serial --unit=1
--speed=4800 --parity=no --word=8"
+ expect(subject.trusted_boot).to eq false
end

- it "proposes to disable trusted boot" do
- subject.propose
+ context "with a serial console on the kernel command line on non-s390" do
+ before do
+ allow(Yast::Arch).to receive(:architecture).and_return("x86_64")
+ kernel_params = "console=ttyS2,4800n8"
+ allow(Yast::Kernel).to receive(:GetCmdLine).and_return(kernel_params)
+ end

- expect(subject.trusted_boot).to eq false
+ it "proposes a serial console for grub" do
+ subject.propose
+ expect(subject.grub_default.serial_console).to eq "serial --unit=2
--speed=4800 --parity=no --word=8"
+ end
+
+ it "proposes a serial console for the kernel" do
+ subject.propose
+ expect(subject.grub_default.kernel_params.serialize).to include
"console=ttyS2,4800n8"
+ end
+
+ it "proposes a serial console for XEN" do
+ subject.propose
+ # Notice that this is always com1, even if the host uses ttyS2!
+ expect(subject.grub_default.xen_hypervisor_params.serialize).to eq
"console=com1 com1=4800"
+ expect(subject.grub_default.xen_kernel_params.serialize).to eq
"console=hvc0"
+ end
end
end

diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-bootloader-4.1.23/test/serial_console_test.rb
new/yast2-bootloader-4.1.24/test/serial_console_test.rb
--- old/yast2-bootloader-4.1.23/test/serial_console_test.rb 2019-03-25
16:25:17.000000000 +0100
+++ new/yast2-bootloader-4.1.24/test/serial_console_test.rb 2019-04-04
16:28:47.000000000 +0200
@@ -114,4 +114,18 @@
expect(obj.console_args).to eq "serial --unit=2 --speed=9600 --parity=no"
end
end
+
+ describe "#xen_kernel_args" do
+ it "returns the hypervisor console for XEN kernels" do
+ obj = described_class.new(2, 9600, "no", "8")
+ expect(obj.xen_kernel_args).to eq "console=hvc0"
+ end
+ end
+
+ describe "#xen_hypervisor_args" do
+ it "returns the correct console speed parameters" do
+ obj = described_class.new(2, 9600, "no", "8")
+ expect(obj.xen_hypervisor_args).to eq "console=com1 com1=9600"
+ end
+ end
end


< Previous Next >
This Thread
  • No further messages