Hello community, here is the log from the commit of package perl-Bootloader for openSUSE:Factory checked in at 2014-03-01 14:38:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Bootloader (Old) and /work/SRC/openSUSE:Factory/.perl-Bootloader.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "perl-Bootloader" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Bootloader/perl-Bootloader.changes 2014-02-21 13:48:25.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.perl-Bootloader.new/perl-Bootloader.changes 2014-03-01 14:38:17.000000000 +0100 @@ -1,0 +2,7 @@ +Thu Feb 27 11:52:10 CET 2014 - snwint@suse.de + +- propagate serial console setting to xen (bnc #862614) +- fix reading xen sections +- 0.805 + +------------------------------------------------------------------- Old: ---- perl-Bootloader-0.804.tar.xz New: ---- perl-Bootloader-0.805.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Bootloader.spec ++++++ --- /var/tmp/diff_new_pack.VtLw2O/_old 2014-03-01 14:38:17.000000000 +0100 +++ /var/tmp/diff_new_pack.VtLw2O/_new 2014-03-01 14:38:17.000000000 +0100 @@ -17,7 +17,7 @@ Name: perl-Bootloader -Version: 0.804 +Version: 0.805 Release: 0 Requires: coreutils Requires: e2fsprogs ++++++ perl-Bootloader-0.804.tar.xz -> perl-Bootloader-0.805.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perl-Bootloader-0.804/perl-Bootloader.changes new/perl-Bootloader-0.805/perl-Bootloader.changes --- old/perl-Bootloader-0.804/perl-Bootloader.changes 2014-02-17 13:15:59.000000000 +0100 +++ new/perl-Bootloader-0.805/perl-Bootloader.changes 2014-02-27 11:53:07.000000000 +0100 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Thu Feb 27 11:52:10 CET 2014 - snwint@suse.de + +- propagate serial console setting to xen (bnc #862614) +- fix reading xen sections +- 0.805 + +------------------------------------------------------------------- Mon Feb 17 13:15:12 CET 2014 - snwint@suse.de - fix section info not returning initrd (bnc #863909) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perl-Bootloader-0.804/src/Core/GRUB2.pm new/perl-Bootloader-0.805/src/Core/GRUB2.pm --- old/perl-Bootloader-0.804/src/Core/GRUB2.pm 2014-02-17 13:15:59.000000000 +0100 +++ new/perl-Bootloader-0.805/src/Core/GRUB2.pm 2014-02-27 11:53:07.000000000 +0100 @@ -265,7 +265,6 @@ $sect_info{"name"} = $name; $sect_info{"menuentry"} = $name; - $sect_info{"type"} = "image"; if ($args =~ m/'gnulinux-[^\s]+-recovery-[^\s]+'/) { $sect_info{"usage"} = "linux_failsafe"; @@ -273,25 +272,59 @@ $sect_info{"usage"} = "linux"; } - if ($cfg2 =~ /^\s+linux\s+([^\s]+)\s*(.*)$/m) { - my $append = $2; - $sect_info{"image"} = $1; - - if ($append =~ /root=/) { - $append =~ s/root=([^\s]+)\s*//; - $sect_info{"root"} = $1; - } + if ($args =~ m/--class xen/) { + + $sect_info{"type"} = "xen"; + + if ($cfg2 =~ /^\s+multiboot\s+(\S+)\s+\S+\s*(.*)$/m) { + $sect_info{"xen"} = $1; + $sect_info{"xen_append"} = $2; + } + + while ($cfg2 =~ /^\s+module\s+(\S+)\s+\S+\s*(.*)$/gm) { + + if (!exists $sect_info{"image"}) { + + my $append = $2; + $sect_info{"image"} = $1; + + if ($append =~ /root=/) { + $append =~ s/root=(\S+)\s*//; + $sect_info{"root"} = $1; + } + + if ($append =~ /vga=/) { + $append =~ s/vga=(\S+)\s*//; + $sect_info{"vgamode"} = $1; + } - if ($append =~ /vga=/) { - $append =~ s/vga=([^\s]+)\s*//; - $sect_info{"vgamode"} = $1; + $sect_info{"append"} = $append; + + } elsif (!exists $sect_info{"initrd"}) { + $sect_info{"initrd"} = $1; + } } - $sect_info{"append"} = $append; - } + } else { + + $sect_info{"type"} = "image"; + + if ($cfg2 =~ /^\s+linux\s+(\S+)\s*(.*)$/m) { + my $append = $2; + $sect_info{"image"} = $1; + + if ($append =~ /root=/) { + $append =~ s/root=(\S+)\s*//; + $sect_info{"root"} = $1; + } + + if ($append =~ /vga=/) { + $append =~ s/vga=(\S+)\s*//; + $sect_info{"vgamode"} = $1; + } - if ($cfg2 =~ /^\s+initrd\s+([^\s]+)/m) { - $sect_info{"initrd"} = $1; + $sect_info{"append"} = $append; + } } push @{$sect}, \%sect_info; @@ -777,6 +810,10 @@ $ret{"gfxbackground"} = $val; } elsif ($key =~ m/@?GRUB_DISABLE_OS_PROBER$/) { $ret{"os_prober"} = ($val eq "true") ? "false" : "true"; + } elsif ($key =~ m/@?GRUB_CMDLINE_XEN_DEFAULT$/) { + $ret{"xen_append"} = $val; + } elsif ($key =~ m/@?GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT$/) { + $ret{"xen_kernel_append"} = $val; } } @@ -927,6 +964,8 @@ # my $root = delete $globinfo{"root"} || ""; my $vga = delete $globinfo{"vgamode"} || ""; my $append = delete $globinfo{"append"} || ""; + my $xen_append = delete $globinfo{"xen_append"} || ""; + my $xen_kernel_append = delete $globinfo{"xen_kernel_append"} || ""; # YaST doesn't save bootloader settings when 'Timeout in seconds' is set to 0 (bnc#804176) my $timeout = delete $globinfo{"timeout"} || 0; my $hiddenmenu = delete $globinfo{"hiddenmenu"} || ""; @@ -952,6 +991,27 @@ $hidden_timeout = "0" if "$hidden_timeout" ne ""; } + # bnc#862614 - serial console settings not propagated into xen entry + if ($append =~ /console=ttyS(\d+),(\w+)/) + { + # merge console and speed into xen_append + my $console = sprintf("com%d", $1+1); + my $speed = sprintf("%s=%s", $console, $2); + + if ($xen_append ne "") { + while ($xen_append =~ s/(.*)console=(\S+)\s*(.*)$/$1$3/) { + my $del_console = $2; + $xen_append =~ s/(.*)${del_console}=\w+\s*(.*)$/$1$2/g; + } + $xen_append = "console=$console $speed $xen_append"; + } else { + $xen_append = "console=$console $speed"; + } + + $xen_kernel_append = $append if ($xen_kernel_append eq ""); + $xen_kernel_append =~ s/console=ttyS(\S+)\s*//g; + } + @lines = map { my $line_ref = $_; my $key = $line_ref->{"key"}; @@ -1017,6 +1077,12 @@ } elsif ($key =~ m/@?GRUB_DISABLE_OS_PROBER$/) { $line_ref->{"value"} = ($os_prober eq "false") ? "true" : "false"; $os_prober = ""; + } elsif ($key =~ m/@?GRUB_CMDLINE_XEN_DEFAULT$/) { + $line_ref->{"value"} = $xen_append if $xen_append ne ""; + $xen_append = ""; + } elsif ($key =~ m/@?GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT$/) { + $line_ref->{"value"} = $xen_kernel_append if $xen_kernel_append ne ""; + $xen_kernel_append = ""; } defined $line_ref ? $line_ref : (); } @lines; @@ -1097,6 +1163,20 @@ "value" => ($os_prober eq "false") ? "true" : "false", } } + + if ($xen_append ne "") { + push @lines, { + "key" => "GRUB_CMDLINE_XEN_DEFAULT", + "value" => $xen_append, + } + } + + if ($xen_kernel_append ne "") { + push @lines, { + "key" => "GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT", + "value" => $xen_kernel_append, + } + } return \@lines; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perl-Bootloader-0.804/src/Core/GRUB2EFI.pm new/perl-Bootloader-0.805/src/Core/GRUB2EFI.pm --- old/perl-Bootloader-0.804/src/Core/GRUB2EFI.pm 2014-02-17 13:15:59.000000000 +0100 +++ new/perl-Bootloader-0.805/src/Core/GRUB2EFI.pm 2014-02-27 11:53:07.000000000 +0100 @@ -80,7 +80,6 @@ $sect_info{"name"} = $name; $sect_info{"menuentry"} = $name; - $sect_info{"type"} = "image"; if ($args =~ m/'gnulinux-[^\s]+-recovery-[^\s]+'/) { $sect_info{"usage"} = "linux_failsafe"; @@ -88,34 +87,72 @@ $sect_info{"usage"} = "linux"; } - # bnc#824609 - installation boot parameters not written to GRUB_CMDLINE_LINUX_DEFAULT - # we need to match linuxefi command, otherwise the kernel append will lost - if ($cfg2 =~ /^\s+(linux|linuxefi)\s+([^\s]+)\s*(.*)$/m) { - my $append = $3; - $sect_info{"image"} = $2; - my $command = $1; - - if ($append =~ /root=/) { - $append =~ s/root=([^\s]+)\s*//; - $sect_info{"root"} = $1; - } + if ($args =~ m/--class xen/) { - # the ro is part of linuxefi entries created by grub2 scripts - # not part of kernel append by yast - if ( $command eq "linuxefi" ) { - $append =~ s/^ro\s*//; - } + $sect_info{"type"} = "xen"; + + if ($cfg2 =~ /^\s+multiboot\s+(\S+)\s+\S+\s*(.*)$/m) { + $sect_info{"xen"} = $1; + $sect_info{"xen_append"} = $2; + } + + while ($cfg2 =~ /^\s+module\s+(\S+)\s+\S+\s*(.*)$/gm) { + + if (!exists $sect_info{"image"}) { + + my $append = $2; + $sect_info{"image"} = $1; + + if ($append =~ /root=/) { + $append =~ s/root=(\S+)\s*//; + $sect_info{"root"} = $1; + } - if ($append =~ /vga=/) { - $append =~ s/vga=([^\s]+)\s*//; - $sect_info{"vgamode"} = $1; + if ($append =~ /vga=/) { + $append =~ s/vga=(\S+)\s*//; + $sect_info{"vgamode"} = $1; + } + + $sect_info{"append"} = $append; + + } elsif (!exists $sect_info{"initrd"}) { + $sect_info{"initrd"} = $1; + } } - $sect_info{"append"} = $append; - } + } else { + + $sect_info{"type"} = "image"; - if ($cfg2 =~ /^\s+(initrd|initrdefi)\s+([^\s]+)/m) { - $sect_info{"initrd"} = $2; + # bnc#824609 - installation boot parameters not written to GRUB_CMDLINE_LINUX_DEFAULT + # we need to match linuxefi command, otherwise the kernel append will lost + if ($cfg2 =~ /^\s+(linux|linuxefi)\s+([^\s]+)\s*(.*)$/m) { + my $append = $3; + $sect_info{"image"} = $2; + my $command = $1; + + if ($append =~ /root=/) { + $append =~ s/root=([^\s]+)\s*//; + $sect_info{"root"} = $1; + } + + # the ro is part of linuxefi entries created by grub2 scripts + # not part of kernel append by yast + if ( $command eq "linuxefi" ) { + $append =~ s/^ro\s*//; + } + + if ($append =~ /vga=/) { + $append =~ s/vga=([^\s]+)\s*//; + $sect_info{"vgamode"} = $1; + } + + $sect_info{"append"} = $append; + } + + if ($cfg2 =~ /^\s+(initrd|initrdefi)\s+([^\s]+)/m) { + $sect_info{"initrd"} = $2; + } } push @{$sect}, \%sect_info; @@ -353,6 +390,10 @@ $ret{"gfxbackground"} = $val; } elsif ($key =~ m/@?GRUB_DISABLE_OS_PROBER$/) { $ret{"os_prober"} = ($val eq "true") ? "false" : "true"; + } elsif ($key =~ m/@?GRUB_CMDLINE_XEN_DEFAULT$/) { + $ret{"xen_append"} = $val; + } elsif ($key =~ m/@?GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT$/) { + $ret{"xen_kernel_append"} = $val; } } @@ -502,6 +543,8 @@ # my $root = delete $globinfo{"root"} || ""; my $vga = delete $globinfo{"vgamode"} || ""; my $append = delete $globinfo{"append"} || ""; + my $xen_append = delete $globinfo{"xen_append"} || ""; + my $xen_kernel_append = delete $globinfo{"xen_kernel_append"} || ""; # YaST doesn't save bootloader settings when 'Timeout in seconds' is set to 0 (bnc#804176) my $timeout = delete $globinfo{"timeout"} || 0; my $hiddenmenu = delete $globinfo{"hiddenmenu"} || ""; @@ -533,6 +576,27 @@ $use_linuxefi = $self->{secure_boot} ? "true" : "false"; } + # bnc#862614 - serial console settings not propagated into xen entry + if ($append =~ /console=ttyS(\d+),(\w+)/) + { + # merge console and speed into xen_append + my $console = sprintf("com%d", $1+1); + my $speed = sprintf("%s=%s", $console, $2); + + if ($xen_append ne "") { + while ($xen_append =~ s/(.*)console=(\S+)\s*(.*)$/$1$3/) { + my $del_console = $2; + $xen_append =~ s/(.*)${del_console}=\w+\s*(.*)$/$1$2/g; + } + $xen_append = "console=$console $speed $xen_append"; + } else { + $xen_append = "console=$console $speed"; + } + + $xen_kernel_append = $append if ($xen_kernel_append eq ""); + $xen_kernel_append =~ s/console=ttyS(\S+)\s*//g; + } + @lines = map { my $line_ref = $_; my $key = $line_ref->{"key"}; @@ -601,7 +665,14 @@ } elsif ($key =~ m/@?GRUB_USE_LINUXEFI$/) { $line_ref->{"value"} = "$use_linuxefi" if "$use_linuxefi" ne ""; $use_linuxefi = ""; + } elsif ($key =~ m/@?GRUB_CMDLINE_XEN_DEFAULT$/) { + $line_ref->{"value"} = $xen_append if $xen_append ne ""; + $xen_append = ""; + } elsif ($key =~ m/@?GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT$/) { + $line_ref->{"value"} = $xen_kernel_append if $xen_kernel_append ne ""; + $xen_kernel_append = ""; } + defined $line_ref ? $line_ref : (); } @lines; @@ -689,6 +760,19 @@ } } + if ($xen_append ne "") { + push @lines, { + "key" => "GRUB_CMDLINE_XEN_DEFAULT", + "value" => $xen_append, + } + } + + if ($xen_kernel_append ne "") { + push @lines, { + "key" => "GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT", + "value" => $xen_kernel_append, + } + } return \@lines; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perl-Bootloader-0.804/version new/perl-Bootloader-0.805/version --- old/perl-Bootloader-0.804/version 2014-02-17 13:15:59.000000000 +0100 +++ new/perl-Bootloader-0.805/version 2014-02-27 11:53:07.000000000 +0100 @@ -1 +1 @@ -0.804 +0.805 -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org