From e54c32a1c40d1d1efba7b1253b6ba7f64c888b70 Mon Sep 17 00:00:00 2001 From: William Cohen Date: Fri, 14 Apr 2023 16:57:58 -0400 Subject: [PATCH] Upgrade to upstream libpf-4.13.0 Resolves: #2185652 routine rebase of libpfm for rhel 9.3 --- .gitignore | 1 + libpfm-initp.patch | 19 +++++++++++++++++++ libpfm.spec | 9 +++++++-- sources | 2 +- 4 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 libpfm-initp.patch diff --git a/.gitignore b/.gitignore index df137f8..0f753c1 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /libpfm-4.10.0.tar.gz /libpfm-4.10.1.tar.gz /libpfm-4.11.0.tar.gz +/libpfm-4.13.0.tar.gz diff --git a/libpfm-initp.patch b/libpfm-initp.patch new file mode 100644 index 0000000..4eeb498 --- /dev/null +++ b/libpfm-initp.patch @@ -0,0 +1,19 @@ +commit 75d8bb06f6ea0d7a8edf8e080c7ea6d434d598ff +Author: William Cohen +Date: Fri Apr 14 16:07:07 2023 -0400 + + Make sure that p is set to a known value before using. + +diff --git a/lib/pfmlib_perf_event_pmu.c b/lib/pfmlib_perf_event_pmu.c +index 637c5b1..8f7d7d1 100644 +--- a/lib/pfmlib_perf_event_pmu.c ++++ b/lib/pfmlib_perf_event_pmu.c +@@ -361,7 +361,7 @@ gen_tracepoint_table(void) + { + DIR *dir1, *dir2; + struct dirent *d1, *d2; +- perf_event_t *p; ++ perf_event_t *p = NULL; + perf_umask_t *um; + char d2path[MAXPATHLEN]; + char idpath[MAXPATHLEN]; diff --git a/libpfm.spec b/libpfm.spec index 2c7cb33..5ab5299 100644 --- a/libpfm.spec +++ b/libpfm.spec @@ -11,8 +11,8 @@ %endif Name: libpfm -Version: 4.11.0 -Release: 6%{?dist} +Version: 4.13.0 +Release: 1%{?dist} Summary: Library to encode performance events for use by perf tool @@ -20,6 +20,7 @@ License: MIT URL: http://perfmon2.sourceforge.net/ Source0: http://sourceforge.net/projects/perfmon2/files/libpfm4/%{name}-%{version}.tar.gz Patch2: libpfm-python3-setup.patch +Patch3: libpfm-initp.patch BuildRequires: make BuildRequires: gcc @@ -71,6 +72,7 @@ Python bindings for libpfm4 and perf_event_open system call. %prep %setup -q %patch2 -p1 -b .python3 +%patch3 -p1 -b .test %build %if %{with python} @@ -124,6 +126,9 @@ rm $RPM_BUILD_ROOT%{_libdir}/lib*.a %endif %changelog +* Fri Apr 14 2023 William cohen - 4.13.0-1 +- Rebase to libpf-4.13.0 (rhbz #2185652) + * Mon Aug 09 2021 Mohan Boddu - 4.11.0-6 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags Related: rhbz#1991688 diff --git a/sources b/sources index 3d5afdf..b2d4ea3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libpfm-4.11.0.tar.gz) = 633035b8a7b35973437572095cdc80d422b2a1a61e74e14f106db95fa8e44e4518e591699cc457f828b8f2fb63f60eef6d0c7535c6b4c9a6c3a70d4550b3c3c7 +SHA512 (libpfm-4.13.0.tar.gz) = e61b210aa2ce80f0e47603c88eee2e4f2fe30ca2c0e194a5472b6a8de3bf9dc1085e5261bbb9ddbe5b6531c4b391fb34f20d038e5ebd8e6f4c14c2112aee508f