diff --git a/.fmf/version b/.fmf/version deleted file mode 100644 index d00491f..0000000 --- a/.fmf/version +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/.gitignore b/.gitignore index 0f753c1..df137f8 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,3 @@ /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/gating.yaml b/gating.yaml deleted file mode 100644 index ce3cdc1..0000000 --- a/gating.yaml +++ /dev/null @@ -1,19 +0,0 @@ ---- !Policy -product_versions: - - fedora-* -decision_context: bodhi_update_push_stable -subject_type: koji_build -rules: - - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} ---- !Policy -product_versions: - - rhel-8 -decision_context: osci_compose_gate -rules: - - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional} ---- !Policy -product_versions: - - rhel-9 -decision_context: osci_compose_gate -rules: - - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional} diff --git a/libpfm-fix-const.patch b/libpfm-fix-const.patch deleted file mode 100644 index b9a2308..0000000 --- a/libpfm-fix-const.patch +++ /dev/null @@ -1,59 +0,0 @@ -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-gcc14.patch b/libpfm-gcc14.patch deleted file mode 100644 index 9f2a62d..0000000 --- a/libpfm-gcc14.patch +++ /dev/null @@ -1,21 +0,0 @@ -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 d7384ca..beac79b 100644 --- a/libpfm.spec +++ b/libpfm.spec @@ -4,21 +4,22 @@ %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)") -%global __provides_exclude_from ^%{python3_sitearch}/perfmon/.*\.so$ +%{?filter_setup: +%filter_provides_in %{python3_sitearch}/perfmon/.*\.so$ +%filter_setup +} %endif Name: libpfm -Version: 4.13.0 -Release: 17%{?dist} +Version: 4.11.0 +Release: 6%{?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 BuildRequires: make BuildRequires: gcc @@ -36,7 +37,6 @@ kernels performance monitoring interfaces. The current version provides support for the perf_events interface available in upstream Linux kernels since v2.6.31. %package devel -License: MIT Summary: Development library to encode performance events for perf_events based tools Requires: %{name}%{?_isa} = %{version}-%{release} @@ -46,7 +46,6 @@ applications for the perf_events interface. %if %{with_static} %package static -License: MIT Summary: Static library to encode performance events for perf_events based tools Requires: %{name}%{?_isa} = %{version}-%{release} @@ -57,7 +56,6 @@ applications for the perf_events interface. %if %{with python} %package -n python3-libpfm -License: MIT AND LicenseRef-Fedora-UltraPermissive %{?python_provide:%python_provide python3-libpfm} # Remove before F30 Provides: %{name}-python = %{version}-%{release} @@ -72,13 +70,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 -# see https://github.com/pypa/setuptools/issues/3143 -# and https://github.com/pypa/pip/issues/11501 -sed -i 's/--prefix=$(DESTDIR)$(PYTHON_PREFIX)/--root=$(DESTDIR) --prefix=$(PYTHON_PREFIX)/' python/Makefile +%patch2 -p1 -b .python3 %build %if %{with python} @@ -94,15 +86,14 @@ sed -i 's/--prefix=$(DESTDIR)$(PYTHON_PREFIX)/--root=$(DESTDIR) --prefix=$(PYTHO rm -rf $RPM_BUILD_ROOT %if %{with python} -%global python_config CONFIG_PFMLIB_NOPYTHON=n PYTHON_PREFIX=%{python_prefix} +%global python_config CONFIG_PFMLIB_NOPYTHON=n PYTHON_PREFIX=$RPM_BUILD_ROOT/%{python_prefix} %else %global python_config CONFIG_PFMLIB_NOPYTHON=y %endif make \ - DESTDIR=$RPM_BUILD_ROOT \ - PREFIX=%{_prefix} \ - LIBDIR=%{_libdir} \ + PREFIX=$RPM_BUILD_ROOT%{_prefix} \ + LIBDIR=$RPM_BUILD_ROOT%{_libdir} \ %{python_config} \ LDCONFIG=/bin/true \ install @@ -129,80 +120,10 @@ rm $RPM_BUILD_ROOT%{_libdir}/lib*.a %if %{with python} %files -n python3-libpfm -%{python3_sitearch}/perfmon-*.egg-info/ -%{python3_sitearch}/perfmon/ +%{python3_sitearch}/* %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 - -* 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 - -* 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 - -* 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 - -* 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 - -* 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 - -* Tue Aug 1 2023 William Cohen - 4.13.0-5 -- migrated to SPDX license - -* Thu Jul 20 2023 Fedora Release Engineering - 4.13.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Tue Jun 13 2023 Python Maint - 4.13.0-3 -- Rebuilt for Python 3.12 - -* Tue Apr 25 2023 Miro HronĨok - 4.13.0-2 -- Don't install a Python .egg - -* Tue Mar 28 2023 William Cohen - 4.13.0-1 -- Rebase on libpfm-4.13.0. - -* Tue Mar 14 2023 William Cohen - 4.11.0-12 -- Add libpfm upstream patch to allow papi-7.0.1 to build. - -* Thu Jan 19 2023 Fedora Release Engineering - 4.11.0-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Thu Jul 21 2022 Fedora Release Engineering - 4.11.0-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Tue Jun 21 2022 Python Maint - 4.11.0-9 -- Fix FTBFS due to gcc12. (rhbz2045823) - -* Mon Jun 13 2022 Python Maint - 4.11.0-8 -- Rebuilt for Python 3.11 - -* Thu Jan 20 2022 Fedora Release Engineering - 4.11.0-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - * Thu Jul 22 2021 Fedora Release Engineering - 4.11.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/plans/ci.fmf b/plans/ci.fmf deleted file mode 100644 index 3fd3ab7..0000000 --- a/plans/ci.fmf +++ /dev/null @@ -1,5 +0,0 @@ -summary: CI Gating Plan -discover: - how: fmf -execute: - how: tmt diff --git a/sources b/sources index b2d4ea3..3d5afdf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libpfm-4.13.0.tar.gz) = e61b210aa2ce80f0e47603c88eee2e4f2fe30ca2c0e194a5472b6a8de3bf9dc1085e5261bbb9ddbe5b6531c4b391fb34f20d038e5ebd8e6f4c14c2112aee508f +SHA512 (libpfm-4.11.0.tar.gz) = 633035b8a7b35973437572095cdc80d422b2a1a61e74e14f106db95fa8e44e4518e591699cc457f828b8f2fb63f60eef6d0c7535c6b4c9a6c3a70d4550b3c3c7 diff --git a/tests/libpfm-testsuite/Makefile b/tests/libpfm-testsuite/Makefile deleted file mode 100644 index ba93382..0000000 --- a/tests/libpfm-testsuite/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /tools/libpfm/Sanity/libpfm-testsuite -# Description: libpfm-testsuite testing by upstream testsuite -# Author: Michal Kolar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2021 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/tools/libpfm/Sanity/libpfm-testsuite -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Michal Kolar " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: libpfm-testsuite testing by upstream testsuite" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 1h" >> $(METADATA) - @echo "RunFor: libpfm" >> $(METADATA) - @echo "Requires: libpfm rpm-build yum-utils make gcc" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5 -RHEL6 -RHEL7" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/libpfm-testsuite/PURPOSE b/tests/libpfm-testsuite/PURPOSE deleted file mode 100644 index 9c4a286..0000000 --- a/tests/libpfm-testsuite/PURPOSE +++ /dev/null @@ -1,3 +0,0 @@ -PURPOSE of /tools/libpfm/Sanity/libpfm-testsuite -Description: libpfm-testsuite testing by upstream testsuite -Author: Michal Kolar diff --git a/tests/libpfm-testsuite/main.fmf b/tests/libpfm-testsuite/main.fmf deleted file mode 100644 index 8b5c8cf..0000000 --- a/tests/libpfm-testsuite/main.fmf +++ /dev/null @@ -1,16 +0,0 @@ -summary: libpfm-testsuite testing by upstream testsuite -description: '' -contact: Michal Kolar -component: -- libpfm -test: ./runtest.sh -framework: beakerlib -recommend: -- libpfm -- rpm-build -- yum-utils -- make -- gcc -duration: 1h -extra-summary: /tools/libpfm/Sanity/libpfm-testsuite -extra-task: /tools/libpfm/Sanity/libpfm-testsuite diff --git a/tests/libpfm-testsuite/runtest.sh b/tests/libpfm-testsuite/runtest.sh deleted file mode 100755 index a5997d6..0000000 --- a/tests/libpfm-testsuite/runtest.sh +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /tools/libpfm/Sanity/libpfm-testsuite -# Description: libpfm-testsuite testing by upstream testsuite -# Author: Michal Kolar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2021 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -BUILD_USER=${BUILD_USER:-lbpfmbld} -TESTS_COUNT_MIN=${TESTS_COUNT_MIN:-1} -PACKAGE="libpfm" -REQUIRES="$PACKAGE rpm-build make gcc" -if rlIsFedora; then - REQUIRES="$REQUIRES dnf-utils" -else - REQUIRES="$REQUIRES yum-utils" -fi - -rlJournalStart - rlPhaseStartSetup - rlShowRunningKernel - rlAssertRpm --all - rlRun "TmpDir=\$(mktemp -d)" - rlRun "pushd $TmpDir" - rlFetchSrcForInstalled $PACKAGE - rlRun "useradd -M -N $BUILD_USER" 0,9 - [ "$?" == "0" ] && rlRun "del=yes" - rlRun "chown -R $BUILD_USER:users $TmpDir" - rlPhaseEnd - - rlPhaseStartSetup "build libpfm" - rlRun "rpm -D \"_topdir $TmpDir\" -U *.src.rpm" - 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-*-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" - rlPhaseEnd - - rlPhaseStartTest "run testsuite" - rlRun "su -c './validate &>$TmpDir/testsuite.log' $BUILD_USER" - rlRun "rlFileSubmit $TmpDir/testsuite.log" - rlPhaseEnd - - rlPhaseStartTest "evaluate results" - rlRun "cd $TmpDir" - rlRun "grep -q 'All tests passed' testsuite.log" - rlRun "tests_count=\$(grep -o -E '^\s*[0-9]+' testsuite.log | awk '{sum+=\$1} END {print sum}')" - [ "$tests_count" -ge "$TESTS_COUNT_MIN" ] && rlLogInfo "Test counter: $tests_count" || rlFail "Test counter $tests_count should be greater than or equal to $TESTS_COUNT_MIN" - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "popd" - rlRun "rm -r $TmpDir" - [ "$del" == "yes" ] && rlRun "userdel -f $BUILD_USER" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd