diff --git a/kdump-fix-missing-index-of-kdump_Host.patch b/kdump-fix-missing-index-of-kdump_Host.patch new file mode 100644 index 0000000..3d09821 --- /dev/null +++ b/kdump-fix-missing-index-of-kdump_Host.patch @@ -0,0 +1,29 @@ +From: Lance Wang +Date: Mon, 4 Dec 2017 16:05:23 +0800 +Subject: Fix missing index of kdump_Host +References: bsc#1002617 +Upstream: merged +Git-commit: 3d0ba82b678f996dd78a8de7da043340efec7dcb + +Fix missing index of kdump_Host + +--- + init/setup-kdump.functions | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/init/setup-kdump.functions ++++ b/init/setup-kdump.functions +@@ -868,11 +868,11 @@ function kdump_modify_config() # + kdump_over_ssh=yes + if [ -z "$KDUMP_HOST_KEY" ] ; then + KDUMP_HOST_KEY=$( +- ssh-keygen -F "$kdump_Host" 2>/dev/null | \ ++ ssh-keygen -F "${kdump_Host[i]}" 2>/dev/null | \ + awk '/^[^#]/ { if (NF==3) { print $3; exit } }' + ) + fi +- ssh-keygen -F "$kdump_Host" 2> /dev/null \ ++ ssh-keygen -F "${kdump_Host[i]}" 2> /dev/null \ + >>"${dest}/kdump/.ssh/known_hosts" + fi + diff --git a/kdump-nsswitch.conf-filtering.patch b/kdump-nsswitch.conf-filtering.patch new file mode 100644 index 0000000..9e9770e --- /dev/null +++ b/kdump-nsswitch.conf-filtering.patch @@ -0,0 +1,38 @@ +From: Lance Wang +Date: Mon, 4 Dec 2017 16:14:06 +0800 +Subject: Copy /etc/hosts and /etc/nsswitch.conf in setup-kdump.functions +References: bsc#1048178,bsc#1002617 +Upstream: merged +Git-commit: c5b2ce7c303d19f3615607d9867a06ce0f0d7ae2 + +Only filter field hosts from /etc/nsswitch.conf to avoid ssh login failure. +It is better to copy files in kdump dracut module than via the cmdline +to dracut. +--- + init/mkdumprd | 3 --- + init/setup-kdump.functions | 2 ++ + 2 files changed, 2 insertions(+), 3 deletions(-) + +--- a/init/mkdumprd ++++ b/init/mkdumprd +@@ -142,9 +142,6 @@ function run_dracut() + # Make resolved variables visible to the dracut module + kdump_export_targets + +- # Include additional files in the kdump initial ram disk +- DRACUT_ARGS="$DRACUT_ARGS --install '/etc/hosts /etc/nsswitch.conf'" +- + DRACUT_ARGS="$DRACUT_ARGS --add 'kdump' $INITRD $KERNELVERSION" + echo "Regenerating kdump initrd ..." >&2 + eval "bash -$- $DRACUT $DRACUT_ARGS" +--- a/init/setup-kdump.functions ++++ b/init/setup-kdump.functions +@@ -859,6 +859,8 @@ function kdump_modify_config() # + KDUMP_SAVEDIR="${KDUMP_SAVEDIR}file://${kdump_Realpath[i]}" + elif [ "$protocol" != "srcfile" ] ; then + KDUMP_SAVEDIR="${KDUMP_SAVEDIR}${kdump_URL[i]}" ++ cp /etc/hosts "${dest}/etc" ++ grep '^hosts:' /etc/nsswitch.conf > "${dest}/etc/nsswitch.conf" + fi + + # diff --git a/kdump.changes b/kdump.changes index 3d4df3b..18b39db 100644 --- a/kdump.changes +++ b/kdump.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Fri Feb 9 17:46:06 UTC 2018 - ptesarik@suse.com + +- kdump-nsswitch.conf-filtering.patch + +------------------------------------------------------------------- +Fri Feb 9 17:44:42 UTC 2018 - ptesarik@suse.com + +- kdump-fix-missing-index-of-kdump_Host.patch: Fix missing index of + kdump_Host (bsc#1002617). + ------------------------------------------------------------------- Fri Feb 9 16:09:48 UTC 2018 - ptesarik@suse.com diff --git a/kdump.spec b/kdump.spec index a3618df..07b28ba 100644 --- a/kdump.spec +++ b/kdump.spec @@ -83,6 +83,8 @@ Patch33: %{name}-calibrate-adjust-sizeof-struct-page.patch Patch34: %{name}-calibrate-update-kernel-text-data-size.patch Patch35: %{name}-calibrate-update-user-space-requirements.patch Patch36: %{name}-bail-out-if-no-default-interface.patch +Patch37: %{name}-fix-missing-index-of-kdump_Host.patch +Patch38: %{name}-nsswitch.conf-filtering.patch BuildRequires: asciidoc BuildRequires: cmake BuildRequires: gcc-c++ @@ -181,6 +183,8 @@ cp %{S:1} tests/data/ %patch34 -p1 %patch35 -p1 %patch36 -p1 +%patch37 -p1 +%patch38 -p1 %build export CFLAGS="%{optflags}"