public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Aaron Merey <amerey@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/libpfm] f43: Add libpfm-fix-const.patch
Date: Wed, 03 Jun 2026 13:41:58 GMT	[thread overview]
Message-ID: <178049411833.1.17050967930827922403.rpms-libpfm-7581f961126a@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/libpfm
Branch : f43
Commit : 7581f961126a36779ddff1aa5f81497a2fe1a7f7
Author : Aaron Merey <amerey@redhat.com>
Date   : 2025-12-19T13:30:35-05:00
Stats  : +65/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/libpfm/c/7581f961126a36779ddff1aa5f81497a2fe1a7f7?branch=f43

Log:
Add 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 <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
+

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 <amerey@redhat.com> - 4.13.0-17
+- Add libpfm-fix-const.patch
+
 * Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 4.13.0-16
 - Rebuilt for Python 3.14.0rc3 bytecode
 

                 reply	other threads:[~2026-06-03 13:41 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=178049411833.1.17050967930827922403.rpms-libpfm-7581f961126a@fedoraproject.org \
    --to=amerey@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