Sync from SUSE:ALP:Source:Standard:1.0 makedumpfile revision fa11f61093f3f7a2df675e3411c3e3d7
This commit is contained in:
commit
778085818b
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
BIN
eppic-21808c78596d6d80c67eeaa08a618570ae0d886d.tar.gz
(Stored with Git LFS)
Normal file
BIN
eppic-21808c78596d6d80c67eeaa08a618570ae0d886d.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
makedumpfile-1.7.4.tar.gz
(Stored with Git LFS)
Normal file
BIN
makedumpfile-1.7.4.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
26
makedumpfile-PN_XNUM.patch
Normal file
26
makedumpfile-PN_XNUM.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From: Petr Tesarik <ptesarik@suse.com>
|
||||
Subject: Define PN_XNUM if missing
|
||||
Upstream: never, build fix for old distros
|
||||
|
||||
Older elfutils did not define this constant.
|
||||
|
||||
Signed-off-by: Petr Tesarik <ptesarik@suse.com>
|
||||
---
|
||||
elf_info.h | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
Index: makedumpfile-1.7.1/elf_info.h
|
||||
===================================================================
|
||||
--- makedumpfile-1.7.1.orig/elf_info.h
|
||||
+++ makedumpfile-1.7.1/elf_info.h
|
||||
@@ -19,6 +19,10 @@
|
||||
#include <elf.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
+#ifndef PN_XNUM
|
||||
+#define PN_XNUM 0xffff
|
||||
+#endif
|
||||
+
|
||||
#define KEXEC_CORE_NOTE_NAME "CORE"
|
||||
#define KEXEC_CORE_NOTE_NAME_BYTES sizeof(KEXEC_CORE_NOTE_NAME)
|
||||
|
34
makedumpfile-override-libtinfo.patch
Normal file
34
makedumpfile-override-libtinfo.patch
Normal file
@ -0,0 +1,34 @@
|
||||
From: Petr Tesarik <ptesarik@suse.com>
|
||||
Subject: Allow to override the tinfo library used for eppic
|
||||
Upstream: never; only needed for compatibility with older ncurses
|
||||
|
||||
Allow to override the "-ltinfo" linker option with a make variable.
|
||||
|
||||
Signed-off-by: Petr Tesarik <ptesarik@suse.com>
|
||||
|
||||
---
|
||||
Makefile | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: makedumpfile-1.7.1/Makefile
|
||||
===================================================================
|
||||
--- makedumpfile-1.7.1.orig/Makefile
|
||||
+++ makedumpfile-1.7.1/Makefile
|
||||
@@ -82,6 +82,8 @@ CFLAGS += -fsanitize=undefined
|
||||
#CFLAGS += -fanalyzer
|
||||
endif
|
||||
|
||||
+TINFOLIB = -ltinfo
|
||||
+
|
||||
LIBS := $(LIBS) -lpthread
|
||||
|
||||
try-run = $(shell set -e; \
|
||||
@@ -120,7 +122,7 @@ makedumpfile: $(SRC_BASE) $(OBJ_PART) $(
|
||||
$(VPATH)makedumpfile.conf.5.in > $(VPATH)makedumpfile.conf.5
|
||||
|
||||
eppic_makedumpfile.so: extension_eppic.c
|
||||
- $(CC) $(CFLAGS) $(LDFLAGS) -shared -rdynamic -o $@ extension_eppic.c -fPIC -leppic -ltinfo
|
||||
+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -rdynamic -o $@ extension_eppic.c -fPIC -leppic ${TINFOLIB}
|
||||
|
||||
clean:
|
||||
rm -f $(OBJ) $(OBJ_PART) $(OBJ_ARCH) makedumpfile makedumpfile.8 makedumpfile.conf.5
|
65
makedumpfile-ppc64-VA-range-SUSE.patch
Normal file
65
makedumpfile-ppc64-VA-range-SUSE.patch
Normal file
@ -0,0 +1,65 @@
|
||||
From: Petr Tesarik <ptesarik@suse.cz>
|
||||
Subject: Use correct l3 index size with SLE15-SP1 ppc64le kernels
|
||||
References: bsc#1123015
|
||||
Upstream: never, SUSE-specific
|
||||
|
||||
SLE 15 SP1 backported commit c2b4d8b7417a ("powerpc/mm/hash64: Increase
|
||||
the VA range"), to Linux 4.12, so let's check SUSE_PRODUCT_CODE.
|
||||
|
||||
Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
|
||||
---
|
||||
arch/ppc64.c | 3 ++-
|
||||
makedumpfile.c | 4 ++++
|
||||
makedumpfile.h | 3 +++
|
||||
3 files changed, 9 insertions(+), 1 deletion(-)
|
||||
Index: makedumpfile-1.7.1/arch/ppc64.c
|
||||
===================================================================
|
||||
--- makedumpfile-1.7.1.orig/arch/ppc64.c
|
||||
+++ makedumpfile-1.7.1/arch/ppc64.c
|
||||
@@ -248,7 +248,9 @@ ppc64_vmalloc_init(void)
|
||||
|
||||
if (info->kernel_version >= KERNEL_VERSION(4, 12, 0)) {
|
||||
info->l2_index_size = PMD_INDEX_SIZE_L4_64K_4_12;
|
||||
- if (info->kernel_version >= KERNEL_VERSION(4, 17, 0))
|
||||
+ if (info->kernel_version >= KERNEL_VERSION(4, 17, 0) ||
|
||||
+ ((NUMBER(SUSE_PRODUCT_CODE) & ~0xffL) == 0x010f0100) ||
|
||||
+ ((NUMBER(SUSE_PRODUCT_CODE) & ~0xffL) == 0x010c0500))
|
||||
info->l3_index_size = PUD_INDEX_SIZE_L4_64K_4_17;
|
||||
else
|
||||
info->l3_index_size = PUD_INDEX_SIZE_L4_64K_4_12;
|
||||
Index: makedumpfile-1.7.1/makedumpfile.c
|
||||
===================================================================
|
||||
--- makedumpfile-1.7.1.orig/makedumpfile.c
|
||||
+++ makedumpfile-1.7.1/makedumpfile.c
|
||||
@@ -2491,6 +2491,8 @@ write_vmcoreinfo_data(void)
|
||||
WRITE_NUMBER_UNSIGNED("kimage_voffset", kimage_voffset);
|
||||
#endif
|
||||
|
||||
+ WRITE_NUMBER("SUSE_PRODUCT_CODE", SUSE_PRODUCT_CODE);
|
||||
+
|
||||
if (info->phys_base)
|
||||
fprintf(info->file_vmcoreinfo, "%s%lu\n", STR_NUMBER("phys_base"),
|
||||
info->phys_base);
|
||||
@@ -2939,6 +2941,8 @@ read_vmcoreinfo(void)
|
||||
|
||||
READ_NUMBER("HUGETLB_PAGE_DTOR", HUGETLB_PAGE_DTOR);
|
||||
|
||||
+ READ_NUMBER("SUSE_PRODUCT_CODE", SUSE_PRODUCT_CODE);
|
||||
+
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Index: makedumpfile-1.7.1/makedumpfile.h
|
||||
===================================================================
|
||||
--- makedumpfile-1.7.1.orig/makedumpfile.h
|
||||
+++ makedumpfile-1.7.1/makedumpfile.h
|
||||
@@ -2069,6 +2069,9 @@ struct number_table {
|
||||
unsigned long kernel_link_addr;
|
||||
unsigned long va_kernel_pa_offset;
|
||||
#endif
|
||||
+
|
||||
+ /* Distro-specific */
|
||||
+ long SUSE_PRODUCT_CODE;
|
||||
};
|
||||
|
||||
struct srcfile_table {
|
1
makedumpfile-rpmlintrc
Normal file
1
makedumpfile-rpmlintrc
Normal file
@ -0,0 +1 @@
|
||||
addFilter("devel-file-in-non-devel-package .*/usr/share/makedumpfile-\d+\.\d+\.\d+/eppic_scripts/.*\.c")
|
1069
makedumpfile.changes
Normal file
1069
makedumpfile.changes
Normal file
File diff suppressed because it is too large
Load Diff
128
makedumpfile.spec
Normal file
128
makedumpfile.spec
Normal file
@ -0,0 +1,128 @@
|
||||
#
|
||||
# spec file for package makedumpfile
|
||||
#
|
||||
# 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
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define build_eppic 1
|
||||
%define eppic_commit 21808c78596d6d80c67eeaa08a618570ae0d886d
|
||||
|
||||
%if 0%{!?have_zstd:1}
|
||||
%if 0%{?sle_version} >= 150200 || 0%{?suse_version} > 1500
|
||||
%define have_zstd 1
|
||||
%else
|
||||
%define have_zstd 0
|
||||
%endif
|
||||
%endif
|
||||
|
||||
Name: makedumpfile
|
||||
Version: 1.7.4
|
||||
Release: 0
|
||||
Summary: Partial kernel dump
|
||||
License: GPL-2.0-only
|
||||
Group: System/Kernel
|
||||
URL: https://github.com/makedumpfile/makedumpfile
|
||||
Source: https://github.com/makedumpfile/makedumpfile/releases/download/%{version}/%{name}-%{version}.tar.gz
|
||||
Source1: https://github.com/lucchouina/eppic/archive/%{eppic_commit}.tar.gz#/eppic-%{eppic_commit}.tar.gz
|
||||
Source99: %{name}-rpmlintrc
|
||||
Patch0: %{name}-override-libtinfo.patch
|
||||
Patch1: %{name}-ppc64-VA-range-SUSE.patch
|
||||
Patch2: %{name}-PN_XNUM.patch
|
||||
BuildRequires: libbz2-devel
|
||||
BuildRequires: libdw-devel
|
||||
BuildRequires: libelf-devel
|
||||
BuildRequires: lzo-devel
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: snappy-devel
|
||||
BuildRequires: xz-devel
|
||||
BuildRequires: zlib-devel
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
ExclusiveArch: %{ix86} x86_64 ia64 ppc ppc64 ppc64le riscv64 s390x %{arm} aarch64
|
||||
%if %{have_zstd}
|
||||
BuildRequires: libzstd-devel
|
||||
%endif
|
||||
%if %{build_eppic}
|
||||
BuildRequires: bison
|
||||
BuildRequires: flex
|
||||
%endif
|
||||
|
||||
%description
|
||||
makedumpfile is a dump program to shorten the size of dump file. It
|
||||
copies only the necessary pages for analysis with various dump levels,
|
||||
and can compress the page data. The obtained dump file can by analyzed
|
||||
via gdb or crash utility.
|
||||
|
||||
%prep
|
||||
%if %{build_eppic}
|
||||
%autosetup -p1 -b1
|
||||
%else
|
||||
%autosetup -p1
|
||||
%endif
|
||||
|
||||
%build
|
||||
export CFLAGS="%{optflags} -fcommon"
|
||||
export USESNAPPY=on
|
||||
%if %{have_zstd}
|
||||
export USEZSTD=on
|
||||
%endif
|
||||
export USELZO=on
|
||||
export LINKTYPE=dynamic
|
||||
make %{?_smp_mflags} LDFLAGS="-Wl,-rpath,%{_libdir}/%{name}-%{version}"
|
||||
|
||||
%if %{build_eppic}
|
||||
pushd ../eppic-%{eppic_commit}/libeppic
|
||||
make
|
||||
popd
|
||||
export CFLAGS="-I../eppic-%{eppic_commit}/libeppic $CFLAGS"
|
||||
export LDFLAGS="-L../eppic-%{eppic_commit}/libeppic $LDFLAGS"
|
||||
make %{?_smp_mflags} eppic_makedumpfile.so %{?ncurses_make_opts}
|
||||
%endif
|
||||
|
||||
%install
|
||||
install -D -m 0755 makedumpfile %{buildroot}%{_bindir}/makedumpfile
|
||||
install -D -m 0755 makedumpfile-R.pl %{buildroot}%{_bindir}/makedumpfile-R.pl
|
||||
install -D -m 0644 makedumpfile.8 %{buildroot}%{_mandir}/man8/makedumpfile.8
|
||||
install -D -m 0644 makedumpfile.conf.5 %{buildroot}%{_mandir}/man5/makedumpfile.conf.5
|
||||
%if %{build_eppic}
|
||||
install -D -m 0755 eppic_makedumpfile.so %{buildroot}%{_libdir}/%{name}-%{version}/eppic_makedumpfile.so
|
||||
install -d -m 0755 %{buildroot}%{_datadir}/%{name}-%{version}/eppic_scripts
|
||||
install -m 0644 -t %{buildroot}%{_datadir}/%{name}-%{version}/eppic_scripts/ eppic_scripts/*
|
||||
%endif
|
||||
|
||||
# Compatibility cruft
|
||||
# there is no %%license prior to SLE12
|
||||
%if %{undefined _defaultlicensedir}
|
||||
%define license %doc
|
||||
%else
|
||||
# filesystem before SLE12 SP3 lacks /usr/share/licenses
|
||||
%if 0%(test ! -d %{_defaultlicensedir} && echo 1)
|
||||
%define _defaultlicensedir %{_defaultdocdir}
|
||||
%endif
|
||||
%endif # End of compatibility cruft
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%license COPYING
|
||||
%doc README IMPLEMENTATION
|
||||
%{_mandir}/man?/*
|
||||
%{_bindir}/*
|
||||
%if %{build_eppic}
|
||||
%dir %{_libdir}/%{name}-%{version}
|
||||
%{_libdir}/%{name}-%{version}/eppic_makedumpfile.so
|
||||
%dir %{_datadir}/%{name}-%{version}
|
||||
%{_datadir}/%{name}-%{version}/eppic_scripts/
|
||||
%endif
|
||||
|
||||
%changelog
|
Loading…
Reference in New Issue
Block a user