From: Michael Petlan <mpetlan@xxxxxxxxxx> [redhat] perf: link libtraceevent dynamically Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1952426 Due to independent usage of libtraceevent by various users (perf, trace-cmd), it now exists as a separate package, which provides the library+plugins. Now perf has to link against it and not install its own libtraceevent, since that would conflict. v1 --> v2 ========= Rebased to latest os-build branch. Signed-off-by: Michael Petlan <mpetlan@xxxxxxxxxx> diff a/redhat/kernel.spec.template b/redhat/kernel.spec.template --- a/redhat/kernel.spec.template +++ b/redhat/kernel.spec.template @@ -543,6 +543,7 @@ BuildRequires: audit-libs-devel BuildRequires: java-devel BuildRequires: libbpf-devel BuildRequires: libbabeltrace-devel +BuildRequires: libtraceevent-devel %ifnarch %{arm} s390x BuildRequires: numactl-devel %endif @@ -872,7 +873,7 @@ This package provides debug information for the perf package. # symlinks because of the trailing nonmatching alternation and # the leading .*, because of find-debuginfo.sh's buggy handling # of matching the pattern against the symlinks file. -%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%%{_bindir}/perf(\.debug)?|.*%%{_libexecdir}/perf-core/.*|.*%%{_libdir}/traceevent/plugins/.*|.*%%{_libdir}/libperf-jvmti.so(\.debug)?|XXX' -o perf-debuginfo.list} +%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%%{_bindir}/perf(\.debug)?|.*%%{_libexecdir}/perf-core/.*|.*%%{_libdir}/libperf-jvmti.so(\.debug)?|XXX' -o perf-debuginfo.list} %package -n python3-perf Summary: Python bindings for apps which will manipulate perf events @@ -2070,7 +2071,7 @@ InitBuildVars %endif %global perf_make \ - %{__make} %{?make_opts} EXTRA_CFLAGS="${RPM_OPT_FLAGS}" LDFLAGS="%{__global_ldflags}" %{?cross_opts} -C tools/perf V=1 NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 LIBBPF_DYNAMIC=1 prefix=%{_prefix} PYTHON=%{__python3} + %{__make} %{?make_opts} EXTRA_CFLAGS="${RPM_OPT_FLAGS}" LDFLAGS="%{__global_ldflags}" %{?cross_opts} -C tools/perf V=1 NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 LIBBPF_DYNAMIC=1 LIBTRACEEVENT_DYNAMIC=1 prefix=%{_prefix} PYTHON=%{__python3} %if %{with_perf} # perf # make sure check-headers.sh is executable @@ -2283,7 +2284,7 @@ tar xjvf %{SOURCE300} -C $INSTALL_KABI_PATH %if %{with_perf} # perf tool binary and supporting scripts/binaries -%{perf_make} DESTDIR=$RPM_BUILD_ROOT lib=%{_lib} install-bin install-traceevent-plugins +%{perf_make} DESTDIR=$RPM_BUILD_ROOT lib=%{_lib} install-bin # remove the 'trace' symlink. rm -f %{buildroot}%{_bindir}/trace @@ -2591,8 +2592,7 @@ fi %files -n perf %{_bindir}/perf %{_libdir}/libperf-jvmti.so -%dir %{_libdir}/traceevent/plugins -%{_libdir}/traceevent/plugins/* +%exclude %{_libdir}/traceevent %dir %{_libexecdir}/perf-core %{_libexecdir}/perf-core/* %{_datadir}/perf-core/* -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1148 _______________________________________________ kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure