Hello community, here is the log from the commit of package perl-Bootloader for openSUSE:Factory checked in at 2014-03-05 15:36:43 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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-03-01 14:38:17.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.perl-Bootloader.new/perl-Bootloader.changes 2014-03-05 15:36:45.000000000 +0100 @@ -1,0 +2,6 @@ +Tue Mar 4 17:48:03 CET 2014 - snwint@suse.de + +- support grub2 on s390x +- 0.806 + +------------------------------------------------------------------- Old: ---- perl-Bootloader-0.805.tar.xz New: ---- perl-Bootloader-0.806.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Bootloader.spec ++++++ --- /var/tmp/diff_new_pack.EdBoHC/_old 2014-03-05 15:36:46.000000000 +0100 +++ /var/tmp/diff_new_pack.EdBoHC/_new 2014-03-05 15:36:46.000000000 +0100 @@ -17,7 +17,7 @@ Name: perl-Bootloader -Version: 0.805 +Version: 0.806 Release: 0 Requires: coreutils Requires: e2fsprogs @@ -79,7 +79,7 @@ %endif %endif %ifarch s390 s390x -rm -f $RPM_BUILD_ROOT/%{perl_vendorlib}/Bootloader/Core/{*LILO*,GRUB*} +rm -f $RPM_BUILD_ROOT/%{perl_vendorlib}/Bootloader/Core/{*LILO*,GRUB.*,GRUB2EFI.*} %if 0%{?suse_version} == 0 || 0%{?suse_version} <= 1130 sed -i '/LILO/D;/GRUB/D;' $RPM_BUILD_ROOT/%{perl_vendorarch}/auto/Bootloader/.packlist %endif ++++++ perl-Bootloader-0.805.tar.xz -> perl-Bootloader-0.806.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perl-Bootloader-0.805/perl-Bootloader.changes new/perl-Bootloader-0.806/perl-Bootloader.changes --- old/perl-Bootloader-0.805/perl-Bootloader.changes 2014-02-27 11:53:07.000000000 +0100 +++ new/perl-Bootloader-0.806/perl-Bootloader.changes 2014-03-04 17:48:42.000000000 +0100 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Tue Mar 4 17:48:03 CET 2014 - snwint@suse.de + +- support grub2 on s390x +- 0.806 + +------------------------------------------------------------------- Thu Feb 27 11:52:10 CET 2014 - snwint@suse.de - propagate serial console setting to xen (bnc #862614) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perl-Bootloader-0.805/perl-Bootloader.spec.in new/perl-Bootloader-0.806/perl-Bootloader.spec.in --- old/perl-Bootloader-0.805/perl-Bootloader.spec.in 2014-02-27 11:53:07.000000000 +0100 +++ new/perl-Bootloader-0.806/perl-Bootloader.spec.in 2014-03-04 17:48:42.000000000 +0100 @@ -73,7 +73,7 @@ %endif %endif %ifarch s390 s390x -rm -f $RPM_BUILD_ROOT/%{perl_vendorlib}/Bootloader/Core/{*LILO*,GRUB*} +rm -f $RPM_BUILD_ROOT/%{perl_vendorlib}/Bootloader/Core/{*LILO*,GRUB.*,GRUB2EFI.*} %if 0%{?suse_version} == 0 || 0%{?suse_version} <= 1130 sed -i '/LILO/D;/GRUB/D;' $RPM_BUILD_ROOT/%{perl_vendorarch}/auto/Bootloader/.packlist %endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perl-Bootloader-0.805/src/Core/GRUB2.pm new/perl-Bootloader-0.806/src/Core/GRUB2.pm --- old/perl-Bootloader-0.805/src/Core/GRUB2.pm 2014-02-27 11:53:07.000000000 +0100 +++ new/perl-Bootloader-0.806/src/Core/GRUB2.pm 2014-03-04 17:48:42.000000000 +0100 @@ -347,6 +347,7 @@ my $ref = shift; my $old = shift; my $arch = `uname --hardware-platform`; + chomp $arch; my $target; my $loader = $self->SUPER::new($ref, $old); @@ -355,9 +356,10 @@ # Set target based on architecture (ppc or x86) $target = "i386-pc" if $arch =~ /(i386|x86_64)/; $target = "powerpc-ieee1275" if $arch =~ /(ppc|ppc64)/; - $loader->{'target'} = $target; + $target = "s390x-emu" if $arch eq 's390x'; + $loader->{target} = $target; - $loader->milestone("Created GRUB2 instance for target $target"); + $loader->milestone("Created GRUB2 instance for target \"$target\" (arch = $arch)"); return $loader; } @@ -1291,47 +1293,62 @@ my $self = shift; my %glob = %{$self->{"global"}}; my $file = Bootloader::Path::Grub2_installdevice(); - my $files_ref = $self->ReadFiles ([$file,]); + my $files_ref; - if (! defined ($files_ref)) - { - return undef; + # some targets might need an install device list + if($self->{target} !~ /(-emu|-efi)$/) { + $files_ref = $self->ReadFiles([$file,]); } - # Since Bootloader::Tools::ReadPartitions didn't assign - # correct part_type, the skip-fs-probe check based - # on `extended may not work. - - #my $skip_fs_probe = delete $glob{"boot_extended"}; + $self->milestone("files_ref", $files_ref); - #if (defined $skip_fs_probe and $skip_fs_probe eq "true") { - # $install_opts .= " --skip-fs-probe "; - #} + if ($files_ref->{$file}) + { + # Since Bootloader::Tools::ReadPartitions didn't assign + # correct part_type, the skip-fs-probe check based + # on `extended may not work. + + #my $skip_fs_probe = delete $glob{"boot_extended"}; + + #if (defined $skip_fs_probe and $skip_fs_probe eq "true") { + # $install_opts .= " --skip-fs-probe "; + #} + + # Do skip-fs-probe to avoid error when embedding stage1 + # to extended partition + my $install_opts = "--force --skip-fs-probe"; + my @devices = @{$files_ref->{$file} || []}; + + $self->milestone("devices =", \@devices); + + # Hmm .. grub2-install must has been run before + # any grub2-mkconfig ... + # TODO: foreach .. looks awkward .. need clearify + foreach my $dev (@devices) { - # Do skip-fs-probe to avoid error when embedding stage1 - # to extended partition - my $install_opts = "--force --skip-fs-probe"; - my @devices = @{$files_ref->{$file} || []}; + if ($dev eq "activate" or $dev eq "generic_mbr") { + next; + } - # Hmm .. grub2-install must has been run before - # any grub2-mkconfig ... - # TODO: foreach .. looks awkward .. need clearify - foreach my $dev (@devices) { + my $ret = $self->RunCommand ( + # TODO: Use --force is for installing on BS + # the tradeoff is we can't capture errors + # only patch grub2 package is possible way + # to get around this problem + "/usr/sbin/grub2-install --target=$self->{'target'} $install_opts \"$dev\"", + Bootloader::Path::BootCommandLogname() + ); - if ($dev eq "activate" or $dev eq "generic_mbr") { - next; + return 0 if (0 != $ret); } - + } + else { my $ret = $self->RunCommand ( - # TODO: Use --force is for installing on BS - # the tradeoff is we can't capture errors - # only patch grub2 package is possible way - # to get around this problem - "/usr/sbin/grub2-install --target=$self->{'target'} $install_opts \"$dev\"", + "/usr/sbin/grub2-install --target=$self->{'target'}", Bootloader::Path::BootCommandLogname() ); - return 0 if (0 != $ret); + return 0 if $ret; } my $default = delete $glob{"default"}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perl-Bootloader-0.805/version new/perl-Bootloader-0.806/version --- old/perl-Bootloader-0.805/version 2014-02-27 11:53:07.000000000 +0100 +++ new/perl-Bootloader-0.806/version 2014-03-04 17:48:42.000000000 +0100 @@ -1 +1 @@ -0.805 +0.806 -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org