- Update to latest upstream release
- Use system readline library - Fix "crash --log vmcore" command for 3.11 and later kernels.
This commit is contained in:
parent
1515080c89
commit
bdde3e005a
1
.gitignore
vendored
1
.gitignore
vendored
@ -20,3 +20,4 @@ crash-5.0.6.tar.gz
|
||||
/crash-7.0.2.tar.gz
|
||||
/crash-7.0.3.tar.gz
|
||||
/crash-7.0.4.tar.gz
|
||||
/crash-7.0.5.tar.gz
|
||||
|
15
crash.spec
15
crash.spec
@ -3,8 +3,8 @@
|
||||
#
|
||||
Summary: Kernel analysis utility for live systems, netdump, diskdump, kdump, LKCD or mcore dumpfiles
|
||||
Name: crash
|
||||
Version: 7.0.4
|
||||
Release: 2%{?dist}
|
||||
Version: 7.0.5
|
||||
Release: 1%{?dist}
|
||||
License: GPLv3
|
||||
Group: Development/Debuggers
|
||||
Source: http://people.redhat.com/anderson/crash-%{version}.tar.gz
|
||||
@ -12,10 +12,12 @@ URL: http://people.redhat.com/anderson
|
||||
ExclusiveOS: Linux
|
||||
ExclusiveArch: %{ix86} ia64 x86_64 ppc ppc64 s390 s390x %{arm} aarch64
|
||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot-%(%{__id_u} -n)
|
||||
BuildRequires: ncurses-devel zlib-devel lzo-devel snappy-devel bison
|
||||
BuildRequires: ncurses-devel zlib-devel lzo-devel snappy-devel bison readline-devel
|
||||
Requires: binutils
|
||||
Provides: bundled(libiberty)
|
||||
Patch0: lzo_snappy.patch
|
||||
Patch1: use_system_readline.patch
|
||||
Patch2: crash_log.patch
|
||||
|
||||
%description
|
||||
The core analysis suite is a self-contained tool that can be used to
|
||||
@ -37,6 +39,8 @@ offered by Mission Critical Linux, or the LKCD kernel patch.
|
||||
%prep
|
||||
%setup -n %{name}-%{version} -q
|
||||
%patch0 -p1 -b lzo_snappy.patch
|
||||
%patch1 -p1 -b use_system_readline.patch
|
||||
%patch2 -p1 -b crash_log.patch
|
||||
|
||||
%build
|
||||
make RPMPKG="%{version}-%{release}" CFLAGS="%{optflags}"
|
||||
@ -65,6 +69,11 @@ rm -rf %{buildroot}
|
||||
%{_includedir}/*
|
||||
|
||||
%changelog
|
||||
* Fri Feb 28 2014 Dave Anderson <anderson@redhat.com> - 7.0.5-1
|
||||
- Update to latest upstream release
|
||||
- Use system readline library
|
||||
- Fix "crash --log vmcore" command for 3.11 and later kernels.
|
||||
|
||||
* Tue Dec 17 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 7.0.4-2
|
||||
- crash bundles gdb which bundles libiberty. Add virtual Provides for
|
||||
libiberty tracking. Open a bug for unbundling gdb RHBZ#1044119
|
||||
|
65
crash_log.patch
Normal file
65
crash_log.patch
Normal file
@ -0,0 +1,65 @@
|
||||
--- crash-7.0.5/kernel.c.orig
|
||||
+++ crash-7.0.5/kernel.c
|
||||
@@ -8980,6 +8980,12 @@ get_log_from_vmcoreinfo(char *file, char
|
||||
fprintf(fp, "OFFSET(log.ts_nsec): %ld\n",
|
||||
vmc->log_ts_nsec_OFFSET);
|
||||
free(string);
|
||||
+ } else if ((string = vmcoreinfo_read_string("OFFSET(printk_log.ts_nsec)"))) {
|
||||
+ vmc->log_ts_nsec_OFFSET = dtol(string, RETURN_ON_ERROR, NULL);
|
||||
+ if (CRASHDEBUG(1))
|
||||
+ fprintf(fp, "OFFSET(printk_log.ts_nsec): %ld\n",
|
||||
+ vmc->log_ts_nsec_OFFSET);
|
||||
+ free(string);
|
||||
}
|
||||
if ((string = vmcoreinfo_read_string("OFFSET(log.len)"))) {
|
||||
vmc->log_len_OFFSET = dtol(string, RETURN_ON_ERROR, NULL);
|
||||
@@ -8987,6 +8993,12 @@ get_log_from_vmcoreinfo(char *file, char
|
||||
fprintf(fp, "OFFSET(log.len): %ld\n",
|
||||
vmc->log_len_OFFSET);
|
||||
free(string);
|
||||
+ } else if ((string = vmcoreinfo_read_string("OFFSET(printk_log.len)"))) {
|
||||
+ vmc->log_len_OFFSET = dtol(string, RETURN_ON_ERROR, NULL);
|
||||
+ if (CRASHDEBUG(1))
|
||||
+ fprintf(fp, "OFFSET(printk_log.len): %ld\n",
|
||||
+ vmc->log_len_OFFSET);
|
||||
+ free(string);
|
||||
}
|
||||
if ((string = vmcoreinfo_read_string("OFFSET(log.text_len)"))) {
|
||||
vmc->log_text_len_OFFSET = dtol(string, RETURN_ON_ERROR, NULL);
|
||||
@@ -8994,6 +9006,12 @@ get_log_from_vmcoreinfo(char *file, char
|
||||
fprintf(fp, "OFFSET(log.text_len): %ld\n",
|
||||
vmc->log_text_len_OFFSET);
|
||||
free(string);
|
||||
+ } else if ((string = vmcoreinfo_read_string("OFFSET(printk_log.text_len)"))) {
|
||||
+ vmc->log_text_len_OFFSET = dtol(string, RETURN_ON_ERROR, NULL);
|
||||
+ if (CRASHDEBUG(1))
|
||||
+ fprintf(fp, "OFFSET(printk_log.text_len): %ld\n",
|
||||
+ vmc->log_text_len_OFFSET);
|
||||
+ free(string);
|
||||
}
|
||||
if ((string = vmcoreinfo_read_string("OFFSET(log.dict_len)"))) {
|
||||
vmc->log_dict_len_OFFSET = dtol(string, RETURN_ON_ERROR, NULL);
|
||||
@@ -9001,12 +9019,23 @@ get_log_from_vmcoreinfo(char *file, char
|
||||
fprintf(fp, "OFFSET(log.dict_len): %ld\n",
|
||||
vmc->log_dict_len_OFFSET);
|
||||
free(string);
|
||||
+ } else if ((string = vmcoreinfo_read_string("OFFSET(printk_log.dict_len)"))) {
|
||||
+ vmc->log_dict_len_OFFSET = dtol(string, RETURN_ON_ERROR, NULL);
|
||||
+ if (CRASHDEBUG(1))
|
||||
+ fprintf(fp, "OFFSET(printk_log.dict_len): %ld\n",
|
||||
+ vmc->log_dict_len_OFFSET);
|
||||
+ free(string);
|
||||
}
|
||||
if ((string = vmcoreinfo_read_string("SIZE(log)"))) {
|
||||
vmc->log_SIZE = dtol(string, RETURN_ON_ERROR, NULL);
|
||||
if (CRASHDEBUG(1))
|
||||
fprintf(fp, "SIZE(log): %ld\n", vmc->log_SIZE);
|
||||
free(string);
|
||||
+ } else if ((string = vmcoreinfo_read_string("SIZE(printk_log)"))) {
|
||||
+ vmc->log_SIZE = dtol(string, RETURN_ON_ERROR, NULL);
|
||||
+ if (CRASHDEBUG(1))
|
||||
+ fprintf(fp, "SIZE(printk_log): %ld\n", vmc->log_SIZE);
|
||||
+ free(string);
|
||||
}
|
||||
|
||||
/*
|
2
sources
2
sources
@ -1 +1 @@
|
||||
45b47c058e088d12a3830c33b698b66c crash-7.0.4.tar.gz
|
||||
3fba47055539e61ba3fb4d6e8a0e84b0 crash-7.0.5.tar.gz
|
||||
|
32
use_system_readline.patch
Normal file
32
use_system_readline.patch
Normal file
@ -0,0 +1,32 @@
|
||||
--- crash-7.0.4/cmdline.c.orig
|
||||
+++ crash-7.0.4/cmdline.c
|
||||
@@ -42,7 +42,8 @@ static int verify_args_input_file(char *
|
||||
#define READLINE_LIBRARY
|
||||
|
||||
#include <readline.h>
|
||||
-#include <rldefs.h>
|
||||
+#define vi_mode 0
|
||||
+#define emacs_mode 1
|
||||
#include <history.h>
|
||||
|
||||
static void readline_init(void);
|
||||
--- crash-7.0.4/Makefile.orig
|
||||
+++ crash-7.0.4/Makefile
|
||||
@@ -200,7 +200,7 @@ TAR_FILES=${SOURCE_FILES} Makefile ${GPL
|
||||
${EXTENSION_SOURCE_FILES} ${MEMORY_DRIVER_FILES}
|
||||
CSCOPE_FILES=${SOURCE_FILES}
|
||||
|
||||
-READLINE_DIRECTORY=./${GDB}/readline
|
||||
+READLINE_DIRECTORY=/usr/include/readline
|
||||
BFD_DIRECTORY=./${GDB}/bfd
|
||||
GDB_INCLUDE_DIRECTORY=./${GDB}/include
|
||||
|
||||
@@ -228,7 +228,7 @@ gdb_merge: force
|
||||
@rm -f ${PROGRAM}
|
||||
@if [ ! -f ${GDB}/config.status ]; then \
|
||||
(cd ${GDB}; ./configure ${GDB_CONF_FLAGS} --with-separate-debug-dir=/usr/lib/debug \
|
||||
- --with-bugurl="" --with-expat=no --with-python=no; \
|
||||
+ --with-bugurl="" --with-expat=no --with-python=no --with-system-readline; \
|
||||
make --no-print-directory CRASH_TARGET=${TARGET}; echo ${TARGET} > crash.target) \
|
||||
else (cd ${GDB}/gdb; make --no-print-directory CRASH_TARGET=${TARGET};); fi
|
||||
@if [ ! -f ${PROGRAM} ]; then \
|
Loading…
Reference in New Issue
Block a user