public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Julio Faracco <jfaracco@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/procdump] epel8: New upstream release 3.5.2
Date: Wed, 05 Aug 2026 19:13:07 GMT	[thread overview]
Message-ID: <178595718760.1.16148260792083079459.rpms-procdump-c950eac9d734@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/procdump
            Branch : epel8
            Commit : c950eac9d7349042ca95cfe400d3ddee9457d812
            Author : Julio Faracco <jfaracco@redhat.com>
            Date   : 2026-08-05T16:12:12-03:00
            Stats  : +755/-12 in 11 file(s)
            URL    : https://src.fedoraproject.org/rpms/procdump/c/c950eac9d7349042ca95cfe400d3ddee9457d812?branch=epel8

            Log:
            New upstream release 3.5.2

- Adds .NET counter integration (3.5.2)
- Adds a custom core dumper (corex) (3.5.2)
- Add support for RHEL10, Debian 13, Ubuntu 26.04, Fedora 43 and updated dependencies (3.5.1)

Signed-off-by: Julio Faracco <jfaracco@redhat.com>

---
diff --git a/.gitignore b/.gitignore
index dd5c6f0..2c5b8f1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
 /ProcDump-for-Linux-1.1.tar.gz
 /ProcDump-for-Linux-1.1.1.tar.gz
 /ProcDump-for-Linux-1.2.tar.gz
+/ProcDump-for-Linux-3.5.2.tar.gz

diff --git a/0002-Initialize-TerminalState-structure-properly.patch b/0002-Initialize-TerminalState-structure-properly.patch
new file mode 100644
index 0000000..43620b8
--- /dev/null
+++ b/0002-Initialize-TerminalState-structure-properly.patch
@@ -0,0 +1,30 @@
+From 30d8ca791d96f5cfa59be8c8d001f4a2a484cb3f Mon Sep 17 00:00:00 2001
+From: Julio Faracco <jcfaracco@gmail.com>
+Date: Tue, 14 Oct 2025 12:02:47 -0300
+Subject: [PATCH 2/4] Initialize TerminalState structure properly
+
+The structure TerminalState is not a pointer. So, it should be properly
+initialized with a double brackets. This commit just fixes this warning
+to avoid compilation failures.
+
+Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
+---
+ src/Monitor.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Monitor.cpp b/src/Monitor.cpp
+index 6268edf..1a1c63d 100644
+--- a/src/Monitor.cpp
++++ b/src/Monitor.cpp
+@@ -1605,7 +1605,7 @@ void* RestrackManualTriggerThread(void *thread_args /* struct ProcDumpConfigurat
+ #ifdef __linux__
+     struct ProcDumpConfiguration *config = (struct ProcDumpConfiguration *)thread_args;
+ 
+-    struct TerminalState originalTerminalState = {0};
++    struct TerminalState originalTerminalState = {{}};
+     auto_free struct CoreDumpWriter *writer = NULL;
+     std::vector<pthread_t> leakReportThreads;
+     int rc = 0;
+-- 
+2.50.1
+

diff --git a/0003-CMake-Add-ability-to-use-system-installed-libbpf-rat.patch b/0003-CMake-Add-ability-to-use-system-installed-libbpf-rat.patch
new file mode 100644
index 0000000..00906d6
--- /dev/null
+++ b/0003-CMake-Add-ability-to-use-system-installed-libbpf-rat.patch
@@ -0,0 +1,427 @@
+From 86fdf7644daa1068553e4b0e6cbd6f574aadb5b2 Mon Sep 17 00:00:00 2001
+From: Julio Faracco <jcfaracco@gmail.com>
+Date: Tue, 14 Oct 2025 13:27:06 -0300
+Subject: [PATCH] CMake: Add ability to use system-installed libbpf rather than
+ ExternalProject_Add
+
+This is a patchset based on PR #225.
+The PR does not work on top of 3.3 and it was rebased to be applied
+cleanly.
+
+Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
+---
+ CMakeLists.txt         | 105 ++++++++++++++++++++++---------
+ cmake/FindBpf.cmake    | 139 +++++++++++++++++++++++++++++++++++++++++
+ cmake/FindLibelf.cmake |  82 ++++++++++++++++++++++++
+ ebpf/procdump_ebpf.h   |   6 +-
+ 4 files changed, 301 insertions(+), 31 deletions(-)
+ create mode 100644 cmake/FindBpf.cmake
+ create mode 100644 cmake/FindLibelf.cmake
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b1ae451..2e8c87b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -31,14 +31,18 @@ cmake_policy(SET CMP0048 NEW)
+ # set the project name - version is MAJOR.MINOR.PATCH.RELEASE - releases start at 1
+ #
+ if (DEFINED ENV{VERSION})
+-  project(ProcDumpForLinux VERSION $ENV{VERSION})
++  project(ProcDumpForLinux VERSION $ENV{VERSION} LANGUAGES C CXX)
+ else()
+-  project(ProcDumpForLinux VERSION 0.0.0)
++  project(ProcDumpForLinux VERSION 0.0.0 LANGUAGES C CXX)
+ endif()
+ 
+ set(PROJECT_VERSION_TWEAK 0)
+ file(READ "dist/changelog" CHANGE_LOG)
+ 
++option(PROCDUMP_DISABLE_SYSTEM_LIBBPF "Don't attempt to use an installed libbpf" OFF)
++
++include(GNUInstallDirs)
++
+ #
+ # package name
+ #
+@@ -267,8 +271,18 @@ if(NOT APPLE AND CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
+ endif()
+ 
+ if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+-  add_dependencies(procdump libbpf procdump_ebpf)
+-  target_link_libraries(procdump ${libbpf_SOURCE_DIR}/src/libbpf.a elf z pthread corex)
++  add_dependencies(procdump procdump_ebpf)
++
++  list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
++  find_package(Threads REQUIRED)
++  find_package(ZLIB REQUIRED)
++  find_package(Libelf REQUIRED)
++  target_link_libraries(procdump
++         Libelf::Libelf
++         ZLIB::ZLIB
++         Threads::Threads
++         corex
++  )
+ else()
+   target_link_libraries(procdump z pthread)
+ endif()
+@@ -322,17 +336,38 @@ endif()
+ # Make ProcDump eBPF program
+ #
+ if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+-  # Fetch libbpf
+-  include(ExternalProject)
+-
+-  ExternalProject_Add(libbpf
+-      GIT_REPOSITORY https://github.com/libbpf/libbpf.git
+-      GIT_TAG v1.7.0
+-      PREFIX ./libbpf
+-      CONFIGURE_COMMAND ""
+-      BUILD_COMMAND cd ../libbpf/src && bash -c "CFLAGS=\"-g -O2 -Werror -Wall -fPIC\" make"
+-      INSTALL_COMMAND ""
+-      )
++  # Attempt to use system-installed libbpf
++  if(NOT PROCDUMP_DISABLE_SYSTEM_LIBBPF)
++    find_package(Bpf COMPONENTS libbpf)
++    if(Bpf_FOUND)
++      set(libbpf_LINK Bpf::libbpf)
++      set(libbpf_INCLUDE "${Bpf_INCLUDE_DIRS}")
++    endif()
++  endif()
++
++  if(NOT Bpf_FOUND)
++    # Fetch libbpf
++    include(ExternalProject)
++
++    ExternalProject_Add(libbpf
++        GIT_REPOSITORY https://github.com/libbpf/libbpf.git
++        GIT_TAG v1.7.0
++        PREFIX ./libbpf
++        CONFIGURE_COMMAND ""
++        BUILD_COMMAND
++          cd ../libbpf/src &&
++          bash -c "CFLAGS=\"-g -O2 -Werror -Wall -fPIC\" make"
++        INSTALL_COMMAND
++          cd ../libbpf/src && bash -c "DESTDIR=<INSTALL_DIR> make install"
++        )
++    set(libbpf_LINK "${libbpf_BINARY_DIR}/usr/${CMAKE_INSTALL_LIBDIR}/libbpf.a")
++    set(libbpf_INCLUDE "${libbpf_BINARY_DIR}/usr/include")
++  endif()
++
++  # We always need to find the bpftool program
++  find_package(Bpf REQUIRED COMPONENTS bpftool)
++
++  target_link_libraries(procdump ${libbpf_LINK})
+ 
+   # set binaries and options for clang and llc
+   set(CLANG "clang")
+@@ -369,7 +404,7 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+                     #-I "/usr/include/x86_64-linux-gnu"
+                     -I "${CMAKE_SOURCE_DIR}"
+                     -I "${CMAKE_BINARY_DIR}"
+-                    -I "${libbpf_SOURCE_DIR}/src"
++                    -I "${libbpf_INCLUDE}"
+                     )
+ 
+   if(NOT APPLE AND CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
+@@ -380,17 +415,31 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+     list(APPEND CLANG_INCLUDES -I "/usr/include/x86_64-linux-gnu")
+   endif()
+ 
+-  add_custom_target(procdump_ebpf
+-                    DEPENDS procdump_ebpf.o
+-                  )
+-
+-  add_dependencies(procdump_ebpf libbpf)
+-
+   add_custom_command(OUTPUT procdump_ebpf.o
+-                    COMMAND "${CLANG}" -nostdinc -isystem `gcc -print-file-name=include` ${CLANG_INCLUDES} ${CLANG_DEFINES} -O2 ${CLANG_OPTIONS} -target bpf -fno-stack-protector -c "${procdump_ebpf_SOURCE_DIR}/procdump_ebpf.c" -o "procdump_ebpf.o" && bpftool gen object procdump.ebpf.o procdump_ebpf.o && bpftool gen skeleton "procdump.ebpf.o" name "procdump_ebpf" > "procdump_ebpf.skel.h" && bash "${CMAKE_SOURCE_DIR}/fix_skeleton.sh"
+-                    COMMENT "Building EBPF object procdump_ebpf.o"
+-                    DEPENDS ${procdump_ebpf_SOURCE_DIR}/procdump_ebpf.c
+-                    )
+-
+-  set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES procdump.ebpf.o)
++    COMMAND "${CLANG}" -nostdinc -isystem `gcc -print-file-name=include` ${CLANG_INCLUDES} ${CLANG_DEFINES} -O2 ${CLANG_OPTIONS} -target bpf -fno-stack-protector -c "${procdump_ebpf_SOURCE_DIR}/procdump_ebpf.c" -o "procdump_ebpf.o"
++    COMMENT "Building EBPF object procdump_ebpf.o"
++    DEPENDS ${procdump_ebpf_SOURCE_DIR}/procdump_ebpf.c
++    WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
++  )
++  add_custom_command(OUTPUT procdump.ebpf.o
++    COMMAND Bpf::bpftool gen object procdump.ebpf.o procdump_ebpf.o
++    COMMENT "Generating procdump.ebpf.o"
++    DEPENDS procdump_ebpf.o
++    WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
++  )
++
++  add_custom_command(OUTPUT procdump_ebpf.skel.h
++    COMMAND Bpf::bpftool gen skeleton "procdump.ebpf.o" name "procdump_ebpf" > "procdump_ebpf.skel.h"
++    COMMENT "Writing EBPF header procdump_ebpf.skel.h"
++    DEPENDS procdump.ebpf.o
++    WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
++  )
++
++  add_custom_target(procdump_ebpf DEPENDS
++    procdump_ebpf.o
++    procdump.ebpf.o
++    procdump_ebpf.skel.h
++  )
++
++  add_dependencies(procdump_ebpf ${libbpf_LINK})
+ endif()
+diff --git a/cmake/FindBpf.cmake b/cmake/FindBpf.cmake
+new file mode 100644
+index 0000000..2defb64
+--- /dev/null
++++ b/cmake/FindBpf.cmake
+@@ -0,0 +1,139 @@
++# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
++# file Copyright.txt or https://cmake.org/licensing for details.
++
++#[=======================================================================[.rst:
++FindBpf
++----------
++
++Find libbpf headers and library, and bpftool executable.
++
++Imported Targets
++^^^^^^^^^^^^^^^^
++
++``Bpf::libbpf``
++  The libbpf library, if found.
++``Bpf::bpftool``
++  The bpftool executable, if found.
++
++Result Variables
++^^^^^^^^^^^^^^^^
++
++This will define some or all of the following variables
++in your project (depending on components selected):
++
++``Bpf_FOUND``
++  true if (the requested version of) libbpf and/or the bpftool
++  program are available.
++``Bpf_VERSION``
++  the version of libbpf.
++``Bpf_LIBRARIES``
++  the libraries to link against to use libbpf.
++``Bpf_INCLUDE_DIRS``
++  where to find the libbpf headers.
++``Bpf_COMPILE_OPTIONS``
++  this should be passed to target_compile_options(), if the
++  target is not used for linking
++``Bpf_BPFTOOL_EXECUTABLE``
++  the location of the bpftool binary.
++
++#]=======================================================================]
++
++if(NOT Bpf_FIND_COMPONENTS)
++  set(Bpf_FIND_COMPONENTS libbpf bpftool)
++endif()
++set(_required)
++
++if(libbpf IN_LIST Bpf_FIND_COMPONENTS)
++  # Use pkg-config to get the directories and then use these values
++  # in the FIND_PATH() and FIND_LIBRARY() calls
++  find_package(PkgConfig QUIET)
++  pkg_check_modules(PKG_Bpf QUIET libbpf)
++
++  set(Bpf_COMPILE_OPTIONS ${PKG_Bpf_CFLAGS_OTHER})
++  set(Bpf_VERSION ${PKG_Bpf_VERSION})
++
++  find_path(Bpf_INCLUDE_DIR
++    NAMES
++      bpf/libbpf.h
++    HINTS
++      ${PKG_Bpf_INCLUDE_DIRS}
++  )
++  mark_as_advanced(Bpf_INCLUDE_DIR)
++
++  find_library(Bpf_LIBRARY
++    NAMES
++      bpf
++    HINTS
++      ${PKG_Bpf_LIBRARY_DIRS}
++  )
++  mark_as_advanced(Bpf_LIBRARY)
++
++  if(Bpf_INCLUDE_DIR AND Bpf_LIBRARY)
++    set(Bpf_libbpf_FOUND TRUE)
++  endif()
++
++  list(APPEND _required Bpf_LIBRARY Bpf_INCLUDE_DIR)
++  set(_version Bpf_VERSION)
++
++  set(Bpf_LIBRARIES ${Bpf_LIBRARY})
++  set(Bpf_INCLUDE_DIRS ${Bpf_INCLUDE_DIR})
++endif()
++
++if(bpftool IN_LIST Bpf_FIND_COMPONENTS)
++  find_program(Bpf_BPFTOOL_EXECUTABLE
++    NAMES
++      bpftool
++  )
++  mark_as_advanced(Bpf_BPFTOOL_EXECUTABLE)
++
++  if(Bpf_BPFTOOL_EXECUTABLE)
++    set(Bpf_bpftool_FOUND TRUE)
++  endif()
++  list(APPEND _required Bpf_BPFTOOL_EXECUTABLE)
++  set(Bpf_BPFTOOL_EXECUTABLE ${Bpf_BPFTOOL_EXECUTABLE})
++endif()
++
++include(FindPackageHandleStandardArgs)
++
++# From CMake 3.18, HANDLE_COMPONENTS makes REQUIRED_VARS optional
++if(CMAKE_VERSION VERSION_LESS "3.18")
++  set(_required_vars
++    REQUIRED_VARS
++      ${_required}
++  )
++else()
++  set(_required_vars)
++endif()
++
++if(DEFINED _version)
++  set(_version_var
++    VERSION_VAR ${_version}
++  )
++else()
++  set(_version_var)
++endif()
++
++
++find_package_handle_standard_args(Bpf
++  FOUND_VAR
++    Bpf_FOUND
++  ${_version_var}
++  ${_required_vars}
++  HANDLE_COMPONENTS
++)
++
++if(Bpf_FOUND AND Bpf_LIBRARY AND NOT TARGET Bpf::libbpf)
++    add_library(Bpf::libbpf UNKNOWN IMPORTED)
++    set_target_properties(Bpf::libbpf PROPERTIES
++      IMPORTED_LOCATION "${Bpf_LIBRARY}"
++      INTERFACE_COMPILE_OPTIONS "${Bpf_COMPILE_OPTIONS}"
++      INTERFACE_INCLUDE_DIRECTORIES "${Bpf_INCLUDE_DIR}"
++    )
++endif()
++
++if(Bpf_FOUND AND Bpf_BPFTOOL_EXECUTABLE AND NOT TARGET Bpf::bpftool)
++    add_executable(Bpf::bpftool IMPORTED)
++    set_target_properties(Bpf::bpftool PROPERTIES
++      IMPORTED_LOCATION "${Bpf_BPFTOOL_EXECUTABLE}"
++    )
++endif()
+diff --git a/cmake/FindLibelf.cmake b/cmake/FindLibelf.cmake
+new file mode 100644
+index 0000000..fe11e26
+--- /dev/null
++++ b/cmake/FindLibelf.cmake
+@@ -0,0 +1,82 @@
++# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
++# file Copyright.txt or https://cmake.org/licensing for details.
++
++#[=======================================================================[.rst:
++FindLibelf
++----------
++
++Find libelf headers and library.
++
++Imported Targets
++^^^^^^^^^^^^^^^^
++
++``Libelf::Libelf``
++  The libelf library, if found.
++
++Result Variables
++^^^^^^^^^^^^^^^^
++
++This will define the following variables in your project:
++
++``Libelf_FOUND``
++  true if (the requested version of) Libelf is available.
++``Libelf_VERSION``
++  the version of Libelf.
++``Libelf_LIBRARIES``
++  the libraries to link against to use Libelf.
++``Libelf_INCLUDE_DIRS``
++  where to find the Libelf headers.
++``Libelf_COMPILE_OPTIONS``
++  this should be passed to target_compile_options(), if the
++  target is not used for linking
++
++#]=======================================================================]
++
++
++# Use pkg-config to get the directories and then use these values
++# in the FIND_PATH() and FIND_LIBRARY() calls
++find_package(PkgConfig QUIET)
++pkg_check_modules(PKG_Libelf QUIET libelf)
++
++set(Libelf_COMPILE_OPTIONS ${PKG_Libelf_CFLAGS_OTHER})
++set(Libelf_VERSION ${PKG_Libelf_VERSION})
++
++find_path(Libelf_INCLUDE_DIR
++  NAMES
++    libelf.h
++  HINTS
++    ${PKG_Libelf_INCLUDE_DIRS}
++)
++find_library(Libelf_LIBRARY
++  NAMES
++    elf
++  HINTS
++    ${PKG_Libelf_LIBRARY_DIRS}
++)
++
++include(FindPackageHandleStandardArgs)
++find_package_handle_standard_args(Libelf
++  FOUND_VAR
++    Libelf_FOUND
++  REQUIRED_VARS
++    Libelf_LIBRARY
++    Libelf_INCLUDE_DIR
++  VERSION_VAR
++    Libelf_VERSION
++)
++
++if(Libelf_FOUND AND NOT TARGET Libelf::Libelf)
++  add_library(Libelf::Libelf UNKNOWN IMPORTED)
++  set_target_properties(Libelf::Libelf PROPERTIES
++    IMPORTED_LOCATION "${Libelf_LIBRARY}"
++    INTERFACE_COMPILE_OPTIONS "${Libelf_COMPILE_OPTIONS}"
++    INTERFACE_INCLUDE_DIRECTORIES "${Libelf_INCLUDE_DIR}"
++  )
++endif()
++
++mark_as_advanced(Libelf_LIBRARY Libelf_INCLUDE_DIR)
++
++if(Libelf_FOUND)
++  set(Libelf_LIBRARIES ${Libelf_LIBRARY})
++  set(Libelf_INCLUDE_DIRS ${Libelf_INCLUDE_DIR})
++endif()
+diff --git a/ebpf/procdump_ebpf.h b/ebpf/procdump_ebpf.h
+index 94a2f2c..0e912d2 100644
+--- a/ebpf/procdump_ebpf.h
++++ b/ebpf/procdump_ebpf.h
+@@ -18,8 +18,8 @@
+ #define __PROCDUMP_EBPF_H__
+ 
+ #include "vmlinux.h"
+-#include <bpf_helpers.h>
+-#include <usdt.bpf.h>
++#include <bpf/bpf_helpers.h>
++#include <bpf/usdt.bpf.h>
+ 
+ #define USER_STACKID_FLAGS (0 | BPF_F_FAST_STACK_CMP | BPF_F_USER_STACK)
+ #define ARGS_HASH_SIZE 10240
+@@ -68,4 +68,4 @@ struct
+ 	__uint(max_entries, 10 * 1024 * 1024 /* 10 MB */);
+ } ringBuffer SEC(".maps");
+ 
+-#endif // __PROCDUMP_EBPF_H__
+\ No newline at end of file
++#endif // __PROCDUMP_EBPF_H__
+-- 
+2.55.0
+

diff --git a/0004-cmake-Include-install-section-for-procdump-and-its-m.patch b/0004-cmake-Include-install-section-for-procdump-and-its-m.patch
new file mode 100644
index 0000000..89f1fde
--- /dev/null
+++ b/0004-cmake-Include-install-section-for-procdump-and-its-m.patch
@@ -0,0 +1,44 @@
+From 7d18fdd2f37c1278e26d4878c35773cfd13017b5 Mon Sep 17 00:00:00 2001
+From: Julio Faracco <jcfaracco@gmail.com>
+Date: Tue, 14 Oct 2025 13:28:21 -0300
+Subject: [PATCH 4/4] cmake: Include install section for procdump and its
+ manpage
+
+Both binary file and the manpage are missing an install section inside
+CMakeLists.txt file. It is benefitial for cmake internal subcommands
+during the generation process.
+
+For further reference the PR is #224
+
+Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
+---
+ CMakeLists.txt | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a8395f3..d6cce25 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -71,6 +71,10 @@ else()
+                     )
+ endif()
+ 
++install(FILES ${PROJECT_BINARY_DIR}/${PROCDUMP_COMPRESS_MAN}
++        DESTINATION "/usr/share/man/man1/"
++        )
++
+ #
+ # Change log
+ #
+@@ -416,4 +420,8 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+   )
+ 
+   add_dependencies(procdump_ebpf ${libbpf_LINK})
++
++  install(TARGETS procdump
++          DESTINATION ${CMAKE_INSTALL_BINDIR}
++          )
+ endif()
+-- 
+2.50.1
+

diff --git a/0005-corex-Remove-unused-variable-num_mappings-from-elf_w.patch b/0005-corex-Remove-unused-variable-num_mappings-from-elf_w.patch
new file mode 100644
index 0000000..6ffa3eb
--- /dev/null
+++ b/0005-corex-Remove-unused-variable-num_mappings-from-elf_w.patch
@@ -0,0 +1,31 @@
+From 8a70dc09839acea259ac2746b2413b5ce62b694a Mon Sep 17 00:00:00 2001
+From: Julio Faracco <jcfaracco@gmail.com>
+Date: Wed, 5 Aug 2026 12:58:49 -0300
+Subject: [PATCH 5/6] corex: Remove unused variable num_mappings from
+ elf_write_core
+
+The local variable num_mappings is assigned but never referenced.
+All usages access proc->num_mappings directly. Remove it to fix
+-Werror=unused-variable build failure.
+
+Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
+---
+ src/corex/elf_writer.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/src/corex/elf_writer.c b/src/corex/elf_writer.c
+index 9cf14bd..4e816f1 100644
+--- a/src/corex/elf_writer.c
++++ b/src/corex/elf_writer.c
+@@ -122,8 +122,6 @@ int elf_write_core(const char *path,
+         return COREX_ERR_INVALID_ARG;
+     }
+ 
+-    size_t num_mappings = (size_t)proc->num_mappings;
+-    
+     /* Count only mappings that will be dumped */
+     int num_loads = 0;
+     for (int i = 0; i < proc->num_mappings; i++) {
+-- 
+2.55.0
+

diff --git a/0006-corex-Replace-strncpy-with-memcpy-in-note_builder-to.patch b/0006-corex-Replace-strncpy-with-memcpy-in-note_builder-to.patch
new file mode 100644
index 0000000..79c10bb
--- /dev/null
+++ b/0006-corex-Replace-strncpy-with-memcpy-in-note_builder-to.patch
@@ -0,0 +1,32 @@
+From bf148adeca1982b700d1b627f6e9e86359c7e7ff Mon Sep 17 00:00:00 2001
+From: Julio Faracco <jcfaracco@gmail.com>
+Date: Wed, 5 Aug 2026 12:58:49 -0300
+Subject: [PATCH 6/6] corex: Replace strncpy with memcpy in note_builder to fix
+ truncation warning
+
+GCC warns about strncpy potentially truncating when source and
+destination have matching sizes. Use memcpy with explicit null
+termination instead.
+
+Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
+---
+ src/corex/note_builder.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/corex/note_builder.c b/src/corex/note_builder.c
+index 0dfff07..f4ed468 100644
+--- a/src/corex/note_builder.c
++++ b/src/corex/note_builder.c
+@@ -146,7 +146,8 @@ static int build_prpsinfo_note(corex_note_buf_t *buf,
+     psinfo.pr_uid = proc->uid;
+     psinfo.pr_gid = proc->gid;
+ 
+-    strncpy(psinfo.pr_fname, proc->comm, sizeof(psinfo.pr_fname) - 1);
++    memcpy(psinfo.pr_fname, proc->comm, sizeof(psinfo.pr_fname) - 1);
++    psinfo.pr_fname[sizeof(psinfo.pr_fname) - 1] = '\0';
+ 
+     /* Build a space-separated args string from the NUL-separated cmdline */
+     if (proc->cmdline_len > 0) {
+-- 
+2.55.0
+

diff --git a/0007-EventPipeHelper-Remove-unused-variable-and-function.patch b/0007-EventPipeHelper-Remove-unused-variable-and-function.patch
new file mode 100644
index 0000000..6f7de10
--- /dev/null
+++ b/0007-EventPipeHelper-Remove-unused-variable-and-function.patch
@@ -0,0 +1,77 @@
+From a80d2858c4b1b50ca7f8fe15d7d4267e0bcd859f Mon Sep 17 00:00:00 2001
+From: Julio Faracco <jcfaracco@gmail.com>
+Date: Wed, 5 Aug 2026 13:45:41 -0300
+Subject: [PATCH] EventPipeHelper: Remove unused variable and function
+
+Remove FAST_SERIALIZATION_TAG constant and read_nettrace_string
+function which are declared but never referenced. Fixes
+-Werror,-Wunused-const-variable and -Werror,-Wunused-function
+build failures with clang.
+
+Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
+---
+ src/EventPipeHelper.cpp | 41 +----------------------------------------
+ 1 file changed, 1 insertion(+), 40 deletions(-)
+
+diff --git a/src/EventPipeHelper.cpp b/src/EventPipeHelper.cpp
+index 5a3bffd..21ae320 100644
+--- a/src/EventPipeHelper.cpp
++++ b/src/EventPipeHelper.cpp
+@@ -25,7 +25,7 @@
+ // Nettrace format constants
+ //--------------------------------------------------------------------
+ static const char NETTRACE_MAGIC[] = "Nettrace";
+-static const char FAST_SERIALIZATION_TAG[] = "!FastSerialization.1";
++
+ 
+ // Block types (as null-terminated strings in the stream)
+ #define TRACE_OBJECT_TAG        "Trace"
+@@ -124,45 +124,6 @@ static int skip_bytes_tracked(int fd, size_t len, size_t* streamPos)
+     return 0;
+ }
+ 
+-//--------------------------------------------------------------------
+-// Helper: Read a length-prefixed nettrace string (serialized as
+-// int32 length in chars, followed by UTF-16LE chars).
+-// Converts to UTF-8 (ASCII subset) in outBuf.
+-//--------------------------------------------------------------------
+-static int read_nettrace_string(const uint8_t* data, size_t dataLen, size_t* offset, char* outBuf, size_t outBufSize)
+-{
+-    if (*offset + 4 > dataLen) return -1;
+-    int32_t charCount;
+-    memcpy(&charCount, data + *offset, 4);
+-    *offset += 4;
+-
+-    if (charCount <= 0)
+-    {
+-        if (outBufSize > 0) outBuf[0] = '\0';
+-        return 0;
+-    }
+-
+-    // Guard against overflow on 32-bit: cap charCount to half the max buffer
+-    if ((uint32_t)charCount > dataLen / 2)
+-        return -1;
+-
+-    size_t byteCount = (size_t)charCount * 2;
+-    if (*offset + byteCount > dataLen) return -1;
+-
+-    // Convert UTF-16LE to ASCII (sufficient for counter/provider names)
+-    size_t j = 0;
+-    for (int32_t i = 0; i < charCount && outBufSize > 1 && j < outBufSize - 1; i++)
+-    {
+-        uint16_t wc;
+-        memcpy(&wc, data + *offset + i * 2, 2);
+-        if (wc == 0) break; // null terminator
+-        outBuf[j++] = (wc < 128) ? (char)wc : '?';
+-    }
+-    if (outBufSize > 0) outBuf[j] = '\0';
+-    *offset += byteCount;
+-    return 0;
+-}
+-
+ //--------------------------------------------------------------------
+ // Helper: Read a null-terminated UTF-16LE string (used in event payloads).
+ //--------------------------------------------------------------------
+-- 
+2.55.0
+

diff --git a/0008-Monitor-Remove-unused-variable-found-in-histogram-pa.patch b/0008-Monitor-Remove-unused-variable-found-in-histogram-pa.patch
new file mode 100644
index 0000000..fd339d0
--- /dev/null
+++ b/0008-Monitor-Remove-unused-variable-found-in-histogram-pa.patch
@@ -0,0 +1,36 @@
+From db819d79539cc7cfa3319be833c581c2993d6745 Mon Sep 17 00:00:00 2001
+From: Julio Faracco <jcfaracco@gmail.com>
+Date: Wed, 5 Aug 2026 13:56:42 -0300
+Subject: [PATCH] Monitor: Remove unused variable found in histogram parsing
+
+The variable found is set but never read. Remove it to fix
+-Werror,-Wunused-but-set-variable build failure with clang.
+
+Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
+---
+ src/Monitor.cpp | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/src/Monitor.cpp b/src/Monitor.cpp
+index fb6542f..cb09f69 100644
+--- a/src/Monitor.cpp
++++ b/src/Monitor.cpp
+@@ -2279,7 +2279,6 @@ static bool PerfCounterCallback(struct EventPipeCounterValue* counterValue, void
+             {
+                 double targetPct = trigger->percentile >= 0.0 ? trigger->percentile : 0.5; // default p50
+                 double bestVal = counterValue->value; // fallback to default (p50)
+-                bool found = false;
+ 
+                 char parseBuf[512];
+                 strncpy(parseBuf, counterValue->quantiles, sizeof(parseBuf) - 1);
+@@ -2303,7 +2302,6 @@ static bool PerfCounterCallback(struct EventPipeCounterValue* counterValue, void
+                             if (fabs(qKey - targetPct) < 0.001)
+                             {
+                                 bestVal = qVal;
+-                                found = true;
+                                 break;
+                             }
+                         }
+-- 
+2.55.0
+

diff --git a/0009-Logging-Fix-buffer-size-in-LogFormatter-snprintf-vsnprintf.patch b/0009-Logging-Fix-buffer-size-in-LogFormatter-snprintf-vsnprintf.patch
new file mode 100644
index 0000000..047bec0
--- /dev/null
+++ b/0009-Logging-Fix-buffer-size-in-LogFormatter-snprintf-vsnprintf.patch
@@ -0,0 +1,39 @@
+From 64839a8650df42be107d5c7774bcab613db5d017 Mon Sep 17 00:00:00 2001
+From: Julio Faracco <jfaracco@redhat.com>
+Date: Wed, 5 Aug 2026 15:10:40 -0300
+Subject: [PATCH] Logging: Fix buffer size arguments in LogFormatter
+ snprintf/vsnprintf calls
+
+The second vsnprintf call passes traceLen+argsLen as buffer size, but
+writing at offset traceLen into a buffer of traceLen+argsLen+1 bytes
+leaves only argsLen+1 bytes remaining. With _FORTIFY_SOURCE=3, the
+runtime detects the size argument exceeds the actual remaining buffer
+and aborts with 'buffer overflow detected'.
+
+Fix both snprintf calls to pass correct remaining buffer sizes:
+- snprintf: traceLen+1 (prefix length + null terminator)
+- vsnprintf: argsLen+1 (message length + null terminator)
+
+Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
+---
+ src/Logging.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/Logging.cpp b/src/Logging.cpp
+index b4ea374..29dd86f 100644
+--- a/src/Logging.cpp
++++ b/src/Logging.cpp
+@@ -37,8 +37,8 @@ void LogFormatter(enum LogLevel logLevel, enum DiagnosticsLogTarget target, cons
+         return;
+     }
+ 
+-    snprintf(trace, traceLen+argsLen, "[%s - %s]: ", timeBuff, LogLevelStrings[logLevel]);
+-    vsnprintf(trace+traceLen, traceLen+argsLen, message, args);
++    snprintf(trace, traceLen+1, "[%s - %s]: ", timeBuff, LogLevelStrings[logLevel]);
++    vsnprintf(trace+traceLen, argsLen+1, message, args);
+ 
+     // If a log entry is not 'debug' it simply goes to stdout.
+     // If you want an entry to only go to the syslog, use 'debug'
+-- 
+2.55.0
+

diff --git a/procdump.spec b/procdump.spec
index 28ce562..016c7ee 100644
--- a/procdump.spec
+++ b/procdump.spec
@@ -2,37 +2,58 @@
 %global repo_name ProcDump-for-Linux
 
 Name:           procdump
-Version:        1.2
+Version:        3.5.2
 Release:        1%{?dist}
 Summary:        Sysinternals process dump utility
 
 License:        MIT
-URL:            https://github.com/Sysinternals/%{repo_name}
+URL:            https://github.com/Microsoft/%{repo_name}
 Source:         %{url}/archive/%{version}/%{repo_name}-%{version}.tar.gz
+Patch2:         0002-Initialize-TerminalState-structure-properly.patch
+Patch3:         0003-CMake-Add-ability-to-use-system-installed-libbpf-rat.patch
+Patch4:         0004-cmake-Include-install-section-for-procdump-and-its-m.patch
+Patch5:         0005-corex-Remove-unused-variable-num_mappings-from-elf_w.patch
+Patch6:         0006-corex-Replace-strncpy-with-memcpy-in-note_builder-to.patch
+Patch7:         0007-EventPipeHelper-Remove-unused-variable-and-function.patch
+Patch8:         0008-Monitor-Remove-unused-variable-found-in-histogram-pa.patch
+Patch9:         0009-Logging-Fix-buffer-size-in-LogFormatter-snprintf-vsnprintf.patch
 
 BuildRequires:  gcc
 BuildRequires:  make
+BuildRequires:  cmake
+BuildRequires:  clang
+BuildRequires:  libbpf-devel
+BuildRequires:  bpftool
+BuildRequires:  git
 BuildRequires:  zlib-devel
 Requires:       gdb >= 7.6.1
 
+%undefine _annotated_build
+%undefine _hardened_build
+
+# ProcDump does not support PPC64 (#163) and s390x.
+# For further information see ./ebpf/vmlinux.h.
+ExclusiveArch:    x86_64 aarch64
+
 %description
-ProcDump is a command-line utility whose primary purpose is monitoring an
-application for various resources and generating crash dumps during a spike that
-an administrator or developer can use to determine the cause of the issue.
-ProcDump also serves as a general process dump utility that you can embed in
-other scripts.
+ProcDump is a command-line utility whose primary purpose is monitoring an application
+for various resources and generating crash dumps during a spike that an administrator
+or developer can use to determine the cause of the issue. ProcDump also serves as a
+general process dump utility that you can embed in other scripts.
 
 
 %prep
-%autosetup -n %{repo_name}-%{version}
+%autosetup -p1 -n %{repo_name}-%{version}
 
 
 %build
-%make_build
+export VERSION=%{version}
+%cmake
+%cmake_build
 
 
 %install
-%make_install
+%cmake_install
 
 
 %files
@@ -40,11 +61,16 @@ other scripts.
 %doc README.md
 %doc procdump.gif
 %{_bindir}/procdump
-%{_mandir}/man1/procdump.1*
+%{_mandir}/man1/procdump.1.gz
 
 
 
 %changelog
+* Wed Aug 05 2026 Julio Faracco <jfaracco@redhat.com> - 3.5.2-1
+- Adds .NET counter integration (3.5.2)
+- Adds a custom core dumper (corex) (3.5.2)
+- Add support for RHEL10, Debian 13, Ubuntu 26.04, Fedora 43 and updated dependencies (3.5.1)
+
 * Tue Sep 21 2021 Matěj Grabovský <mgrabovs@redhat.com> - 1.2-1
 - New upstream release 1.2
 

diff --git a/sources b/sources
index 724ad35..545ccdd 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (ProcDump-for-Linux-1.2.tar.gz) = 363b75349c4dc90f0eddb3d764130486f233ec05d504c34cda857dae8a5420fea5aa1712b62cab866bc8bd4d1f335fc5d0cee7f48b49fcf477cbeb0434b93998
+SHA512 (ProcDump-for-Linux-3.5.2.tar.gz) = b6eb97fc89773fc75cf3add5a1a60b2010b231b3d3de6a0d0d4642168b4eb10b0c09fbf18cf11eaaac00ee34ef2b4240e430bd93dc31970e78e7412c0a249fbe

                 reply	other threads:[~2026-08-05 19:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178595718760.1.16148260792083079459.rpms-procdump-c950eac9d734@fedoraproject.org \
    --to=jfaracco@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox