Hello community,

here is the log from the commit of package kdumpid for openSUSE:Factory checked 
in at 2016-02-03 10:19:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kdumpid (Old)
 and      /work/SRC/openSUSE:Factory/.kdumpid.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kdumpid"

Changes:
--------
--- /work/SRC/openSUSE:Factory/kdumpid/kdumpid.changes  2014-11-05 
15:55:11.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.kdumpid.new/kdumpid.changes     2016-02-03 
10:19:51.000000000 +0100
@@ -1,0 +2,12 @@
+Mon Feb  1 14:06:18 UTC 2016 - [email protected]
+
+- Update to version 1.1:
+  * Support for libkdumpfile-0.2.0 
+- Patches moved to upstream:
+  * kdumpid-libkdumpfile-libs.patch
+  * kdumpid-x86_64-fix-NULL-arch-segv.patch
+  * kdumpid-quit-on-libkdumpfile-failure.patch
+  * kdumpid-fix-kdump_is_xen.patch
+  * kdumpid-x86-out-of-bounds-disas.patch
+
+-------------------------------------------------------------------

Old:
----
  kdumpid-1.0.tar.bz2
  kdumpid-fix-kdump_is_xen.patch
  kdumpid-libkdumpfile-libs.patch
  kdumpid-quit-on-libkdumpfile-failure.patch
  kdumpid-x86-out-of-bounds-disas.patch
  kdumpid-x86_64-fix-NULL-arch-segv.patch

New:
----
  kdumpid-1.1.tar.bz2

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

Other differences:
------------------
++++++ kdumpid.spec ++++++
--- /var/tmp/diff_new_pack.BtcrcG/_old  2016-02-03 10:19:52.000000000 +0100
+++ /var/tmp/diff_new_pack.BtcrcG/_new  2016-02-03 10:19:52.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package kdumpid
 #
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -26,7 +26,7 @@
 BuildRequires:  binutils-devel
 %endif
 BuildRequires:  libkdumpfile-devel
-Version:        1.0
+Version:        1.1
 Release:        0
 Summary:        Utility to extract information from vmcores
 License:        GPL-2.0+
@@ -34,11 +34,6 @@
 Url:            http://sourceforge.net/p/kdumpid
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Source:         %{name}-%{version}.tar.bz2
-Patch1:         %{name}-libkdumpfile-libs.patch
-Patch2:         %{name}-x86_64-fix-NULL-arch-segv.patch
-Patch3:         %{name}-quit-on-libkdumpfile-failure.patch
-Patch4:         %{name}-x86-out-of-bounds-disas.patch
-Patch5:         %{name}-fix-kdump_is_xen.patch
 
 %description
 Kdumpid extracts information such as type of dump, architecture
@@ -47,11 +42,6 @@
 
 %prep
 %setup
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
 
 %build
 make CUSTOM_CFLAGS="${CFLAGS:-%optflags}"

++++++ kdumpid-1.0.tar.bz2 -> kdumpid-1.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdumpid-1.0/Makefile new/kdumpid-1.1/Makefile
--- old/kdumpid-1.0/Makefile    2014-11-03 09:57:23.000000000 +0100
+++ new/kdumpid-1.1/Makefile    2016-02-01 15:01:04.000000000 +0100
@@ -11,7 +11,7 @@
 endif
 
 CUSTOM_CFLAGS=
-LIBS += -lkdumpfile -lz -llzo2 -lsnappy -lopcodes -lbfd -liberty -ldl
+LIBS += -lkdumpfile -lz -lopcodes -lbfd -liberty -ldl
 
 LD=ld
 
@@ -20,7 +20,7 @@
 ### CONFIGURATION END
 
 VER_MAJOR=1
-VER_MINOR=0
+VER_MINOR=1
 
 CFLAGS=-DVER_MAJOR=$(VER_MAJOR) -DVER_MINOR=$(VER_MINOR)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdumpid-1.0/kdumpid.h new/kdumpid-1.1/kdumpid.h
--- old/kdumpid-1.0/kdumpid.h   2014-11-03 09:57:23.000000000 +0100
+++ new/kdumpid-1.1/kdumpid.h   2016-02-01 15:01:04.000000000 +0100
@@ -60,6 +60,14 @@
 
 /* utils */
 
+#ifdef KDUMPFILE_VER_MAJOR
+static inline int
+kdump_is_xen(kdump_ctx *ctx)
+{
+       return kdump_xen_type(ctx) != kdump_xen_none;
+}
+#endif
+
 int get_version_from_banner(struct dump_desc *dd);
 int need_explore(struct dump_desc *dd);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdumpid-1.0/main.c new/kdumpid-1.1/main.c
--- old/kdumpid-1.0/main.c      2014-11-03 09:57:23.000000000 +0100
+++ new/kdumpid-1.1/main.c      2016-02-01 15:01:04.000000000 +0100
@@ -26,6 +26,49 @@
 
 #include "kdumpid.h"
 
+/* Compatibility with ancient versions */
+#ifndef KDUMPFILE_VER_MAJOR
+static void
+print_xen_info(kdump_ctx *ctx)
+{
+       if (kdump_is_xen(ctx)) {
+               kdump_xen_version_t ver;
+               kdump_xen_version(ctx, &ver);
+               printf("Xen: %ld.%ld%s\n",
+                      ver.major, ver.minor, ver.extra ?: "");
+       }
+}
+
+#else
+
+static void
+print_xen_info(kdump_ctx *ctx)
+{
+       if (kdump_xen_type(ctx) != kdump_xen_none) {
+               struct kdump_attr attr;
+               kdump_status status;
+
+               fputs("Xen: ", stdout);
+               status = kdump_get_attr(ctx, "xen.version.major", &attr);
+               if (status == kdump_ok)
+                       printf("%ld.", attr.val.number);
+               else
+                       fputs("?.", stdout);
+
+               status = kdump_get_attr(ctx, "xen.version.minor", &attr);
+               if (status == kdump_ok)
+                       printf("%ld", attr.val.number);
+               else
+                       fputs("?", stdout);
+
+               status = kdump_get_attr(ctx, "xen.version.extra", &attr);
+               if (status == kdump_ok)
+                       puts(attr.val.string);
+       }
+}
+
+#endif
+
 static void
 version(FILE *out, const char *progname)
 {
@@ -118,11 +161,13 @@
                        status == kdump_syserr
                        ? strerror(errno)
                        : "libkdumpfile failure");
+               close(dd.fd);
+               return 2;
        }
 
        dd.page_size = kdump_pagesize(dd.ctx);
-       strcpy(dd.ver, kdump_release(dd.ctx));
-       strcpy(dd.machine, kdump_machine(dd.ctx));
+       strcpy(dd.ver, kdump_release(dd.ctx) ?: "");
+       strcpy(dd.machine, kdump_machine(dd.ctx) ?: "");
        dd.arch = kdump_arch_name(dd.ctx);
 
        if (need_explore(&dd))
@@ -135,12 +180,7 @@
               kdump_is_xen(dd.ctx) ? ", Xen" : "");
        printf("Arch: %s\n", dd.arch);
        printf("Version: %s\n", dd.ver);
-       if (kdump_is_xen(dd.ctx)) {
-               kdump_xen_version_t ver;
-               kdump_xen_version(dd.ctx, &ver);
-               printf("Xen: %ld.%ld%s\n",
-                      ver.major, ver.minor, ver.extra ?: "");
-       }
+       print_xen_info(dd.ctx);
 
        if (dd.flags & DIF_VERBOSE)
                print_verbose(&dd);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdumpid-1.0/util.c new/kdumpid-1.1/util.c
--- old/kdumpid-1.0/util.c      2014-11-03 09:57:23.000000000 +0100
+++ new/kdumpid-1.1/util.c      2016-02-01 15:01:04.000000000 +0100
@@ -135,15 +135,24 @@
 int read_page(struct dump_desc *dd, unsigned long pfn)
 {
        size_t rd = dd->page_size;
+#ifndef KDUMPFILE_VER_MAJOR
        return kdump_readp(dd->ctx, pfn * dd->page_size, dd->page, &rd,
                           KDUMP_PHYSADDR);
+#else
+       return kdump_readp(dd->ctx, KDUMP_KPHYSADDR, pfn * dd->page_size,
+                          dd->page, &rd);
+#endif
 }
 
 size_t
 dump_cpin(struct dump_desc *dd, void *buf, uint64_t paddr, size_t len)
 {
        ssize_t rd;
+#ifndef KDUMPFILE_VER_MAJOR
        rd = kdump_read(dd->ctx, paddr, buf, len, KDUMP_PHYSADDR);
+#else
+       rd = kdump_read(dd->ctx, KDUMP_KPHYSADDR, paddr, buf, len);
+#endif
        if (rd <= 0)
                return len;
        return len - rd;
@@ -228,7 +237,7 @@
        if (arch_in_array(dd->arch, x86_biarch)) {
                /* Xen pv kernels are loaded low */
                addr = 0x2000;
-               if (dd->flags & kdump_is_xen(dd->ctx) &&
+               if (kdump_is_xen(dd->ctx) &&
                    looks_like_kcode_x86(dd, addr) > 0 &&
                    !fn(dd, addr, addr + MAX_KERNEL_SIZE, x86_biarch)) {
                        dd->start_addr = addr;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdumpid-1.0/x86.c new/kdumpid-1.1/x86.c
--- old/kdumpid-1.0/x86.c       2014-11-03 09:57:23.000000000 +0100
+++ new/kdumpid-1.1/x86.c       2016-02-01 15:01:04.000000000 +0100
@@ -171,7 +171,7 @@
                        int cont = strncmp(insn, "jmp", 3);
 
                        a -= info->buffer_vma;
-                       if (a < info->buffer_vma + dd->page_size) {
+                       if (a < dd->page_size) {
                                priv->initstate = state;
                                ++priv->initstate.depth;
                                if (disas_at(dd, info, a) > 0)
@@ -218,7 +218,7 @@
                                return 1;
                        if (is_reg(arg1, "si")) {
                                state.flags |= SI_STORED;
-                               if (dd->flags & kdump_is_xen(dd->ctx) &&
+                               if (kdump_is_xen(dd->ctx) &&
                                    !(state.flags & SI_MODIFIED) &&
                                    sscanf(arg2, "0x%llx", &a) == 1)
                                        dd->xen_start_info = a;
@@ -258,7 +258,8 @@
        /* Try i386 code first */
        info.mach          = bfd_mach_i386_i386;
        disassemble_init_for_target(&info);
-       if (strcmp(dd->arch, "x86_64") && disas_at(dd, &info, 0) > 0) {
+       if ((!dd->arch || strcmp(dd->arch, "x86_64")) &&
+           disas_at(dd, &info, 0) > 0) {
                free(priv);
                return 1;
        }
@@ -267,7 +268,8 @@
        memset(priv, 0, sizeof(struct disas_priv) + dd->page_size / 8);
        info.mach          = bfd_mach_x86_64;
        disassemble_init_for_target(&info);
-       if (strcmp(dd->arch, "i386") && disas_at(dd, &info, 0) > 0) {
+       if ((!dd->arch || strcmp(dd->arch, "i386")) &&
+           disas_at(dd, &info, 0) > 0) {
                free(priv);
                return 1;
        }


Reply via email to