Compare commits

...
Sign in to create a new pull request.

94 commits

Author SHA1 Message Date
Aaron Merey
7581f96112
Add libpfm-fix-const.patch 2025-12-19 13:30:35 -05:00
Python Maint
37780f0847 Rebuilt for Python 3.14.0rc3 bytecode 2025-09-19 12:27:20 +02:00
Aaron Merey
0bfaf1d1cb
libpfm.spec: bump release number 2025-08-25 12:04:16 -04:00
Aaron Merey
91fced006a
tests/runtest.sh: Fix path to tests
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2389127
2025-08-25 11:54:56 -04:00
Python Maint
9b4205af69 Rebuilt for Python 3.14.0rc2 bytecode 2025-08-15 12:56:39 +02:00
Fedora Release Engineering
12330968af Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-24 20:10:36 +00:00
Python Maint
fab74e854f Rebuilt for Python 3.14 2025-06-02 20:26:21 +02:00
Fedora Release Engineering
c9663bf9f8 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-17 12:58:01 +00:00
Fedora Release Engineering
d9915b348d Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-18 14:46:25 +00:00
Python Maint
9c38e7ca4d Rebuilt for Python 3.13 2024-06-07 08:51:39 +02:00
Yaakov Selkowitz
5b33854516 Modernize provides filter
https://docs.fedoraproject.org/en-US/packaging-guidelines/AutoProvidesAndRequiresFiltering/
2024-02-04 11:33:04 -05:00
Michal Kolar
e8e4c2f2e9 plans/ci.fmf: fix deprecated fmf plan attribute 2024-02-02 09:11:21 +00:00
William Cohen
dcb84740cd Fix gcc-14 -Werror=calloc-transposed-args compatibility 2024-01-29 16:34:57 -05:00
Fedora Release Engineering
461c2dd0bd Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-25 03:13:09 +00:00
Fedora Release Engineering
0697d01219 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-21 05:00:03 +00:00
William Cohen
109072acb0 migrated to SPDX license 2023-08-01 09:48:34 -04:00
Fedora Release Engineering
22274b8db4 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-20 11:45:57 +00:00
Python Maint
2d5dcdf0e7 Rebuilt for Python 3.12 2023-06-13 20:43:09 +02:00
Miro Hrončok
0f9c88b81f Don't install a Python .egg
Due to an upcoming deprecation of .eggs in pip,
we'd like to avoid all Python .eggs in Fedora.

setuptools forces installation of an .egg when --prefix is set without --root.

To make this work, we set the make's DESTDIR variable
rather than prefixing other values with it.

To assert this works, we list the Python files explicitly,
as required by https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_explicit_lists
2023-04-25 14:13:18 +02:00
William Cohen
face84c751 Rebase on libpfm-4.13.0. 2023-03-28 23:31:46 -04:00
William Cohen
a5d8146854 Add libpfm upstream patch to allow papi-7.0.1 to build. 2023-03-14 10:52:30 -04:00
Fedora Release Engineering
4e095bbe90 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 17:09:29 +00:00
Fedora Release Engineering
fb415892ef Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-21 18:40:28 +00:00
William Cohen
99bed25950 Resolve: rhbz2045823 2022-06-21 12:07:42 -04:00
Python Maint
da6000bab9 Rebuilt for Python 3.11 2022-06-13 15:08:54 +02:00
Fedora Release Engineering
abee1be380 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 16:58:00 +00:00
Michal Kolar
dcd2f17914 init FMF CI gating 2021-09-20 21:22:34 +00:00
Fedora Release Engineering
1e30143a01 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-22 12:06:05 +00:00
Python Maint
e5d977450b Rebuilt for Python 3.10 2021-06-04 20:09:41 +02:00
Fedora Release Engineering
12dbc8b7ae - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 17:45:21 +00:00
William Cohen
06bbef121d Re-enable libpfm-static for time being. 2021-01-23 14:52:27 -05:00
William Cohen
fab1ad1b12 Related #1918922 2021-01-22 13:30:29 -05:00
Tom Stellard
035bc07c0b Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2021-01-06 19:45:02 +00:00
William Cohen
be509d634c Rebase to libpfm-4.11.0. 2020-09-08 11:09:03 -04:00
Fedora Release Engineering
a05595b455 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-28 05:20:17 +00:00
Tom Stellard
13951d4142 Use make macros
https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
2020-07-13 21:21:46 +00:00
Miro Hrončok
f4ffc7d560 Rebuilt for Python 3.9 2020-05-26 02:51:00 +02:00
Fedora Release Engineering
a7cd34e5cb - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-29 10:03:11 +00:00
Miro Hrončok
c5e835f5e8 Rebuilt for Python 3.8.0rc1 (#1748018) 2019-10-03 13:55:53 +02:00
Miro Hrončok
d4b0539856 Rebuilt for Python 3.8 2019-08-19 10:18:18 +02:00
Fedora Release Engineering
1eb63415a4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-25 14:07:29 +00:00
Fedora Release Engineering
6e29b869b3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-01 07:57:27 +00:00
Igor Gnatenko
5577a0591b Remove obsolete Group tag
References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag
2019-01-28 20:24:12 +01:00
Igor Gnatenko
f1bd5ac965
Remove obsolete ldconfig scriptlets
References: https://fedoraproject.org/wiki/Changes/RemoveObsoleteScriptlets
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-01-22 18:40:01 +01:00
William Cohen
393b4b06e6 Should be using python3 macros. 2018-07-24 11:41:08 -04:00
Miro Hrončok
686670e617 Update Python macros to new packaging standards 2018-07-17 17:10:59 +02:00
William Cohen
af5418c81e Add gcc Buildrequires. 2018-07-15 20:05:06 -04:00
Fedora Release Engineering
7f4ef1dde1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-13 08:39:19 +00:00
Miro Hrončok
d69ef2206b Rebuilt for Python 3.7 2018-06-19 10:46:14 +02:00
William Cohen
e8ae3bf138 Rebase 4.10.1. 2018-06-15 09:40:41 -04:00
William Cohen
d7cc62017d Use upstream libpfm cavium patch. 2018-06-12 11:58:41 -04:00
William Cohen
360481a7b3 - Rebase on libpfm-4.10.0.
- Use Python 3.
2018-06-10 23:03:58 -04:00
William Cohen
75e5fed5de Pass in LDFLAGS rhbz1540262 2018-02-26 11:42:26 -05:00
Fedora Release Engineering
4225d4f522 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-07 23:02:18 +00:00
William Cohen
c307e8c48d Fixes due to compiler checks for possible truncation by snprintf. 2018-01-31 11:47:46 -05:00
William Cohen
b3bd2d418d Related: rhbz1540262 2018-01-30 13:57:18 -05:00
Iryna Shcherbina
d5efe98c8d Update Python 2 dependency declarations to new packaging standards 2018-01-09 18:57:30 +01:00
William Cohen
37725593f3 Rebase on libpfm-4.9.0. 2018-01-04 09:01:59 -05:00
Zbigniew Jędrzejewski-Szmek
f7b910a282 Add Provides for the old name without %_isa 2017-08-20 10:36:50 -04:00
Zbigniew Jędrzejewski-Szmek
557d7065fb Python 2 binary package renamed to python2-libpfm 2017-08-19 09:38:38 -04:00
Fedora Release Engineering
91533d7a46 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-03 02:05:00 +00:00
Fedora Release Engineering
5059dba167 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-26 19:31:15 +00:00
Igor Gnatenko
b00e6540d3 Rebuild due to bug in RPM (RHBZ #1468476)
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2017-07-07 12:21:13 +02:00
Fedora Release Engineering
4867e1344e - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-02-10 19:16:31 +00:00
William Cohen
033c6fd25c Rebase on libpfm-4.8.0. 2016-11-07 11:12:28 -05:00
Fedora Release Engineering
29a46f8104 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages 2016-07-19 07:43:04 +00:00
William Cohen
01f234c66c Rebase on libpfm-4.7.0. 2016-02-11 13:39:54 -05:00
Dennis Gilmore
4c403f5308 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-04 03:45:17 +00:00
Dennis Gilmore
a25bed8d76 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild 2015-06-17 16:22:49 +00:00
William Cohen
25c704b8ff Make sure subrpms have same version as main libpfm rpm. 2015-06-04 13:53:35 -04:00
William Cohen
e530429c44 Rebase to libpfm-4.6.0. 2015-03-05 14:20:43 -05:00
William Cohen
143ee83893 Bump version and rebuild. 2015-02-11 15:30:54 -05:00
Peter Robinson
321c481630 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild 2014-08-17 05:25:50 +00:00
Toshio Kuratomi
c127adaf08 Replace python-setuptools-devel BR with python-setuptools 2014-06-30 13:33:14 -07:00
Dennis Gilmore
684d107199 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild 2014-06-07 00:02:12 -05:00
William Cohen
14b554c6b8 Add Arm Cortex a53 support. 2014-05-23 14:35:43 -04:00
William Cohen
dbbf2a9355 Update to libpfm-4.5.0 2014-05-23 13:38:02 -04:00
Lukas Berk
bbc8d2ec41 Automated weekly libpfm rawhide release: 5.217.gbca43a5 2014-01-15 14:30:51 -05:00
Lukas Berk
5cf35974ab Automated weekly libpfm rawhide release: 3.200.g9df2031 2013-11-25 09:24:39 -05:00
Lukas Berk
d31ad20f7f Comment out patch1 application for rawhide release 3.199.g0b87987 2013-11-19 10:55:12 -05:00
Lukas Berk
c227a98b23 Comment out patch applied upstream for rawhide release 3.199.g0b87987 2013-11-19 10:53:34 -05:00
Lukas Berk
61289f645a Automated weekly libpfm rawhide release: 3.199.g0b87987 2013-11-19 10:32:58 -05:00
Dennis Gilmore
29361e11c8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild 2013-08-03 01:42:55 -05:00
William Cohen
71fa8e87be related: rhbz830275 - Add support for POWER8 processor to PAPI 2013-07-19 18:52:06 -04:00
William Cohen
00467d5ab2 Rebase on libpfm-4.4.0 2013-06-17 15:12:58 -04:00
Dennis Gilmore
95117c1e63 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild 2013-02-13 23:03:51 -06:00
William Cohen
a90bf62439 Turn off LDCONFIG and remove patch. 2012-08-28 14:56:14 -04:00
William Cohen
95ba25063d Rebase to libpfm-4.3.0. 2012-08-28 10:09:57 -04:00
Dennis Gilmore
ec48aaa168 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild 2012-07-19 15:52:03 -05:00
William Cohen
1bd5d57e0d Avoid triggering swig segfault
When building with swig 2.0.7 in rawhide the the printing of a warning
message in swig would cause swig to segfault.  This patch avoids the error
message and allow libpfm to build.
2012-06-08 13:55:16 -04:00
William Cohen
9ae3bad453 Revive libpfm and import (#804666). 2012-06-08 10:00:34 -04:00
William Eden Cohen
1d75737b06 Obsolete package 2010-02-26 20:47:57 +00:00
Bill Nottingham
96c665b0cb Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-25 23:51:13 +00:00
Jesse Keating
2d1bc2eb4b - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild 2009-07-25 06:25:23 +00:00
18 changed files with 629 additions and 218 deletions

View file

@ -1 +0,0 @@
libpfm-3.5.tar.gz

1
.fmf/version Normal file
View file

@ -0,0 +1 @@
1

14
.gitignore vendored Normal file
View file

@ -0,0 +1,14 @@
/libpfm-4.3.0.tar.gz
/libpfm-4.4.0.tar.gz
/libpfm-4.4.0-3.199.g0b87987.tar.gz
/libpfm-4.4.0-3.200.g9df2031.tar.gz
/libpfm-4.4.0-5.217.gbca43a5.tar.gz
/libpfm-4.5.0.tar.gz
/libpfm-4.6.0.tar.gz
/libpfm-4.7.0.tar.gz
/libpfm-4.8.0.tar.gz
/libpfm-4.9.0.tar.gz
/libpfm-4.10.0.tar.gz
/libpfm-4.10.1.tar.gz
/libpfm-4.11.0.tar.gz
/libpfm-4.13.0.tar.gz

View file

@ -1,21 +0,0 @@
# Makefile for source rpm: libpfm
# $Id: Makefile,v 1.1 2004/09/24 14:13:08 wcohen Exp $
NAME := libpfm
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attempt a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

19
gating.yaml Normal file
View file

@ -0,0 +1,19 @@
--- !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}

View file

@ -1,20 +0,0 @@
--- libpfm-3.2-060926/rules.mk.rpm_opt 2006-09-26 08:21:37.000000000 -0400
+++ libpfm-3.2-060926/rules.mk 2006-10-01 21:33:10.000000000 -0400
@@ -25,12 +25,12 @@
.SUFFIXES: .c .S .o .lo .cpp
.S.o:
- $(CC) $(CFLAGS) -c $*.S
+ $(CC) $(CFLAGS) $(RPM_OPT_FLAGS) -c $*.S
.c.o:
- $(CC) $(CFLAGS) -c $*.c
+ $(CC) $(CFLAGS) $(RPM_OPT_FLAGS) -c $*.c
.cpp.o:
- $(CXX) $(CFLAGS) -c $*.cpp
+ $(CXX) $(CFLAGS) $(RPM_OPT_FLAGS) -c $*.cpp
.c.lo:
- $(CC) -fPIC -DPIC $(CFLAGS) -c $*.c -o $*.lo
+ $(CC) -fPIC -DPIC $(CFLAGS) $(RPM_OPT_FLAGS) -c $*.c -o $*.lo
.S.lo:
- $(CC) -fPIC -DPIC $(CFLAGS) -c $*.S -o $*.lo
+ $(CC) -fPIC -DPIC $(CFLAGS) $(RPM_OPT_FLAGS) -c $*.S -o $*.lo

View file

@ -1,12 +0,0 @@
diff -up libpfm-3.3/lib/pfmlib_itanium2.c.broken libpfm-3.3/lib/pfmlib_itanium2.c
--- libpfm-3.3/lib/pfmlib_itanium2.c.broken 2008-02-26 10:47:03.000000000 -0500
+++ libpfm-3.3/lib/pfmlib_itanium2.c 2008-02-26 10:47:50.000000000 -0500
@@ -231,7 +231,7 @@ check_inst_retired_events(pfmlib_input_p
int code;
int c;
unsigned int i, count, found = 0;
- unsigned long umask, mask;
+ unsigned long umask = 0, mask;
pfm_get_event_code(PME_ITA2_IA64_INST_RETIRED_THIS, &code);

View file

@ -1,38 +0,0 @@
diff -up libpfm-3.5/examples/multiplex.c.unused libpfm-3.5/examples/multiplex.c
--- libpfm-3.5/examples/multiplex.c.unused 2008-07-31 16:58:21.000000000 -0400
+++ libpfm-3.5/examples/multiplex.c 2008-07-31 16:59:18.000000000 -0400
@@ -613,6 +613,7 @@ measure_one_cpu(char **argv)
struct pollfd pollfd;
pid_t pid = 0;
int ret, timeout;
+ int nbytes;
memset(ctx, 0, sizeof(ctx));
memset(&load_arg, 0, sizeof(load_arg));
@@ -721,7 +722,7 @@ measure_one_cpu(char **argv)
*/
if (options.opt_ovfl_switch) {
pfarg_msg_t msg;
- read(ctxid, &msg, sizeof(msg));
+ nbytes = read(ctxid, &msg, sizeof(msg));
}
switch_sets(ctxid);
break;
diff -up libpfm-3.5/lib/pfmlib_os_linux.c.unused libpfm-3.5/lib/pfmlib_os_linux.c
--- libpfm-3.5/lib/pfmlib_os_linux.c.unused 2008-07-30 17:16:40.000000000 -0400
+++ libpfm-3.5/lib/pfmlib_os_linux.c 2008-07-31 16:57:05.000000000 -0400
@@ -390,12 +390,13 @@ static int
pfm_init_syscalls_sysfs(void)
{
FILE *fp;
+ int nbytes;
fp = fopen("/sys/kernel/perfmon/syscall", "r");
if (!fp)
return -1;
- fscanf(fp, "%d", &sys_base);
+ nbytes = fscanf(fp, "%d", &sys_base);
fclose(fp);

59
libpfm-fix-const.patch Normal file
View file

@ -0,0 +1,59 @@
From ded148888c501c2e9d21c23263d7c09aed4b97d6 Mon Sep 17 00:00:00 2001
From: Aaron Merey <amerey@redhat.com>
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

21
libpfm-gcc14.patch Normal file
View file

@ -0,0 +1,21 @@
commit cb944829e0940d74009e09b8985b4f2139f5cb3b
Author: William Cohen <wcohen@redhat.com>
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;

View file

@ -0,0 +1,10 @@
diff --git a/python/setup.py b/python/setup.py
index eda8fa5..dff0f27 100755
--- a/python/setup.py
+++ b/python/setup.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
from distutils.core import setup, Extension
from distutils.command.install_data import install_data

View file

@ -1,180 +1,390 @@
Summary: A performance monitoring library for Linux
Name: libpfm
Version: 3.5
Release: 3%{?dist}
License: MIT
Group: Development/Libraries
ExclusiveArch: ia64 %{ix86} x86_64 ppc ppc64
ExclusiveOS: linux
Source: http://prdownloads.sourceforge.net/perfmon2/%{name}-%{version}.tar.gz
URL: http://sourceforge.net/projects/perfmon2/
# Default to no static libraries
%{!?with_static: %global with_static 1}
%bcond_without python
%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$
%endif
Patch3: libpfm-3.2-rpm_opt.patch
#Patch4: libpfm-3.2-man3.patch
Patch5: libpfm-3.3-ia64-build.patch
Patch6: libpfm-3.4-unused.patch
Name: libpfm
Version: 4.13.0
Release: 17%{?dist}
BuildRequires: ncurses-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-root
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
%if %{with python}
BuildRequires: python3
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: swig
%endif
%description
This package contains a library to develop performance monitoring
applications using the Performance Monitor Unit (PMU) available on
various processors.
libpfm4 is a library to help encode events for use with operating system
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
Summary: the Linux performance library (libpfm) development files.
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
License: MIT
Summary: Development library to encode performance events for perf_events based tools
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The performance monitoring library (libpfm) is used to develop
performance monitoring applications using the Performance Monitoring
Unit (PMU) available on various processors. This package provides the
files necessary for development of applications.
It requires a kernel perfmon-2.x subsystem.
Development library and header files to create performance monitoring
applications for the perf_events interface.
Requires: ncurses
%if %{with_static}
%package static
License: MIT
Summary: Static library to encode performance events for perf_events based tools
Requires: %{name}%{?_isa} = %{version}-%{release}
%description static
Static version of the libpfm library for performance monitoring
applications for the perf_events interface.
%endif
%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}
Provides: %{name}-python%{?_isa} = %{version}-%{release}
Obsoletes: %{name}-python < %{version}-%{release}
Summary: Python bindings for libpfm and perf_event_open system call
Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n python3-libpfm
Python bindings for libpfm4 and perf_event_open system call.
%endif
%prep
%setup -q -n %{name}-%{version}
%patch3 -p1 -b .rpm_opt
#%patch4 -p1 -b .man3
%patch5 -p1 -b .ia64build
%patch6 -p1 -b .unused
%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
%build
make PREFIX=/usr DESTDIR=%{buildroot} LIBDIR=%{_libdir}
%if %{with python}
%global python_config CONFIG_PFMLIB_NOPYTHON=n
%else
%global python_config CONFIG_PFMLIB_NOPYTHON=y
%endif
%make_build %{python_config} \
OPTIM="%{optflags}" LDFLAGS="%{build_ldflags}"
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}
make install PREFIX=/usr DESTDIR=%{buildroot} LIBDIR=%{_libdir}
# If we need this static library, make a -static subpackage for it.
rm -rf %{buildroot}/%{_libdir}/*.a
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%if %{with python}
%global python_config CONFIG_PFMLIB_NOPYTHON=n PYTHON_PREFIX=%{python_prefix}
%else
%global python_config CONFIG_PFMLIB_NOPYTHON=y
%endif
%clean
rm -rf %{buildroot}
make \
DESTDIR=$RPM_BUILD_ROOT \
PREFIX=%{_prefix} \
LIBDIR=%{_libdir} \
%{python_config} \
LDCONFIG=/bin/true \
install
%if !%{with_static}
rm $RPM_BUILD_ROOT%{_libdir}/lib*.a
%endif
%ldconfig_scriptlets
%files
%defattr(-,root,root,-)
%doc README COPYRIGHT
%attr(755,root,root) %{_libdir}/*.so.*
%doc README
%{_libdir}/lib*.so.*
%files devel
%defattr(-,root,root,-)
%{_mandir}/man3/*
%{_libdir}/libpfm.so
%{_includedir}/*
%{_mandir}/man3/*
%{_libdir}/lib*.so
%if %{with_static}
%files static
%{_libdir}/lib*.a
%endif
%if %{with python}
%files -n python3-libpfm
%{python3_sitearch}/perfmon-*.egg-info/
%{python3_sitearch}/perfmon/
%endif
%changelog
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Tue Dec 16 2025 Aaron Merey <amerey@redhat.com> - 4.13.0-17
- Add libpfm-fix-const.patch
* Thu Aug 7 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 3.5-2
- fix license tag
- package cleanups (drop static library, package shared bits correctly)
* Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 4.13.0-16
- Rebuilt for Python 3.14.0rc3 bytecode
* Thu Jul 31 2008 Will Cohen <wcohen@redhat.com> - 3.5-1
- Update to libpfm-3.5.
* Mon Aug 25 2025 Aaron Merey <amerey@redhat.com> - 4.13.0-15
- Fix path in tests/runtest.sh
* Fri May 2 2008 Will Cohen <wcohen@redhat.com> - 3.4-1
- Update to libpfm-3.4.
* Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 4.13.0-14
- Rebuilt for Python 3.14.0rc2 bytecode
* Tue Feb 26 2008 Will Cohen <wcohen@redhat.com> - 3.3-0.080225.2
- Correct possibly unitialized variable umask. Resolves: rhbz #434968
* Thu Jul 24 2025 Fedora Release Engineering <releng@fedoraproject.org> - 4.13.0-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Mon Feb 25 2008 Will Cohen <wcohen@redhat.com> - 3.3-0.080225.1
- Update to libpfm-3.3.
* Mon Jun 02 2025 Python Maint <python-maint@redhat.com> - 4.13.0-12
- Rebuilt for Python 3.14
* Wed Feb 20 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 3.2-1.071017.1
- Autorebuild for GCC 4.3
* Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 4.13.0-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Wed Oct 24 2007 Will Cohen <wcohen@redhat.com> - 3.2-0.071017.1
- Update to libpfm-3.2-071017.
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.13.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Tue Aug 21 2007 Will Cohen <wcohen@redhat.com> - 3.2-0.061205.3
- rebuild
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 4.13.0-9
- Rebuilt for Python 3.13
* Mon May 21 2007 Will Cohen <wcohen@redhat.com> - 3.2-0.061205.2
- Fix up rpmlint complaints.
* Mon Jan 29 2024 William Cohen <wcohen@redhat.com> - 4.13.0-8
- Fix gcc-14 -Werror=calloc-transposed-args compatibility
* Mon Dec 4 2006 Will Cohen <wcohen@redhat.com> - 3.2-0.061205.1
- Update to libpfm-3.2-061205.
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.13.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Nov 3 2006 Will Cohen <wcohen@redhat.com> - 3.2-0.060926.3
- Add dist tag to build.
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.13.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Oct 1 2006 Will Cohen <wcohen@redhat.com> - 3.2-0.060926.2
- Eliminate unneeded libpfm-compa.tpatch.
* Tue Aug 1 2023 William Cohen <wcohen@redhat.com> - 4.13.0-5
- migrated to SPDX license
* Sun Oct 1 2006 Will Cohen <wcohen@redhat.com> - 3.2-0.060926.1
- Update to libpfm-3.2-060926.
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.13.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Sep 19 2006 Will Cohen <wcohen@redhat.com> - 3.2-0.060621.10
- Make sure fix works on i386. (#205221)
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 4.13.0-3
- Rebuilt for Python 3.12
* Tue Sep 19 2006 Will Cohen <wcohen@redhat.com> - 3.2-0.060621.9
- Make sure libraries put in correct directory. (#205221)
* Tue Apr 25 2023 Miro Hrončok <mhroncok@redhat.com> - 4.13.0-2
- Don't install a Python .egg
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 3.2-0.060621.8.1
- rebuild
* Tue Mar 28 2023 William Cohen <wcohen@redhat.com> - 4.13.0-1
- Rebase on libpfm-4.13.0.
* Sat Jul 8 2006 Will Cohen <wcohen@redhat.com>
- Avoid pulling in the example ELF executable into /usr/share. (#198001)
- Mark man pages as documentation.
* Tue Mar 14 2023 William Cohen <wcohen@redhat.com> - 4.11.0-12
- Add libpfm upstream patch to allow papi-7.0.1 to build.
* Tue Jun 27 2006 Will Cohen <wcohen@redhat.com>
- Add ncurses requires.
- Add ncurses-devel buildprereq.
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.11.0-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Mon Jun 26 2006 Will Cohen <wcohen@redhat.com>
- Make sure that CFLAGS in pfmlib/lib/ is used.
- Separate build and install processes.
- Clean up the descriptions.
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.11.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 26 2006 Will Cohen <wcohen@redhat.com>
- Update to libpfm-3.2-060621.
* Tue Jun 21 2022 Python Maint <python-maint@redhat.com> - 4.11.0-9
- Fix FTBFS due to gcc12. (rhbz2045823)
* Wed Jun 14 2006 Will Cohen <wcohen@redhat.com>
- Update to libpfm-3.2-060613.
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 4.11.0-8
- Rebuilt for Python 3.11
* Fri May 05 2006 Will Cohen <wcohen@redhat.com>
- fno-strict-aliasing so ia64 builds.
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.11.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri May 05 2006 Will Cohen <wcohen@redhat.com>
- make sure that perfmon_compat.h installed for ia64.
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.11.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Thu May 04 2006 Will Cohen <wcohen@redhat.com>
- Update to libpfm-3.2-060421.
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 4.11.0-5
- Rebuilt for Python 3.10
* Thu Feb 09 2006 Florian La Roche <laroche@redhat.com>
- remove empty scripts
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.11.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 3.0-4.2
- rebuilt for new gcc4.1 snapshot and glibc changes
* Sat Jan 23 2021 William Cohen <wcohen@redhat.com> - 4.11.0-3
- Reenable generation of static libraries for time being.
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
- rebuilt
* Fri Jan 22 2021 William Cohen <wcohen@redhat.com> - 4.11.0-2
- By default disable generation of static libraries
* Mon Mar 14 2005 Will Cohen <wcohen@redhat.com>
- Bump rebuild with gcc4.
* Tue Sep 08 2020 William Cohen <wcohen@redhat.com> - 4.11.0-1
- Rebase on libpfm-4.11.0.
* Tue Oct 26 2004 Will Cohen <wcohen@redhat.com>
- Correct ownership of files.
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.10.1-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Sep 27 2004 Will Cohen <wcohen@redhat.com>
- Correct spec file for build system.
* Mon Jul 13 2020 Tom Stellard <tstellar@redhat.com> - 4.10.1-12
- Use make macros
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
* Mon Dec 1 2003 Stephane Eranian <eranian@hpl.hp.com>
- release 3.0 final version
* Thu Jan 02 2003 Stephane Eranian <eranian@hpl.hp.com>
- release final 2.0 version
* Fri Dec 20 2002 Stephane Eranian <eranian@hpl.hp.com>
- final 2.0 release
* Thu Dec 05 2002 Stephane Eranian <eranian@hpl.hp.com>
- initial release of the library as a standalone package
- see ChangeLog for actual log
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 4.10.1-11
- Rebuilt for Python 3.9
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.10.1-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 4.10.1-9
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 4.10.1-8
- Rebuilt for Python 3.8
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.10.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.10.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Tue Jul 17 2018 Miro Hrončok <mhroncok@redhat.com> - 4.10.1-5
- Update Python macros to new packaging standards
(See https://fedoraproject.org/wiki/Changes/Move_usr_bin_python_into_separate_package)
* Sun Jul 15 2018 William Cohen <wcohen@redhat.com> - 4.10.1-4
- Add gcc Buildrequires.
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.10.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 4.10.1-2
- Rebuilt for Python 3.7
* Fri Jun 15 2018 William Cohen <wcohen@redhat.com> - 4.10.1-1
- Rebase on libpfm-4.10.1.
* Tue Jun 12 2018 William Cohen <wcohen@redhat.com> - 4.10.0-2
- Use upstream libpfm cavium patch.
* Fri Jun 8 2018 William Cohen <wcohen@redhat.com> - 4.10.0-1
- Rebase on libpfm-4.10.0.
- Use Python 3.
* Mon Feb 26 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.9.0-6
- Pass in LDFLAGS for build.
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.9.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Tue Jan 30 2018 William Cohen <wcohen@redhat.com> - 4.9.0-4
- Address truncation issues.
* Tue Jan 30 2018 William Cohen <wcohen@redhat.com> - 4.9.0-3
- Use the RPM build flags. (RHBZ #1540262)
* Tue Jan 09 2018 Iryna Shcherbina <ishcherb@redhat.com> - 4.9.0-2
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
* Thu Jan 4 2018 William Cohen <wcohen@redhat.com> - 4.9.0-1
- Rebase on libpfm-4.9.0.
* Sun Aug 20 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.8.0-8
- Add Provides for the old name without %%_isa
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.8.0-7
- Python 2 binary package renamed to python2-libpfm
See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.8.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.8.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Jul 07 2017 Igor Gnatenko <ignatenko@redhat.com> - 4.8.0-4
- Rebuild due to bug in RPM (RHBZ #1468476)
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.8.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Nov 7 2016 William Cohen <wcohen@redhat.com> - 4.8.0-1
- Rebase on libpfm-4.8.0.
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.7.0-2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 11 2016 William Cohen <wcohen@redhat.com> - 4.7.0-1
- Rebase on libpfm-4.7.0.
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 4.6.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.6.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Thu Jun 4 2015 William Cohen <wcohen@redhat.com> - 4.6.0-2
- Correct requires for subpackages.
* Thu Mar 5 2015 William Cohen <wcohen@redhat.com> - 4.6.0-1
- Rebase on libpfm-4.6.0.
* Wed Feb 11 2015 William Cohen <wcohen@redhat.com> - 4.5.0-6
- Bump version and rebuild.
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.5.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Mon Jun 30 2014 Toshio Kuratomi <toshio@fedoraproject.org> - 4.5.0-4
- Replace python-setuptools-devel BR with python-setuptools
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.5.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Fri May 23 2014 William Cohen <wcohen@redhat.com> 4.5.0-2
- Add cortex a53 support.
* Fri May 23 2014 William Cohen <wcohen@redhat.com> 4.5.0-1
- Rebase on libpfm-4.5.0.
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.4.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Fri Jul 19 2013 William Cohen <wcohen@redhat.com> 4.4.0-2
- Add IBM power 8 support.
* Mon Jun 17 2013 William Cohen <wcohen@redhat.com> 4.4.0-1
- Rebase on libpfm-4.4.0.
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.3.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Tue Aug 28 2012 William Cohen <wcohen@redhat.com> 4.3.0-2
- Turn off LDCONFIG and remove patch.
* Tue Aug 28 2012 William Cohen <wcohen@redhat.com> 4.3.0-1
- Rebase on libpfm-4.3.0.
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Fri Jun 8 2012 William Cohen <wcohen@redhat.com> 4.2.0-7
- Eliminate swig error.
* Thu Jun 7 2012 William Cohen <wcohen@redhat.com> 4.2.0-6
- Eliminate rpm_build_root macro in build section.
- Correct location of shared library files.
* Thu Jun 7 2012 William Cohen <wcohen@redhat.com> 4.2.0-5
- Use siginfo_t for some examples.
* Mon Jun 4 2012 William Cohen <wcohen@redhat.com> 4.2.0-4
- Correct python files.
* Wed Mar 28 2012 William Cohen <wcohen@redhat.com> 4.2.0-3
- Additional spec file fixup for rhbz804666.
* Wed Mar 14 2012 William Cohen <wcohen@redhat.com> 4.2.0-2
- Some spec file fixup.
* Wed Jan 12 2011 Arun Sharma <asharma@fb.com> 4.2.0-0
Initial revision

5
plans/ci.fmf Normal file
View file

@ -0,0 +1,5 @@
summary: CI Gating Plan
discover:
how: fmf
execute:
how: tmt

View file

@ -1 +1 @@
01caa64e409d378bd420aca9d3bc6efb libpfm-3.5.tar.gz
SHA512 (libpfm-4.13.0.tar.gz) = e61b210aa2ce80f0e47603c88eee2e4f2fe30ca2c0e194a5472b6a8de3bf9dc1085e5261bbb9ddbe5b6531c4b391fb34f20d038e5ebd8e6f4c14c2112aee508f

View file

@ -0,0 +1,63 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /tools/libpfm/Sanity/libpfm-testsuite
# Description: libpfm-testsuite testing by upstream testsuite
# Author: Michal Kolar <mkolar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# 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 <mkolar@redhat.com>" > $(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)

View file

@ -0,0 +1,3 @@
PURPOSE of /tools/libpfm/Sanity/libpfm-testsuite
Description: libpfm-testsuite testing by upstream testsuite
Author: Michal Kolar <mkolar@redhat.com>

View file

@ -0,0 +1,16 @@
summary: libpfm-testsuite testing by upstream testsuite
description: ''
contact: Michal Kolar <mkolar@redhat.com>
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

View file

@ -0,0 +1,82 @@
#!/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 <mkolar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# 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