Hello community,

here is the log from the commit of package kdump for openSUSE:Factory checked 
in at 2017-06-20 10:58:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kdump (Old)
 and      /work/SRC/openSUSE:Factory/.kdump.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kdump"

Tue Jun 20 10:58:21 2017 rev:88 rq:503694 version:0.8.16

Changes:
--------
--- /work/SRC/openSUSE:Factory/kdump/kdump.changes      2017-05-20 
10:11:33.453734485 +0200
+++ /work/SRC/openSUSE:Factory/.kdump.new/kdump.changes 2017-06-20 
10:59:20.308487979 +0200
@@ -1,0 +2,27 @@
+Wed Jun 14 12:48:34 UTC 2017 - [email protected]
+
+- kdump-Routable-preferred-source-address.patch: Routable: parse
+  and store preferred source address (FATE#321844).
+- kdump-URLTransfer-complete-target.patch: Use the complete target
+  URL for URLTransfer (FATE#321844).
+- kdump-prepend-IP-address.patch: Prepend IP address to remote
+  target subdirectory (FATE#321844).
+
+-------------------------------------------------------------------
+Thu Jun  8 15:02:09 UTC 2017 - [email protected]
+
+- kdump-fix-service-files.patch: Fix kdump-related services
+  (bsc#1021484).
+
+-------------------------------------------------------------------
+Thu Jun  8 13:10:41 UTC 2017 - [email protected]
+
+- kernel-ELF-aarch64: Test data for aarch64 findkernel.
+- kdump-KDUMP_SSH_IDENTITY.patch: Update with later upstream fixes.
+
+-------------------------------------------------------------------
+Wed Jun  7 11:43:46 UTC 2017 - [email protected]
+
+- kdump-aarch64.patch: kdumptool: add aarch64 (bsc#1033464).
+
+-------------------------------------------------------------------

New:
----
  kdump-Routable-preferred-source-address.patch
  kdump-URLTransfer-complete-target.patch
  kdump-aarch64.patch
  kdump-fix-service-files.patch
  kdump-prepend-IP-address.patch
  kernel-ELF-aarch64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kdump.spec ++++++
--- /var/tmp/diff_new_pack.eK984C/_old  2017-06-20 10:59:20.932400035 +0200
+++ /var/tmp/diff_new_pack.eK984C/_new  2017-06-20 10:59:20.940398908 +0200
@@ -40,6 +40,7 @@
 Group:          System/Kernel
 Url:            https://github.com/ptesarik/kdump
 Source:         %{name}-%{version}.tar.bz2
+Source1:        kernel-ELF-aarch64
 Source2:        %{name}-rpmlintrc
 Patch1:         %{name}-cmake-compat.patch
 Patch2:         %{name}-KDUMP_SSH_IDENTITY.patch
@@ -49,6 +50,11 @@
 Patch6:         %{name}-pre-generate-mount-units.patch
 Patch7:         %{name}-bind-mount-sysroot.patch
 Patch8:         %{name}-x86_64-kexec-file-syscall.patch
+Patch9:         %{name}-aarch64.patch
+Patch10:        %{name}-fix-service-files.patch
+Patch11:        %{name}-Routable-preferred-source-address.patch
+Patch12:        %{name}-URLTransfer-complete-target.patch
+Patch13:        %{name}-prepend-IP-address.patch
 BuildRequires:  asciidoc
 BuildRequires:  cmake
 BuildRequires:  gcc-c++
@@ -116,6 +122,12 @@
 %patch6 -p1
 %patch7 -p1
 %patch8 -p1
+%patch9 -p1
+cp %{S:1} tests/data/
+%patch10 -p1
+%patch11 -p1
+%patch12 -p1
+%patch13 -p1
 
 %build
 export CFLAGS="%{optflags}"
@@ -151,14 +163,14 @@
 ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rckdump
 %else
 rm %{buildroot}/usr/lib/systemd/system/kdump.service
-rm %{buildroot}/usr/lib/systemd/system/kdump-rebuild-initrd.service
+rm %{buildroot}/usr/lib/systemd/system/kdump-early.service
 ln -s ../..%{_initddir}/boot.kdump %{buildroot}%{_sbindir}/rckdump
 %endif
 
 %if %{systemd_present}
 %pre
 %service_add_pre kdump.service
-%service_add_pre kdump-rebuild-initrd.service
+%service_add_pre kdump-early.service
 %endif
 
 %post
@@ -171,7 +183,7 @@
 %if %{systemd_present}
 %{fillup_only -n kdump}
 %service_add_post kdump.service
-%service_add_post kdump-rebuild-initrd.service
+%service_add_post kdump-early.service
 %else
 %{fillup_and_insserv -n kdump boot.kdump}
 %endif
@@ -188,7 +200,7 @@
 echo "Stopping kdump ..."
 %if %{systemd_present}
 %service_del_preun kdump.service
-%service_del_preun kdump-rebuild-initrd.service
+%service_del_preun kdump-early.service
 %else
 %stop_on_removal boot.kdump
 %endif
@@ -200,7 +212,7 @@
 rm /var/log/dump >/dev/null 2>&1 || true
 %if %{systemd_present}
 %service_del_postun kdump.service
-%service_del_postun kdump-rebuild-initrd.service
+%service_del_postun kdump-early.service
 %else
 %restart_on_update boot.kdump
 %insserv_cleanup
@@ -230,7 +242,7 @@
 %{_udevrulesdir}/70-kdump.rules
 %if %{systemd_present}
 %{_unitdir}/kdump.service
-%{_unitdir}/kdump-rebuild-initrd.service
+%{_unitdir}/kdump-early.service
 %else
 %{_sysconfdir}/init.d/boot.kdump
 %endif

++++++ kdump-KDUMP_SSH_IDENTITY.patch ++++++
--- /var/tmp/diff_new_pack.eK984C/_old  2017-06-20 10:59:20.980393270 +0200
+++ /var/tmp/diff_new_pack.eK984C/_new  2017-06-20 10:59:20.980393270 +0200
@@ -3,6 +3,8 @@
 Subject: Add KDUMP_SSH_IDENTITY config option
 References: FATE#321583
 Git-commit: 3e7e5f020024eed5c6d944e0ff9554772cbdb896
+Git-commit: d7e6f45461bf0f899cfedf564d985cf5cd41f331
+Git-commit: f0a43757c99635ece304fc9c011c0b82acd86f64
 Upstream: v0.8.17
 
 Make the SSH private file configurable.
@@ -10,14 +12,14 @@
 Signed-off-by: Petr Tesarik <[email protected]>
 
 ---
- doc/man/kdump.5.txt.in     |    9 +++++++++
- init/setup-kdump.functions |   37 ++++++++++++++++++++++++++-----------
+ doc/man/kdump.5.txt.in     |   10 ++++++++++
+ init/setup-kdump.functions |   39 ++++++++++++++++++++++++++++-----------
  kdumptool/define_opt.h     |    1 +
- 3 files changed, 36 insertions(+), 11 deletions(-)
+ 3 files changed, 39 insertions(+), 11 deletions(-)
 
 --- a/doc/man/kdump.5.txt.in
 +++ b/doc/man/kdump.5.txt.in
-@@ -643,7 +643,16 @@ Example (broken into lines for readabili
+@@ -643,7 +643,17 @@ Example (broken into lines for readabili
  
  Default: ""
  
@@ -26,7 +28,8 @@
  
 +List of SSH identity files for public key authentication. If empty, kdump
 +will try all standard OpenSSH identities for the 'root' user (rsa, dsa,
-+ecdsa, ed25519, in this order).
++ecdsa, ed25519, in this order). The path to every identity file is relative
++to +~root/.ssh+, or an absolute path can be given.
 +
 +Example: "/root/.ssh/id_kdump_rsa"
 +
@@ -36,7 +39,7 @@
  ----------
 --- a/init/setup-kdump.functions
 +++ b/init/setup-kdump.functions
-@@ -935,6 +935,27 @@ function kdump_modify_multipath()
+@@ -935,6 +935,29 @@ function kdump_modify_multipath()
  }                                                                        # }}}
  
  #
@@ -45,18 +48,20 @@
 +#   1) dest: root of the temporary area
 +function kdump_copy_ssh_ident()                                               
   # {{{
 +{
-+    local dest="$1"
-+    local ssh_conf="$dest/kdump/.ssh/config"
++    local sshdir="$1/kdump/.ssh"
++    local ssh_conf="$sshdir/config"
 +    local f
 +
 +    shift
 +    for f in "$@"; do
++      test "${f:0:1}" = "/" || f=~root/".ssh/$f"
 +      test -f "$f" || continue
 +
-+        cp "$f" "${dest}/kdump/.ssh/"
-+      test -f "${f}.pub" && cp "${f}.pub" "${dest}/kdump/.ssh/"
-+      test -f "${f}-cert.pub" && cp "${f}-cert.pub" "${dest}/kdump/.ssh/"
-+      echo "IdentityFile ${f}" >> "$ssh_conf"
++      cp "$f" "$sshdir/"
++      test -f "${f}.pub" && cp "${f}.pub" "$sshdir/"
++      test -f "${f}-cert.pub" && cp "${f}-cert.pub" "$sshdir/"
++      f=$( basename $f )
++      echo "IdentityFile /kdump/.ssh/${f}" >> "$ssh_conf"
 +    done
 +}                                                                        # }}}
 +
@@ -64,7 +69,7 @@
  # Copy SSH keys and create a config file in the target
  # Parameters:
  #   1) dest: root of the temporary area
-@@ -952,17 +973,11 @@ function kdump_init_ssh()                                
                   # {{{
+@@ -952,17 +975,11 @@ function kdump_init_ssh()                                
                   # {{{
      echo "StrictHostKeyChecking yes" >> "$ssh_conf"
      echo "UserKnownHostsFile /kdump/.ssh/known_hosts" >> "$ssh_conf"
  
@@ -82,7 +87,7 @@
 +    if [ -n "$KDUMP_SSH_IDENTITY" ] ; then
 +      kdump_copy_ssh_ident "$dest" $KDUMP_SSH_IDENTITY
 +    else
-+      kdump_copy_ssh_ident "$dest" /root/.ssh/id_{rsa,dsa,ecdsa,ed25519}
++      kdump_copy_ssh_ident "$dest" id_{rsa,dsa,ecdsa,ed25519}
 +    fi
  }                                                                        # }}}
  

++++++ kdump-Routable-preferred-source-address.patch ++++++
Date: Fri Jun 9 16:46:10 2017 +0200
From: Petr Tesarik <[email protected]>
Subject: Routable: parse and store preferred source address
References: FATE#321844
Upstream: v0.8.17
Git-commit: 3748faebf9834eae0a0676800984ebccd7d3cab9

This is the preferred source address, used by the kernel for outgoing
connections when no other address is explicitly set.

Signed-off-by: Petr Tesarik <[email protected]>

diff --git a/kdumptool/routable.cc b/kdumptool/routable.cc
index d9833f6..6137f89 100644
--- a/kdumptool/routable.cc
+++ b/kdumptool/routable.cc
@@ -58,6 +58,10 @@ class NetLink {
 
        int waitRouteChange(void);
 
+        const char *prefSrc(void) const
+        throw ()
+        { return m_prefsrc; }
+
     protected:
        class RecvCheck {
            public:
@@ -89,6 +93,8 @@ class NetLink {
        throw ()
        { return m_message; }
 
+        int parseAttrs(const struct rtattr *rta, size_t len);
+
     private:
        int m_timeout;
 
@@ -99,13 +105,16 @@ class NetLink {
        size_t m_buflen;
        unsigned char *m_buffer;
        struct nlmsghdr *m_message;
+
+        int m_family;
+        char m_prefsrc[INET6_ADDRSTRLEN];
 };
 
 unsigned NetLink::m_seq;
 
 // 
-----------------------------------------------------------------------------
 NetLink::NetLink(unsigned subscribe, size_t recv_max)
-    : m_timeout(-1), m_buflen(recv_max)
+    : m_timeout(-1), m_buflen(recv_max), m_family(AF_UNSPEC)
 {
     struct sockaddr_nl sa;
     socklen_t salen;
@@ -126,6 +135,8 @@ NetLink::NetLink(unsigned subscribe, size_t recv_max)
        throw KSystemError("Cannot get local netlink address", errno);
     if (salen != sizeof m_local || m_local.nl_family != AF_NETLINK)
        throw KError("Invalid local netlink address");
+
+    m_prefsrc[0] = '\0';
 }
 
 // 
-----------------------------------------------------------------------------
@@ -354,7 +365,8 @@ int NetLink::checkRoute(const struct addrinfo *ai)
     case RTN_BROADCAST:
     case RTN_ANYCAST:
     case RTN_MULTICAST:
-       return 0;
+        m_family = rt->rtm_family;
+        return parseAttrs(RTM_RTA(rt), RTM_PAYLOAD(nh));
     case RTN_UNREACHABLE:
        return -EHOSTUNREACH;
     case RTN_BLACKHOLE:
@@ -368,6 +380,49 @@ int NetLink::checkRoute(const struct addrinfo *ai)
     }
 }
 
+// 
-----------------------------------------------------------------------------
+int NetLink::parseAttrs(const struct rtattr *rta, size_t len)
+{
+    while (RTA_OK(rta, len)) {
+        void *data = RTA_DATA(rta);
+        size_t dlen = RTA_PAYLOAD(rta);
+        int res;
+
+        switch (rta->rta_type) {
+        case RTA_PREFSRC:
+            if (m_family == AF_INET &&
+                dlen == sizeof(struct in_addr)) {
+                struct sockaddr_in saddr;
+                memset(&saddr, 0, sizeof saddr);
+                saddr.sin_family = AF_INET;
+                saddr.sin_addr = *(struct in_addr *)data;
+                res = getnameinfo((struct sockaddr*)&saddr, sizeof saddr,
+                                  m_prefsrc, sizeof m_prefsrc,
+                                  NULL, 0, NI_NUMERICHOST);
+            } else if (m_family == AF_INET6 &&
+                       dlen == sizeof(struct in6_addr)) {
+                struct sockaddr_in6 saddr;
+                memset(&saddr, 0, sizeof saddr);
+                saddr.sin6_family = AF_INET6;
+                saddr.sin6_addr = *(struct in6_addr *)data;
+                res = getnameinfo((struct sockaddr*)&saddr, sizeof saddr,
+                                  m_prefsrc, sizeof m_prefsrc,
+                                  NULL, 0, NI_NUMERICHOST);
+            } else
+                res = EAI_FAMILY;
+            if (res)
+                throw KGaiError("Cannot parse preferred source address", res);
+
+            break;
+        }
+        rta = RTA_NEXT(rta, len);
+    }
+    if (len)
+        throw KError("Netlink rtattr truncated");
+
+    return 0;
+}
+
 //}}}
 
 //{{{ Routable 
-----------------------------------------------------------------
@@ -388,8 +443,11 @@ bool Routable::hasRoute(void)
     Debug::debug()->trace("hasRoute(%s)", m_host.c_str());
 
     for (p = m_ai; p; p = p->ai_next) {
-       if (nl.checkRoute(p) == 0)
+        if (nl.checkRoute(p) == 0) {
+            Debug::debug()->dbg("m_prefsrc='%s'", nl.prefSrc());
+            m_prefsrc.assign(nl.prefSrc());
            return true;
+        }
     }
 
     return false;
diff --git a/kdumptool/routable.h b/kdumptool/routable.h
index cdfffaf..0763131 100644
--- a/kdumptool/routable.h
+++ b/kdumptool/routable.h
@@ -42,6 +42,10 @@ class Routable {
 
        bool check(int timeout);
 
+        const std::string& prefsrc(void) const
+        throw ()
+        { return m_prefsrc; }
+
     protected:
        bool resolve(void)
        throw (KError);
@@ -51,6 +55,7 @@ class Routable {
     private:
        int m_nlfd;
        std::string m_host;
+        std::string m_prefsrc;
        struct addrinfo *m_ai;
 };
 
++++++ kdump-URLTransfer-complete-target.patch ++++++
++++ 617 lines (skipped)

++++++ kdump-aarch64.patch ++++++
From: Matthias Brugger <[email protected]>
Date: Mon May 8 13:58:38 2017 +0200
Subject: kdumptool: add aarch64
References: bsc#1033464
Upstream: v0.8.17
Git-commit: 914c79f493c858e7ab2c07248c17f23f9195daa3
Git-commit: f43e30a71f294020817f0c4f35ea96931ea9ab93
Git-commit: e6afa41112b5ab4a961a595841f3d6b6751f99b4
Git-commit: a885ddf80fb2c6c2490f2550338042581bca6150
 
Add support for Aarch64.

Signed-off-by: Matthias Brugger <[email protected]>
Acked-by: Petr Tesarik <[email protected]>

---
 kdumptool/identifykernel.cc |    3 ++
 kdumptool/kerneltool.cc     |   47 +++++++++++++++++++++++++++++++++++++++++++-
 kdumptool/kerneltool.h      |    9 ++++++++
 kdumptool/savedump.cc       |    7 ++++++
 tests/identify_kernel.sh    |    5 +++-
 5 files changed, 69 insertions(+), 2 deletions(-)

--- a/kdumptool/kerneltool.cc
+++ b/kdumptool/kerneltool.cc
@@ -130,6 +130,8 @@ list<string> KernelTool::imageNames(cons
         ret.push_back("vmlinuz");
     } else if (arch == "s390x") {
         ret.push_back("image");
+    } else if (arch == "aarch64") {
+        ret.push_back("Image");
     } else {
         ret.push_back("vmlinux");
     }
@@ -181,6 +183,11 @@ KernelTool::KernelType KernelTool::getKe
             return KT_S390;
         else
             return KT_NONE;
+    } else if (Util::getArch() == "aarch64") {
+        if (isAarch64Kernel())
+            return KT_AARCH64;
+        else
+            return KT_NONE;
     } else      
         return KT_NONE;
 }
@@ -201,6 +208,9 @@ bool KernelTool::isRelocatable() const
         case KernelTool::KT_S390:
             return true;
 
+        case KernelTool::KT_AARCH64:
+            return true;
+
         default:
             throw KError("Invalid kernel type.");
             break;
@@ -257,6 +267,39 @@ bool KernelTool::isS390Kernel() const
 }
 
 // 
-----------------------------------------------------------------------------
+bool KernelTool::isAarch64Kernel() const
+    throw (KError)
+{
+    struct {
+        uint32_t code0;         /* Executable code */
+        uint32_t code1;         /* Executable code */
+        uint64_t text_offset;   /* Image load offset, little endian */
+        uint64_t image_size;    /* Effective Image size, little endian */
+        uint64_t flags;         /* kernel flags, little endian */
+        uint64_t res2;          /* reserved */
+        uint64_t res3;          /* reserved */
+        uint64_t res4;          /* reserved */
+        uint32_t magic;         /* Magic number, little endian, "ARM\x64" */
+        uint32_t res5;          /* reserved (used for PE COFF offset) */
+    } buffer;
+
+    /* check the magic number */
+    if (lseek(m_fd, 0, SEEK_SET) == (off_t)-1) {
+        throw KSystemError("IdentifyKernel::isAarch64Kernel: lseek to "
+            "file start failed", errno);
+    }
+
+    int ret = read(m_fd, &buffer, sizeof(buffer));
+    if (ret < 0) {
+        throw KSystemError("IdentifyKernel::isAarch64Kernel: read of magic "
+            "start failed", errno);
+    } else if (ret < (int)sizeof(buffer))
+        return false;
+
+    return buffer.magic == 0x644d5241; /* little endian "ARM\x64" */
+}
+
+// 
-----------------------------------------------------------------------------
 bool KernelTool::x86isRelocatable() const
     throw (KError)
 {
@@ -390,7 +433,7 @@ bool KernelTool::elfIsRelocatable() cons
 bool KernelTool::isArchAlwaysRelocatable(const string &machine) const
     throw ()
 {
-    return machine == "ia64";
+    return machine == "ia64" || machine == "aarch64";
 }
 
 // 
-----------------------------------------------------------------------------
@@ -426,6 +469,7 @@ string KernelTool::archFromElfMachine(un
         case EM_S390:   return "s390";
         case EM_IA_64:  return "ia64";
         case EM_X86_64: return "x86_64";
+        case EM_AARCH64: return "aarch64";
         default:        return "unknown";
     }
 }
@@ -681,6 +725,7 @@ string KernelTool::extractKernelConfig()
         case KernelTool::KT_ELF:
         case KernelTool::KT_ELF_GZ:
         case KernelTool::KT_S390:
+        case KernelTool::KT_AARCH64:
             return extractKernelConfigELF();
 
         case KernelTool::KT_X86:
--- a/tests/identify_kernel.sh
+++ b/tests/identify_kernel.sh
@@ -28,18 +28,21 @@ KERNEL_IMAGES=("kernel-bzImage-x86_64"
                "kernel-ELFgz-ia64"
                "kernel-ELF-ia64"
                "kernel-ELF-ppc64"
+               "kernel-ELF-aarch64"
                )
 RELOCATABLE=(  1
                0
                0
                1
                1
-               0 )
+               0
+               1 )
 TYPE=(         "x86"
                "ELF gzip"
                "ELF"
                "ELF gzip"
                "ELF"
+               "ELF"
                "ELF" )
 
                                                                            # 
}}}
--- a/kdumptool/savedump.cc
+++ b/kdumptool/savedump.cc
@@ -563,6 +563,13 @@ string SaveDump::findKernel()
     if (binaryroot.exists())
         return binary;
 
+    // 5: Image
+    (binary = "/boot").appendPath("Image-" + m_crashrelease);
+    (binaryroot = m_rootdir).appendPath(binary);
+    Debug::debug()->dbg("Trying %s", binaryroot.c_str());
+    if (binaryroot.exists())
+        return binary;
+
     FilePath fp = m_rootdir;
     fp.appendPath("/boot");
     throw KError("No kernel image found in " + fp);
--- a/kdumptool/identifykernel.cc
+++ b/kdumptool/identifykernel.cc
@@ -91,6 +91,9 @@ void IdentifyKernel::execute()
             case KernelTool::KT_S390:
                 cout << "S390" << endl;
                 break;
+            case KernelTool::KT_AARCH64:
+                cout << "Aarch64" << endl;
+                break;
             default:
                 throw KError("The specified file is not a kernel image.");
         }
--- a/kdumptool/kerneltool.h
+++ b/kdumptool/kerneltool.h
@@ -42,6 +42,7 @@ class KernelTool {
             KT_ELF_GZ,
             KT_X86,
             KT_S390,
+            KT_AARCH64,
             KT_NONE
         };
 
@@ -207,6 +208,14 @@ class KernelTool {
         throw (KError);
 
         /**
+         * Checks if the kernel is an Aarch64 kernel image.
+         *
+         * @return @c true if it's an Aarch64 kernel image, @c false otherwise.
+         */
+        bool isAarch64Kernel() const
+        throw (KError);
+
+        /**
          * Returns the architecture as string from the ELF machine type.
          *
          * @param[in] et_machine the ELF machine type such as EM_386
++++++ kdump-fix-service-files.patch ++++++
From: Michal Koutny <[email protected]>
Date: Wed Jun 7 15:16:05 2017 +0200
Subject: Fix kdump-related services
References: bsc#1021484
Upstreams: v0.8.17
Git-commit: 168b7bfeb992594df08c7e4020ac34f1d9a825bb

kdump.service should be the "big switch" to turn kdump on and off. We
can achieve this by adding an Also= directive.

kdump-early.service is merely a way to load a kdump kernel a early
during the boot process if and only if the kdumprd already exists (e.g.
from a previous boot). There may be some use cases for enabling only
the early service without kdump.service.

OTOH, it is not an error if the initrd is not found during the early
stages. This is indicated by exit code 6 (originally conforming to LSB
"program not configured" exit code).

Signed-off-by: Michal Koutny <[email protected]>
Acked-by: Petr Tesarik <[email protected]>

---
 init/CMakeLists.txt               |    2 +-
 init/kdump-early.service          |   14 ++++++++++++++
 init/kdump-rebuild-initrd.service |   12 ------------
 init/kdump.service                |    8 ++++----
 4 files changed, 19 insertions(+), 17 deletions(-)

--- a/init/kdump.service
+++ b/init/kdump.service
@@ -1,13 +1,13 @@
 [Unit]
-Description=Load kdump kernel on startup
-After=local-fs.target
-Wants=kdump-rebuild-initrd.service
+Description=Load kdump kernel and initrd
+After=local-fs.target network.service YaST2-Second-Stage.service 
YaST2-Firstboot.service
 
 [Service]
 Type=oneshot
-ExecStart=/lib/kdump/load.sh
+ExecStart=/lib/kdump/load.sh --update
 ExecStop=/lib/kdump/unload.sh
 RemainAfterExit=true
 
 [Install]
 WantedBy=multi-user.target
+Also=kdump-early.service
--- /dev/null
+++ b/init/kdump-early.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Load kdump kernel early on startup
+After=local-fs.target
+
+[Service]
+Type=oneshot
+ExecStart=/lib/kdump/load.sh
+ExecStop=/lib/kdump/unload.sh
+RemainAfterExit=true
+# It is OK if the initrd is missing in this early attempt
+SuccessExitStatus=6
+
+[Install]
+WantedBy=multi-user.target
--- a/init/kdump-rebuild-initrd.service
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=Reload kdump kernel and updated initrd after the network is 
configured
-After=local-fs.target network.service YaST2-Second-Stage.service 
YaST2-Firstboot.service
-
-[Service]
-Type=oneshot
-ExecStart=/lib/kdump/load.sh --update
-ExecStop=/lib/kdump/unload.sh
-RemainAfterExit=true
-
-[Install]
-WantedBy=multi-user.target
--- a/init/CMakeLists.txt
+++ b/init/CMakeLists.txt
@@ -39,7 +39,7 @@ INSTALL(
 INSTALL(
     FILES
         ${CMAKE_CURRENT_SOURCE_DIR}/kdump.service
-        ${CMAKE_CURRENT_SOURCE_DIR}/kdump-rebuild-initrd.service
+        ${CMAKE_CURRENT_SOURCE_DIR}/kdump-early.service
     DESTINATION
         /usr/lib/systemd/system
     PERMISSIONS
++++++ kdump-prepend-IP-address.patch ++++++
Date: Wed Jun 14 14:39:15 2017 +0200
From: Petr Tesarik <[email protected]>
Subject: Prepend IP address to remote target subdirectory
References: FATE#321844
Upstream: v0.8.17
Git-commit: d8f0f0cb4450776b0765ddb0441a5d5669a78062

Check the target route directly from save_dump and take the preferred
source IP address into the subdirectory name.

Signed-off-by: Petr Tesarik <[email protected]>

diff --git a/kdumptool/savedump.cc b/kdumptool/savedump.cc
index 9938b6f..14e66b3 100644
--- a/kdumptool/savedump.cc
+++ b/kdumptool/savedump.cc
@@ -40,6 +40,7 @@
 #include "vmcoreinfo.h"
 #include "identifykernel.h"
 #include "email.h"
+#include "routable.h"
 
 using std::string;
 using std::list;
@@ -114,8 +115,17 @@ void SaveDump::execute()
     std::istringstream iss(config->KDUMP_SAVEDIR.value());
     FilePath elem;
     while (iss >> elem) {
-        RootDirURL url(elem.appendPath(subdir), m_rootdir);
-        urlv.push_back(url);
+        RootDirURL url(elem, m_rootdir);
+        if (url.getProtocol() != URLParser::PROT_FILE) {
+            Routable rt(url.getHostname());
+            if (!rt.check(config->KDUMP_NET_TIMEOUT.value())) {
+                cerr << "WARNING: Dump target not reachable" << endl;
+                elem.appendPath(string("unknown-") + subdir);
+            } else
+                elem.appendPath(rt.prefsrc() + '-' + subdir);
+        } else
+            elem.appendPath(subdir);
+        urlv.push_back(RootDirURL(elem, m_rootdir));
     }
 
     m_transfer = getTransfer(urlv);

Reply via email to