From patchwork Sun Jun 6 18:52:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ryan Sundberg X-Patchwork-Id: 29983 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id BCD4927BC81; Sun, 6 Jun 2021 23:13:13 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 47C2527BC78 for ; Sun, 6 Jun 2021 23:13:13 +0100 (BST) Received: from localhost ([::1]:37330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lq115-0001pG-Kr for patchwork@mira.cbaines.net; Sun, 06 Jun 2021 18:13:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56466) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lq10x-0001nq-9C for guix-patches@gnu.org; Sun, 06 Jun 2021 18:13:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42559) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lq10w-0002mZ-UW for guix-patches@gnu.org; Sun, 06 Jun 2021 18:13:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lq10w-0003hM-Pn for guix-patches@gnu.org; Sun, 06 Jun 2021 18:13:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48889] [PATCH 4/4] bpftool: new package Resent-From: Ryan Sundberg Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 06 Jun 2021 22:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48889 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48889@debbugs.gnu.org Cc: Ryan Sundberg X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162301757414188 (code B ref -1); Sun, 06 Jun 2021 22:13:02 +0000 Received: (at submit) by debbugs.gnu.org; 6 Jun 2021 22:12:54 +0000 Received: from localhost ([127.0.0.1]:54102 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lq10m-0003gd-Uy for submit@debbugs.gnu.org; Sun, 06 Jun 2021 18:12:54 -0400 Received: from lists.gnu.org ([209.51.188.17]:56240) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lpxsy-0002tQ-Er for submit@debbugs.gnu.org; Sun, 06 Jun 2021 14:52:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59234) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpxsy-0002kC-5s for guix-patches@gnu.org; Sun, 06 Jun 2021 14:52:36 -0400 Received: from mail.arctype.co ([138.68.9.245]:48079) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpxsw-0008Bx-LX for guix-patches@gnu.org; Sun, 06 Jun 2021 14:52:35 -0400 Received: from authenticated-user (mail.arctype.co [138.68.9.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.arctype.co (Postfix) with ESMTPSA id 90E5911F07C; Sun, 6 Jun 2021 11:52:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arctype.co; s=mail; t=1623005553; bh=JmWAd3G/ya4HiHbmoLCzSsE79WHkrJyQaVwDaJ5NeeM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EIzij1AGQ8JGOfdDvfuQK5YzaI++41wcOk1ocDkvIbrhmpzIsQ3ZQRq36FGMj4zK0 3jmEnrJ7KYM3guVo7+aNnN9z9Xv3+xhnCh261q9dboT4I0nlevhw/UMzOtjFA+ChTW vQCwwXBfQKX2V8p8guULU7HzG7oDziOJaGw9Wk6buq4mJa9asMJt8naqldr8O3xvfh HtBUAznF7wG2Vry5ZLfSuGZzdHxD11bD3D9IMB1d6AiCkPst57fawNUj+gD4DFaMcx hJPE2sv8N+eDnxrI6FbagjQqu84LIiqycNT27u6z3r6Pd0bIYsKDC/B9xe5kw1Wdz7 tHpJy6U8V/Q7Q== Date: Sun, 6 Jun 2021 11:52:04 -0700 Message-Id: <20210606185204.17617-4-ryan@arctype.co> In-Reply-To: <20210606185204.17617-1-ryan@arctype.co> References: <20210606185204.17617-1-ryan@arctype.co> MIME-Version: 1.0 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-Mailman-Approved-At: Sun, 06 Jun 2021 18:12:49 -0400 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Ryan Sundberg X-ACL-Warn: , Ryan Sundberg via Guix-patches X-Patchwork-Original-From: Ryan Sundberg via Guix-patches via From: Ryan Sundberg X-getmail-retrieved-from-mailbox: Patches Adds the bpftool package from the Linux kernel source tree. --- gnu/packages/linux.scm | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index c8ec310665..06bb344475 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -54,6 +54,7 @@ ;;; Copyright © 2020 David Dashyan ;;; Copyright © 2020 pukkamustard ;;; Copyright © 2021 B. Wilson +;;; Copyright © 2021 Ryan Sundberg ;;; ;;; This file is part of GNU Guix. ;;; @@ -8108,3 +8109,42 @@ Availability and Serviceability} reports from Linux kernel trace events. These trace events are logged in @file{/sys/kernel/debug/tracing} and reported through standard log mechanisms like syslog.") (license license:gpl2))) + +(define-public bpftool + (package + (name "bpftool") + (version (package-version linux-libre)) + (source (package-source linux-libre)) + (build-system gnu-build-system) + (arguments + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (add-before 'configure 'chdir + (lambda _ (chdir "tools/bpf") #t)) + (delete 'configure) + (replace 'build + (lambda _ (invoke "make" "CC=gcc" "bpftool") #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" "bpftool" + "install") + #t)))))) + (inputs + `(("bison" ,bison) + ("python" ,python-3) + ("readline" ,readline))) + (propagated-inputs + `(("libcap" ,libcap) + ("libelf" ,libelf) + ("zlib" ,zlib))) + (home-page (package-home-page linux-libre)) + (synopsis "bpftool is a 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. Note that format of the output of all tools is not guaranteed to be stable and should not be depended upon.") + (license (package-license linux-libre))))