[packages/crash] - up to 8.0.4

baggins baggins at pld-linux.org
Mon Dec 25 13:16:57 CET 2023


commit 589e70ce3be9f3e986f7321cbc6b3e9348e757d0
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Mon Dec 25 13:15:54 2023 +0100

    - up to 8.0.4

 crash.spec           | 26 ++++++++++++++++----------
 kernel-5.8.patch     | 34 ----------------------------------
 only-patch-gdb.patch | 16 ++++++++++++++++
 3 files changed, 32 insertions(+), 44 deletions(-)
---
diff --git a/crash.spec b/crash.spec
index b955d98..1caea94 100644
--- a/crash.spec
+++ b/crash.spec
@@ -25,18 +25,19 @@ exit 1
 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}}
@@ -115,8 +116,9 @@ Ten pakiet zawiera sterownik pamięci /dev/crash do sesji crash na\
 %{?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
 
@@ -125,7 +127,12 @@ Ten pakiet zawiera sterownik pamięci /dev/crash do sesji crash na\
 
 %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"
@@ -165,7 +172,6 @@ rm -rf $RPM_BUILD_ROOT
 %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
diff --git a/kernel-5.8.patch b/kernel-5.8.patch
deleted file mode 100644
index baebb11..0000000
--- a/kernel-5.8.patch
+++ /dev/null
@@ -1,34 +0,0 @@
---- 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;
-         }
diff --git a/only-patch-gdb.patch b/only-patch-gdb.patch
new file mode 100644
index 0000000..e80ab77
--- /dev/null
+++ b/only-patch-gdb.patch
@@ -0,0 +1,16 @@
+--- 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}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/crash.git/commitdiff/589e70ce3be9f3e986f7321cbc6b3e9348e757d0



More information about the pld-cvs-commit mailing list