Hello community,

here is the log from the commit of package kdumpid for openSUSE:Factory checked 
in at 2020-09-23 18:43:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kdumpid (Old)
 and      /work/SRC/openSUSE:Factory/.kdumpid.new.4249 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kdumpid"

Wed Sep 23 18:43:24 2020 rev:8 rq:836156 version:1.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/kdumpid/kdumpid.changes  2017-06-20 
09:39:15.389702303 +0200
+++ /work/SRC/openSUSE:Factory/.kdumpid.new.4249/kdumpid.changes        
2020-09-23 18:44:25.505543452 +0200
@@ -1,0 +2,6 @@
+Tue Sep 22 20:11:47 UTC 2020 - Petr Tesařík <[email protected]>
+
+- Update to version 1.3:
+  * Switch to libkdumpfile-0.4.0
+
+-------------------------------------------------------------------

Old:
----
  kdumpid-1.2.tar.bz2

New:
----
  kdumpid-1.3.tar.bz2

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

Other differences:
------------------
++++++ kdumpid.spec ++++++
--- /var/tmp/diff_new_pack.pbP6jV/_old  2020-09-23 18:44:27.613545392 +0200
+++ /var/tmp/diff_new_pack.pbP6jV/_new  2020-09-23 18:44:27.617545396 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package kdumpid
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,7 +12,7 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
@@ -26,12 +26,12 @@
 BuildRequires:  binutils-devel
 %endif
 BuildRequires:  libkdumpfile-devel
-Version:        1.2
+Version:        1.3
 Release:        0
 Summary:        Utility to extract information from vmcores
-License:        GPL-2.0+
+License:        GPL-2.0-or-later
 Group:          System/Kernel
-Url:            http://sourceforge.net/p/kdumpid
+URL:            http://sourceforge.net/p/kdumpid
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Source:         %{name}-%{version}.tar.bz2
 

++++++ kdumpid-1.2.tar.bz2 -> kdumpid-1.3.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdumpid-1.2/Makefile new/kdumpid-1.3/Makefile
--- old/kdumpid-1.2/Makefile    2017-05-15 13:42:59.745768325 +0200
+++ new/kdumpid-1.3/Makefile    2020-09-22 22:08:52.098011234 +0200
@@ -10,8 +10,8 @@
 MANDIR=$(PREFIX)/man
 endif
 
-CUSTOM_CFLAGS= -ggdb -Wall -I/home/tesarik/include
-LIBS += -L/home/tesarik/lib64 -lkdumpfile -laddrxlat -lz -lopcodes -lbfd 
-liberty -ldl
+CUSTOM_CFLAGS= -ggdb -Wall -I/home/tesarik/.local/include
+LIBS += -L/home/tesarik/.local/lib64 -lkdumpfile -laddrxlat -lz -lopcodes 
-lbfd -liberty -ldl
 
 LD=ld
 
@@ -20,7 +20,7 @@
 ### CONFIGURATION END
 
 VER_MAJOR=1
-VER_MINOR=2
+VER_MINOR=3
 
 CFLAGS=-DVER_MAJOR=$(VER_MAJOR) -DVER_MINOR=$(VER_MINOR)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdumpid-1.2/kdumpid.h new/kdumpid-1.3/kdumpid.h
--- old/kdumpid-1.2/kdumpid.h   2017-05-15 13:42:59.745768325 +0200
+++ new/kdumpid-1.3/kdumpid.h   2020-09-22 22:08:52.098011234 +0200
@@ -24,7 +24,7 @@
        const char *format;     /* format name */
 
        const char *arch;       /* architecture (if known) */
-       int endian;             /* __LITTLE_ENDIAN or __BIG_ENDIAN */
+       kdump_num_t endian;     /* target byte order */
        uint64_t start_addr;    /* kernel start address */
 
        char machine[66];       /* arch name (utsname machine) */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdumpid-1.2/main.c new/kdumpid-1.3/main.c
--- old/kdumpid-1.2/main.c      2017-05-15 13:42:59.745768325 +0200
+++ new/kdumpid-1.3/main.c      2020-09-22 22:08:52.098011234 +0200
@@ -143,6 +143,11 @@
                return 2;
        }
 
+       status = kdump_set_number_attr(dd.ctx, KDUMP_ATTR_ZERO_EXCLUDED, 1);
+       if (status != KDUMP_OK)
+               fprintf(stderr, "WARNING: Excluded pages are not zeroed: %s\n",
+                       kdump_get_err(dd.ctx));
+
        status = kdump_set_number_attr(dd.ctx, KDUMP_ATTR_FILE_FD, dd.fd);
        if (status != KDUMP_OK) {
                fprintf(stderr, "File initialization failed: %s\n",
@@ -205,6 +210,16 @@
                        kdump_get_err(dd.ctx));
                kdump_free(dd.ctx);
                return 2;
+       }
+
+       status = kdump_get_number_attr(dd.ctx, "arch.byte_order", &dd.endian);
+       if (status == KDUMP_ERR_NODATA)
+               dd.endian = (kdump_num_t)-1;
+       else if (status != KDUMP_OK) {
+               fprintf(stderr, "Cannot get architecture byte order: %s\n",
+                       kdump_get_err(dd.ctx));
+               kdump_free(dd.ctx);
+               return 2;
        }
 
        status = kdump_get_string_attr(dd.ctx, KDUMP_ATTR_FILE_FORMAT,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdumpid-1.2/ppc.c new/kdumpid-1.3/ppc.c
--- old/kdumpid-1.2/ppc.c       2017-05-15 13:42:59.745768325 +0200
+++ new/kdumpid-1.3/ppc.c       2020-09-22 22:08:52.098011234 +0200
@@ -38,6 +38,8 @@
 static const char sep[] = ", \t\r\n";
 #define wsep   (sep+1)
 
+static disassembler_ftype print_insn;
+
 static int
 disas_fn(void *data, const char *fmt, ...)
 {
@@ -69,19 +71,17 @@
 {
        struct disas_priv *priv = info->stream;
        char *toksave;
-       char *insn, *arg1, *arg2;
+       char *insn;
        int count;
 
        do {
                priv->iptr = priv->insn;
-               count = print_insn_big_powerpc(info->buffer_vma + pc, info);
+               count = print_insn(info->buffer_vma + pc, info);
                if (count < 0)
                        break;
                pc += count;
 
                insn = strtok_r(priv->insn, wsep, &toksave);
-               arg1 = strtok_r(NULL, sep, &toksave);
-               arg2 = strtok_r(NULL, sep, &toksave);
 
                /* for historical reasons, ppc starts with 3 NOPs */
                if (pc <= 3 * 4 && strcmp(insn, "nop"))
@@ -125,5 +125,8 @@
        info.arch          = bfd_arch_powerpc;
        info.mach          = bfd_mach_ppc;
        disassemble_init_for_target(&info);
+       print_insn = disassembler(bfd_arch_powerpc,
+                                 dd->endian != KDUMP_LITTLE_ENDIAN,
+                                 bfd_mach_ppc, NULL);
        return disas_at(dd, &info, 0);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdumpid-1.2/ppc64.c new/kdumpid-1.3/ppc64.c
--- old/kdumpid-1.2/ppc64.c     2017-05-15 13:42:59.745768325 +0200
+++ new/kdumpid-1.3/ppc64.c     2020-09-22 22:08:52.098011234 +0200
@@ -38,6 +38,8 @@
 static const char sep[] = ", \t\r\n";
 #define wsep   (sep+1)
 
+static disassembler_ftype print_insn;
+
 static int
 disas_fn(void *data, const char *fmt, ...)
 {
@@ -80,19 +82,17 @@
 {
        struct disas_priv *priv = info->stream;
        char *toksave;
-       char *insn, *arg1, *arg2;
+       char *insn;
        int count;
 
        do {
                priv->iptr = priv->insn;
-               count = print_insn_big_powerpc(info->buffer_vma + pc, info);
+               count = print_insn(info->buffer_vma + pc, info);
                if (count < 0)
                        break;
                pc += count;
 
                insn = strtok_r(priv->insn, wsep, &toksave);
-               arg1 = strtok_r(NULL, sep, &toksave);
-               arg2 = strtok_r(NULL, sep, &toksave);
 
                /* ppc64 starts with a jump instruction, but it
                 * may be NOPped out at runtime */
@@ -142,5 +142,8 @@
        info.arch          = bfd_arch_powerpc;
        info.mach          = bfd_mach_ppc64;
        disassemble_init_for_target(&info);
+       print_insn = disassembler(bfd_arch_powerpc,
+                                 dd->endian != KDUMP_LITTLE_ENDIAN,
+                                 bfd_mach_ppc64, NULL);
        return disas_at(dd, &info, 0);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdumpid-1.2/s390.c new/kdumpid-1.3/s390.c
--- old/kdumpid-1.2/s390.c      2017-05-15 13:42:59.745768325 +0200
+++ new/kdumpid-1.3/s390.c      2020-09-22 22:08:52.098011234 +0200
@@ -43,6 +43,8 @@
 static const char sep[] = ", \t\r\n";
 #define wsep   (sep+1)
 
+static disassembler_ftype print_insn;
+
 static int
 disas_fn(void *data, const char *fmt, ...)
 {
@@ -74,19 +76,17 @@
 {
        struct disas_priv *priv = info->stream;
        char *toksave;
-       char *insn, *arg1, *arg2;
+       char *insn;
        int count;
 
        do {
                priv->iptr = priv->insn;
-               count = print_insn_s390(info->buffer_vma + pc, info);
+               count = print_insn(info->buffer_vma + pc, info);
                if (count < 0)
                        break;
                pc += count;
 
                insn = strtok_r(priv->insn, wsep, &toksave);
-               arg1 = strtok_r(NULL, sep, &toksave);
-               arg2 = strtok_r(NULL, sep, &toksave);
 
                /* s390 setup code always starts with a basr instruction */
                if (pc == 0 && strcmp(insn, "basr"))
@@ -131,6 +131,8 @@
        info.arch          = bfd_arch_s390;
        info.mach          = bfd_mach_s390_64;
        disassemble_init_for_target(&info);
+       print_insn = disassembler(bfd_arch_s390, TRUE,
+                                 bfd_mach_s390_64, NULL);
        ret |= disas_at(dd, &info, 0);
 
        if (ret > 0 && priv.state.flags & SAM64_SEEN)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdumpid-1.2/util.c new/kdumpid-1.3/util.c
--- old/kdumpid-1.2/util.c      2017-05-15 13:42:59.745768325 +0200
+++ new/kdumpid-1.3/util.c      2020-09-22 22:08:52.098011234 +0200
@@ -416,6 +416,7 @@
 {
        addrxlat_sys_t *sys;
        addrxlat_map_t *map;
+       kdump_status kstatus;
        int ret;
 
        if ( (dd->page = malloc(dd->page_size)) == NULL) {
@@ -423,7 +424,15 @@
                return -1;
        }
 
-       sys = kdump_get_addrxlat_sys(dd->ctx);
+       ret = -1;
+
+       kstatus = kdump_get_addrxlat(dd->ctx, NULL, &sys);
+       if (kstatus != KDUMP_OK) {
+               fprintf(stderr, "Cannot get address translation: %s\n",
+                       kdump_get_err(dd->ctx));
+               goto err_free;
+       }
+
        map = addrxlat_sys_get_map(sys, ADDRXLAT_SYS_MAP_KPHYS_MACHPHYS);
        if (!map) {
                addrxlat_range_t range;
@@ -439,7 +448,7 @@
                map = addrxlat_map_new();
                if (!map) {
                        perror("Cannot allocate identity map");
-                       return -1;
+                       goto err_xlat;
                }
 
                range.endoff = ADDRXLAT_ADDR_MAX;
@@ -448,16 +457,18 @@
                if (status != ADDRXLAT_OK) {
                        fprintf(stderr, "Cannot set identity range: %s\n",
                                addrxlat_strerror(status));
-                       return -1;
+                       goto err_xlat;
                }
                addrxlat_sys_set_map(sys, ADDRXLAT_SYS_MAP_KPHYS_MACHPHYS, map);
        }
 
-       ret = -1;
        ret &= explore_kernel(dd, explore_utsname);
        explore_kernel(dd, explore_ikcfg);
        ret &= explore_kernel(dd, explore_banner);
 
+ err_xlat:
+       addrxlat_sys_decref(sys);
+ err_free:
        free(dd->page);
 
        return ret;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdumpid-1.2/x86.c new/kdumpid-1.3/x86.c
--- old/kdumpid-1.2/x86.c       2017-05-15 13:42:59.745768325 +0200
+++ new/kdumpid-1.3/x86.c       2020-09-22 22:08:52.098011234 +0200
@@ -35,6 +35,8 @@
 static const char sep[] = ", \t\r\n";
 #define wsep   (sep+1)
 
+static disassembler_ftype print_insn;
+
 static int
 disas_fn(void *data, const char *fmt, ...)
 {
@@ -154,7 +156,7 @@
                        break;
 
                priv->iptr = priv->insn;
-               count = print_insn_i386(info->buffer_vma + pc, info);
+               count = print_insn(info->buffer_vma + pc, info);
                set_pagemap(priv->pagemap, pc, count);
                if (count < 0)
                        break;
@@ -258,6 +260,8 @@
        /* Try i386 code first */
        info.mach          = bfd_mach_i386_i386;
        disassemble_init_for_target(&info);
+       print_insn = disassembler(bfd_arch_i386, FALSE,
+                                 bfd_mach_i386_i386, NULL);
        if ((!dd->arch || strcmp(dd->arch, "x86_64")) &&
            disas_at(dd, &info, 0) > 0) {
                free(priv);
@@ -268,6 +272,8 @@
        memset(priv, 0, sizeof(struct disas_priv) + dd->page_size / 8);
        info.mach          = bfd_mach_x86_64;
        disassemble_init_for_target(&info);
+       print_insn = disassembler(bfd_arch_i386, FALSE,
+                                 bfd_mach_x86_64, NULL);
        if ((!dd->arch || strcmp(dd->arch, "i386")) &&
            disas_at(dd, &info, 0) > 0) {
                free(priv);


Reply via email to