Summary: Core Analysis Suite
Summary(pl.UTF-8): Zestaw narzędzi do analizy zrzutów pamięci
Name: %{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel}
-Version: 7.2.8
+Version: 8.0.4
Release: %{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}}
License: GPL v2+
Group: Libraries
-#Source0Download: https://github.com/crash-utility/crash/releases
-#future releases: https://github.com/crash-utility/crash/archive/%{version}/%{pname}-%{version}.tar.gz
-Source0: http://people.redhat.com/anderson/%{pname}-%{version}.tar.gz
-# Source0-md5: a76e61e81058774f62e562435e5af396
-# git clone https://code.google.com/p/eppic
+Source0: https://github.com/crash-utility/crash/archive/%{version}/%{pname}-%{version}.tar.gz
+# Source0-md5: 5d8513ded5c9517e713a75e712d72e3a
+# git clone -b v5.0 https://github.com/lucchouina/eppic
Source1: eppic.tar.xz
-# Source1-md5: a9f80ad71de9d6f5b77534a7ebdbed8e
+# Source1-md5: a04143f6eb0d72c33cd53329dc1b4803
+Source2: https://ftp.gnu.org/gnu/gdb/gdb-10.2.tar.gz
+# Source2-md5: 8130d3441bcd1689987e3da5e4f8cd17
Patch0: %{pname}-x32.patch
+Patch1: only-patch-gdb.patch
URL: https://github.com/crash-utility/crash
BuildRequires: rpmbuild(macros) >= 1.701
%{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}}
%{?with_kernel:%{expand:%create_kernel_packages}}
%prep
-%setup -q -a1 -n %{pname}-%{version}
+%setup -q -a1 -a2 -n %{pname}-%{version}
%patch0 -p1
+%patch1 -p1
%{__mv} eppic extensions
%if %{with userspace}
export CPPFLAGS="%{rpmcppflags} -I/usr/include/ncurses"
-%{__make} -j1 all extensions \
+%{__make} \
+ ARCH="%{_target_cpu}" \
+ CC="%{__cc}" \
+ CFLAGS="%{rpmcflags} -I/usr/include/ncurses"
+
+%{__make} -j1 extensions \
ARCH="%{_target_cpu}" \
CC="%{__cc}" \
CFLAGS="%{rpmcflags} -I/usr/include/ncurses"
%attr(755,root,root) %{_libdir}/crash/extensions/echo.so
%attr(755,root,root) %{_libdir}/crash/extensions/eppic.so
%attr(755,root,root) %{_libdir}/crash/extensions/snap.so
-%attr(755,root,root) %{_libdir}/crash/extensions/trace.so
%{_mandir}/man8/crash.8*
%files devel
+++ /dev/null
---- crash-7.2.8/memory_driver/crash.c~ 2020-01-30 19:57:27.000000000 +0100
-+++ crash-7.2.8/memory_driver/crash.c 2020-08-16 18:41:10.187285717 +0200
-@@ -34,6 +34,7 @@
- #include <linux/mm.h>
- #include <linux/highmem.h>
- #include <linux/mmzone.h>
-+#include <linux/version.h>
-
- extern int page_is_ram(unsigned long);
-
-@@ -186,7 +186,11 @@
- return -EFAULT;
- }
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,8,0)
- if (probe_kernel_write(vaddr, buffer, count)) {
-+#else
-+ if (copy_to_kernel_nofault(vaddr, buffer, count)) {
-+#endif
- unmap_virtual(page);
- return -EFAULT;
- }
-@@ -227,7 +227,11 @@
- * Use bounce buffer to bypass the CONFIG_HARDENED_USERCOPY
- * kernel text restriction.
- */
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,8,0)
- if (probe_kernel_read(buffer, vaddr, count)) {
-+#else
-+ if (copy_from_kernel_nofault(buffer, vaddr, count)) {
-+#endif
- unmap_virtual(page);
- return -EFAULT;
- }
--- /dev/null
+--- crash-8.0.4/Makefile~ 2023-11-16 03:20:42.000000000 +0100
++++ crash-8.0.4/Makefile 2023-12-25 12:29:22.153190280 +0100
+@@ -251,12 +251,11 @@
+
+ all: make_configure
+ @./configure ${CONF_TARGET_FLAG} -p "RPMPKG=${RPMPKG}" -b
++ @$(MAKE) gdb_patch
+ @$(MAKE) gdb_merge
+ # @$(MAKE) extensions
+
+ gdb_merge: force
+- @if [ ! -f ${GDB}/README ]; then \
+- $(MAKE) gdb_unzip; fi
+ @echo "${LDFLAGS} -lz -ldl -rdynamic" > ${GDB}/gdb/mergelibs
+ @echo "../../${PROGRAM} ../../${PROGRAM}lib.a" > ${GDB}/gdb/mergeobj
+ @rm -f ${PROGRAM}