commit 9c0121d79e97f1eb6455560697d2e4fdc2ae2ba546a2f091c8e7466bc7d006ec Author: David Sterba Date: Thu Jul 4 20:27:22 2024 +0000 Accepting request 1185442 from home:dsterba:branches:benchmark - Add patch fix-libtracefs.patch, fix build path of libtracefs OBS-URL: https://build.opensuse.org/request/show/1185442 OBS-URL: https://build.opensuse.org/package/show/benchmark/rtla?expand=0&rev=11 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/fix-libtracefs.patch b/fix-libtracefs.patch new file mode 100644 index 0000000..8236ffc --- /dev/null +++ b/fix-libtracefs.patch @@ -0,0 +1,88 @@ +From mboxrd@z Thu Jan 1 00:00:00 1970 +Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) + (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) + (No client certificate requested) + by smtp.subspace.kernel.org (Postfix) with ESMTPS id B329119F469 + for ; Thu, 27 Jun 2024 21:02:04 +0000 (UTC) +Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 +ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; + t=1719522124; cv=none; b=s4NVapf/lq1T0G/Q2NNKau5FA40v9ogxFJehiFKljlGluyrG4IwJyKQkdXqR/OURtBP0HSErZZwdaXmuVv0rT8SwrpBqOPpSGkwK6Ae/8hs7YRXUE5nMyAoZs/uB6JblAvZqffUHaG3ZRWiQLIyg4QJTawF1ojXw/BJXva3W1Q8= +ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; + s=arc-20240116; t=1719522124; c=relaxed/simple; + bh=5A1xrcYEqkBgQFzZBOgLxlRJaM6yasYiRU8R1ppF8p8=; + h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: + Content-Type; b=MFhg8Io6UFReVzW8t0/210YaPgnQyW2ZqSL7ab3IDWqmxqAcgd9EnJIJIELWAcaoAVrp2GTxUFh5QiI1OIr9Ffo0if30VQCO7HRtEDpZ4PQdEhgflszvVK8QVC4+cr/UIx7DoXn4mI+lNs8CG7o1mTwSqxPnqDqujvH8gbq2UHw= +ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 +Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6AE9EC4AF09; + Thu, 27 Jun 2024 21:02:04 +0000 (UTC) +Received: from rostedt by gandalf with local (Exim 4.97) + (envelope-from ) + id 1sMwGf-000000031l7-0Doo; + Thu, 27 Jun 2024 17:02:57 -0400 +Message-ID: <20240627210256.912091413@goodmis.org> +User-Agent: quilt/0.68 +Date: Thu, 27 Jun 2024 16:50:25 -0400 +From: Steven Rostedt +To: linux-kernel@vger.kernel.org +Cc: Daniel Wagner , + "Luis Claudio R. Goncalves" , + Clark Williams , + Daniel Bristot de Oliveira +Subject: [for-next][PATCH 3/3] tools: build: use correct lib name for libtracefs feature detection +References: <20240627205022.857212058@goodmis.org> +Precedence: bulk +X-Mailing-List: linux-kernel@vger.kernel.org +List-Id: +List-Subscribe: +List-Unsubscribe: +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Status: RO +Content-Length: 1448 +Lines: 44 + +From: Daniel Wagner + +Use libtracefs as package name to lookup the CFLAGS for libtracefs. This +makes it possible to use the distro specific path as include path for +the header file. + +Link: https://lkml.kernel.org/r/20240617-rtla-build-v1-1-6882c34678e8@suse.de + +Cc: Daniel Bristot de Oliveira +Signed-off-by: Daniel Wagner +Signed-off-by: Daniel Bristot de Oliveira +--- + tools/build/feature/Makefile | 2 +- + tools/build/feature/test-libtracefs.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile +index ed54cef450f5..489cbed7e82a 100644 +--- a/tools/build/feature/Makefile ++++ b/tools/build/feature/Makefile +@@ -213,7 +213,7 @@ $(OUTPUT)test-libtraceevent.bin: + $(BUILD) -ltraceevent + + $(OUTPUT)test-libtracefs.bin: +- $(BUILD) $(shell $(PKG_CONFIG) --cflags libtraceevent 2>/dev/null) -ltracefs ++ $(BUILD) $(shell $(PKG_CONFIG) --cflags libtracefs 2>/dev/null) -ltracefs + + $(OUTPUT)test-libcrypto.bin: + $(BUILD) -lcrypto +diff --git a/tools/build/feature/test-libtracefs.c b/tools/build/feature/test-libtracefs.c +index 8eff16c0c10b..29a757a7d848 100644 +--- a/tools/build/feature/test-libtracefs.c ++++ b/tools/build/feature/test-libtracefs.c +@@ -1,5 +1,5 @@ + // SPDX-License-Identifier: GPL-2.0 +-#include ++#include + + int main(void) + { +-- +2.43.0 + + + diff --git a/rtla.changes b/rtla.changes new file mode 100644 index 0000000..4f882fd --- /dev/null +++ b/rtla.changes @@ -0,0 +1,32 @@ +------------------------------------------------------------------- +Thu Jul 4 00:00:00 CEST 2024 - dsterba@suse.cz + +- Add patch fix-libtracefs.patch, fix build path of libtracefs + +------------------------------------------------------------------- +Fri May 5 12:22:21 UTC 2023 - Daniel Wagner + +- Add hwnoise tool which got added with Linux 6.3 + +------------------------------------------------------------------- +Tue Jan 10 10:41:54 UTC 2023 - Daniel Wagner + +- Add missing libtraceevent linker argument (workaround until + the kernel list the lib dependency) +- Drop version dependencies on kernel and the libraries + +------------------------------------------------------------------- +Thu Oct 6 09:40:30 UTC 2022 - Andreas Schwab + +- Add a dummy -rebuild package to give OBS/Tumbleweed a hint when this + package needs a rebuild + +------------------------------------------------------------------- +Mon Jul 25 14:20:41 UTC 2022 - Andreas Schwab + +- Suppress stripping of installed binaries + +------------------------------------------------------------------- +Fri Feb 11 17:07:20 UTC 2022 - Daniel Wagner + +- Initial packaging of rtla. diff --git a/rtla.spec b/rtla.spec new file mode 100644 index 0000000..b628966 --- /dev/null +++ b/rtla.spec @@ -0,0 +1,85 @@ +# +# spec file for package rtla +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define version %(rpm -q --qf '%%{VERSION}' kernel-source) + +Name: rtla +Version: %{version} +Release: 0 +Summary: Real-Time Linux Analysis tools +License: GPL-2.0-only +URL: https://www.kernel.org/ +Patch1: fix-libtracefs.patch +BuildRequires: kernel-source +BuildRequires: libtraceevent-devel +BuildRequires: libtracefs-devel +BuildRequires: procps-devel +BuildRequires: python3-docutils + +%description +The rtla is a meta-tool that includes a set of commands that +aims to analyze the real-time properties of Linux. But, instead of +testing Linux as a black box, rtla leverages kernel tracing +capabilities to provide precise information about the properties +and root causes of unexpected results. + +%package rebuild +Summary: Empty package to ensure rebuilding rtla in OBS +%requires_eq kernel-source + +%description rebuild +This is an empty package that ensures rtla is rebuilt every time +kernel-default is rebuilt in OBS. + +There is no reason to install this package. + +%prep +(cd %{_prefix}/src/linux ; tar -cf - COPYING CREDITS README tools include scripts Kbuild Makefile arch/*/{include,lib,Makefile} lib Documentation/tools/rtla) | tar -xf - +# Workaround for missing lib dependency +sed -i 's/--libs libtracefs/--libs libtracefs libtraceevent/' tools/tracing/rtla/Makefile +%patch1 -p1 + +%build +cd tools/tracing/rtla +make %{?_smp_mflags} + +%install +cd tools/tracing/rtla +make install DESTDIR=%{buildroot} STRIP=true + +# Fixup symlinks as they are pointing to DESTDIR instead prefix +rm %{buildroot}%{_bindir}/osnoise +rm %{buildroot}%{_bindir}/timerlat +rm -f %{buildroot}%{_bindir}/hwnoise +ln -sf %{_bindir}/rtla %{buildroot}%{_bindir}/osnoise +ln -sf %{_bindir}/rtla %{buildroot}%{_bindir}/timerlat +ln -sf %{_bindir}/rtla %{buildroot}%{_bindir}/hwnoise + +%files +%license COPYING +%doc CREDITS README +%{_mandir}/man1/rtla*.1*%{?ext_man} +%{_bindir}/rtla +%{_bindir}/osnoise +%{_bindir}/timerlat +%{_bindir}/hwnoise + +%files rebuild +%license COPYING + +%changelog