From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id kLoADw7svWAQ4QAAgWs5BA (envelope-from ) for ; Mon, 07 Jun 2021 11:51:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id mDlWCg7svWDxEwAA1q6Kng (envelope-from ) for ; Mon, 07 Jun 2021 09:51:10 +0000 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 ACAC61DB74 for ; Mon, 7 Jun 2021 11:51:08 +0200 (CEST) Received: from localhost ([::1]:43632 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqBuV-00073k-Kg for larch@yhetil.org; Mon, 07 Jun 2021 05:51:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35018) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqBuQ-00072m-ON for guix-patches@gnu.org; Mon, 07 Jun 2021 05:51:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42950) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lqBuQ-0008Qd-Hr for guix-patches@gnu.org; Mon, 07 Jun 2021 05:51:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lqBuQ-00041r-Cw for guix-patches@gnu.org; Mon, 07 Jun 2021 05:51:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48889] [PATCH 4/4] bpftool: new package Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 07 Jun 2021 09:51: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: Ryan Sundberg , 48889@debbugs.gnu.org Received: via spool by 48889-submit@debbugs.gnu.org id=B48889.162305944215463 (code B ref 48889); Mon, 07 Jun 2021 09:51:02 +0000 Received: (at 48889) by debbugs.gnu.org; 7 Jun 2021 09:50:42 +0000 Received: from localhost ([127.0.0.1]:54496 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqBu1-00041G-9I for submit@debbugs.gnu.org; Mon, 07 Jun 2021 05:50:41 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:54256) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqBtx-000415-Cf for 48889@debbugs.gnu.org; Mon, 07 Jun 2021 05:50:36 -0400 Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id E9qX2500P0mfAB4019qXsw; Mon, 07 Jun 2021 11:50:31 +0200 Message-ID: <95c21dc7fa0e9c6864df06b307f3375d511847a8.camel@telenet.be> From: Maxime Devos Date: Mon, 07 Jun 2021 11:50:31 +0200 In-Reply-To: <20210606185204.17617-4-ryan@arctype.co> References: <20210606185204.17617-1-ryan@arctype.co> <20210606185204.17617-4-ryan@arctype.co> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-kL+qTxDP/GLos5O6SQJw" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623059431; bh=xeys/O+7CTJqUadzjT3/ac5d1jiTKmdlVBR7xFRG7u8=; h=Subject:From:To:Date:In-Reply-To:References; b=qgCQkrGlHHQvFOU1UiAaV9NIszuaQQRZJ6J9qQV2lDxoBjH5nfykrVpUIJN+gdWEM XCaz+6K0etkuV6kkB1GmJDOtraQxlYu+JYlISl/PRR9i5/Jh9G4m1rZKfDKxxGwc55 T8nBB/XEVRxz5OXrtcgzy6BwDmIRGCpYh/kTc0oItTo/0g9hmeIwfWqHG95E20VsC3 hWOTm8BkCBfB5qriF/hecrZRyAtMSkjJ+Rn5QPywTTcJhjNGByeODXwq/UBVooFPE/ eCyDUYHz5Gu9Xp0kcoKE4dKfDRp4BcsXSHj9MBllUz6g+W/USBirjeK3W0WwOscyFl Vd9CVpBoCxKRQ== 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1623059469; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=xeys/O+7CTJqUadzjT3/ac5d1jiTKmdlVBR7xFRG7u8=; b=a1PZR6WrVWnzIDcBlX8nctbFeVnInrD41D19LcBYo4pvOpPJ0WaK4TosDjzSIGpD8CEV1N dUxkaUhITLVHLlfgLAJ5gQ6XZN6GPqZVJgjE58lgsHLRkWUPLN33LMONAGFJCHV6Iiu9sA Xm5HTlqk5Ip5UjtNnSdTi5eLT3zSMv9k9tgctnA3HkjrmmYhrFchmxFuHZ3uA5si5Z9c9Y CTpGF2gLT78txldHMjZ9nRUCvP+Ez1BsMINyVKx3zXndCI1RxtI3rqJd65v3Cg88bpfCrC yzKH42A5oR9b7t85N0W5ZzXVI2zrqhZfCHNhovxnNeHkl8TI8rj91WvP99R41A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1623059469; a=rsa-sha256; cv=none; b=pna23EL08KE3ol9Y94liM5ILmETxQCS1bTHtutul2EkEkQfXw5FCKWzY4XN73iUbd7HRJl sqkACL1enW0njCD424vStIdbiaSbKOmL1avHUpbGdmEDjq6dl0vcBrT9nGG7IAY4yp+AIJ HGVW5ondGhJUgDBvG5Eg1egQ8D0lE/yWp0lEzF1uKYPUJnNh8XFkkJ61I79IBOOyLD2zmp vW3cnc213avIMfZxz+S3RlLAXjxaAX7uJkTNZe0+ZJfGAmM6nuNfkDiriMnRXT0IsB5YZ5 qkcSnj5A/oz98K2o1n7Gx78dgmhRt1cbhNHWXINfef498x98wObyC4TYdvwFKw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=qgCQkrGl; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -3.42 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=qgCQkrGl; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: ACAC61DB74 X-Spam-Score: -3.42 X-Migadu-Scanner: scn0.migadu.com X-TUID: I0GgFUqpaNFP --=-kL+qTxDP/GLos5O6SQJw Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Ryan Sundberg via Guix-patches via schreef op zo 06-06-2021 om 11:52 [-0700= ]: > Adds the bpftool package from the Linux kernel source tree. > --- > gnu/packages/linux.scm | 40 ++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 40 insertions(+) >=20 > 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 =C2=A9 2020 David Dashyan > ;;; Copyright =C2=A9 2020 pukkamustard > ;;; Copyright =C2=A9 2021 B. Wilson > +;;; Copyright =C2=A9 2021 Ryan Sundberg > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -8108,3 +8109,42 @@ Availability and Serviceability} reports from Linu= x kernel trace events. > These trace events are logged in @file{/sys/kernel/debug/tracing} and re= ported > 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 Why are tests disabled? > + #:phases=20 > + (modify-phases %standard-phases > + (add-before 'configure 'chdir=20 > + (lambda _ (chdir "tools/bpf") #t)) > + (delete 'configure) > + (replace 'build=20 > + (lambda _ (invoke "make" "CC=3Dgcc" "bpftool") #t)) Use ,(string-append "CC=3D" (cc-for-target)), to make sure cross-compiling = bpftools works. > + (replace 'install=20 > + (lambda* (#:key outputs #:allow-other-keys) > + (let* ((out (assoc-ref outputs "out")))=20 > + (mkdir-p (string-append out "/sbin")) > + (mkdir-p (string-append out "/share/bash-completion/comp= letions")) > + (invoke "make"=20 > + (string-append "prefix=3D" out) > + (string-append "bash_compdir=3D" out "/share/bas= h-completion/completions") > + "-C" "bpftool" > + "install") > + #t)))))) > + (inputs > + `(("bison" ,bison) Bison looks like a native input to me. > + ("python" ,python-3) Could be input, could be native-input. I don't know what's appropriate for = bpftools. You can check with ./pre-inst-env guix build bpftools --target=3Daarch64-linux-gnu If there is "command not found: python" or something like that, you'll need to move python to native-inputs. > + ("readline" ,readline))) > + (propagated-inputs > + `(("libcap" ,libcap) > + ("libelf" ,libelf) > + ("zlib" ,zlib))) bpftool is a tool, and not a library, right? Then these libraries should be in inputs, not propagated-inputs, to avoid polluting the profile. bpftool should still have access to these libraries by ELF's RPATH or something like that. > + (home-page (package-home-page linux-libre)) I don't see anything about bpftools on . Maybe bpftools has a wiki somewhere? > + (synopsis "bpftool is a tool for inspection and simple manipulation = of eBPF programs and maps") > + (description "*bpftool* allows for inspection and simple modificatio= n of BPF objects on the system. Note that format of the output of all tool= s is not guaranteed to be stable and should not be depended upon.") Line is too long. Also, what's up with surrounding bpftools with *asterisks= *? Greetings, Maxime. --=-kL+qTxDP/GLos5O6SQJw Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYL3r5xccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7tZnAP4w6ax7410R6Llv1PpzKReLDD3a lB81L0kxY+3VXGUu3wEA+vWAOWv438Hb78+9uF8U80TqowvR014O3Yghk4U6GwI= =yDST -----END PGP SIGNATURE----- --=-kL+qTxDP/GLos5O6SQJw--