From 0697d01219e46a0c4cf4b72aff06385fedf4e519 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 21 Jan 2024 05:00:03 +0000 Subject: [PATCH 01/15] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- libpfm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libpfm.spec b/libpfm.spec index 0bb1e41..51cd03a 100644 --- a/libpfm.spec +++ b/libpfm.spec @@ -12,7 +12,7 @@ Name: libpfm Version: 4.13.0 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Library to encode performance events for use by perf tool @@ -133,6 +133,9 @@ rm $RPM_BUILD_ROOT%{_libdir}/lib*.a %endif %changelog +* Sun Jan 21 2024 Fedora Release Engineering - 4.13.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Tue Aug 1 2023 William Cohen - 4.13.0-5 - migrated to SPDX license From 461c2dd0bd9a31f0f6e7c5755804e6f97a2354ef Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jan 2024 03:13:09 +0000 Subject: [PATCH 02/15] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- libpfm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libpfm.spec b/libpfm.spec index 51cd03a..699adb1 100644 --- a/libpfm.spec +++ b/libpfm.spec @@ -12,7 +12,7 @@ Name: libpfm Version: 4.13.0 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Library to encode performance events for use by perf tool @@ -133,6 +133,9 @@ rm $RPM_BUILD_ROOT%{_libdir}/lib*.a %endif %changelog +* Thu Jan 25 2024 Fedora Release Engineering - 4.13.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sun Jan 21 2024 Fedora Release Engineering - 4.13.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From dcb84740cd296a92ffc8598b7318faa6c457096a Mon Sep 17 00:00:00 2001 From: William Cohen Date: Mon, 29 Jan 2024 16:34:57 -0500 Subject: [PATCH 03/15] Fix gcc-14 -Werror=calloc-transposed-args compatibility --- libpfm-gcc14.patch | 21 +++++++++++++++++++++ libpfm.spec | 9 +++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 libpfm-gcc14.patch diff --git a/libpfm-gcc14.patch b/libpfm-gcc14.patch new file mode 100644 index 0000000..9f2a62d --- /dev/null +++ b/libpfm-gcc14.patch @@ -0,0 +1,21 @@ +commit cb944829e0940d74009e09b8985b4f2139f5cb3b +Author: William Cohen +Date: Mon Jan 29 16:23:43 2024 -0500 + + Correct s390x code to avoid GCC-14 -Werror=calloc-transposed-args errors + +diff --git a/lib/pfmlib_s390x_cpumf.c b/lib/pfmlib_s390x_cpumf.c +index d8ce22d..718f5f8 100644 +--- a/lib/pfmlib_s390x_cpumf.c ++++ b/lib/pfmlib_s390x_cpumf.c +@@ -216,8 +216,8 @@ static int pfm_cpumcf_init(void *this) + break; + } + +- cpumcf_pe = calloc(sizeof(*cpumcf_pe), +- cfvn_set_count + csvn_set_count + ext_set_count); ++ cpumcf_pe = calloc(cfvn_set_count + csvn_set_count + ext_set_count, ++ sizeof(*cpumcf_pe)); + if (cpumcf_pe == NULL) + return PFM_ERR_NOMEM; + diff --git a/libpfm.spec b/libpfm.spec index 699adb1..bd80765 100644 --- a/libpfm.spec +++ b/libpfm.spec @@ -12,7 +12,7 @@ Name: libpfm Version: 4.13.0 -Release: 7%{?dist} +Release: 8%{?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-gcc14.patch BuildRequires: make BuildRequires: gcc @@ -73,7 +74,8 @@ Python bindings for libpfm4 and perf_event_open system call. %prep %setup -q -%patch2 -p1 -b .python3 +%patch -P2 -p1 -b .python3 +%patch -P3 -p1 -b .gcc14 # to prevent setuptools from installing an .egg, we need to pass --root to setup.py install # see https://github.com/pypa/setuptools/issues/3143 # and https://github.com/pypa/pip/issues/11501 @@ -133,6 +135,9 @@ rm $RPM_BUILD_ROOT%{_libdir}/lib*.a %endif %changelog +* Mon Jan 29 2024 William Cohen - 4.13.0-8 +- Fix gcc-14 -Werror=calloc-transposed-args compatibility + * Thu Jan 25 2024 Fedora Release Engineering - 4.13.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From e8e4c2f2e9a0db1b35984de163068639facadb7c Mon Sep 17 00:00:00 2001 From: Michal Kolar Date: Fri, 2 Feb 2024 09:11:21 +0000 Subject: [PATCH 04/15] plans/ci.fmf: fix deprecated fmf plan attribute --- plans/ci.fmf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plans/ci.fmf b/plans/ci.fmf index 1ad2c12..3fd3ab7 100644 --- a/plans/ci.fmf +++ b/plans/ci.fmf @@ -1,6 +1,5 @@ summary: CI Gating Plan discover: how: fmf - directory: tests execute: - how: beakerlib + how: tmt From 5b33854516e671b5dcc693b4d4c4ed5b5ffbc303 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Tue, 23 Jan 2024 15:47:16 -0500 Subject: [PATCH 05/15] Modernize provides filter https://docs.fedoraproject.org/en-US/packaging-guidelines/AutoProvidesAndRequiresFiltering/ --- libpfm.spec | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libpfm.spec b/libpfm.spec index bd80765..093ff6e 100644 --- a/libpfm.spec +++ b/libpfm.spec @@ -4,10 +4,7 @@ %if %{with python} %define python_sitearch %(python3 -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(1))") %define python_prefix %(python3 -c "import sys; print (sys.prefix)") -%{?filter_setup: -%filter_provides_in %{python3_sitearch}/perfmon/.*\.so$ -%filter_setup -} +%global __provides_exclude_from ^%{python3_sitearch}/perfmon/.*\.so$ %endif Name: libpfm From 9c38e7ca4d14ddecd9137e45b475a3173de67b1b Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 7 Jun 2024 08:51:39 +0200 Subject: [PATCH 06/15] Rebuilt for Python 3.13 --- libpfm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libpfm.spec b/libpfm.spec index 093ff6e..ebd1d73 100644 --- a/libpfm.spec +++ b/libpfm.spec @@ -9,7 +9,7 @@ Name: libpfm Version: 4.13.0 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Library to encode performance events for use by perf tool @@ -132,6 +132,9 @@ rm $RPM_BUILD_ROOT%{_libdir}/lib*.a %endif %changelog +* Fri Jun 07 2024 Python Maint - 4.13.0-9 +- Rebuilt for Python 3.13 + * Mon Jan 29 2024 William Cohen - 4.13.0-8 - Fix gcc-14 -Werror=calloc-transposed-args compatibility From d9915b348de8759e2a31690c755d23cb1882434a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 18 Jul 2024 14:46:25 +0000 Subject: [PATCH 07/15] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- libpfm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libpfm.spec b/libpfm.spec index ebd1d73..afcbc0d 100644 --- a/libpfm.spec +++ b/libpfm.spec @@ -9,7 +9,7 @@ Name: libpfm Version: 4.13.0 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Library to encode performance events for use by perf tool @@ -132,6 +132,9 @@ rm $RPM_BUILD_ROOT%{_libdir}/lib*.a %endif %changelog +* Thu Jul 18 2024 Fedora Release Engineering - 4.13.0-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Fri Jun 07 2024 Python Maint - 4.13.0-9 - Rebuilt for Python 3.13 From c9663bf9f8d06cf44a0a055ff1480f3b9448bef4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jan 2025 12:58:01 +0000 Subject: [PATCH 08/15] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- libpfm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libpfm.spec b/libpfm.spec index afcbc0d..10c14f9 100644 --- a/libpfm.spec +++ b/libpfm.spec @@ -9,7 +9,7 @@ Name: libpfm Version: 4.13.0 -Release: 10%{?dist} +Release: 11%{?dist} Summary: Library to encode performance events for use by perf tool @@ -132,6 +132,9 @@ rm $RPM_BUILD_ROOT%{_libdir}/lib*.a %endif %changelog +* Fri Jan 17 2025 Fedora Release Engineering - 4.13.0-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Thu Jul 18 2024 Fedora Release Engineering - 4.13.0-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From fab74e854f1a6f0106eea0746fc92e568a8e3179 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 2 Jun 2025 20:26:21 +0200 Subject: [PATCH 09/15] Rebuilt for Python 3.14 --- libpfm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libpfm.spec b/libpfm.spec index 10c14f9..d478b11 100644 --- a/libpfm.spec +++ b/libpfm.spec @@ -9,7 +9,7 @@ Name: libpfm Version: 4.13.0 -Release: 11%{?dist} +Release: 12%{?dist} Summary: Library to encode performance events for use by perf tool @@ -132,6 +132,9 @@ rm $RPM_BUILD_ROOT%{_libdir}/lib*.a %endif %changelog +* Mon Jun 02 2025 Python Maint - 4.13.0-12 +- Rebuilt for Python 3.14 + * Fri Jan 17 2025 Fedora Release Engineering - 4.13.0-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 12330968afe4d47e389a8242296bb9634058bbef Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 24 Jul 2025 20:10:36 +0000 Subject: [PATCH 10/15] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- libpfm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libpfm.spec b/libpfm.spec index d478b11..79bca51 100644 --- a/libpfm.spec +++ b/libpfm.spec @@ -9,7 +9,7 @@ Name: libpfm Version: 4.13.0 -Release: 12%{?dist} +Release: 13%{?dist} Summary: Library to encode performance events for use by perf tool @@ -132,6 +132,9 @@ rm $RPM_BUILD_ROOT%{_libdir}/lib*.a %endif %changelog +* Thu Jul 24 2025 Fedora Release Engineering - 4.13.0-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Mon Jun 02 2025 Python Maint - 4.13.0-12 - Rebuilt for Python 3.14 From 9b4205af69aa73b02e72726991365d5f870048d3 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 15 Aug 2025 12:56:39 +0200 Subject: [PATCH 11/15] Rebuilt for Python 3.14.0rc2 bytecode --- libpfm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libpfm.spec b/libpfm.spec index 79bca51..fef78c1 100644 --- a/libpfm.spec +++ b/libpfm.spec @@ -9,7 +9,7 @@ Name: libpfm Version: 4.13.0 -Release: 13%{?dist} +Release: 14%{?dist} Summary: Library to encode performance events for use by perf tool @@ -132,6 +132,9 @@ rm $RPM_BUILD_ROOT%{_libdir}/lib*.a %endif %changelog +* Fri Aug 15 2025 Python Maint - 4.13.0-14 +- Rebuilt for Python 3.14.0rc2 bytecode + * Thu Jul 24 2025 Fedora Release Engineering - 4.13.0-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 91fced006a95ab85a5c30a572a81f870fc9b0f87 Mon Sep 17 00:00:00 2001 From: Aaron Merey Date: Mon, 25 Aug 2025 11:18:03 -0400 Subject: [PATCH 12/15] tests/runtest.sh: Fix path to tests Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2389127 --- tests/libpfm-testsuite/runtest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/libpfm-testsuite/runtest.sh b/tests/libpfm-testsuite/runtest.sh index 7c8e03d..a5997d6 100755 --- a/tests/libpfm-testsuite/runtest.sh +++ b/tests/libpfm-testsuite/runtest.sh @@ -55,7 +55,7 @@ rlJournalStart rlRun "yum-builddep -y $TmpDir/SPECS/*.spec" rlRun "su -c 'rpmbuild -D \"_topdir $TmpDir\" -bp $TmpDir/SPECS/*.spec &>$TmpDir/rpmbuild.log' $BUILD_USER" rlRun "rlFileSubmit $TmpDir/rpmbuild.log" - rlRun "cd $TmpDir/BUILD/libpfm-*/tests" + rlRun "cd \"$TmpDir\"/BUILD/libpfm-*-build/libpfm-*/tests 2>/dev/null || cd \"$TmpDir\"/BUILD/libpfm-*/tests" rlRun "su -c 'make PFMLIB=`rpm -ql libpfm | grep .so | head -n 1`' $BUILD_USER" rlRun "ldd validate | tee $TmpDir/ldd.log" rlRun "grep -q 'libpfm.so' $TmpDir/ldd.log" From 0bfaf1d1cb79cffd156b0ea7a73095c9eb07d2ff Mon Sep 17 00:00:00 2001 From: Aaron Merey Date: Mon, 25 Aug 2025 12:04:16 -0400 Subject: [PATCH 13/15] libpfm.spec: bump release number --- libpfm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libpfm.spec b/libpfm.spec index fef78c1..409d65b 100644 --- a/libpfm.spec +++ b/libpfm.spec @@ -9,7 +9,7 @@ Name: libpfm Version: 4.13.0 -Release: 14%{?dist} +Release: 15%{?dist} Summary: Library to encode performance events for use by perf tool @@ -132,6 +132,9 @@ rm $RPM_BUILD_ROOT%{_libdir}/lib*.a %endif %changelog +* Mon Aug 25 2025 Aaron Merey - 4.13.0-15 +- Fix path in tests/runtest.sh + * Fri Aug 15 2025 Python Maint - 4.13.0-14 - Rebuilt for Python 3.14.0rc2 bytecode From 37780f084700403189de71ed0f73776008123bf3 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 19 Sep 2025 12:27:20 +0200 Subject: [PATCH 14/15] Rebuilt for Python 3.14.0rc3 bytecode --- libpfm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libpfm.spec b/libpfm.spec index 409d65b..f9fb838 100644 --- a/libpfm.spec +++ b/libpfm.spec @@ -9,7 +9,7 @@ Name: libpfm Version: 4.13.0 -Release: 15%{?dist} +Release: 16%{?dist} Summary: Library to encode performance events for use by perf tool @@ -132,6 +132,9 @@ rm $RPM_BUILD_ROOT%{_libdir}/lib*.a %endif %changelog +* Fri Sep 19 2025 Python Maint - 4.13.0-16 +- Rebuilt for Python 3.14.0rc3 bytecode + * Mon Aug 25 2025 Aaron Merey - 4.13.0-15 - Fix path in tests/runtest.sh From 7581f961126a36779ddff1aa5f81497a2fe1a7f7 Mon Sep 17 00:00:00 2001 From: Aaron Merey Date: Tue, 16 Dec 2025 10:55:52 -0500 Subject: [PATCH 15/15] Add libpfm-fix-const.patch --- libpfm-fix-const.patch | 59 ++++++++++++++++++++++++++++++++++++++++++ libpfm.spec | 7 ++++- 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 libpfm-fix-const.patch diff --git a/libpfm-fix-const.patch b/libpfm-fix-const.patch new file mode 100644 index 0000000..b9a2308 --- /dev/null +++ b/libpfm-fix-const.patch @@ -0,0 +1,59 @@ +From ded148888c501c2e9d21c23263d7c09aed4b97d6 Mon Sep 17 00:00:00 2001 +From: Aaron Merey +Date: Fri, 19 Dec 2025 12:33:33 -0500 +Subject: [PATCH] fix discarded const warning on newer gcc + +--- + lib/pfmlib_common.c | 15 +++++++++------ + tests/validate_x86.c | 2 +- + 2 files changed, 10 insertions(+), 7 deletions(-) + +diff --git a/lib/pfmlib_common.c b/lib/pfmlib_common.c +index 44b5de4..59a7cff 100644 +--- a/lib/pfmlib_common.c ++++ b/lib/pfmlib_common.c +@@ -1625,12 +1625,6 @@ pfmlib_parse_event(const char *event, pfmlib_event_desc_t *d) + const char *pname = NULL; + int i, j, ret; + +- /* +- * support only one event at a time. +- */ +- p = strpbrk(event, PFMLIB_EVENT_DELIM); +- if (p) +- return PFM_ERR_INVAL; + /* + * create copy because string is const + */ +@@ -1638,6 +1632,15 @@ pfmlib_parse_event(const char *event, pfmlib_event_desc_t *d) + if (!str) + return PFM_ERR_NOMEM; + ++ /* ++ * support only one event at a time. ++ */ ++ p = strpbrk(s, PFMLIB_EVENT_DELIM); ++ if (p) { ++ free(s); ++ return PFM_ERR_INVAL; ++ } ++ + + /* check for optional PMU name */ + p = strstr(s, PFMLIB_PMU_DELIM); +diff --git a/tests/validate_x86.c b/tests/validate_x86.c +index 500a697..68a776d 100644 +--- a/tests/validate_x86.c ++++ b/tests/validate_x86.c +@@ -8018,7 +8018,7 @@ static int + check_pmu_supported(const char *evt) + { + pfm_pmu_info_t info; +- char *p; ++ const char *p; + int ret; + pfm_pmu_t i; + +-- +2.52.0 + diff --git a/libpfm.spec b/libpfm.spec index f9fb838..d7384ca 100644 --- a/libpfm.spec +++ b/libpfm.spec @@ -9,13 +9,14 @@ Name: libpfm Version: 4.13.0 -Release: 16%{?dist} +Release: 17%{?dist} Summary: Library to encode performance events for use by perf tool License: MIT URL: http://perfmon2.sourceforge.net/ Source0: http://sourceforge.net/projects/perfmon2/files/libpfm4/%{name}-%{version}.tar.gz +Patch1: libpfm-fix-const.patch Patch2: libpfm-python3-setup.patch Patch3: libpfm-gcc14.patch @@ -71,6 +72,7 @@ Python bindings for libpfm4 and perf_event_open system call. %prep %setup -q +%patch -P1 -p1 -b .fix-const %patch -P2 -p1 -b .python3 %patch -P3 -p1 -b .gcc14 # to prevent setuptools from installing an .egg, we need to pass --root to setup.py install @@ -132,6 +134,9 @@ rm $RPM_BUILD_ROOT%{_libdir}/lib*.a %endif %changelog +* Tue Dec 16 2025 Aaron Merey - 4.13.0-17 +- Add libpfm-fix-const.patch + * Fri Sep 19 2025 Python Maint - 4.13.0-16 - Rebuilt for Python 3.14.0rc3 bytecode