forked from pool/grub2
Accepting request 518461 from home:michael-chang:branches:home:rwill:branches:Base:System
- Fix minor oversights in and the exit value of the grub2-install helper on s390x. (bsc#1055343, fate#323298) * grub2-s390x-09-improve-zipl-setup.patch OBS-URL: https://build.opensuse.org/request/show/518461 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=274
This commit is contained in:
parent
00508796e7
commit
3c6f5594e2
74
grub2-s390x-09-improve-zipl-setup.patch
Normal file
74
grub2-s390x-09-improve-zipl-setup.patch
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
---
|
||||||
|
util/s390x/zipl2grub.conf.in | 2 +-
|
||||||
|
util/s390x/zipl2grub.pl.in | 19 +++++++++++--------
|
||||||
|
2 files changed, 12 insertions(+), 9 deletions(-)
|
||||||
|
|
||||||
|
--- a/util/s390x/zipl2grub.conf.in
|
||||||
|
+++ b/util/s390x/zipl2grub.conf.in
|
||||||
|
@@ -8,7 +8,7 @@ defaultmenu = menu
|
||||||
|
target = @zipldir@
|
||||||
|
ramdisk = @zipldir@/initrd,0x2000000
|
||||||
|
image = @zipldir@/image
|
||||||
|
- parameters = "root=@GRUB_DEVICE@ @GRUB_EMU_CONMODE@ @GRUB_CMDLINE_LINUX@ @GRUB_CMDLINE_LINUX_DEFAULT@ initgrub quiet splash=silent plymouth.enable=0 "
|
||||||
|
+ parameters = "root=@GRUB_DEVICE@ @GRUB_EMU_CONMODE@ @GRUB_CMDLINE_LINUX@ @GRUB_CMDLINE_LINUX_DEFAULT@ initgrub quiet splash=silent plymouth.enable=0 mem=1G "
|
||||||
|
|
||||||
|
[skip-grub2]
|
||||||
|
target = @zipldir@
|
||||||
|
--- a/util/s390x/zipl2grub.pl.in
|
||||||
|
+++ b/util/s390x/zipl2grub.pl.in
|
||||||
|
@@ -44,12 +44,12 @@ sub System(@) {
|
||||||
|
return 0 if ($debug);
|
||||||
|
system( @C);
|
||||||
|
if ($? == -1) {
|
||||||
|
- Panic( $?, "$C[0]: Failed to execute: $!\n");
|
||||||
|
+ Panic( 1, "$C[0]: Failed to execute: $!\n");
|
||||||
|
} elsif ($? & 127) {
|
||||||
|
- Panic( $?, sprintf( "$C[0]: Died with signal %d with%s coredump\n",
|
||||||
|
+ Panic( 1, sprintf( "$C[0]: Died with signal %d with%s coredump\n",
|
||||||
|
($? & 127), ($? & 128) ? '' : 'out'));
|
||||||
|
} elsif ( $? >> 8 != 0 ) {
|
||||||
|
- Panic( $?, "$C[0]: Failed\n");
|
||||||
|
+ Panic( $? >> 8, "$C[0]: Failed\n");
|
||||||
|
}
|
||||||
|
return( 0);
|
||||||
|
}
|
||||||
|
@@ -166,7 +166,9 @@ sub Usage($) {
|
||||||
|
"zIPL directory missing.",
|
||||||
|
"Configuration template missing.",
|
||||||
|
"Configuration template unreadable.",
|
||||||
|
- "zIPL directory not accesible.",
|
||||||
|
+ "zIPL directory not accessible.",
|
||||||
|
+ "kernel image parameter missing.",
|
||||||
|
+ "kernel image unreadable.",
|
||||||
|
""
|
||||||
|
);
|
||||||
|
my $msg = "";
|
||||||
|
@@ -190,7 +192,8 @@ while ( $#ARGV >= 0 ) {
|
||||||
|
(/^--?help/ || /^-h/) && (Usage(0));
|
||||||
|
(/^--zipldir$/ || /^-z$/) && ($zipldir = shift || Usage(2), next);
|
||||||
|
(/^--template$/ || /^-T$/) && ($in = shift || Usage(3), next);
|
||||||
|
- (/^--image$/ || /^-i$/) && ($Image = shift || Usage(5), $force = 1, next);
|
||||||
|
+ (/^--image$/ || /^-i$/) && ($Image = shift || Usage(6),
|
||||||
|
+ -r "$Image" || Usage(7), $force = 1, next);
|
||||||
|
(/^-/) && (Usage(1));
|
||||||
|
Usage(1);
|
||||||
|
}
|
||||||
|
@@ -403,15 +406,15 @@ if ( -l $Image ) {
|
||||||
|
$Image = readlink( $Image);
|
||||||
|
}
|
||||||
|
my ($image, $version) = ($Image =~ m{^(?:/boot/)?([^-]+-(.+))$});
|
||||||
|
-my $initrd = "initrd-$version";
|
||||||
|
-
|
||||||
|
if ( !defined($image) || !defined($version) || ! -r "/boot/$image" ) {
|
||||||
|
Panic( 1, "$C: weird $Image. This should never happen!\n");
|
||||||
|
}
|
||||||
|
+my $initrd = "initrd-$version";
|
||||||
|
|
||||||
|
if ( ! -r $ziplimage || ! -r $ziplinitrd || $refresh ) {
|
||||||
|
BootCopy( $image, $zipldir, "image");
|
||||||
|
- BootCopy( $initrd, $zipldir, "initrd") if (-r "/boot/$initrd");
|
||||||
|
+ BootCopy( $initrd, $zipldir, "initrd")
|
||||||
|
+ if (-r "/boot/$initrd" && ! exists( $fsdev{"/boot"}));
|
||||||
|
}
|
||||||
|
if ( $refresh || ChkInitrd( $zipldir, "initrd") <= 0 ) {
|
||||||
|
MkInitrd( $initrd, $zipldir, $version);
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Aug 23 17:52:32 UTC 2017 - rw@suse.com
|
||||||
|
|
||||||
|
- Fix minor oversights in and the exit value of the grub2-install
|
||||||
|
helper on s390x. (bsc#1055343, fate#323298)
|
||||||
|
* grub2-s390x-09-improve-zipl-setup.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jul 24 13:39:25 UTC 2017 - bwiedemann@suse.com
|
Mon Jul 24 13:39:25 UTC 2017 - bwiedemann@suse.com
|
||||||
|
|
||||||
|
@ -211,6 +211,7 @@ Patch80: grub2-emu-4-all.patch
|
|||||||
Patch81: grub2-lvm-allocate-metadata-buffer-from-raw-contents.patch
|
Patch81: grub2-lvm-allocate-metadata-buffer-from-raw-contents.patch
|
||||||
Patch82: grub2-diskfilter-support-pv-without-metadatacopies.patch
|
Patch82: grub2-diskfilter-support-pv-without-metadatacopies.patch
|
||||||
Patch83: grub2-efi-uga-64bit-fb.patch
|
Patch83: grub2-efi-uga-64bit-fb.patch
|
||||||
|
Patch84: grub2-s390x-09-improve-zipl-setup.patch
|
||||||
# Btrfs snapshot booting related patches
|
# Btrfs snapshot booting related patches
|
||||||
Patch101: grub2-btrfs-01-add-ability-to-boot-from-subvolumes.patch
|
Patch101: grub2-btrfs-01-add-ability-to-boot-from-subvolumes.patch
|
||||||
Patch102: grub2-btrfs-02-export-subvolume-envvars.patch
|
Patch102: grub2-btrfs-02-export-subvolume-envvars.patch
|
||||||
@ -356,9 +357,9 @@ provides support for %{platform} systems.
|
|||||||
%package %{grubefiarch}
|
%package %{grubefiarch}
|
||||||
|
|
||||||
Summary: Bootloader with support for Linux, Multiboot and more
|
Summary: Bootloader with support for Linux, Multiboot and more
|
||||||
|
Group: System/Boot
|
||||||
# Require efibootmgr
|
# Require efibootmgr
|
||||||
# Without it grub-install is broken so break the package as well if unavailable
|
# Without it grub-install is broken so break the package as well if unavailable
|
||||||
Group: System/Boot
|
|
||||||
Requires: efibootmgr
|
Requires: efibootmgr
|
||||||
Requires(post): efibootmgr
|
Requires(post): efibootmgr
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
@ -478,6 +479,7 @@ swap partition while in resuming
|
|||||||
%patch81 -p1
|
%patch81 -p1
|
||||||
%patch82 -p1
|
%patch82 -p1
|
||||||
%patch83 -p1
|
%patch83 -p1
|
||||||
|
%patch84 -p1
|
||||||
%patch101 -p1
|
%patch101 -p1
|
||||||
%patch102 -p1
|
%patch102 -p1
|
||||||
%patch103 -p1
|
%patch103 -p1
|
||||||
|
Loading…
Reference in New Issue
Block a user