From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 8B8HKhJyrWOHOQAAbAwnHQ (envelope-from ) for ; Thu, 29 Dec 2022 11:55:14 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id qCUIKhJyrWMuEAAA9RJhRA (envelope-from ) for ; Thu, 29 Dec 2022 11:55:14 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E09D629A43 for ; Thu, 29 Dec 2022 11:55:13 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pAqZ1-0004YH-EH; Thu, 29 Dec 2022 05:55:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pAqZ0-0004Y6-8B for guix-patches@gnu.org; Thu, 29 Dec 2022 05:55:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pAqYx-0004rq-0F for guix-patches@gnu.org; Thu, 29 Dec 2022 05:55:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pAqYw-0007jU-Fq for guix-patches@gnu.org; Thu, 29 Dec 2022 05:55:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60401] [PATCH] gnu: bpftool: New package Resent-From: Ryan Sundberg Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 29 Dec 2022 10:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60401 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60401@debbugs.gnu.org Cc: Ryan Sundberg X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167231127529687 (code B ref -1); Thu, 29 Dec 2022 10:55:02 +0000 Received: (at submit) by debbugs.gnu.org; 29 Dec 2022 10:54:35 +0000 Received: from localhost ([127.0.0.1]:59374 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAqYV-0007il-9N for submit@debbugs.gnu.org; Thu, 29 Dec 2022 05:54:35 -0500 Received: from lists.gnu.org ([209.51.188.17]:37736) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAqYS-0007ib-Ss for submit@debbugs.gnu.org; Thu, 29 Dec 2022 05:54:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pAqYS-0004X0-Kg for guix-patches@gnu.org; Thu, 29 Dec 2022 05:54:32 -0500 Received: from mail.arctype.co ([138.68.9.245]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pAqYQ-0004mq-Fe for guix-patches@gnu.org; Thu, 29 Dec 2022 05:54:32 -0500 Received: from authenticated-user (mail.arctype.co [138.68.9.245]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by mail.arctype.co (Postfix) with ESMTPSA id 17F2313B18E; Thu, 29 Dec 2022 10:53:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=arctype.co; s=mail; t=1672311235; bh=2I/HHlWBhE48lG3jOrtPYPUXX34p50EuorrnxJRf8Pk=; h=From:To:Cc:Subject:Date:From; b=OvOlNDvGzdAeozhB1Z+p3U72hEQnpsigcc0REU1XWxneI1Iq6phTIqt+ZffX7Xw6l E15x6Gw16v2vAGRsnM4YsyOQ5uXLrwj7PjhPAVmBkGR9IgS5ObxDwdZdtZpPpHZ+FU wHXQXbV/NaEy8OjeSAFmBuGr0wrRrBYxNH9JRJPaBXhuOvhFHRwtkgbU0MkWhkg6xh ImCSsBm7fP6HPavgz0h6XnXfupPmOzXARbQC32XtQMveYudEOatQJstFTMT+Rx2dhR SLH42bs3kCcmiadDnMemutvWwTkXNr96wOOo5OOZu+MGwawPuIygS/j6y3L4uBNDtr s2efiODhx3ZTA== Date: Thu, 29 Dec 2022 02:53:51 -0800 Message-Id: <20221229105351.2318-1-ryan@arctype.co> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=138.68.9.245; envelope-from=ryan@arctype.co; helo=mail.arctype.co X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Ryan Sundberg X-ACL-Warn: , Ryan Sundberg via Guix-patches From: Ryan Sundberg via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1672311314; a=rsa-sha256; cv=none; b=V+apG8lrBDVqbnbimYljpEo+ThQZp9zaQmqafT4fgdd1agzfFGCc4JHjLUoVLRX0HqNCi+ CoDiLJCY9R4IQLPzF4OxI5/gD3kHKHBLDPmyozovLjFclUd+1t17KOrAM0VrdajT0uFC0D n7CGPuT4nzTgSAqXLOz8HrHa0DEtXXzLjH1Xl9MlL7emqQ5TGBrjKDL75ihPdFCptsyZg3 Fi1rElzlMj8fdyoDRzKrPIu/pPu4qJ25GTXaeZR1tYMvT2cGFHpp+VlOtmNt/vGpDkWyBn DAbuHHFpIUNaQU8Ki6ezHw5ZZos2dbuYgHO+dOQCBGEIeW11Se9G/+DBRW/iHA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=arctype.co header.s=mail header.b=OvOlNDvG; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1672311314; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=HsFHZUlvwdE3nY9WrQ6lBqGBULRR7dXxxD7BLlW5PsI=; b=MnIQQ7qNf3nAgvSMMSUqwUezuE49jhF3dG2ZNcdpOisZ6rk5tuUgeOTcbFFaqfi4bGR9iR LdyIMGvWqeSeZa5JxkorjOTcy+o6EXVwnVlF/AX418ZqNBYtpA6vnoMBcr6MJ4FLErSs6m VtaOJ+pmGYMiTUfXk9ZYeyWvFjiVmumB3c1vxjMHMPE8ipDPT78dazBThGbJUB4WMwyoxy A7T99DDN4B/htxiyTH6jUdxqmx3RQ8MO/dWoKwIltPBlNYhAEx2eVXpvAxhZl1B3RjRPAf zpJKI7KKFvJICKQUPaWf99LQzRhlu+xOr45d/CYTEenxAEgxTmWGSkigecvRiw== X-Spam-Score: -3.03 X-Migadu-Queue-Id: E09D629A43 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=arctype.co header.s=mail header.b=OvOlNDvG; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -3.03 X-TUID: Ok/7ctdmyONw Provides a package for `bpftool` from the Linux kernel source. * gnu/packages/linux.scm (bpftool): New variable --- gnu/packages/linux.scm | 53 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 568c2b6b92..2f625267dc 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -61,6 +61,7 @@ ;;; Copyright © 2021 Olivier Dion ;;; Copyright © 2021 Solene Rapenne ;;; Copyright © 2021, 2022 Petr Hodina +;;; Copyright © 2021 Ryan Sundberg ;;; Copyright © 2022 Artyom V. Poptsov ;;; Copyright © 2022 Rene Saavedra ;;; Copyright © 2022 muradm @@ -9361,6 +9362,58 @@ (define-public bcc and above.") (license license:asl2.0))) +(define-public bpftool + (package + (name "bpftool") + (version (package-version linux-libre)) + (source (package-source linux-libre)) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; This package has no tests. + #:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda* (#:key inputs #:allow-other-keys) + (let* ((binutils* (assoc-ref inputs "binutils")) + (ldflags (string-append "-I" (string-append binutils* "/include")))) + (invoke "make" + "-C" + "tools/bpf/bpftool" + ,(string-append "CC=" (cc-for-target)) + ; We need to explicitly set the RUNPATH for these libraries + (string-append "LDFLAGS=-Wl" + ",-rpath=" (assoc-ref inputs "elfutils") "/lib" + ",-rpath=" (assoc-ref inputs "libcap") "/lib" + ",-rpath=" (assoc-ref inputs "zlib") "/lib")) + #t))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out"))) + (mkdir-p (string-append out "/sbin")) + (mkdir-p (string-append out "/share/bash-completion/completions")) + (invoke "make" + (string-append "prefix=" out) + (string-append "bash_compdir=" out + "/share/bash-completion/completions") + "-C" "tools/bpf/bpftool" + "install") + #t)))))) + (inputs + `(("elfutils", elfutils) ; Provides libelf + ("readline" ,readline) + ("libcap" ,libcap) + ("zlib" ,zlib))) + (native-inputs + `(("bison" ,bison) + ("python" ,python-3))) + ; This tool does not have a proper web page. + (home-page "https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/tree/tools/bpf/bpftool") + (synopsis "Tool for inspection and simple manipulation of eBPF programs and maps") + (description "bpftool allows for inspection and simple modification of BPF +objects on the system.") + (license (package-license linux-libre)))) + (define-public bpftrace (package (name "bpftrace") -- 2.37.2