public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/perfetto] rawhide: Update to 57.2 (fedora#2520856).
@ 2026-08-21 5:24 Jonathan Steffan
0 siblings, 0 replies; only message in thread
From: Jonathan Steffan @ 2026-08-21 5:24 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/perfetto
Branch : rawhide
Commit : e5beb53fd7815dae558acb78075c1d2f31e78ac7
Author : Jonathan Steffan <jsteffan@fedoraproject.org>
Date : 2026-08-20T23:24:34-06:00
Stats : +277/-21 in 8 file(s)
URL : https://src.fedoraproject.org/rpms/perfetto/c/e5beb53fd7815dae558acb78075c1d2f31e78ac7?branch=rawhide
Log:
Update to 57.2 (fedora#2520856).
---
diff --git a/.gitignore b/.gitignore
index 05b61f5..37b22ed 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,5 @@
/perfetto-v48.0.tar.gz
/perfetto-v48.1.tar.gz
/perfetto-v49.0.tar.gz
+/perfetto-57.2.tar.gz
+/perfetto-cpp-sdk-src-v57.2.zip
diff --git a/perfetto-system-gtest.patch b/perfetto-system-gtest.patch
new file mode 100644
index 0000000..95ffe64
--- /dev/null
+++ b/perfetto-system-gtest.patch
@@ -0,0 +1,83 @@
+From: Fedora
+Subject: [PATCH] gn: allow linking the unit tests against the system GoogleTest
+
+Same rationale as the system RE2 patch: GoogleTest is only available as a
+hermetic buildtools/googletest checkout fetched by tools/install-build-deps,
+so distributions building from a release tarball cannot build the unit tests
+at all and have to ship with enable_perfetto_unittests=false.
+
+Add a perfetto_use_system_gtest argument resolving //gn:gtest_and_gmock and
+//gn:gtest_main to the system libraries via pkg-config.
+
+--- a/gn/perfetto.gni
++++ b/gn/perfetto.gni
+@@ -475,6 +475,10 @@
+ # one. Combine with perfetto_use_pkgconfig to pick up the abseil deps.
+ perfetto_use_system_re2 = false
+
++ # Uses the system version of GoogleTest/GoogleMock instead of the hermetic
++ # one, for building the unit tests.
++ perfetto_use_system_gtest = false
++
+ perfetto_use_system_zlib = false
+
+ # Set by the amalgamated SDK build. Defaults the optional zlib/re2 features
+--- a/gn/BUILD.gn
++++ b/gn/BUILD.gn
+@@ -199,10 +199,44 @@
+ }
+ }
+
++pkg_config("pkgconfig_gtest") {
++ pkg_deps = [
++ "gmock",
++ "gtest",
++ ]
++}
++
++config("system_gtest") {
++ if (perfetto_use_pkgconfig) {
++ configs = [ ":pkgconfig_gtest" ]
++ } else {
++ # Fallback if pkg-config isn't enabled.
++ libs = [
++ "gmock",
++ "gtest",
++ ]
++ }
++}
++
++pkg_config("pkgconfig_gtest_main") {
++ pkg_deps = [ "gtest_main" ]
++}
++
++config("system_gtest_main") {
++ if (perfetto_use_pkgconfig) {
++ configs = [ ":pkgconfig_gtest_main" ]
++ } else {
++ # Fallback if pkg-config isn't enabled.
++ libs = [ "gtest_main" ]
++ }
++}
++
+ group("gtest_and_gmock") {
+ testonly = true
+
+- if (perfetto_root_path == "//") {
++ if (perfetto_use_system_gtest) {
++ public_configs = [ ":system_gtest" ]
++ } else if (perfetto_root_path == "//") {
+ public_deps = [
+ "//buildtools:gmock",
+ "//buildtools:gtest",
+@@ -219,7 +253,9 @@
+ group("gtest_main") {
+ testonly = true
+
+- if (perfetto_root_path == "//") {
++ if (perfetto_use_system_gtest) {
++ public_configs = [ ":system_gtest_main" ]
++ } else if (perfetto_root_path == "//") {
+ public_deps = [ "//buildtools:gtest_main" ]
+ } else if (build_with_chromium) {
+ public_deps = [ "//base/test:run_all_unittests" ]
diff --git a/perfetto-system-re2.patch b/perfetto-system-re2.patch
new file mode 100644
index 0000000..b750142
--- /dev/null
+++ b/perfetto-system-re2.patch
@@ -0,0 +1,57 @@
+From: Fedora
+Subject: [PATCH] gn: allow linking against the system RE2
+
+Perfetto only knows how to build RE2 from the hermetic buildtools/re2
+checkout, which is fetched by tools/install-build-deps and is therefore
+absent from the release tarballs. Distributions that ship their own RE2
+have to disable enable_perfetto_re2 entirely and fall back to std::regex.
+
+Add a perfetto_use_system_re2 argument that resolves //gn:re2 to the
+system library, mirroring what perfetto_use_system_protobuf already does
+for protobuf. When perfetto_use_pkgconfig is set the flags come from
+pkg-config, which also pulls in the abseil that modern RE2 requires.
+
+--- a/gn/perfetto.gni
++++ b/gn/perfetto.gni
+@@ -471,6 +471,10 @@
+ # from /usr/include instead of the hermetic one.
+ perfetto_use_system_sqlite = false
+
++ # Uses the system version of RE2 from /usr/include instead of the hermetic
++ # one. Combine with perfetto_use_pkgconfig to pick up the abseil deps.
++ perfetto_use_system_re2 = false
++
+ perfetto_use_system_zlib = false
+
+ # Set by the amalgamated SDK build. Defaults the optional zlib/re2 features
+--- a/gn/BUILD.gn
++++ b/gn/BUILD.gn
+@@ -516,9 +516,27 @@
+ }
+ }
+
++# pkg_deps selects the appropriate pkg-config based on current_toolchain and
++# this is a no-op if |perfetto_use_pkgconfig| is false.
++pkg_config("pkgconfig_re2") {
++ pkg_deps = [ "re2" ]
++}
++
++config("system_re2") {
++ if (perfetto_use_pkgconfig) {
++ configs = [ ":pkgconfig_re2" ]
++ } else {
++ # Fallback if pkg-config isn't enabled.
++ libs = [ "re2" ]
++ }
++ defines = [ "RE2_USE_ABSL" ]
++}
++
+ if (enable_perfetto_re2) {
+ group("re2") {
+- if (perfetto_root_path == "//") {
++ if (perfetto_use_system_re2) {
++ public_configs = [ ":system_re2" ]
++ } else if (perfetto_root_path == "//") {
+ public_deps = [ "//buildtools:re2" ]
+ } else {
+ # This part will be overridden by the various build generators (Android.bp,
diff --git a/perfetto-traced-probes.service b/perfetto-traced-probes.service
new file mode 100644
index 0000000..1d853b0
--- /dev/null
+++ b/perfetto-traced-probes.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Perfetto data sources for system tracing (ftrace and /proc pollers)
+Documentation=https://perfetto.dev/docs/
+
+[Service]
+ExecStart=/usr/sbin/traced_probes
+User=root
+Group=root
diff --git a/perfetto-traced.service b/perfetto-traced.service
new file mode 100644
index 0000000..4ca8d7a
--- /dev/null
+++ b/perfetto-traced.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=Perfetto tracing service daemon
+Documentation=https://perfetto.dev/docs/
+
+[Service]
+ExecStart=/usr/sbin/traced \
+ --set-socket-permissions traced:0666:traced-consumer:0660
+User=traced
+Group=traced
+PrivateTmp=no
+PrivateDevices=yes
+PrivateNetwork=yes
+ProtectSystem=yes
+ProtectHome=yes
+NoNewPrivileges=yes
+RestrictAddressFamilies=AF_UNIX
+SystemCallArchitectures=native
diff --git a/perfetto-versioned-soname.patch b/perfetto-versioned-soname.patch
new file mode 100644
index 0000000..6c9f44a
--- /dev/null
+++ b/perfetto-versioned-soname.patch
@@ -0,0 +1,40 @@
+From: Fedora
+Subject: [PATCH] gn: allow giving libperfetto.so a versioned SONAME
+
+libperfetto.so is installed into the system library path and is linked
+against (DT_NEEDED) by traced and traced_probes, rather than dlopen()ed.
+Distributions such as Fedora require a versioned SONAME in that situation,
+so that an incompatible ABI change can be expressed by bumping the SONAME.
+
+Add a perfetto_shared_lib_soname_suffix argument, empty by default, which
+gets appended to the "so" output extension. The standalone toolchain already
+derives -Wl,-soname from {{output_extension}}, so setting this is enough to
+produce both the versioned file name and the matching SONAME.
+
+--- a/gn/perfetto.gni
++++ b/gn/perfetto.gni
+@@ -479,6 +479,11 @@
+ # one, for building the unit tests.
+ perfetto_use_system_gtest = false
+
++ # Suffix appended to the "so" output extension of libperfetto.so, e.g.
++ # "0.1" produces libperfetto.so.0.1 with a matching SONAME. Empty (the
++ # default) keeps the historical unversioned libperfetto.so.
++ perfetto_shared_lib_soname_suffix = ""
++
+ perfetto_use_system_zlib = false
+
+ # Set by the amalgamated SDK build. Defaults the optional zlib/re2 features
+--- a/BUILD.gn
++++ b/BUILD.gn
+@@ -250,6 +250,10 @@
+ target(libperfetto_target_type, "libperfetto") {
+ if (libperfetto_target_type == "static_library") {
+ complete_static_lib = true
++ } else if (perfetto_shared_lib_soname_suffix != "") {
++ # Distributions require a versioned SONAME for any DSO that lives in the
++ # system library path and is linked against (as opposed to dlopen()ed).
++ output_extension = "so.$perfetto_shared_lib_soname_suffix"
+ }
+ deps = [
+ "gn:default_deps",
diff --git a/perfetto.spec b/perfetto.spec
index 64f0469..a1aa629 100644
--- a/perfetto.spec
+++ b/perfetto.spec
@@ -1,4 +1,6 @@
-%global forgeurl https://android.googlesource.com/platform/external/perfetto
+%global forgeurl https://github.com/google/perfetto
+%global tag v%{version}
+%global soname_suffix 0.1
%global common_description %{expand:
Perfetto is a production-grade open-source stack for performance
@@ -8,26 +10,41 @@ library for analyzing traces using SQL and a web-based UI to visualize and
explore multi-GB traces.}
Name: perfetto
-Version: 49.0
+Version: 57.2
Release: %autorelease
Summary: System profiling, app tracing and trace analysis
-License: Apache-2.0
+License: Apache-2.0 AND BSD-2-Clause
URL: https://perfetto.dev/
-Source0: %{forgeurl}/+archive/v%{version}.tar.gz#/%{name}-v%{version}.tar.gz
+%forgemeta
+Source0: %{forgesource}
Source1: perfetto.tmpfiles
Source2: perfetto.sysusers
+Source3: %{forgeurl}/releases/download/%{tag}/perfetto-cpp-sdk-src.zip#/%{name}-cpp-sdk-src-%{tag}.zip
+Source4: perfetto-traced.service
+Source5: perfetto-traced-probes.service
+
+# system re2
+Patch0: perfetto-system-re2.patch
+# system gtest
+Patch1: perfetto-system-gtest.patch
+# versioned SONAME; bump it when abi-compliance-checker reports a break.
+Patch2: perfetto-versioned-soname.patch
-BuildRequires: binutils-gold
BuildRequires: chrpath
BuildRequires: gcc-c++
+BuildRequires: gmock-devel
BuildRequires: gn
+BuildRequires: gtest-devel
BuildRequires: ninja-build
BuildRequires: pandoc
-BuildRequires: protobuf-compiler < 4
+BuildRequires: pkgconf-pkg-config
+BuildRequires: protobuf-compiler
BuildRequires: systemd-rpm-macros
+BuildRequires: unzip
-BuildRequires: protobuf-devel < 4
+BuildRequires: protobuf-devel
+BuildRequires: re2-devel
BuildRequires: zlib-devel
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
@@ -46,7 +63,8 @@ This package contains shared libraries for %{name}.
%package sdk
Summary: Perfetto Tracing SDK
-Requires: %{name}-libs%{?_isa} = %{version}-%{release}
+BuildArch: noarch
+Requires: %{name}-libs = %{version}-%{release}
%description sdk %{common_description}
@@ -55,7 +73,8 @@ userspace applications to emit trace events and add more app-specific context
to a Perfetto trace.
%prep
-%autosetup -c -p1
+%autosetup %{forgesetupargs} -p1
+unzip -q -o %{SOURCE3} -d sdk/
%build
gn gen build --args="\
@@ -66,39 +85,63 @@ gn gen build --args="\
is_clang=false \
skip_buildtools_check=true \
enable_perfetto_integration_tests=false \
- enable_perfetto_unittests=false \
+ perfetto_use_pkgconfig=true \
+ perfetto_use_system_gtest=true \
perfetto_use_system_protobuf=true \
+ perfetto_use_system_re2=true \
perfetto_use_system_zlib=true \
perfetto_enable_git_rev_version_header=false \
+ perfetto_shared_lib_soname_suffix=\"%{soname_suffix}\" \
extra_cflags=\"${CFLAGS}\" \
extra_cxxflags=\"${CXXFLAGS} -Wno-error=array-bounds\" \
extra_ldflags=\"${LDFLAGS}\" \
cc=\"${CC}\" \
cxx=\"${CXX}\" \
"
-
-%ninja_build -C build perfetto traced traced_probes
+
+%ninja_build -C build perfetto traced traced_probes tracebox \
+ perfetto_base_unittests perfetto_tracing_unittests
pandoc docs/reference/perfetto-cli.md -s -t man --shift-heading-level-by=-1 \
> perfetto.1
+pandoc docs/reference/tracebox.md -s -t man --shift-heading-level-by=-1 \
+ > tracebox.1
+for man in traced traced_probes; do
+ pandoc docs/reference/${man}.md -s -t man --shift-heading-level-by=-1 \
+ -V section=8 > ${man}.8
+done
# Fix bogus rpath
-chrpath -d build/{perfetto,traced,traced_probes}
+chrpath -d build/{perfetto,tracebox,traced,traced_probes}
+
+# The SONAME must be versioned: it is in the default library path and is
+# linked against by traced/traced_probes rather than dlopen()ed.
+test "$(objdump -p build/libperfetto.so.%{soname_suffix} | awk '/SONAME/{print $2}')" \
+ = "libperfetto.so.%{soname_suffix}"
%install
-install -Dpm0755 -t %{buildroot}%{_libdir} build/libperfetto.so
+install -Dpm0755 -t %{buildroot}%{_libdir} build/libperfetto.so.%{soname_suffix}
install -Dpm0755 -t %{buildroot}%{_sbindir} build/traced build/traced_probes
-install -Dpm0755 -t %{buildroot}%{_bindir} build/perfetto
-install -Dpm0644 -t %{buildroot}%{_unitdir} debian/{traced,traced-probes}.service
-install -Dpm0664 -t %{buildroot}%{_mandir}/man1 perfetto.1
+install -Dpm0755 -t %{buildroot}%{_bindir} build/perfetto build/tracebox
+install -Dpm0644 %{SOURCE4} %{buildroot}%{_unitdir}/traced.service
+install -Dpm0644 %{SOURCE5} %{buildroot}%{_unitdir}/traced-probes.service
+install -Dpm0664 -t %{buildroot}%{_mandir}/man1 perfetto.1 tracebox.1
+install -Dpm0664 -t %{buildroot}%{_mandir}/man8 traced.8 traced_probes.8
-install -Ddpm0755 %{buildroot}/run/perfetto
install -Dpm0644 %SOURCE1 %{buildroot}%{_tmpfilesdir}/perfetto.conf
install -Dpm0644 %SOURCE2 %{buildroot}%{_sysusersdir}/perfetto.conf
install -Dpm0644 -t %{buildroot}%{_datadir}/%{name}/configs test/configs/*.cfg
install -Dpm0644 -t %{buildroot}%{_datadir}/%{name}/sdk sdk/perfetto.{h,cc}
+%check
+for bin in perfetto tracebox traced traced_probes; do
+ LD_LIBRARY_PATH=build build/${bin} --version
+done
+build/perfetto_base_unittests
+build/perfetto_tracing_unittests
+
%post
+%tmpfiles_create_package %{name} %{SOURCE1}
%systemd_post traced.service traced-probes.service
@@ -110,10 +153,14 @@ install -Dpm0644 -t %{buildroot}%{_datadir}/%{name}/sdk sdk/perfetto.{h,cc}
%files
%doc CHANGELOG README.md
-%attr(0755,traced,traced) %dir /run/%{name}
+%ghost %attr(0755,traced,traced) %dir /run/%{name}
%{_bindir}/perfetto
+%{_bindir}/tracebox
%{_datadir}/%{name}/configs/
%{_mandir}/man1/perfetto.1*
+%{_mandir}/man1/tracebox.1*
+%{_mandir}/man8/traced.8*
+%{_mandir}/man8/traced_probes.8*
%{_sbindir}/traced
%{_sbindir}/traced_probes
%{_sysusersdir}/perfetto.conf
@@ -123,10 +170,11 @@ install -Dpm0644 -t %{buildroot}%{_datadir}/%{name}/sdk sdk/perfetto.{h,cc}
%files libs
%license LICENSE
-%{_libdir}/libperfetto.so
+%{_libdir}/libperfetto.so.%{soname_suffix}
%dir %{_datadir}/%{name}
%files sdk
+%doc docs/instrumentation/tracing-sdk.md
%{_datadir}/%{name}/sdk/
%changelog
diff --git a/sources b/sources
index 1398fc9..0cca8f4 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
-SHA512 (perfetto-v49.0.tar.gz) = 82f8759e401e104e6042fb9e0019ff1a00bedffc6c1844696c467943603ea7a0f274866da1113b9dbb386eb1c8c3c1a563a79a30b53bff79de6a69c74d70f1ac
+SHA512 (perfetto-57.2.tar.gz) = f1e46d72512b9f006357699e8d3e405fece0cf3f7be84504509618fb6b8a1eceb9e9e48eaae5ee1f45d6f461ead88a575e0b3f0ce8091d2c9567a8bd8bafe2b6
+SHA512 (perfetto-cpp-sdk-src-v57.2.zip) = 38abe1c89e075bd1d1f37396f7c5ba0af55c253747e79be7856e902e437a53e146a1bba4965bf0f3bd5d10aead7f9adada050fcb182010cf5fc15712ace1f5f4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-21 5:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-21 5:24 [rpms/perfetto] rawhide: Update to 57.2 (fedora#2520856) Jonathan Steffan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox