Accepting request 252505 from Kernel:kdump
1 OBS-URL: https://build.opensuse.org/request/show/252505 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kdump?expand=0&rev=81
This commit is contained in:
commit
48317aa9e9
@ -3,7 +3,7 @@ Date: Tue Sep 23 16:12:34 2014 +0200
|
|||||||
Subject: Add KDUMP_NETCONFIG modes to support IPv6
|
Subject: Add KDUMP_NETCONFIG modes to support IPv6
|
||||||
References: bnc#885897
|
References: bnc#885897
|
||||||
Patch-mainline: v0.8.16
|
Patch-mainline: v0.8.16
|
||||||
Git-commit: 72be4138d5ac03af8c5579099c6a39ab7d272503
|
Git-commit: ffd6542ed47a41be1f1d9f8df95781b6d94123d4
|
||||||
|
|
||||||
KDUMP_NETCONFIG had only two modes: static and dhcp, where dhcp
|
KDUMP_NETCONFIG had only two modes: static and dhcp, where dhcp
|
||||||
actually only means DHCP4. New modes are needed to get an IPv6
|
actually only means DHCP4. New modes are needed to get an IPv6
|
||||||
@ -98,9 +98,9 @@ Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
|
|||||||
+ printf " %s" $(kdump_ifname_config "$_if")
|
+ printf " %s" $(kdump_ifname_config "$_if")
|
||||||
+
|
+
|
||||||
+ if [ "$_mode" = "auto" ] ; then
|
+ if [ "$_mode" = "auto" ] ; then
|
||||||
+ if [ -n $(kdump_ip_config) ] ; then
|
+ if [ -n $(kdump_ip_config "$_if") ] ; then
|
||||||
+ _mode=dhcp4
|
+ _mode=dhcp4
|
||||||
+ elif [ -n $(kdump_ip6_config) ] ; then
|
+ elif [ -n $(kdump_ip6_config "$_if") ] ; then
|
||||||
+ _mode=dhcp6
|
+ _mode=dhcp6
|
||||||
else
|
else
|
||||||
- echo -n " ip=${_if}:dhcp"
|
- echo -n " ip=${_if}:dhcp"
|
||||||
|
59
kdump-bootloader-grub2.patch
Normal file
59
kdump-bootloader-grub2.patch
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
Date: Fri Sep 26 11:43:33 2014 +0200
|
||||||
|
From: Petr Tesarik <ptesarik@suse.cz>
|
||||||
|
Subject: kdump-Bootloader: add support for GRUB2
|
||||||
|
References: bsc#889192
|
||||||
|
Patch-mainline: v0.8.16
|
||||||
|
Git-commit: 30d4271c72251c5f1c995d0580b19aa000ade1d6
|
||||||
|
|
||||||
|
GRUB2 is very different from the other bootloader, because the final
|
||||||
|
configuration file is generated by an external utility. This means
|
||||||
|
that the command line must be modified in the global settings instead
|
||||||
|
of the individual section.
|
||||||
|
|
||||||
|
Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
|
||||||
|
|
||||||
|
---
|
||||||
|
init/kdump-bootloader.pl | 22 +++++++++++++++++-----
|
||||||
|
1 file changed, 17 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
--- a/init/kdump-bootloader.pl
|
||||||
|
+++ b/init/kdump-bootloader.pl
|
||||||
|
@@ -4,11 +4,19 @@ use Bootloader::Tools;
|
||||||
|
|
||||||
|
Bootloader::Tools::InitLibrary();
|
||||||
|
|
||||||
|
+my $grub2;
|
||||||
|
+my $section;
|
||||||
|
+if (Bootloader::Tools::GetBootloader() =~ /^(grub2|grub2-efi)$/) {
|
||||||
|
+ $grub2 = true;
|
||||||
|
+ $section = Bootloader::Tools::GetGlobals();
|
||||||
|
+} else {
|
||||||
|
+ $grub2 = false;
|
||||||
|
+ $section = Bootloader::Tools::GetDefaultSection();
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
if ($ARGV[0] eq "--get") {
|
||||||
|
- my $section = Bootloader::Tools::GetDefaultSection ();
|
||||||
|
print $section->{"append"};
|
||||||
|
} elsif ($ARGV[0] eq "--update") {
|
||||||
|
- my $section = Bootloader::Tools::GetDefaultSection ();
|
||||||
|
my $input = $section->{"append"};
|
||||||
|
my $result;
|
||||||
|
while (length($input)) {
|
||||||
|
@@ -28,9 +36,13 @@ if ($ARGV[0] eq "--get") {
|
||||||
|
shift @ARGV;
|
||||||
|
$result .= " " if length($result);
|
||||||
|
$result .= join(" ", @ARGV);
|
||||||
|
- $section->{"append"} = $result;
|
||||||
|
- $section->{"__modified"} = 1;
|
||||||
|
- Bootloader::Tools::SetGlobals();
|
||||||
|
+ if ($grub2) {
|
||||||
|
+ Bootloader::Tools::SetGlobals("append" => $result);
|
||||||
|
+ } else {
|
||||||
|
+ $section->{"append"} = $result;
|
||||||
|
+ $section->{"__modified"} = 1;
|
||||||
|
+ Bootloader::Tools::SetGlobals();
|
||||||
|
+ }
|
||||||
|
} else {
|
||||||
|
die "Need an action (--get or --update)";
|
||||||
|
}
|
33
kdump-enable-fadump-ppc64le.patch
Normal file
33
kdump-enable-fadump-ppc64le.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
Date: Wed Sep 24 13:56:42 2014 +0200
|
||||||
|
From: Petr Tesarik <ptesarik@suse.cz>
|
||||||
|
Subject: Enable FADUMP on ppc64le
|
||||||
|
References: bsc#889192
|
||||||
|
Patch-mainline: v0.8.16
|
||||||
|
Git-commit: 69bce53e9a02145e857bd4c36effcaf560a8f8cf
|
||||||
|
|
||||||
|
The FADUMP feature is only available on IBM POWER systems, but the
|
||||||
|
new little-endian variant has a new CMAKE_SYSTEM_PROCESSOR value.
|
||||||
|
|
||||||
|
Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
|
||||||
|
|
||||||
|
---
|
||||||
|
CMakeLists.txt | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -144,11 +144,11 @@ ENDIF(NOT LIBSSL_FOUND)
|
||||||
|
# Check for FADUMP
|
||||||
|
#
|
||||||
|
|
||||||
|
-IF(“${CMAKE_SYSTEM_PROCESSOR}” STREQUAL “ppc64”)
|
||||||
|
+IF("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "ppc64(le)?")
|
||||||
|
SET(HAVE_FADUMP TRUE)
|
||||||
|
-ELSE(“${CMAKE_SYSTEM_PROCESSOR}” STREQUAL “ppc64”)
|
||||||
|
+ELSE()
|
||||||
|
SET(HAVE_FADUMP FALSE)
|
||||||
|
-ENDIF(“${CMAKE_SYSTEM_PROCESSOR}” STREQUAL “ppc64”)
|
||||||
|
+ENDIF()
|
||||||
|
|
||||||
|
#
|
||||||
|
# Configure file
|
44
kdump-fadump-bootloader-always.patch
Normal file
44
kdump-fadump-bootloader-always.patch
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
Date: Fri Sep 26 08:10:38 2014 +0200
|
||||||
|
From: Petr Tesarik <ptesarik@suse.cz>
|
||||||
|
Subject: Always turn on fadump if KDUMP_FADUMP is true
|
||||||
|
References: bsc#889192
|
||||||
|
Patch-mainline: v0.8.16
|
||||||
|
Git-commit: 1f7e52d908f0ad2b2a33cdd374a8888bcf6f8234
|
||||||
|
|
||||||
|
The problem is that fadump-related files under /sys/kernel are
|
||||||
|
created only if the kernel is booted with fadump=on. So, this
|
||||||
|
is a chicken-and-egg problem, and a reboot is always necessary if
|
||||||
|
the current kernel is loaded without fadump=on.
|
||||||
|
|
||||||
|
However, if the command line is not modified here, the admin must
|
||||||
|
first add fadump=on to the bootloader command line, and then enable
|
||||||
|
KDUMP_FADUMP, i.e. enable it in two different places. If the command
|
||||||
|
line is modified unconditionally, there is only one "big switch" for
|
||||||
|
FADUMP.
|
||||||
|
|
||||||
|
Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
|
||||||
|
|
||||||
|
---
|
||||||
|
init/rc.kdump.functions | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
--- a/init/rc.kdump.functions
|
||||||
|
+++ b/init/rc.kdump.functions
|
||||||
|
@@ -259,6 +259,8 @@ function fadump_bootloader()
|
||||||
|
# Update fadump configuration
|
||||||
|
function load_kdump_fadump()
|
||||||
|
{
|
||||||
|
+ fadump_bootloader on
|
||||||
|
+
|
||||||
|
if ! fadump_enabled; then
|
||||||
|
echo ": fadump is not enabled in the kernel."
|
||||||
|
rc_status -s
|
||||||
|
@@ -266,8 +268,6 @@ function load_kdump_fadump()
|
||||||
|
rc_exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
- fadump_bootloader on
|
||||||
|
-
|
||||||
|
# The kernel fails with EINVAL if registered already
|
||||||
|
# (see bnc#814780)
|
||||||
|
if [ "$(cat $FADUMP_REGISTERED)" != "1" ]; then
|
59
kdump-fadump-keep-sysroot.patch
Normal file
59
kdump-fadump-keep-sysroot.patch
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
Date: Fri Sep 26 15:50:05 2014 +0200
|
||||||
|
From: Petr Tesarik <ptesarik@suse.cz>
|
||||||
|
Subject: Keep /sysroot mount point if fadump is on
|
||||||
|
References: bsc#889192
|
||||||
|
Patch-mainline: v0.8.16
|
||||||
|
Git-commit: 4c1a5aac3df1e4ea2f0509c5b653083a02c1d4dc
|
||||||
|
|
||||||
|
As FADUMP uses the normal initrd, the system must be able to boot up
|
||||||
|
eventually, so normal mount points are required.
|
||||||
|
|
||||||
|
But mounting the same device twice may not be possible because of
|
||||||
|
conflicting mount options, so system root may not be mountable under
|
||||||
|
/kdump. In order to keep the kdump-specific mount point hierarchy,
|
||||||
|
convert any such mount to a bind mount from /sysroot.
|
||||||
|
|
||||||
|
Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
|
||||||
|
|
||||||
|
---
|
||||||
|
init/module-setup.sh | 20 ++++++++++++++++++--
|
||||||
|
1 file changed, 18 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
--- a/init/module-setup.sh
|
||||||
|
+++ b/init/module-setup.sh
|
||||||
|
@@ -126,17 +126,33 @@ install() {
|
||||||
|
kdump_map_mpath_wwid
|
||||||
|
for_each_host_dev_and_slaves_all kdump_add_mpath_dev
|
||||||
|
|
||||||
|
+ # Convert system root mounts to bind mounts
|
||||||
|
+ if [ "$KDUMP_FADUMP" = "yes" ] ; then
|
||||||
|
+ local i line
|
||||||
|
+ for i in "${!fstab_lines[@]}"
|
||||||
|
+ do
|
||||||
|
+ line=( ${fstab_lines[i]} )
|
||||||
|
+ if [ "${line[1]%/*}" = "/kdump" ] ; then
|
||||||
|
+ fstab_lines[i]="/sysroot ${line[1]} none bind"
|
||||||
|
+ fi
|
||||||
|
+ done
|
||||||
|
+ fi
|
||||||
|
+
|
||||||
|
kdump_setup_files "$initdir" "$kdump_mpath_wwids"
|
||||||
|
|
||||||
|
if dracut_module_included "systemd" ; then
|
||||||
|
- rm -f "${initdir}/$systemdutildir"/system-generators/dracut-rootfs-generator
|
||||||
|
+ [ "$KDUMP_FADUMP" != yes ] && \
|
||||||
|
+ rm -f "${initdir}/$systemdutildir"/system-generators/dracut-rootfs-generator
|
||||||
|
+
|
||||||
|
inst_simple /lib/kdump/save_dump.sh
|
||||||
|
inst_simple "$moddir/kdump-save.service" \
|
||||||
|
"$systemdsystemunitdir"/kdump-save.service
|
||||||
|
ln_r "$systemdsystemunitdir"/kdump-save.service \
|
||||||
|
"$systemdsystemunitdir"/initrd.target.wants/kdump-save.service
|
||||||
|
else
|
||||||
|
- inst_hook mount 30 "$moddir/mount-kdump.sh"
|
||||||
|
+ [ "$KDUMP_FADUMP" != yes ] && \
|
||||||
|
+ inst_hook mount 30 "$moddir/mount-kdump.sh"
|
||||||
|
+
|
||||||
|
inst_hook pre-pivot 90 /lib/kdump/save_dump.sh
|
||||||
|
fi
|
||||||
|
|
@ -4,6 +4,7 @@ Subject: Get required multipath wwids from sysfs
|
|||||||
References: bnc#883883
|
References: bnc#883883
|
||||||
Patch-mainline: v0.8.16
|
Patch-mainline: v0.8.16
|
||||||
Git-commit: 4aa46801a53070dc0b0c27f4247cdc8e2b678694
|
Git-commit: 4aa46801a53070dc0b0c27f4247cdc8e2b678694
|
||||||
|
Git-commit: bb073caafcecfe667fba528c170f89bb29447a1d
|
||||||
|
|
||||||
The dracut code path must use for_each_host_dev_and_slaves_all to
|
The dracut code path must use for_each_host_dev_and_slaves_all to
|
||||||
find multipath devices that are "hidden" beneath e.g. an LVM volume.
|
find multipath devices that are "hidden" beneath e.g. an LVM volume.
|
||||||
@ -71,7 +72,7 @@ Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
|
|||||||
+{
|
+{
|
||||||
+ local f _dir _uuid _wwid _dev
|
+ local f _dir _uuid _wwid _dev
|
||||||
+ for f in /sys/block/*/dm/uuid ; do
|
+ for f in /sys/block/*/dm/uuid ; do
|
||||||
+ eval "_uuid=$(<$f)" 2>/dev/null
|
+ eval "_uuid=\$(<$f)" 2>/dev/null
|
||||||
+ [[ "$_uuid" = mpath-* ]] || continue
|
+ [[ "$_uuid" = mpath-* ]] || continue
|
||||||
+ _dir="${f%/dm/uuid}"
|
+ _dir="${f%/dm/uuid}"
|
||||||
+ _wwid=$(<"$_dir"/dm/name)
|
+ _wwid=$(<"$_dir"/dm/name)
|
||||||
|
@ -1,3 +1,22 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Sep 26 14:13:54 UTC 2014 - ptesarik@suse.cz
|
||||||
|
|
||||||
|
- kdump-enable-fadump-ppc64le.patch: Enable FADUMP on ppc64le
|
||||||
|
(bsc#889192).
|
||||||
|
- kdump-fadump-bootloader-always.patch: Always turn on fadump if
|
||||||
|
KDUMP_FADUMP is true (bsc#889192).
|
||||||
|
- kdump-bootloader-grub2.patch: kdump-Bootloader: add support for
|
||||||
|
GRUB2 (bsc#889192).
|
||||||
|
- kdump-fadump-keep-sysroot.patch: Keep /sysroot mount point if
|
||||||
|
fadump is on (bsc#889192).
|
||||||
|
- kdump-get-multipath-wwid-from-sysfs.patch: Refresh.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Sep 26 10:05:56 UTC 2014 - ptesarik@suse.cz
|
||||||
|
|
||||||
|
- kdump-add-IPv6-KDUMP_NETCONFIG-modes.patch: Refresh: Fix ip
|
||||||
|
error messages when KDUMP_NETCONFIG=auto (bnc#885897).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Sep 23 14:17:01 UTC 2014 - ptesarik@suse.cz
|
Tue Sep 23 14:17:01 UTC 2014 - ptesarik@suse.cz
|
||||||
|
|
||||||
|
@ -76,6 +76,10 @@ Patch8: %{name}-get-multipath-wwid-from-sysfs.patch
|
|||||||
Patch9: %{name}-split-kdump_default_netdev.patch
|
Patch9: %{name}-split-kdump_default_netdev.patch
|
||||||
Patch10: %{name}-move-network-setup-to-module-setup.patch
|
Patch10: %{name}-move-network-setup-to-module-setup.patch
|
||||||
Patch11: %{name}-add-IPv6-KDUMP_NETCONFIG-modes.patch
|
Patch11: %{name}-add-IPv6-KDUMP_NETCONFIG-modes.patch
|
||||||
|
Patch12: %{name}-enable-fadump-ppc64le.patch
|
||||||
|
Patch13: %{name}-fadump-bootloader-always.patch
|
||||||
|
Patch14: %{name}-bootloader-grub2.patch
|
||||||
|
Patch15: %{name}-fadump-keep-sysroot.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
# rename "kdump-helpers" (10.3) -> "kdump" (11.0/SP2)
|
# rename "kdump-helpers" (10.3) -> "kdump" (11.0/SP2)
|
||||||
Provides: kdump-helpers = %{version}
|
Provides: kdump-helpers = %{version}
|
||||||
@ -125,6 +129,10 @@ Authors:
|
|||||||
%patch9 -p1
|
%patch9 -p1
|
||||||
%patch10 -p1
|
%patch10 -p1
|
||||||
%patch11 -p1
|
%patch11 -p1
|
||||||
|
%patch12 -p1
|
||||||
|
%patch13 -p1
|
||||||
|
%patch14 -p1
|
||||||
|
%patch15 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="%optflags"
|
export CFLAGS="%optflags"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user