From 4d6330d310ad196f651b8307b6fe713bf902883b Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Wed, 8 Dec 2021 05:24:17 +0000 Subject: [PATCH] import crash-7.3.1-2.el8 --- ...lzo_snappy.patch => lzo_snappy_zstd.patch} | 15 ++++++--------- SOURCES/rhel8_build.patch | 19 ++++++++----------- SPECS/crash.spec | 9 ++++++--- 3 files changed, 20 insertions(+), 23 deletions(-) rename SOURCES/{lzo_snappy.patch => lzo_snappy_zstd.patch} (56%) diff --git a/SOURCES/lzo_snappy.patch b/SOURCES/lzo_snappy_zstd.patch similarity index 56% rename from SOURCES/lzo_snappy.patch rename to SOURCES/lzo_snappy_zstd.patch index 336f9cb..4813ed0 100644 --- a/SOURCES/lzo_snappy.patch +++ b/SOURCES/lzo_snappy_zstd.patch @@ -1,26 +1,23 @@ -diff --git crash-7.3.1/Makefile crash-7.3.1/Makefile -index 745541012f43..d0574d8f07d3 100644 ---- crash-7.3.1/Makefile +--- crash-7.3.1/Makefile.orig +++ crash-7.3.1/Makefile -@@ -228,7 +228,7 @@ all: make_configure +@@ -230,7 +230,7 @@ all: make_configure gdb_merge: force @if [ ! -f ${GDB}/README ]; then \ make --no-print-directory gdb_unzip; fi - @echo "${LDFLAGS} -lz -ldl -rdynamic" > ${GDB}/gdb/mergelibs -+ @echo "${LDFLAGS} -lz -llzo2 -lsnappy -ldl -rdynamic" > ${GDB}/gdb/mergelibs ++ @echo "${LDFLAGS} -lz -llzo2 -lsnappy -lzstd -ldl -rdynamic" > ${GDB}/gdb/mergelibs @echo "../../${PROGRAM} ../../${PROGRAM}lib.a" > ${GDB}/gdb/mergeobj @rm -f ${PROGRAM} @if [ ! -f ${GDB}/config.status ]; then \ -diff --git crash-7.3.1/diskdump.c crash-7.3.1/diskdump.c -index e88243e616cc..9ccf7039231b 100644 ---- crash-7.3.1/diskdump.c +--- crash-7.3.1/diskdump.c.orig +++ crash-7.3.1/diskdump.c -@@ -23,6 +23,8 @@ +@@ -23,6 +23,9 @@ * GNU General Public License for more details. */ +#define LZO +#define SNAPPY ++#define ZSTD #include "defs.h" #include "diskdump.h" #include "xen_dom0.h" diff --git a/SOURCES/rhel8_build.patch b/SOURCES/rhel8_build.patch index c7e4587..55560b8 100644 --- a/SOURCES/rhel8_build.patch +++ b/SOURCES/rhel8_build.patch @@ -1,8 +1,6 @@ -diff --git crash-7.3.1/Makefile crash-7.3.1/Makefile -index d0574d8f07d3..9dbb61d0dbc8 100644 ---- crash-7.3.1/Makefile +--- crash-7.3.1/Makefile.orig +++ crash-7.3.1/Makefile -@@ -198,7 +198,7 @@ GDB_FLAGS= +@@ -200,7 +200,7 @@ GDB_FLAGS= # TARGET_CFLAGS will be configured automatically by configure TARGET_CFLAGS= @@ -11,20 +9,18 @@ index d0574d8f07d3..9dbb61d0dbc8 100644 GPL_FILES= TAR_FILES=${SOURCE_FILES} Makefile ${GPL_FILES} README .rh_rpm_package crash.8 \ -@@ -228,7 +228,7 @@ all: make_configure +@@ -230,7 +230,7 @@ all: make_configure gdb_merge: force @if [ ! -f ${GDB}/README ]; then \ make --no-print-directory gdb_unzip; fi -- @echo "${LDFLAGS} -lz -llzo2 -lsnappy -ldl -rdynamic" > ${GDB}/gdb/mergelibs -+ @echo "${LDFLAGS} -lz -llzo2 -lsnappy -ldl -rdynamic -Wl,-z,now -fpie" > ${GDB}/gdb/mergelibs +- @echo "${LDFLAGS} -lz -llzo2 -lsnappy -lzstd -ldl -rdynamic" > ${GDB}/gdb/mergelibs ++ @echo "${LDFLAGS} -lz -llzo2 -lsnappy -lzstd -ldl -rdynamic -Wl,-z,now -fpie" > ${GDB}/gdb/mergelibs @echo "../../${PROGRAM} ../../${PROGRAM}lib.a" > ${GDB}/gdb/mergeobj @rm -f ${PROGRAM} @if [ ! -f ${GDB}/config.status ]; then \ -diff --git crash-7.3.1/configure.c crash-7.3.1/configure.c -index 75006e881f5a..06c94d58c56c 100644 ---- crash-7.3.1/configure.c +--- crash-7.3.1/configure.c.orig +++ crash-7.3.1/configure.c -@@ -780,7 +780,8 @@ build_configure(struct supported_gdb_version *sp) +@@ -800,7 +800,8 @@ build_configure(struct supported_gdb_version *sp) fprintf(fp2, "%s\n", sp->GDB); sprintf(target_data.gdb_version, "%s", &sp->GDB[4]); } else if (strncmp(buf, "LDFLAGS=", strlen("LDFLAGS=")) == 0) { @@ -33,3 +29,4 @@ index 75006e881f5a..06c94d58c56c 100644 + fprintf(fp2, "LDFLAGS=%s\n", ldflags ? ldflags : ""); } else fprintf(fp2, "%s", buf); + diff --git a/SPECS/crash.spec b/SPECS/crash.spec index 752684a..b187d45 100644 --- a/SPECS/crash.spec +++ b/SPECS/crash.spec @@ -4,7 +4,7 @@ Summary: Kernel analysis utility for live systems, netdump, diskdump, kdump, LKCD or mcore dumpfiles Name: crash Version: 7.3.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv3 Group: Development/Debuggers Source0: https://github.com/crash-utility/crash/archive/crash-%{version}.tar.gz @@ -16,7 +16,7 @@ Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot-%(%{__id_u} -n) BuildRequires: ncurses-devel zlib-devel lzo-devel bison snappy-devel libzstd-devel Requires: binutils Provides: bundled(gdb) = 7.6 -Patch0: lzo_snappy.patch +Patch0: lzo_snappy_zstd.patch Patch1: rhel8_build.patch Patch2: rhel8_freepointer.patch @@ -39,7 +39,7 @@ offered by Mission Critical Linux, or the LKCD kernel patch. %prep %setup -n %{name}-%{version} -q -%patch0 -p1 -b lzo_snappy.patch +%patch0 -p1 -b lzo_snappy_zstd.patch %patch1 -p1 -b rhel8_build.patch %patch2 -p1 -b rhel8_freepointer.patch @@ -72,6 +72,9 @@ rm -rf %{buildroot} %{_includedir}/* %changelog +* Tue Dec 07 2021 Lianbo Jiang - 7.3.1-2 +- Enable ZSTD feature support + * Fri Nov 26 2021 Lianbo Jiang - 7.3.1-1 - Rebase to the latest crash-7.3.1