import crash-gcore-command-1.6.4-7.el10

i10c-beta changed/i10c-beta/crash-gcore-command-1.6.4-7.el10
MSVSphere Packaging Team 3 months ago
commit 5a59614c79
Signed by: sys_gitsync
GPG Key ID: B2B0B9F29E528FE8

@ -0,0 +1 @@
2c15b78c28ef2e71307e826a5a7912346b4c4d2a SOURCES/crash-gcore-command-1.6.4.tar.gz

1
.gitignore vendored

@ -0,0 +1 @@
SOURCES/crash-gcore-command-1.6.4.tar.gz

@ -0,0 +1,59 @@
From 33f3c97f7d45c8bb1b43a8d551cb01a9873bb123 Mon Sep 17 00:00:00 2001
From: HATAYAMA Daisuke <d.hatayama@fujitsu.com>
Date: Tue, 28 Feb 2023 03:59:16 -0500
Subject: [PATCH] coredump: fix building failure due to undefined macros
MAPLE_TREE_{COUNT,GATHER}
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
As of the commit 13794ace3830bf0274fe7b2e0e579ad72e31848f (coredump:
fix failure of executing gcore command due to introduction of maple
tree management on vma list), gcore.so fails to get built with the
following error messages with defs.h without maple tree API support:
libgcore/gcore_coredump.c:189:50: error: MAPLE_TREE_COUNT undeclared (first use in this function); did you mean RADIX_TREE_COUNT?
189 | entry_num = do_maple_tree(mm_mt, MAPLE_TREE_COUNT, NULL);
| ^~~~~~~~~~~~~~~~
| RADIX_TREE_COUNT
libgcore/gcore_coredump.c:189:50: note: each undeclared identifier is reported only once for each function it appears in
libgcore/gcore_coredump.c:191:38: error: MAPLE_TREE_GATHER undeclared (first use in this function); did you mean RADIX_TREE_GATHER?
191 | do_maple_tree(mm_mt, MAPLE_TREE_GATHER, entry_list);
| ^~~~~~~~~~~~~~~~~
| RADIX_TREE_GATHER
This is caused by the missing macros MAPLE_TREE_COUNT and
MAPLE_TREE_GATHER.
To fix the issue, define the two macros within crash gcore so that
build is successfully done expecting the resulting binary works well
when it is ran against new crash utility that has maple tree API
support.
Signed-off-by: HATAYAMA Daisuke <d.hatayama@fujitsu.com>
---
src/libgcore/gcore_coredump.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/libgcore/gcore_coredump.c b/src/libgcore/gcore_coredump.c
index fa744d4..8eece96 100644
--- a/src/libgcore/gcore_coredump.c
+++ b/src/libgcore/gcore_coredump.c
@@ -128,6 +128,14 @@ void gcore_readmem_user(ulong addr, void *buf, long size, char *type)
}
}
+#if !defined(MAPLE_TREE_COUNT)
+#define MAPLE_TREE_COUNT (1)
+#endif
+
+#if !defined(MAPLE_TREE_GATHER)
+#define MAPLE_TREE_GATHER (4)
+#endif
+
ulong __attribute__((weak))
do_maple_tree(ulong root, int flag, struct list_pair *lp)
{
--
2.39.2

@ -0,0 +1,93 @@
%global reponame crash-gcore
Summary: Gcore extension module for the crash utility
Name: crash-gcore-command
Version: 1.6.4
Release: 7%{?dist}
License: GPL-2.0-only
Source0: https://github.com/fujitsu/crash-gcore/archive/v%{version}/%{name}-%{version}.tar.gz
URL: https://github.com/fujitsu/crash-gcore
ExclusiveOS: Linux
ExclusiveArch: aarch64 ppc64le x86_64
BuildRequires: crash-devel >= 5.1.5
BuildRequires: gcc
Requires: crash >= 5.1.5
Patch0: crash-gcore-1.6.4-coredump-fix-building-failure-due-to-undefined-macro.patch
%description
Command for creating a core dump file of a user-space task that was
running in a kernel dump file.
%prep
%autosetup -n %{reponame}-%{version} -p1
%build
%make_build CFLAGS="%{optflags} -Wl,-z,now" -C src -f gcore.mk
%install
install -m 0755 -d %{buildroot}%{_libdir}/crash/extensions
install -m 0755 -t %{buildroot}%{_libdir}/crash/extensions %{_builddir}/%{reponame}-%{version}/src/gcore.so
%files
%dir %{_libdir}/crash
%dir %{_libdir}/crash/extensions
%{_libdir}/crash/extensions/gcore.so
%license COPYING
%changelog
* Tue Nov 26 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 1.6.4-7
- Rebuilt for MSVSphere 10
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.6.4-7
- Bump release for June 2024 mass rebuild
* Wed Apr 24 2024 Tao Liu <ltao@redhat.com> - 1.6.4-6
- Fix the hardening issue "FAIL: bind-now test because not linked with -Wl,-z,now"
- add gating.yaml
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Tue Sep 12 2023 HATAYAMA Daisuke <d.hatayama@fujitsu.com> - 1.6.4-3
- Migrate to SPDX license format
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed Mar 1 2023 HATAYAMA Daisuke <d.hatayama@fujitsu.com> - 1.6.4-1
- coredump: fix building failure due to undefined macros MAPLE_TREE_{COUNT,GATHER}
* Wed Mar 1 2023 HATAYAMA Daisuke <d.hatayama@fujitsu.com> - 1.6.4-0
- Update to latest upstream release
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Tue Jul 26 2022 HATAYAMA Daisuke <d.hatayama@fujitsu.com> - 1.6.3-2
- gcore.mk: fix mismatch of _FILE_OFFSET_BITS when building gcore.so
- coredump: fix unexpected truncation of generated core files
- elf: fix warning message caused by type mismatch of offset types
- coredump: fix segmentation fault caused by type mismatch
- x86: Fix failure of collecting vsyscall mapping due to change of enum type of vsyscall_mode
- gcore: fix memory allocation failure during processing NT_AUXV note
- gcore, defs: remove definitions and initializations for saved_auxv entries of offset and size tables
- coredump: use MEMBER_{OFFSET, SIZE} instead of GCORE_{OFFSET, SIZE}
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.3-1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Dec 10 2021 HATAYAMA Daisuke <d.hatayama@fujitsu.com> - 1.6.3-0
- Update to latest upstream release
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jan 22 2021 HATAYAMA Daisuke <d.hatayama@fujitsu.com> - 1.6.2-1
- Initial crash-gcore-command package
Loading…
Cancel
Save