From 1096e1c847980ed5fb9eca9529e73eec4be8f556 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Wed, 26 Feb 2025 10:44:12 +0100 Subject: [PATCH] 3.24.0-4 - Split main valgrind package into several subpackages Resolves: #RHEL-75468 valgrind python dependency - Split off the gdb integration and python3.11 scripts into a separate subpackage [rhel-9] - Split main valgrind package into several subpackages: - valgrind now contains just the core tools. - valgrind-scripts contains the post-processing scripts for callgrind, cachegrind, massif and dhat which depend on perl and python. - valgrind-gdb contains the debuginfo client/server and (v)gdb support. - valgrind-docs contains the man pages, html and pdf manual. - Adjust Requires/Recommends to subpackages can be installed independently. - valgrind-devel now Recommends, instead of Requires, valgrind. - valgrind-gdb Requires valgrind - valgrind-scripts Recommends valgrind-gdb - valgrind-gdb Recommends gdb --- valgrind.spec | 106 +++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 84 insertions(+), 22 deletions(-) diff --git a/valgrind.spec b/valgrind.spec index f385bf8..2bc7abd 100644 --- a/valgrind.spec +++ b/valgrind.spec @@ -3,7 +3,7 @@ Summary: Dynamic analysis tools to detect memory or thread bugs and profile Name: %{?scl_prefix}valgrind Version: 3.24.0 -Release: 3%{?dist} +Release: 4%{?dist} Epoch: 1 License: GPLv2+ URL: https://www.valgrind.org/ @@ -132,6 +132,11 @@ BuildRequires: elfutils-debuginfod-client Recommends: elfutils-debuginfod-client %endif +# Optional subpackages +Recommends: %{?scl_prefix}valgrind-docs = %{epoch}:%{version}-%{release} +Recommends: %{?scl_prefix}valgrind-scripts = %{epoch}:%{version}-%{release} +Recommends: %{?scl_prefix}valgrind-gdb = %{epoch}:%{version}-%{release} + # For running the testsuite. # Some of the python scripts require python 3.9+ BuildRequires: python3-devel @@ -191,11 +196,43 @@ profiler (callgrind), and a heap profiler (massif). %package devel Summary: Development files for valgrind aware programs -Requires: %{?scl_prefix}valgrind = %{epoch}:%{version}-%{release} +# These are just the header files, so strictly speaking you don't +# need valgrind itself unless you are testing your builds. This used +# to be a Requires, so people might depend on the package pulling in +# the core valgrind package, so make it at least a weak dependency. +Recommends: %{?scl_prefix}valgrind = %{epoch}:%{version}-%{release} %description devel Header files and libraries for development of valgrind aware programs. +%package docs +Summary: Documentation for valgrind tools, scripts and gdb integration +License: GFDL-1.2-or-later + +%description docs +Documentation in html and pdf, plus man pages for valgrind tools and scripts. + +%package scripts +Summary: Scripts for post-processing valgrind tool output +License: GPL-2.0-or-later +# Most scripts can be used as is for post-processing a valgrind tool run. +# But callgrind_control uses vgdb. +Recommends: %{?scl_prefix}valgrind-gdb = %{epoch}:%{version}-%{release} + +%description scripts +Perl and Python scripts for post-processing valgrind tool output. + +%package gdb +Summary: Tools for integrating valgrind and gdb +License: GPL-2.0-or-later +Requires: %{?scl_prefix}valgrind = %{epoch}:%{version}-%{release} +# vgdb can be used without gdb, just to control valgrind. +# But normally you use it together with both valgrind and gdb. +Recommends: gdb + +%description gdb +Tools and support files for integrating valgrind and gdb. + %if %{build_tools_devel} %package tools-devel Summary: Development files for building valgrind tools. @@ -409,18 +446,41 @@ echo ===============END TESTING=============== %{!?_licensedir:%global license %%doc} %files -%license COPYING COPYING.DOCS -%doc NEWS README_* -%doc docs/installed/html docs/installed/*.pdf -%{_bindir}/* +%license COPYING +%{_bindir}/valgrind %dir %{_libexecdir}/valgrind -# Install everything in the libdir except the .so. -# The vgpreload so files might need file mode adjustment. -%{_libexecdir}/valgrind/*[^o] +# Install just the core tools, default suppression and vgpreload libraries. +%{_libexecdir}/valgrind/default.supp +%{_libexecdir}/valgrind/*-*-linux # Turn on executable bit again for vgpreload libraries. # Was disabled in %%install to prevent debuginfo stripping. -%attr(0755,root,root) %{_libexecdir}/valgrind/vgpreload*-%{valarch}-*so +%attr(0755,root,root) %{_libexecdir}/valgrind/vgpreload_*-%{valarch}-linux.so + +%files docs +%license COPYING.DOCS +%doc NEWS README_* +%doc docs/installed/html docs/installed/*.pdf %{_mandir}/man1/* + +%files scripts +%license COPYING +%{_bindir}/callgrind_annotate +%{_bindir}/callgrind_control +%{_bindir}/cg_annotate +%{_bindir}/cg_diff +%{_bindir}/cg_merge +%{_bindir}/ms_print +%{_libexecdir}/valgrind/dh_view.css +%{_libexecdir}/valgrind/dh_view.html +%{_libexecdir}/valgrind/dh_view.js + +%files gdb +%license COPYING +%{_bindir}/valgrind-di-server +%{_bindir}/valgrind-listener +%{_bindir}/vgdb +# gdb register descriptions +%{_libexecdir}/valgrind/*.xml %{_datadir}/gdb/auto-load/valgrind-monitor.py %{_datadir}/gdb/auto-load/valgrind-monitor-def.py @@ -453,24 +513,26 @@ echo ===============END TESTING=============== %{_libdir}/valgrind/libmpiwrap*.so %endif -%if 0%{?rhel} == 6 -%post -# There is a bug in rpm (rhbz#214737) that might cause post to be run -# even thought the binary isn't installed when installing two multilib -# versions at the same time. -if [ -x %{_bindir}/valgrind ]; then -# On RHEL6 the fs equivalency should be setup by the devtoolset meta -# package, but because of a rpm bug (rhbz#924044) it might not work. -%{?scl:/sbin/restorecon %{_bindir}/valgrind}%{!?scl:true} -fi -%endif - %changelog +* Wed Feb 26 2025 Mark Wielaard - 3.24.0-4 +- Split main valgrind package into several subpackages: + - valgrind now contains just the core tools. + - valgrind-scripts contains the post-processing scripts for callgrind, + cachegrind, massif and dhat which depend on perl and python. + - valgrind-gdb contains the debuginfo client/server and (v)gdb support. + - valgrind-docs contains the man pages, html and pdf manual. +- Adjust Requires/Recommends to subpackages can be installed independently. + - valgrind-devel now Recommends, instead of Requires, valgrind. + - valgrind-gdb Requires valgrind + - valgrind-scripts Recommends valgrind-gdb + - valgrind-gdb Recommends gdb + * Tue Jan 14 2025 Mark Wielaard - 3.24.0-3 - Add more VALGRIND_3_24_BRANCH patches 0012-Recognize-new-DWARF5-DW_LANG-constants.patch 0013-Bug-498317-FdBadUse-is-not-a-valid-CoreError-type-in.patch 0014-linux-support-EVIOCGRAB-ioctl.patch + * Tue Nov 26 2024 Mark Wielaard - 3.24.0-2 - Add VALGRIND_3_24_BRANCH patches 0001-Prepare-NEWS-for-branch-3.24-fixes.patch