Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package kdumpid for openSUSE:Factory checked 
in at 2023-04-14 13:13:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kdumpid (Old)
 and      /work/SRC/openSUSE:Factory/.kdumpid.new.19717 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kdumpid"

Fri Apr 14 13:13:22 2023 rev:3 rq:1079287 version:1.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/kdumpid/kdumpid.changes  2022-08-16 
17:08:08.555949670 +0200
+++ /work/SRC/openSUSE:Factory/.kdumpid.new.19717/kdumpid.changes       
2023-04-14 13:13:33.699729772 +0200
@@ -1,0 +2,15 @@
+Thu Apr 13 18:35:49 UTC 2023 - Petr Tesařík <[email protected]>
+
+- kdumpid-Fix-build-for-binutils-2.40.patch: Fix build for
+  binutils < 2.40.
+
+-------------------------------------------------------------------
+Thu Apr 13 17:36:52 UTC 2023 - Petr Tesařík <[email protected]>
+
+- Update to version 1.4
+  * Bugfix release
+- Patches moved to upstream:
+  * kdumpid-append_insn.patch
+  * kdumpid-binutils-2.39-fix.patch
+
+-------------------------------------------------------------------

Old:
----
  kdumpid-1.3.tar.bz2
  kdumpid-append_insn.patch
  kdumpid-binutils-2.39-fix.patch

New:
----
  kdumpid-1.4.tar.bz2
  kdumpid-Fix-build-for-binutils-2.40.patch

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

Other differences:
------------------
++++++ kdumpid.spec ++++++
--- /var/tmp/diff_new_pack.PrRHcd/_old  2023-04-14 13:13:34.167732448 +0200
+++ /var/tmp/diff_new_pack.PrRHcd/_new  2023-04-14 13:13:34.167732448 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package kdumpid
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,14 +19,10 @@
 #Url:
 
 Name:           kdumpid
-BuildRequires:  zlib-devel
-%if 0%{?suse_version} < 1030 && ! 0%{?fedora}
-BuildRequires:  binutils
-%else
 BuildRequires:  binutils-devel
-%endif
 BuildRequires:  libkdumpfile-devel
-Version:        1.3
+BuildRequires:  zlib-devel
+Version:        1.4
 Release:        0
 Summary:        Utility to extract information from vmcores
 License:        GPL-2.0-or-later
@@ -34,8 +30,7 @@
 URL:            http://sourceforge.net/p/kdumpid
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Source:         %{name}-%{version}.tar.bz2
-Patch1:         %{name}-append_insn.patch
-Patch2:         %{name}-binutils-2.39-fix.patch
+Patch1:         %{name}-Fix-build-for-binutils-2.40.patch
 
 %description
 Kdumpid extracts information such as type of dump, architecture
@@ -45,6 +40,8 @@
 %setup
 %autopatch -p1
 
+chmod +x libs.sh
+
 %build
 make CUSTOM_CFLAGS="${CFLAGS:-%optflags}"
 

++++++ kdumpid-1.3.tar.bz2 -> kdumpid-1.4.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdumpid-1.3/Makefile new/kdumpid-1.4/Makefile
--- old/kdumpid-1.3/Makefile    2020-09-22 22:08:52.098011234 +0200
+++ new/kdumpid-1.4/Makefile    2023-04-13 19:43:12.747142709 +0200
@@ -10,8 +10,8 @@
 MANDIR=$(PREFIX)/man
 endif
 
-CUSTOM_CFLAGS= -ggdb -Wall -I/home/tesarik/.local/include
-LIBS += -L/home/tesarik/.local/lib64 -lkdumpfile -laddrxlat -lz -lopcodes 
-lbfd -liberty -ldl
+CUSTOM_CFLAGS= -ggdb -Wall -I/home/petr/.local/include
+LIBS += -L/home/petr/.local/lib64 -lkdumpfile -laddrxlat -lz -lzstd -lopcodes 
-lbfd -lsframe -liberty -ldl
 
 LD=ld
 
@@ -20,9 +20,11 @@
 ### CONFIGURATION END
 
 VER_MAJOR=1
-VER_MINOR=3
+VER_MINOR=4
 
-CFLAGS=-DVER_MAJOR=$(VER_MAJOR) -DVER_MINOR=$(VER_MINOR)
+CDEFS:=$(shell ./cdefs.sh)
+
+CFLAGS=-DVER_MAJOR=$(VER_MAJOR) -DVER_MINOR=$(VER_MINOR) $(CDEFS)
 
 ifndef INSTALL
 INSTALL=/usr/bin/install
@@ -37,6 +39,7 @@
 OBJS=$(addsuffix .o,$(basename $(SRC)))
 
 DIST_EXTRA=Makefile Makefile.lib kdumpid.1
+DIST_SCRIPTS=cdefs.sh
 DIST=$(HDRS) $(SRC) $(DIST_EXTRA)
 
 PKGDIR=kdumpid-$(VER_MAJOR).$(VER_MINOR)
@@ -58,6 +61,7 @@
        rm -rf $(PKGDIR)
        mkdir -p $(PKGDIR)
        $(INSTALL) -m 0644 $(DIST) $(PKGDIR)
+       $(INSTALL) -m 0755 $(DIST_SCRIPTS) $(PKGDIR)
 
 package: dist
        rm -f $(PKGNAME)*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdumpid-1.3/cdefs.sh new/kdumpid-1.4/cdefs.sh
--- old/kdumpid-1.3/cdefs.sh    1970-01-01 01:00:00.000000000 +0100
+++ new/kdumpid-1.4/cdefs.sh    2023-04-13 19:43:12.751142746 +0200
@@ -0,0 +1,17 @@
+#! /bin/sh
+tmpdir=$(mktemp -d)
+trap 'rm -rf "$tmpdir"' EXIT
+cd "$tmpdir"
+
+cat > dis_asm.c <<EOF
+#include <dis-asm.h>
+void fn(struct disassemble_info *info, void *stream,
+        fprintf_ftype fprintf_func, fprintf_styled_ftype fprintf_styled_func)
+{
+  init_disassemble_info(info, stream, fprintf_func, fprintf_styled_func);
+}
+EOF
+if make dis_asm.o &> /dev/null
+then
+    echo "-DDIS_ASM_STYLED_PRINTF"
+fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdumpid-1.3/ppc.c new/kdumpid-1.4/ppc.c
--- old/kdumpid-1.3/ppc.c       2020-09-22 22:08:52.098011234 +0200
+++ new/kdumpid-1.4/ppc.c       2023-04-13 19:43:12.747142709 +0200
@@ -40,26 +40,49 @@
 
 static disassembler_ftype print_insn;
 
-static int
-disas_fn(void *data, const char *fmt, ...)
+static void
+append_insn(void *data, const char *fmt, va_list va)
 {
        struct disas_priv *priv = data;
-       va_list va;
        size_t remain;
        int len;
 
-       va_start(va, fmt);
-
        remain = priv->insn + sizeof(priv->insn) - priv->iptr;
        len = vsnprintf(priv->iptr, remain, fmt, va);
        if (len > 0)
                priv->iptr += len;
 
+}
+
+static int
+disas_fn(void *data, const char *fmt, ...)
+{
+       va_list va;
+
+       va_start(va, fmt);
+       append_insn(data, fmt, va);
        va_end(va);
 
        return 0;
 }
 
+#ifdef DIS_ASM_STYLED_PRINTF
+
+static int
+disas_styled_fn(void *data, enum disassembler_style style,
+               const char *fmt, ...)
+{
+       va_list va;
+
+       va_start(va, fmt);
+       append_insn(data, fmt, va);
+       va_end(va);
+
+       return 0;
+}
+
+#endif /* DIS_ASM_STYLED_PRINTF */
+
 static void error_func(int status, bfd_vma memaddr,
                       struct disassemble_info *dinfo)
 {
@@ -117,7 +140,11 @@
                return -1;
 
        memset(&priv, 0, sizeof priv);
+#ifdef DIS_ASM_STYLED_PRINTF
+       init_disassemble_info(&info, &priv, disas_fn, disas_styled_fn);
+#else
        init_disassemble_info(&info, &priv, disas_fn);
+#endif
        info.memory_error_func = error_func;
        info.buffer        = dd->page;
        info.buffer_vma    = addr;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdumpid-1.3/ppc64.c new/kdumpid-1.4/ppc64.c
--- old/kdumpid-1.3/ppc64.c     2020-09-22 22:08:52.098011234 +0200
+++ new/kdumpid-1.4/ppc64.c     2023-04-13 19:43:12.747142709 +0200
@@ -40,26 +40,48 @@
 
 static disassembler_ftype print_insn;
 
-static int
-disas_fn(void *data, const char *fmt, ...)
+static void
+append_insn(void *data, const char *fmt, va_list va)
 {
        struct disas_priv *priv = data;
-       va_list va;
        size_t remain;
        int len;
 
-       va_start(va, fmt);
-
        remain = priv->insn + sizeof(priv->insn) - priv->iptr;
        len = vsnprintf(priv->iptr, remain, fmt, va);
        if (len > 0)
                priv->iptr += len;
+}
 
+static int
+disas_fn(void *data, const char *fmt, ...)
+{
+       va_list va;
+
+       va_start(va, fmt);
+       append_insn(data, fmt, va);
        va_end(va);
 
        return 0;
 }
 
+#ifdef DIS_ASM_STYLED_PRINTF
+
+static int
+disas_styled_fn(void *data, enum disassembler_style style,
+               const char *fmt, ...)
+{
+       va_list va;
+
+       va_start(va, fmt);
+       append_insn(data, fmt, va);
+       va_end(va);
+
+       return 0;
+}
+
+#endif /* DIS_ASM_STYLED_PRINTF */
+
 static void
 print_address(bfd_vma addr, struct disassemble_info *info)
 {
@@ -133,7 +155,11 @@
                return -1;
 
        memset(&priv, 0, sizeof priv);
+#ifdef DIS_ASM_STYLED_PRINTF
+       init_disassemble_info(&info, &priv, disas_fn, disas_styled_fn);
+#else
        init_disassemble_info(&info, &priv, disas_fn);
+#endif
        info.print_address_func = print_address;
        info.memory_error_func = error_func;
        info.buffer        = dd->page;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdumpid-1.3/s390.c new/kdumpid-1.4/s390.c
--- old/kdumpid-1.3/s390.c      2020-09-22 22:08:52.098011234 +0200
+++ new/kdumpid-1.4/s390.c      2023-04-13 19:43:12.747142709 +0200
@@ -45,26 +45,48 @@
 
 static disassembler_ftype print_insn;
 
-static int
-disas_fn(void *data, const char *fmt, ...)
+static void
+append_insn(void *data, const char *fmt, va_list va)
 {
        struct disas_priv *priv = data;
-       va_list va;
        size_t remain;
        int len;
 
-       va_start(va, fmt);
-
        remain = priv->insn + sizeof(priv->insn) - priv->iptr;
        len = vsnprintf(priv->iptr, remain, fmt, va);
        if (len > 0)
                priv->iptr += len;
+}
+
+static int
+disas_fn(void *data, const char *fmt, ...)
+{
+       va_list va;
+
+       va_start(va, fmt);
+       append_insn(data, fmt, va);
+       va_end(va);
+
+       return 0;
+}
+
+#ifdef DIS_ASM_STYLED_PRINTF
 
+static int
+disas_styled_fn(void *data, enum disassembler_style style,
+               const char *fmt, ...)
+{
+       va_list va;
+
+       va_start(va, fmt);
+       append_insn(data, fmt, va);
        va_end(va);
 
        return 0;
 }
 
+#endif /* DIS_ASM_STYLED_PRINTF */
+
 static void error_func(int status, bfd_vma memaddr,
                       struct disassemble_info *dinfo)
 {
@@ -123,7 +145,11 @@
                return -1;
 
        memset(&priv, 0, sizeof priv);
+#ifdef DIS_ASM_STYLED_PRINTF
+       init_disassemble_info(&info, &priv, disas_fn, disas_styled_fn);
+#else
        init_disassemble_info(&info, &priv, disas_fn);
+#endif
        info.memory_error_func = error_func;
        info.buffer        = dd->page;
        info.buffer_vma    = addr + DEFAULT_LOAD_ADDR;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdumpid-1.3/x86.c new/kdumpid-1.4/x86.c
--- old/kdumpid-1.3/x86.c       2020-09-22 22:08:52.098011234 +0200
+++ new/kdumpid-1.4/x86.c       2023-04-13 19:43:12.747142709 +0200
@@ -37,26 +37,48 @@
 
 static disassembler_ftype print_insn;
 
-static int
-disas_fn(void *data, const char *fmt, ...)
+static void
+append_insn(void *data, const char *fmt, va_list va)
 {
        struct disas_priv *priv = data;
-       va_list va;
        size_t remain;
        int len;
 
-       va_start(va, fmt);
-
        remain = priv->insn + sizeof(priv->insn) - priv->iptr;
        len = vsnprintf(priv->iptr, remain, fmt, va);
        if (len > 0)
                priv->iptr += len;
+}
 
+static int
+disas_fn(void *data, const char *fmt, ...)
+{
+       va_list va;
+
+       va_start(va, fmt);
+       append_insn(data, fmt, va);
        va_end(va);
 
        return 0;
 }
 
+#ifdef DIS_ASM_STYLED_PRINTF
+
+static int
+disas_styled_fn(void *data, enum disassembler_style style,
+               const char *fmt, ...)
+{
+       va_list va;
+
+       va_start(va, fmt);
+       append_insn(data, fmt, va);
+       va_end(va);
+
+       return 0;
+}
+
+#endif /* DIS_ASM_STYLED_PRINTF */
+
 static void error_func(int status, bfd_vma memaddr,
                       struct disassemble_info *dinfo)
 {
@@ -250,7 +272,11 @@
        if (!priv)
                return -1;
 
+#ifdef DIS_ASM_STYLED_PRINTF
+       init_disassemble_info(&info, priv, disas_fn, disas_styled_fn);
+#else
        init_disassemble_info(&info, priv, disas_fn);
+#endif
        info.memory_error_func = error_func;
        info.buffer        = dd->page;
        info.buffer_vma    = addr;

++++++ kdumpid-Fix-build-for-binutils-2.40.patch ++++++
From: Petr Tesarik <[email protected]>
Date: Thu, 13 Apr 2023 20:32:32 +0200
Subject: Fix build for binutils < 2.40
Upstream: merged
Git-commit: b5a88def22c8f73c9d7c7b7f5c143a8423b344dd

The list of libraries also depends on binutils version, so it must
be produced by a script. One step closer to GNU Autoconf... *sigh*

Signed-off-by: Petr Tesarik <[email protected]>
---
 Makefile |    4 ++--
 libs.sh  |   41 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+), 2 deletions(-)
 create mode 100755 libs.sh

--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,7 @@ MANDIR=$(PREFIX)/man
 endif
 
 CUSTOM_CFLAGS= -ggdb -Wall -I/home/petr/.local/include
-LIBS += -L/home/petr/.local/lib64 -lkdumpfile -laddrxlat -lz -lzstd -lopcodes 
-lbfd -lsframe -liberty -ldl
+LIBS += -L/home/petr/.local/lib64 -lkdumpfile -laddrxlat $(shell ./libs.sh)
 
 LD=ld
 
@@ -39,7 +39,7 @@ SRC=main.c util.c search.c ppc.c ppc64.c
 OBJS=$(addsuffix .o,$(basename $(SRC)))
 
 DIST_EXTRA=Makefile Makefile.lib kdumpid.1
-DIST_SCRIPTS=cdefs.sh
+DIST_SCRIPTS=cdefs.sh libs.sh
 DIST=$(HDRS) $(SRC) $(DIST_EXTRA)
 
 PKGDIR=kdumpid-$(VER_MAJOR).$(VER_MINOR)
--- /dev/null
+++ b/libs.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+tmpdir=$(mktemp -d)
+trap 'rm -rf "$tmpdir"' EXIT
+cd "$tmpdir"
+
+cat > disas.c <<EOF
+void disassembler();
+void (*fn)() = disassembler;
+EOF
+
+rebuild()
+{
+    gcc -shared -o disas.o disas.c $LIBS
+}
+
+LIBS="-lopcodes"
+rebuild
+if nm -u disas.o | grep -q '^ *U bfd_' ; then
+    LIBS="$LIBS -lbfd"
+    rebuild
+fi
+if nm -u disas.o | grep -q '^ *U sframe_' ; then
+    LIBS="$LIBS -lsframe"
+    rebuild
+fi
+if nm -u disas.o | grep -q '^ *U \(htab_create\|splay_tree_new\)$' ; then
+    LIBS="$LIBS -liberty"
+    rebuild
+fi
+if nm -u disas.o | grep -q '^ *U inflate$' ; then
+    LIBS="$LIBS -lz"
+fi
+if nm -u disas.o | grep -q '^ *U ZSTD_' ; then
+    LIBS="$LIBS -lzstd"
+fi
+if nm -u disas.o | grep -q '^ *U dlopen' ; then
+    LIBS="$LIBS -ldl"
+fi
+
+echo $LIBS

Reply via email to