From c0627460a9d44e4518de3b4eca7adafdf2547092759aa36a5625f8b4e886ac54 Mon Sep 17 00:00:00 2001 From: Christophe Marin Date: Wed, 20 Nov 2024 12:16:53 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/heaptrack?expand=0&rev=49 --- .gitattributes | 23 +++ .gitignore | 1 + ...-C-compatibility-of-libunwind-probes.patch | 48 +++++++ heaptrack-1.5.0.tar.xz | 3 + heaptrack-1.5.0.tar.xz.sig | 16 +++ heaptrack.changes | 135 ++++++++++++++++++ heaptrack.keyring | 63 ++++++++ heaptrack.spec | 119 +++++++++++++++ 8 files changed, 408 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 0001-cmake-Fix-C-compatibility-of-libunwind-probes.patch create mode 100644 heaptrack-1.5.0.tar.xz create mode 100644 heaptrack-1.5.0.tar.xz.sig create mode 100644 heaptrack.changes create mode 100644 heaptrack.keyring create mode 100644 heaptrack.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/0001-cmake-Fix-C-compatibility-of-libunwind-probes.patch b/0001-cmake-Fix-C-compatibility-of-libunwind-probes.patch new file mode 100644 index 0000000..0b619c8 --- /dev/null +++ b/0001-cmake-Fix-C-compatibility-of-libunwind-probes.patch @@ -0,0 +1,48 @@ +From c6c45f3455a652c38aefa402aece5dafa492e8ab Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Fri, 15 Dec 2023 22:53:19 +0100 +Subject: [PATCH] cmake: Fix C compatibility of libunwind probes +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Future compilers such as GCC 14 are likely to enforce C type +compatibility rules by default and report errors like this one: + +…/TryCompile-aAxUZn/src.c: In function ‘main’: +…/TryCompile-aAxUZn/src.c:3:43: error: passing argument 1 of ‘unw_backtrace’ from incompatible pointer type + 3 | int main() { void* buf[10]; unw_backtrace(&buf, 10); return 0; } + | ^~~~ + | | + | void * (*)[10] +In file included from /usr/include/libunwind-x86_64.h:129, + from /usr/include/libunwind.h:23, + from …/TryCompile-aAxUZn/src.c:2: +/usr/include/libunwind-common.h:318:27: note: expected ‘void **’ but argument is of type ‘void * (*)[10]’ + 318 | extern int unw_backtrace (void **, int); + | ^~~~~~~ + +Removing the address operator ensures that the array type decays to +a pointer, and that the types are compatible. +--- + cmake/FindLibunwind.cmake | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/cmake/FindLibunwind.cmake b/cmake/FindLibunwind.cmake +index 2dddfad..d597de9 100644 +--- a/cmake/FindLibunwind.cmake ++++ b/cmake/FindLibunwind.cmake +@@ -57,8 +57,8 @@ if (LIBUNWIND_LIBRARY) + LIBUNWIND_HAS_UNW_GETCONTEXT) + check_c_source_compiles("#define UNW_LOCAL_ONLY 1\n#include \nint main() { unw_context_t context; unw_cursor_t cursor; unw_getcontext(&context); unw_init_local(&cursor, &context); return 0; }" + LIBUNWIND_HAS_UNW_INIT_LOCAL) +- check_c_source_compiles("#define UNW_LOCAL_ONLY 1\n#include \nint main() { void* buf[10]; unw_backtrace(&buf, 10); return 0; }" LIBUNWIND_HAS_UNW_BACKTRACE) +- check_c_source_compiles ("#define UNW_LOCAL_ONLY 1\n#include \nint main() { void* buf[10]; unw_backtrace_skip(&buf, 10, 2); return 0; }" LIBUNWIND_HAS_UNW_BACKTRACE_SKIP) ++ check_c_source_compiles("#define UNW_LOCAL_ONLY 1\n#include \nint main() { void* buf[10]; unw_backtrace(buf, 10); return 0; }" LIBUNWIND_HAS_UNW_BACKTRACE) ++ check_c_source_compiles ("#define UNW_LOCAL_ONLY 1\n#include \nint main() { void* buf[10]; unw_backtrace_skip(buf, 10, 2); return 0; }" LIBUNWIND_HAS_UNW_BACKTRACE_SKIP) + check_c_source_compiles ("#define UNW_LOCAL_ONLY 1\n#include \nint main() { return unw_set_cache_size(unw_local_addr_space, 1024, 0); }" LIBUNWIND_HAS_UNW_SET_CACHE_SIZE) + check_c_source_compiles ("#define UNW_LOCAL_ONLY 1\n#include \nint main() { return unw_set_caching_policy(unw_local_addr_space, UNW_CACHE_PER_THREAD); }" LIBUNWIND_HAS_UNW_CACHE_PER_THREAD) + set(CMAKE_REQUIRED_QUIET ${CMAKE_REQUIRED_QUIET_SAVE}) +-- +2.46.0 + diff --git a/heaptrack-1.5.0.tar.xz b/heaptrack-1.5.0.tar.xz new file mode 100644 index 0000000..54797ba --- /dev/null +++ b/heaptrack-1.5.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a278d9d8f91e8bfb8a1c2f5b73eecab47fd45d0693f5dbea637536413cec2ea5 +size 5447668 diff --git a/heaptrack-1.5.0.tar.xz.sig b/heaptrack-1.5.0.tar.xz.sig new file mode 100644 index 0000000..bec6bdb --- /dev/null +++ b/heaptrack-1.5.0.tar.xz.sig @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCAAdFiEEezawi1aUvUGg3A1+8zYW/HGdOX8FAmUXAxIACgkQ8zYW/HGd +OX8LJBAAho6XtoD1RlXG00X1yxoKqPTzJvu0aSUlYPp0mJupoHSs07CZGfnGlDEs +J396gZb0jXEXhe/gNdv50Q2kTomyTewFI4zy/UJ/9UvxNdAv8y8P0yWgisRJLzs6 +GkigwBtDbdBhKUHk1+I3YJ+TQNeKcaElrfTLNdvzjcRG14BmeLEEKiG5NfAMhJGZ +/9jSDQQfNgVZ0XSHDph1e3G9hjaOzrpP1HNEnoKvu4qrbSmTKrjqxJnwkT681G9t +k+gAlo1p5rjLKLaCn/w7f42fVwFs99obRr2XFvHf1hr0aZPAVs7iDGAaIWmPmZG7 +v2x1YcSFLPOmLLAtEp92HNR1zbtAglUVfItt/E8Z9VU5yb2P45ZrJ2ZGzoj5+Ydb +RJa59mZDAX8xvberaVwysCRLJTvPvAd5NEG+4xU01FK89A4or1qJU+XVFkUts0US +9UThjhPHTsKeQLNcHkgqJ9g2wmakDzCJXauTr0MJ7x38E1kbCbOpnnUvF6QhOUhv +h4xH8e34bCmy1cPQmED6aTWq9+NTmYUtSJEtc3yRv+lJOv6wc4iub4tMRNVCNsrH +oYitqjMg7X4kKgI3r0IHtQ/PD5d1ZGc5yOMdT+Av2V84Fls8G5pNIIlaRVXzgOkf +mPyxZaoq+QGmbY7lqovX9QkgXk6xWvldZzoX0Pv9yGHJqAWyEvc= +=fFiM +-----END PGP SIGNATURE----- diff --git a/heaptrack.changes b/heaptrack.changes new file mode 100644 index 0000000..7b7e8b8 --- /dev/null +++ b/heaptrack.changes @@ -0,0 +1,135 @@ +------------------------------------------------------------------- +Wed Nov 20 12:16:48 UTC 2024 - Christophe Marin + +- Stop using the %suse_update_desktop_file macro + +------------------------------------------------------------------- +Tue Aug 20 08:55:48 UTC 2024 - Christophe Marin + +- Add upstream change: + * 0001-cmake-Fix-C-compatibility-of-libunwind-probes.patch + +------------------------------------------------------------------- +Wed Oct 4 07:50:05 UTC 2023 - Christophe Marin + +- Update to 1.5.0 + https://www.kdab.com/heaptrack-v1-5-0-released/ + * Elfutils is now used for symbolizing backtraces + * Various QOL improvements to the chart + * Various bug fixes and better platform support +- Drop patches, merged upstream: + * 0001-Fix-build-with-gcc-13-by-including-cstdint.patch + * 0001-Add-missing-include.patch + * 0001-Return-early-when-__libc_dlopen_mode-is-detected.patch + +------------------------------------------------------------------- +Thu Feb 23 10:21:47 UTC 2023 - Christophe Marin + +- Try another way to ignore the GLIBC_PRIVATE requirement + +------------------------------------------------------------------- +Wed Feb 22 10:57:50 UTC 2023 - Christophe Marin + +- Add upstream change: + * 0001-Return-early-when-__libc_dlopen_mode-is-detected.patch +- Define _filter_GLIBC_PRIVATE to fix installation on Leap + +------------------------------------------------------------------- +Tue Feb 7 23:22:36 UTC 2023 - Christophe Marin + +- Add GCC 13 and boost 1.81 compatibility patches: + * 0001-Fix-build-with-gcc-13-by-including-cstdint.patch + * 0001-Add-missing-include.patch + +------------------------------------------------------------------- +Sun Nov 27 08:15:26 UTC 2022 - Christophe Giboudeaux + +- Update to 1.4.0 + * Pass client exit code in heaptrack.sh + * Leverage non-deprecated mallinfo2 + * Add support for the mimalloc allocator + * Explicitly encode which hooks are required and which are + optional + * Make mi_* symbols truly optional by usig weak symbols for them + * Prevent malloc from disappearing in inlining example + * handle calling heaptrack_stop() without debuginfo + * Ensure we don't try to overwrite invalid tables + * Make elf_symbol_table a view of const Elf::Sym + * Ensure we don't read outside the string table for symbol names + * Silence -Wuse-after-free for realloc call + +------------------------------------------------------------------- +Sun Dec 19 15:09:15 UTC 2021 - Fabian Vogt + +- Update to 1.3.0: + * New features: + + Allocations can be filtered by time ranges + + Support for suppression files, including the + __lsan_default_suppressions API + * Fixed bugs: + + Fails to build on CentOS 7.0 (kde#441125) + + Crash when filtering on a time range (kde#441132) + + Heaptrack produces impossible/incorrect stack traces (kde#439897) + + ERROR: failed to lock heaptrack output file (kde#408547) + + Attaching to running process generates empty file (kde#394520) + + heaptrack launch script help text shows wrong option name for --output-file (kde#439307) + + Can the output file take hostname into account? (kde#435195) + + Heaptrack GUI crash when opening a zst file (kde#427970) + * More details on https://invent.kde.org/sdk/heaptrack/-/releases/v1.3.0 +- Use %autosetup + +------------------------------------------------------------------- +Sun Jan 17 08:39:36 UTC 2021 - Christophe Giboudeaux + +- Add quotes to text comparison to fix build with rpm 4.16. + +------------------------------------------------------------------- +Sat Sep 5 16:11:52 UTC 2020 - Klaas Freitag + +- Update to upstream version 1.2.0, a bugfix release. +- Removed Fix-compile-on-32bit.patch as it was added upstream. + +------------------------------------------------------------------- +Mon Aug 31 15:38:09 UTC 2020 - Christophe Giboudeaux + +- Fix the plugins installation directory. + +------------------------------------------------------------------- +Wed Jan 29 10:59:48 UTC 2020 - Fabian Vogt + +- Enable zstd support + +------------------------------------------------------------------- +Wed May 23 15:06:59 UTC 2018 - wbauer@tmo.at + +- Add Fix-compile-on-32bit.patch to make it build on 32bit + (kde#394330) +- Don't install office-chart-area icon from breeze to hicolor + anymore, heaptrack comes with its own application icon now +- Mark license files as %license instead of %doc +- Install README.md as well, it contains instructions on how to use + it + +------------------------------------------------------------------- +Wed May 23 13:40:54 UTC 2018 - fabian@ritter-vogt.de + +- Update to version 1.1.0: + * Stability and performance improvements + * When extended debug information is available, stack traces now include inlined frames. + * Split debug information in separate files is now supported. + * Compressed debug information is properly handled. + * The embedded flamegraph view is now searchable. + * More details available on https://www.kdab.com/heaptrack-v1-1-0-release/ +- Remove patches, now upstream: + * fix-build.patch + +------------------------------------------------------------------- +Sat Sep 2 15:03:19 UTC 2017 - wbauer@tmo.at + +- Add fix-build.patch to fix build with glibc 2.26 in Factory + (kde#383889) + +------------------------------------------------------------------- +Wed Apr 19 18:22:16 UTC 2017 - fabian@ritter-vogt.de + +- Initial commit diff --git a/heaptrack.keyring b/heaptrack.keyring new file mode 100644 index 0000000..fe29694 --- /dev/null +++ b/heaptrack.keyring @@ -0,0 +1,63 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBFpOmKABEAC7ME8zNtvKHPKNobZ4umX6O6nUfyhVpMYoX9mxWiejlwHBq8fI +Gi2hr4wUVXOUAylRFPrq0DLF8s5b4XXat8v1u75Z54yS7jnKU525nWIp8MVGU8Vs +U2ufIpguWOqWdj055wUvfpPnwDCYbnsd1Cr3YBD4xje7duK+2ZCTYpHI3UO1OKax +jBx1K2wcQDT7P8zbMRUsfmEq7AXjzJP4qJhJ2FJ1VsBMHu0SNVzQcrUr2aqTl5bQ +g3RFQLu4V2pg5D7hOcjdidQLwV9eh4eZiROd6km9tU1K3hSoCzt2oPEb8QLTkPWR +uBKS9Lv8QLYP8Vm1tqbVRA4yVV9golZ5HJx/SSU0rfe0lGrqimGa7ExxU5QaWW6j +9sjfg2DW6qZLFNI9mIImKpuftAxrNo1c+lV9q8Pge/DpIrKOPQSMzrFuAd7bfP4u +RSrM6FLdlULzY+qaSWtjGl5slpW2TztezzeJSwhFXbDu/wRY4qvoHwdxd2w4f8Oz +56gLV7MY2GhZ5UhJeSEUNTy0DflQoj1nKTwWWMjgSEM3vUbtYZZ6ZAbXq3h59P/F +jeCdvauYXEMO6hySJiLsWnFaVJHQnKfqrHXdhQv8ZOYLB4GmMRchwRnbcXrJnQoM +kRwfl8JMDA/esMnSQwx4A2wZ5w2efx84fDe5VH+ExLAl3sGqX0UWIqJ17wARAQAB +tB5NaWxpYW4gV29sZmYgPG1haWxAbWlsaWFudy5kZT6JAk4EEwEIADgWIQTFG0Wl +MvF/pAHQmaCgxrcsTxxefAUCWk6YoAIbLwULCQgHAgYVCgkICwIEFgIDAQIeAQIX +gAAKCRCgxrcsTxxefPEuD/4xzs9uEzvumwhKKoTzQRBEoE/QVHu7eT4AulTc/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+raDRCDCrBeXQIgzUG92WCl+fv9fJ3MBiJNxg0vEhOfIDhmy6etoK4YKOkPrH2hAA +n5qqYpozpw0celu170ReZVyqW2vqoKx+ggxHFHO9wH1tEhtasc2d41YJ3KRen84J +R6aeX3Gc2i/L14l5IJtU4MB6fJLfFJtOdWygW+s1UotUHZaPwiOz/O7YVuOKzp6p +guYjPPNdIiRen6zgmOs7/NEqMOOqSFXEcLOx7fmE2pHrvVhdnAefJuGJzyARBV71 +TKhBgsvkMsrZZzH+XXMI+z9e3yVGeIF4yvZA0fy0HAWtCy7hUzEFX6Vi+0RN0aFL +xrS5mVodZ/21ErBLbVrRtgHbAf11jh9ThvXFSbyNBrd1FuMFqNSsejsbI+pPluwY +g5ROmtrbWXZG3wLs+uETqwUkFD5EZN3VOOp8LfdD91UvrVp30V4ZcQ55eCVnzIL4 +CIGbzC61WsIruE/R7fian4vnXDIobsFYjX4KlmGokNwt01TTxU9+YTT9PL0nudy8 +PAJs4izSytGKksinu3KerT3Ni3u3+QdnsY7tGa63lfs7gDToOrJuQ5N+JStTlN1S +UiqTmznXgz2lI49eZweGtniGOQyTA8xhZWMcPdlt28iB5epOoClkcJusmvoF7LwR +UpvEw1VesrIKrI8VxPP65SgVR53g+poYjGJMGBGYRC+Esa+ep6tdXNzl/R5oA73J +b7Qe9aBbirxn+kmFygXLJf1MZzhmxEoVV6P9UxVexME= +=fanF +-----END PGP PUBLIC KEY BLOCK----- diff --git a/heaptrack.spec b/heaptrack.spec new file mode 100644 index 0000000..4c9cfcb --- /dev/null +++ b/heaptrack.spec @@ -0,0 +1,119 @@ +# +# spec file for package heaptrack +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +# Needed for Leap, see boo#468748 +%global __requires_exclude GLIBC_PRIVATE +%bcond_without released +Name: heaptrack +Version: 1.5.0 +Release: 0 +Summary: Heap Memory Allocation Profiler +License: LGPL-2.1-or-later +URL: https://apps.kde.org/heaptrack/ +Source0: https://download.kde.org/stable/heaptrack/%{version}/%{name}-%{version}.tar.xz +%if %{with released} +Source1: https://download.kde.org/stable/heaptrack/%{version}/%{name}-%{version}.tar.xz.sig +Source2: heaptrack.keyring +%endif +# PATCH-FIX-UPSTREAM -- gcc14 compat +Patch0: 0001-cmake-Fix-C-compatibility-of-libunwind-probes.patch +BuildRequires: extra-cmake-modules +BuildRequires: libboost_container-devel +BuildRequires: libboost_filesystem-devel +BuildRequires: libboost_iostreams-devel +BuildRequires: libboost_program_options-devel +BuildRequires: libboost_system-devel +BuildRequires: libdwarf-devel +BuildRequires: libunwind-devel +BuildRequires: pkgconfig +BuildRequires: zlib-devel +BuildRequires: cmake(KChart) >= 2.6.0 +BuildRequires: cmake(KF5ConfigWidgets) +BuildRequires: cmake(KF5CoreAddons) +BuildRequires: cmake(KF5I18n) +BuildRequires: cmake(KF5IconThemes) +BuildRequires: cmake(KF5ItemModels) +BuildRequires: cmake(KF5KIO) +BuildRequires: cmake(KF5ThreadWeaver) +BuildRequires: cmake(Qt5Core) +BuildRequires: cmake(Qt5Widgets) +BuildRequires: pkgconfig(libdw) >= 0.158 +BuildRequires: pkgconfig(libzstd) +Suggests: heaptrack-gui + +%description +A memory profiler for Linux, tracking heap allocations. + +%package devel +Summary: Development files for the Heaptrack API +Requires: heaptrack = %{version} + +%description devel +This package contains files needed to develop for the Heaptrack +API. + +%package gui +Summary: GUI Frontend for Heaptrack +Requires: heaptrack = %{version} + +%description gui +A Qt5/KF5 based GUI for Heaptrack. + +%lang_package + +%prep +%autosetup -p1 + +# Disable building tests, they're not used and post-build-checks trips over it +sed -i"" '/add_subdirectory(tests)/d' CMakeLists.txt + +%build +%if "%{_lib}" == "lib64" +extra_opts="-DLIB_SUFFIX=64" +%endif + +%cmake_kf5 -d build -- $extra_opts + +%cmake_build + +%install +%kf5_makeinstall -C build + +%find_lang %{name} --all-name + +%files +%license LICENSES/* +%doc README.md +%{_kf5_bindir}/heaptrack +%{_kf5_bindir}/heaptrack_print +%{_libdir}/heaptrack/ + +%files devel +%{_includedir}/heaptrack_api.h + +%files gui +%{_kf5_bindir}/heaptrack_gui +%{_kf5_applicationsdir}/org.kde.heaptrack.desktop +%{_kf5_appstreamdir}/org.kde.heaptrack.appdata.xml +%dir %{_kf5_iconsdir}/hicolor/* +%dir %{_kf5_iconsdir}/hicolor/*/* +%{_kf5_iconsdir}/*/*/*/*.* + +%files lang -f %{name}.lang + +%changelog