[packages/oprofile] Rel 15
arekm
arekm at pld-linux.org
Sun Aug 23 13:17:45 CEST 2026
commit 499be2a29dae2e5c1acde10e710714633dcdd6ca
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sun Aug 23 13:17:36 2026 +0200
Rel 15
null-string.patch | 17 +++++++++++++++++
oprofile.spec | 11 +++++++----
2 files changed, 24 insertions(+), 4 deletions(-)
---
diff --git a/oprofile.spec b/oprofile.spec
index cb0dcff..6cdaf47 100644
--- a/oprofile.spec
+++ b/oprofile.spec
@@ -11,13 +11,14 @@ Summary: System-wide profiler
Summary(pl.UTF-8): Ogólnosystemowy profiler
Name: oprofile
Version: 1.4.0
-Release: 14
+Release: 15
License: GPL v2 (oprofile), LGPL v2.1+ (libopagent)
Group: Applications/System
-Source0: http://downloads.sourceforge.net/oprofile/%{name}-%{version}.tar.gz
+Source0: https://downloads.sourceforge.net/oprofile/%{name}-%{version}.tar.gz
# Source0-md5: ac0ff685ec9735e30d6a4d19de0efed7
Patch0: gcc14.patch
-URL: http://oprofile.sourceforge.net/
+Patch1: null-string.patch
+URL: https://oprofile.sourceforge.io/
# not used directly, but build fails without it
BuildRequires: autoconf >= 2.50
BuildRequires: automake
@@ -87,6 +88,7 @@ Statyczna biblioteka libopagent.
%prep
%setup -q
%patch -P0 -p1
+%patch -P1 -p1
%build
%{__libtoolize}
@@ -104,12 +106,13 @@ install -d $RPM_BUILD_ROOT%{_var}/lib/oprofile
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
+rm -r $RPM_BUILD_ROOT%{_docdir}/%{name}
+
%clean
rm -rf $RPM_BUILD_ROOT
%preun
if [ "$1" = 0 ]; then
- %{_bindir}/opcontrol --shutdown 2>/dev/null 1>&2
rm -rf %{_var}/lib/oprofile/*
fi
diff --git a/null-string.patch b/null-string.patch
new file mode 100644
index 0000000..a778c2a
--- /dev/null
+++ b/null-string.patch
@@ -0,0 +1,17 @@
+create_stats_dir() returns std::string, so "return NULL" constructs a
+std::string from a null char pointer - undefined behaviour whenever mkdir
+fails with something other than EEXIST.
+
+Upstream commit df99eaa39975af90eeea084b2252691f9f275d12.
+
+--- oprofile-1.4.0/libperf_events/operf_stats.cpp.orig 2020-07-20 17:26:39.000000000 +0200
++++ oprofile-1.4.0/libperf_events/operf_stats.cpp 2026-08-23 12:40:00.000000000 +0200
+@@ -179,7 +179,7 @@
+ if (rc && (errno != EEXIST)) {
+ cerr << "Error trying to create stats dir. " << endl;
+ perror("mkdir failed with");
+- return NULL;
++ return "";
+ }
+ return stats_dir;
+ }
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/oprofile.git/commitdiff/499be2a29dae2e5c1acde10e710714633dcdd6ca
More information about the pld-cvs-commit
mailing list