From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A1DD6158089 for ; Fri, 15 Sep 2023 12:25:35 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B1CBD2BC026; Fri, 15 Sep 2023 12:25:34 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9E7BC2BC026 for ; Fri, 15 Sep 2023 12:25:34 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DA9FA335D16 for ; Fri, 15 Sep 2023 12:25:33 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 589B811AD for ; Fri, 15 Sep 2023 12:25:32 +0000 (UTC) From: "Maciej Barć" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Maciej Barć" Message-ID: <1694780729.6e2a9ca20c9c50bba2052f18fbead292f51188ed.xgqt@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/0xtools/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/0xtools/0xtools-9999.ebuild X-VCS-Directories: dev-util/0xtools/ X-VCS-Committer: xgqt X-VCS-Committer-Name: Maciej Barć X-VCS-Revision: 6e2a9ca20c9c50bba2052f18fbead292f51188ed X-VCS-Branch: master Date: Fri, 15 Sep 2023 12:25:32 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 09fdb5f2-1540-42c3-ba09-c2adfa466a9f X-Archives-Hash: 5848c3bc27bc3be2a596456137bdfdd8 commit: 6e2a9ca20c9c50bba2052f18fbead292f51188ed Author: Maciej Barć gentoo org> AuthorDate: Fri Sep 15 08:09:37 2023 +0000 Commit: Maciej Barć gentoo org> CommitDate: Fri Sep 15 12:25:29 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e2a9ca2 dev-util/0xtools: add live 9999 Signed-off-by: Maciej Barć gentoo.org> dev-util/0xtools/0xtools-9999.ebuild | 62 ++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/dev-util/0xtools/0xtools-9999.ebuild b/dev-util/0xtools/0xtools-9999.ebuild new file mode 100644 index 000000000000..3b7026647b97 --- /dev/null +++ b/dev-util/0xtools/0xtools-9999.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit python-single-r1 systemd toolchain-funcs + +DESCRIPTION="Always-on profiling for production systems" +HOMEPAGE="https://0x.tools/ + https://github.com/tanelpoder/0xtools/" + +if [[ ${PV} == *9999* ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/tanelpoder/${PN}.git" +else + SRC_URI="https://github.com/tanelpoder/${PN}/archive/v${PV}.tar.gz + -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="GPL-2+" +SLOT="0" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND="${PYTHON_DEPS}" +BDEPEND="${RDEPEND}" + +DOCS=( CHANGELOG.md README.md ) + +src_compile() { + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS} ${LDFLAGS}" + + sed -e "/^sys.path.append/s|(.*)|('$(python_get_sitedir)/${PN}')|" \ + -i bin/psn -i bin/schedlat || die +} + +src_install() { + # C executables and scripts + exeinto /usr/bin + doexe bin/{run_xcapture.sh,run_xcpu.sh,vmtop,xcapture} + + # Python executables + python_domodule lib/${PN} + python_doscript bin/psn + python_doscript bin/schedlat + + # Service + systemd_dounit xcapture.service + systemd_dounit xcapture-restart.service + systemd_dounit xcapture-restart.timer + + # Service config + insinto /etc/default + newins xcapture.default xcapture + + # Service logs + keepdir /var/log/xcapture + + einstalldocs +}