From patchwork Wed May 15 16:51:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 64457 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 4503127BBE9; Wed, 15 May 2024 17:52:22 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A731327BBE2 for ; Wed, 15 May 2024 17:52:17 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7HrG-0007hf-DY; Wed, 15 May 2024 12:52:02 -0400 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 1s7HrE-0007hF-Pg for guix-patches@gnu.org; Wed, 15 May 2024 12:52:00 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7HrE-00031E-Ha for guix-patches@gnu.org; Wed, 15 May 2024 12:52:00 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s7HrG-00071M-2U for guix-patches@gnu.org; Wed, 15 May 2024 12:52:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70962] [PATCH 01/14] gnu: grpc: Modernize. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 15 May 2024 16:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70962 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70962@debbugs.gnu.org Cc: Maxim Cournoyer X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.171579188826978 (code B ref -1); Wed, 15 May 2024 16:52:01 +0000 Received: (at submit) by debbugs.gnu.org; 15 May 2024 16:51:28 +0000 Received: from localhost ([127.0.0.1]:43103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7Hqh-000714-A7 for submit@debbugs.gnu.org; Wed, 15 May 2024 12:51:27 -0400 Received: from lists.gnu.org ([209.51.188.17]:58772) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7Hqf-00070y-J1 for submit@debbugs.gnu.org; Wed, 15 May 2024 12:51:26 -0400 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 1s7Hqd-0007e5-ES for guix-patches@gnu.org; Wed, 15 May 2024 12:51:23 -0400 Received: from mail-qv1-xf34.google.com ([2607:f8b0:4864:20::f34]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7Hqb-0002ld-DS for guix-patches@gnu.org; Wed, 15 May 2024 12:51:23 -0400 Received: by mail-qv1-xf34.google.com with SMTP id 6a1803df08f44-6a0ff97a9c7so61694686d6.0 for ; Wed, 15 May 2024 09:51:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715791879; x=1716396679; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=CCjZy5Sg+w9JemZFjGBFpZdFncEPR1AaYb1RW7JkqzQ=; b=P6D/zYVnAl+5Y2+FMz4S8oWQXMKBT6IYODedz6MaocddKO//bUmzcklK/umBeaQ7hu yyW8cexfMHFt2khEt6EitZnUPuCkCumDlzdh2+ixSsTULOt8PJlErt+N8uqrrR6Sv9wH YYWXZWWQp79A/HOOc58fFwULvwgh8Njy/I+hGGoId8pjCI5KCxJe7sIHf3OcmZ0HPiTS 76YiITPCnzncgGRAeGyFDC7ZT8ekwLPy0VRHKOwfkS+e/oNRGw+MxKOiX9EFve3FdyDl hiCdNcN8XZFutruf1jly4zcuKnXEMKVxO96cVe9RwwMDExneBmgZJZo5Cv3xAqi1ZN0m +YIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715791879; x=1716396679; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CCjZy5Sg+w9JemZFjGBFpZdFncEPR1AaYb1RW7JkqzQ=; b=gy3nQog/ze73ZNH+Qt7SeZKo+/djjRnY3AEuKelmaxCZIedDpsDXoPXPjLbh/4rQ8S xuty4/sBokJDajeEF3v4UoHEjkM6EMRO9RyS9NaX56VTOXsRH3SjlKGYJN3OHC/Xj5V7 w6Rk5hbf5sqRh/5KlXGKwEU4kKoug+6qdG28dV2yj3v6aqgJVA6Nt5mG2Z4w0LSW7fiK FMPpka0hnbFnjpApyqdJctOxEnuzEzd37USkmSol96zy2fCYYrZBqCZ6OQ/AItcbupR4 7v+tvngs6guhLfaJn6xX4w1cA+fTHnC46eByqaCBuNRtFDb3FPIS5+dEIe2nXDVm5Z/k U2sw== X-Gm-Message-State: AOJu0Yzc8rQNQkWMpaHT0okGYzyYy9iJeHnJLWdCHei6HyuNzLZeDJNu tPiySLD0q1K777bY5Y58hPrHHubfO1nPzLJpKqKk2hCAsZNH4xaXNdIVHw== X-Google-Smtp-Source: AGHT+IFcEX05jOKoKe5eJn1C5UeCScSTgi67QHn+uhuSyIfNJzeTZxNR9QpD0rYRhJlGfB6JAURQrQ== X-Received: by 2002:a05:6214:578a:b0:6a0:e690:2f96 with SMTP id 6a1803df08f44-6a167987dc2mr303352476d6.21.1715791879274; Wed, 15 May 2024 09:51:19 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-107.b2b2c.ca. [205.233.125.107]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6a15f1ce6b9sm65974836d6.83.2024.05.15.09.51.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 09:51:18 -0700 (PDT) From: Maxim Cournoyer Date: Wed, 15 May 2024 12:51:09 -0400 Message-ID: <7cf609dcf83c85b6897c9fb9af46ce8a854a15c8.1715791830.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::f34; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qv1-xf34.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/rpc.scm (grpc) [arguments]: Use gexps. Delete trailing #t. [native-inputs]: Remove labels. * gnu/packages/rpc.scm (grpc-1.16.1) [arguments]: Use gexps. Change-Id: I0e89d246cc62a293274a32344108a7249f343257 --- gnu/packages/rpc.scm | 118 +++++++++++++++++++++---------------------- 1 file changed, 58 insertions(+), 60 deletions(-) base-commit: 029f2e970d5d14dda2dc89a4a3cc17de573ff90c diff --git a/gnu/packages/rpc.scm b/gnu/packages/rpc.scm index a88c79f8b9..d067d978c5 100644 --- a/gnu/packages/rpc.scm +++ b/gnu/packages/rpc.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2020 Brett Gilio ;;; Copyright © 2021 Greg Hogan ;;; Copyright © 2021 Tobias Geerinckx-Rice -;;; Copyright © 2022 Maxim Cournoyer +;;; Copyright © 2022, 2024 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -65,55 +65,53 @@ (define-public grpc "1fs407hnlnm0b8sncjwys9rc7ia5nb7wxrpx39nq3pzzfs1lv3vq")))) (build-system cmake-build-system) (arguments - `(#:tests? #f ; no test target - #:configure-flags - (list "-DgRPC_ZLIB_PROVIDER=package" - "-DgRPC_ABSL_PROVIDER=package" - "-DgRPC_CARES_PROVIDER=package" - "-DgRPC_SSL_PROVIDER=package" - "-DgRPC_PROTOBUF_PROVIDER=package" - "-DgRPC_RE2_PROVIDER=package" - (string-append "-DCMAKE_INSTALL_PREFIX=" - (assoc-ref %outputs "out")) - "-DCMAKE_INSTALL_LIBDIR=lib" - (string-append "-DCMAKE_INSTALL_RPATH=" - (assoc-ref %outputs "out") "/lib") - "-DCMAKE_VERBOSE_MAKEFILE=ON") - #:phases - (modify-phases %standard-phases - (add-before 'configure 'configure-shared - (lambda* (#:key (configure-flags '()) #:allow-other-keys) - (mkdir "../build-shared") - (with-directory-excursion "../build-shared" - (apply invoke - "cmake" "../source" - "-DBUILD_SHARED_LIBS=ON" - configure-flags) - (apply invoke "make" - `("-j" ,(number->string (parallel-job-count))))))) - (add-after 'install 'install-shared-libraries - (lambda _ - (with-directory-excursion "../build-shared" - (invoke "make" "install")))) - (add-before 'strip 'move-static-libs - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (static (assoc-ref outputs "static"))) - (mkdir-p (string-append static "/lib")) - (with-directory-excursion - (string-append out "/lib") - (for-each + (list + #:tests? #f ; no test target + #:configure-flags + #~(list "-DgRPC_ZLIB_PROVIDER=package" + "-DgRPC_ABSL_PROVIDER=package" + "-DgRPC_CARES_PROVIDER=package" + "-DgRPC_SSL_PROVIDER=package" + "-DgRPC_PROTOBUF_PROVIDER=package" + "-DgRPC_RE2_PROVIDER=package" + (string-append "-DCMAKE_INSTALL_PREFIX=" #$output) + "-DCMAKE_INSTALL_LIBDIR=lib" + (string-append "-DCMAKE_INSTALL_RPATH=" #$output "/lib") + "-DCMAKE_VERBOSE_MAKEFILE=ON") + #:phases + #~(modify-phases %standard-phases + (add-before 'configure 'configure-shared + (lambda* (#:key configure-flags #:allow-other-keys) + (mkdir "../build-shared") + (with-directory-excursion "../build-shared" + (apply invoke "cmake" "../source" + "-DBUILD_SHARED_LIBS=ON" + configure-flags) + (apply invoke "make" + (list "-j" (number->string (parallel-job-count))))))) + (add-after 'install 'install-shared-libraries + (lambda _ + (with-directory-excursion "../build-shared" + (invoke "make" "install")))) + (add-before 'strip 'move-static-libs + (lambda _ + (let ((static #$output:static)) + (mkdir-p (string-append static "/lib")) + (with-directory-excursion (string-append #$output "/lib") + (for-each (lambda (file) - (rename-file file - (string-append static "/lib/" file))) - (find-files "." "\\.a$")))) - #t))))) - (inputs - (list abseil-cpp-cxxstd11 c-ares/cmake openssl re2 zlib)) + (rename-file file (string-append static "/lib/" file))) + (find-files "." "\\.a$"))))))))) (native-inputs - `(("pkg-config" ,pkg-config) - ("protobuf" ,protobuf) - ("python" ,python-wrapper))) + (list pkg-config + protobuf + python-wrapper)) + (inputs + (list abseil-cpp-cxxstd11 + c-ares/cmake + openssl + re2 + zlib)) (home-page "https://grpc.io") (synopsis "High performance universal RPC framework") (description "gRPC is a modern high performance @dfn{Remote Procedure Call} @@ -159,18 +157,18 @@ (define-public grpc-1.16.1 (arguments (substitute-keyword-arguments (package-arguments grpc) ((#:phases phases) - `(modify-phases ,phases - ;; Note: This would be nicer as a snippet, but that creates a tarball - ;; instead of a checkout and breaks assumptions made by the builder. - (add-after 'unpack 'rename-gettid - (lambda _ - ;; Rename custom gettid() syscall wrapper to avoid conflict - ;; with gettid() from glibc 2.30. - (substitute* '("src/core/lib/gpr/log_linux.cc" - "src/core/lib/gpr/log_posix.cc" - "src/core/lib/iomgr/ev_epollex_linux.cc") - (("gettid\\(") - "sys_gettid(")))))))) + #~(modify-phases #$phases + ;; Note: This would be nicer as a snippet, but that creates a tarball + ;; instead of a checkout and breaks assumptions made by the builder. + (add-after 'unpack 'rename-gettid + (lambda _ + ;; Rename custom gettid() syscall wrapper to avoid conflict + ;; with gettid() from glibc 2.30. + (substitute* '("src/core/lib/gpr/log_linux.cc" + "src/core/lib/gpr/log_posix.cc" + "src/core/lib/iomgr/ev_epollex_linux.cc") + (("gettid\\(") + "sys_gettid(")))))))) (inputs (modify-inputs (package-inputs grpc) (replace "abseil-cpp" abseil-cpp-20200923.3))) From patchwork Wed May 15 16:57:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 64463 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 79E4D27BBE9; Wed, 15 May 2024 18:00:55 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C057B27BBEC for ; Wed, 15 May 2024 18:00:51 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7Hz3-0001nI-OS; Wed, 15 May 2024 13:00:05 -0400 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 1s7Hyz-0001mY-US for guix-patches@gnu.org; Wed, 15 May 2024 13:00:02 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7Hyz-0007EP-54 for guix-patches@gnu.org; Wed, 15 May 2024 13:00:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s7Hz0-0007BC-P8 for guix-patches@gnu.org; Wed, 15 May 2024 13:00:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70962] [PATCH 02/14] gnu: grpc: Propagate abseil-cpp-cxxstd11. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 15 May 2024 17:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70962 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70962@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 70962-submit@debbugs.gnu.org id=B70962.171579234927393 (code B ref 70962); Wed, 15 May 2024 17:00:02 +0000 Received: (at 70962) by debbugs.gnu.org; 15 May 2024 16:59:09 +0000 Received: from localhost ([127.0.0.1]:43145 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7Hy8-00077l-Um for submit@debbugs.gnu.org; Wed, 15 May 2024 12:59:09 -0400 Received: from mail-qk1-f170.google.com ([209.85.222.170]:55672) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7Hy6-00076t-0V for 70962@debbugs.gnu.org; Wed, 15 May 2024 12:59:07 -0400 Received: by mail-qk1-f170.google.com with SMTP id af79cd13be357-792bcfde2baso602218385a.3 for <70962@debbugs.gnu.org>; Wed, 15 May 2024 09:59:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715792278; x=1716397078; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=eb69T6lazF2iCOPWxANxBn+1khN6cdkaTZCe7g8HVkI=; b=IKrc26QOOtlmB2h+ZspF+YlwnzQRaG5s+3ecopqECgdc/t463jRCWMIga9mWqrh54b +KEk9Tp4LjVWSnch3EKkpwUukGujeC+a7P/BmzlLC9y4DIuynva5AfdDCBr705uwcbbE phzFTwKLly9ffbAUd0f3Qul2K263P0ep4SFe0hTjf/OWQy3MwRFhODMisH9i3sFHYXiw Rasx1QKsovtEky5ggPs3+W8LG/62VoRur3EGN3Dottwnc4YR/o6ZhzVazZIyfjjLoWLm YMOytm1KqtE0gBB8wyKB/QxnvOklImO+1eMyMlUolf7ksNJCKdeJ3bbr8A0pbvoZ67ph 9EXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715792278; x=1716397078; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eb69T6lazF2iCOPWxANxBn+1khN6cdkaTZCe7g8HVkI=; b=xIiawG5DmdAiKZquH9bOwI3M8HA8h2WhuNNK95XJDU7gynXrv6ZIxYn/e3AOQrhvNn V7MEYDkbCMe9EgLfH/K1ZWSaIFSigQ1PBBkcqKlw+Eu6NAoaEiZ5XoeasDGb51NLMPc/ bMuXf2hVnUb9/Jq8oB4Vxq7CMSiUicvLmRnrqzqW1uOyodWWJh6BW3BV+O2NjMErq4a6 RslWnWrNpXgIFohH52jDb+MSPX5/0KRb1/bD211tlvxLKO7loW1Ofq9YTO3whxIOA0IK iENpbwtxTBNORREY3RjbDTAfCdFwPEw+55oJMJKd/hOEI4yP/eh+9dg3T60AB5p6Rh3T 2jsw== X-Gm-Message-State: AOJu0YzmGP+wOca4TjJn9wliVnuKEEEUb3Gh9Za+H+x7jj9f+za9EAIs 66ey6b6YiYwRnGVQ7aMXisOcvkFHJInqJq05W09Lf667I5SQgwhcHVwQTA== X-Google-Smtp-Source: AGHT+IHilQuEaAwy9kGgeZ/CoEKSE67rMwFuRtFdK2lT52ZE9yQVfkLoX46b9F4dd5o68x1AOck7Tw== X-Received: by 2002:a05:6214:5401:b0:6a0:b3cc:ee0e with SMTP id 6a1803df08f44-6a1682161f6mr209366266d6.49.1715792278163; Wed, 15 May 2024 09:57:58 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-107.b2b2c.ca. [205.233.125.107]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6a15f194871sm66068896d6.59.2024.05.15.09.57.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 09:57:57 -0700 (PDT) From: Maxim Cournoyer Date: Wed, 15 May 2024 12:57:12 -0400 Message-ID: <9667eb578569fbd744103f55e7b6275f3e34bc61.1715791830.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <7cf609dcf83c85b6897c9fb9af46ce8a854a15c8.1715791830.git.maxim.cournoyer@gmail.com> References: <7cf609dcf83c85b6897c9fb9af46ce8a854a15c8.1715791830.git.maxim.cournoyer@gmail.com> MIME-Version: 1.0 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/rpc.scm (grpc) [native-inputs]: Move abseil-cpp-cxxstd11 to... [propagated-inputs]: ... here. Change-Id: I5bceefa762494423c0bc40b559bcf243ecdf85d8 --- gnu/packages/rpc.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gnu/packages/rpc.scm b/gnu/packages/rpc.scm index d067d978c5..b70214fa79 100644 --- a/gnu/packages/rpc.scm +++ b/gnu/packages/rpc.scm @@ -107,11 +107,14 @@ (define-public grpc protobuf python-wrapper)) (inputs - (list abseil-cpp-cxxstd11 - c-ares/cmake + (list c-ares/cmake openssl re2 zlib)) + (propagated-inputs + ;; Abseil libraries are in the 'Requires' field of the various gRPC + ;; pkg-config files. + (list abseil-cpp-cxxstd11)) (home-page "https://grpc.io") (synopsis "High performance universal RPC framework") (description "gRPC is a modern high performance @dfn{Remote Procedure Call} From patchwork Wed May 15 16:57:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 64458 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 4205727BBEC; Wed, 15 May 2024 18:00:25 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A094627BBE9 for ; Wed, 15 May 2024 18:00:24 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7Hz1-0001n8-Pa; Wed, 15 May 2024 13:00:03 -0400 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 1s7Hyz-0001mZ-Vd for guix-patches@gnu.org; Wed, 15 May 2024 13:00:02 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7Hyz-0007Ea-LY for guix-patches@gnu.org; Wed, 15 May 2024 13:00:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s7Hz1-0007BP-AZ for guix-patches@gnu.org; Wed, 15 May 2024 13:00:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70962] [PATCH 03/14] gnu: Add valijson. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 15 May 2024 17:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70962 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70962@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 70962-submit@debbugs.gnu.org id=B70962.171579235327408 (code B ref 70962); Wed, 15 May 2024 17:00:03 +0000 Received: (at 70962) by debbugs.gnu.org; 15 May 2024 16:59:13 +0000 Received: from localhost ([127.0.0.1]:43148 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7HyD-00077z-9p for submit@debbugs.gnu.org; Wed, 15 May 2024 12:59:13 -0400 Received: from mail-qk1-f176.google.com ([209.85.222.176]:51670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7Hy9-00077e-G4 for 70962@debbugs.gnu.org; Wed, 15 May 2024 12:59:12 -0400 Received: by mail-qk1-f176.google.com with SMTP id af79cd13be357-792ecce9522so148647985a.3 for <70962@debbugs.gnu.org>; Wed, 15 May 2024 09:59:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715792282; x=1716397082; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=iUZKi3Db47oMg5U5ez3Stgc/dCeLTWnt0SNQPjy7UTg=; b=N7QklN6QuvGKFB3NjvATFDzjZ3Hf+A5AtOH0fVHahNhpUoUT5OPImjLvlsUmHYNwoE Rr02vh4tD8+w5BD9/hz8ouBQIpHc7mZPLsj0UbEBhSc90CeC854DJ492uYfsG30R7sJY OXFICeY2oC+NRwv6BcngINOOFQy+qikAdCRCPXP0LGUo4uxab/HJdYJAQ3jwEJTrcBV4 MhWy648xhV4+vaSBCYYRgGCQcrkp2O0VLwW6C/hYufW+XArM2Av1M2xk/V2iBk8sSqag ymNfi/2Xchoa7GHalNICnmcf4JkVNFwgg+EkICJyiIlk2T4BYwFHlegMf2vvwYljaVny f7xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715792282; x=1716397082; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iUZKi3Db47oMg5U5ez3Stgc/dCeLTWnt0SNQPjy7UTg=; b=QEYfqPiK8tQ5ANL91Lr4evbiJh/X6d9IqajcxsvC1VHxTMqft/GJft1eaGuQqnbn/R czBceHtFsEzeey3f8c0gB92Cnihfm1fAB1DfPI2GuP7Qso1JbQRJSJ0acB7Xg+0xuuyz VszcM+P4gFOQXdfqB2ki9eDYDb4sXQj56tizWw0z2upg4zDN7x41b9lseq2PRJ0/EH37 ja8OEwJGzilAfd+Zi0Hei1uuvc13NuOu9nIdIhy601/0FeFuqRHAS5iZ8v9dDLa42Iab b86NNomMESEd94R3xdew8f/xJ7BVqSC5otBEdqjJZC4hkTla2BIY8kTvxQdo6P31+Ehd bsAQ== X-Gm-Message-State: AOJu0YwPb76o8WtdL74YgezbEdm7zIxJMPXNuM+u8RA7qg39b6PF8UB2 NzF9nWf/W5BSKFUOYJ9ZgfpKV7G/Ie3KI0csfhUau/s7AzNWV5Eb3xFTfA== X-Google-Smtp-Source: AGHT+IFS9GuMH6uXpdFc43rH8RRHsgBzN/Bt8T5hYy/JWhkCd2R8XCtGJOALgGAS+LlUTdvDdlMB4w== X-Received: by 2002:a05:6214:5b0a:b0:6a0:e2ca:1e69 with SMTP id 6a1803df08f44-6a16822ae19mr169803626d6.29.1715792281732; Wed, 15 May 2024 09:58:01 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-107.b2b2c.ca. [205.233.125.107]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6a15f194871sm66068896d6.59.2024.05.15.09.58.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 09:58:01 -0700 (PDT) From: Maxim Cournoyer Date: Wed, 15 May 2024 12:57:13 -0400 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: <7cf609dcf83c85b6897c9fb9af46ce8a854a15c8.1715791830.git.maxim.cournoyer@gmail.com> References: <7cf609dcf83c85b6897c9fb9af46ce8a854a15c8.1715791830.git.maxim.cournoyer@gmail.com> MIME-Version: 1.0 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/serialization.scm (valijson): New variable. Change-Id: I604a0ecdd5ffaa256db4053b77e760d549881f33 --- gnu/packages/serialization.scm | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm index 331fae80cf..23959ebc4f 100644 --- a/gnu/packages/serialization.scm +++ b/gnu/packages/serialization.scm @@ -15,7 +15,7 @@ ;;; Copyright © 2023 Alexey Abramov ;;; Copyright © 2023 Sharlatan Hellseher ;;; Copyright © 2023 Vinicius Monego -;;; Copyright © 2023 Maxim Cournoyer +;;; Copyright © 2023, 2024 Maxim Cournoyer ;;; Copyright © 2023 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2024 Paul A. Patience ;;; Copyright © 2024 Arun Isaac @@ -936,3 +936,27 @@ (define-public python-feather-format (description "This package provides a Python wrapper library to the Apache Arrow-based Feather binary columnar serialization data frame format.") (license license:asl2.0))) + +(define-public valijson + (package + (name "valijson") + (version "1.0.2") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/tristanpenman/valijson") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1ai6bj6mxd12mpvf1xwlad2vic5lsqy44adilp17wa7dq275vwf2")))) + (build-system cmake-build-system) + ;; The test suite is disabled as it requires Boost, Qt 5, Poco as well as + ;; other bundled libraries. + (arguments (list #:tests? #f)) + (home-page "https://github.com/tristanpenman/valijson") + (synopsis "JSON schema validation C++ header-only library") + (description "Valijson is a header-only JSON Schema validation library for +C++11. It provides a simple validation API that allows loading JSON Schemas, +and validate documents loaded by one of several supported parser libraries.") + (license license:bsd-2))) From patchwork Wed May 15 16:57:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 64466 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 8CA2C27BBEA; Wed, 15 May 2024 18:01:07 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A2B4827BBE2 for ; Wed, 15 May 2024 18:01:05 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7HzE-0001rv-Us; Wed, 15 May 2024 13:00:18 -0400 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 1s7Hz5-0001p4-Q6 for guix-patches@gnu.org; Wed, 15 May 2024 13:00:09 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7Hz2-0007GC-TC for guix-patches@gnu.org; Wed, 15 May 2024 13:00:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s7Hz1-0007BW-Pl; Wed, 15 May 2024 13:00:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70962] [PATCH 04/14] gnu: libbpf: Use gexps. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: leo@famulari.name, me@tobias.gr, w@wmeyer.eu, guix-patches@gnu.org Resent-Date: Wed, 15 May 2024 17:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70962 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70962@debbugs.gnu.org Cc: Maxim Cournoyer , Leo Famulari , Tobias Geerinckx-Rice , Wilko Meyer X-Debbugs-Original-Xcc: Leo Famulari , Tobias Geerinckx-Rice , Wilko Meyer Received: via spool by 70962-submit@debbugs.gnu.org id=B70962.171579235827426 (code B ref 70962); Wed, 15 May 2024 17:00:03 +0000 Received: (at 70962) by debbugs.gnu.org; 15 May 2024 16:59:18 +0000 Received: from localhost ([127.0.0.1]:43151 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7HyH-00078G-PD for submit@debbugs.gnu.org; Wed, 15 May 2024 12:59:18 -0400 Received: from mail-qv1-f49.google.com ([209.85.219.49]:59604) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7HyF-00077s-MA for 70962@debbugs.gnu.org; Wed, 15 May 2024 12:59:16 -0400 Received: by mail-qv1-f49.google.com with SMTP id 6a1803df08f44-6a0b4622ea0so22642306d6.2 for <70962@debbugs.gnu.org>; Wed, 15 May 2024 09:59:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715792287; x=1716397087; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xAMhv2MXFQt9/sKycNDkh8VXp07MURfDX94CRMp5mxY=; b=azBAmuStoSWm6ucWtk2jwURnZ0dfmbgGBLoLCFA41UW7RSHdYe4rq6BzQ5DsWd/j64 P9ff/O5YWE0UzP2ysIIcU2kJ4VWaWhJtPcwieX4zfHz51D8BV7FWeIoUQCMZbhgk66GI HjLVcxQKqHmz+eqbGS0mcYaWh+nZYnXkYBKjIh2ARA4UylWxRZZg5wiVFuwR5li/52Pd wKhXBXvwq6yuGZgoqnCfcCXlEal9PZ5hiyWOZR4Z+oLd239tdGBR2vzhu+WZKOKDBIPv Do8ZD0c78KeVOOvdpHcgotwMORMf8q4RxU12FYhRGpfdFAoo0afXVm+WLwKuOVznk6OJ K4DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715792287; x=1716397087; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xAMhv2MXFQt9/sKycNDkh8VXp07MURfDX94CRMp5mxY=; b=MkvoHRzafvxkozlTiDjLJB2nWQraBhkFSXiZfancgGhWyngefbcNmcfeEKFqB4pPxk kFZi0ffQVUMjtcoj6Rb2oYsfeDd1zKQBhpDnngzGw1QGs4Bkm9rtS4KJLBBbvcE0gNum 0D8qhKXSHfedY7uMEgEB3ok2wlaiznK8jbfi3N/+lehZFSVK8uj46Fqf/Nbwkk5pvMm9 5F3JDPFop1tbxHRNFa1LWg4awKWNd1sOVqXixIu4KPeUd6obg/pvAJAXbrL9q6V9/E6q uLi6HxvbJ9rzUBdphbQqCDFuQDG6m6N7heEYntixSY+HSBAgbHQVrxUzvix1rQ1Q8X9U 22Ww== X-Gm-Message-State: AOJu0YwTHHYH0YokTmiAg46lxQjK/tpx/+3+VojeHj9B46X0w855ci5N vcQNqncS/N5wY//2gMkcZdOGMK9sVdMufNrmrY7P1QclPMh1tor1yYHcMA== X-Google-Smtp-Source: AGHT+IH6DL13bh+toxmusjyQhr3DCqlYnbVjXRvWxCaUhy/jcD6bVsAHlM8R/XnqVrhYcMT+YumxMg== X-Received: by 2002:a05:6214:5509:b0:6a0:c6e3:c025 with SMTP id 6a1803df08f44-6a168163e1emr206318676d6.18.1715792287408; Wed, 15 May 2024 09:58:07 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-107.b2b2c.ca. [205.233.125.107]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6a15f194871sm66068896d6.59.2024.05.15.09.58.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 09:58:07 -0700 (PDT) From: Maxim Cournoyer Date: Wed, 15 May 2024 12:57:14 -0400 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: <7cf609dcf83c85b6897c9fb9af46ce8a854a15c8.1715791830.git.maxim.cournoyer@gmail.com> References: <7cf609dcf83c85b6897c9fb9af46ce8a854a15c8.1715791830.git.maxim.cournoyer@gmail.com> MIME-Version: 1.0 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/linux.scm (libbpf) [arguments]: Use gexps. Change-Id: I5529cda3b316a24b48f4a33bfd685695614350bb --- gnu/packages/linux.scm | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 8a849d146a..dea203a692 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -9795,31 +9795,27 @@ (define-public libbpf (base32 "1zzpkk4x3f20483dzw43b3ml03d63vvkmqf4j8y3b61b67wm59bm")))) (build-system gnu-build-system) - (native-inputs - (list pkg-config)) - (propagated-inputs - ;; In Requires.private of libbpf.pc. - (list elfutils zlib)) (arguments - `(#:tests? #f ; no tests - #:make-flags - (list - (string-append "PREFIX=" (assoc-ref %outputs "out")) - (string-append "LIBDIR=$(PREFIX)/lib") - (string-append "CC=" ,(cc-for-target))) - #:phases - (modify-phases %standard-phases - (delete 'configure) - (add-before 'build 'pre-build - (lambda _ - (chdir "src")))))) + (list + #:tests? #f ;self-tests run in QEMU + #:make-flags + #~(list (string-append "PREFIX=" #$output) + (string-append "LIBDIR=$(PREFIX)/lib") + (string-append "CC=" #$(cc-for-target))) + #:phases #~(modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'pre-build + (lambda _ + (chdir "src")))))) + (native-inputs (list pkg-config)) + (propagated-inputs (list elfutils zlib)) ;in Requires.private of libbpf.pc (home-page "https://github.com/libbpf/libbpf") (synopsis "BPF CO-RE (Compile Once – Run Everywhere)") (description "Libbpf supports building BPF CO-RE-enabled applications, which, in contrast to BCC, do not require the Clang/LLVM runtime or linux kernel headers.") - (license `(,license:lgpl2.1 ,license:bsd-2)))) + (license (list license:lgpl2.1 license:bsd-2)))) (define-public bcc (package From patchwork Wed May 15 16:57:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 64461 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 6695527BBEA; Wed, 15 May 2024 18:00:37 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9E2BB27BBE2 for ; Wed, 15 May 2024 18:00:36 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7Hz9-0001qN-Uo; Wed, 15 May 2024 13:00:12 -0400 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 1s7Hz1-0001nJ-VY for guix-patches@gnu.org; Wed, 15 May 2024 13:00:05 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7Hz1-0007Ff-DT for guix-patches@gnu.org; Wed, 15 May 2024 13:00:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s7Hz2-0007Bc-65; Wed, 15 May 2024 13:00:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70962] [PATCH 05/14] gnu: libbpf: Update to 1.4.1. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: leo@famulari.name, me@tobias.gr, w@wmeyer.eu, guix-patches@gnu.org Resent-Date: Wed, 15 May 2024 17:00:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70962 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70962@debbugs.gnu.org Cc: Maxim Cournoyer , Leo Famulari , Tobias Geerinckx-Rice , Wilko Meyer X-Debbugs-Original-Xcc: Leo Famulari , Tobias Geerinckx-Rice , Wilko Meyer Received: via spool by 70962-submit@debbugs.gnu.org id=B70962.171579236127442 (code B ref 70962); Wed, 15 May 2024 17:00:04 +0000 Received: (at 70962) by debbugs.gnu.org; 15 May 2024 16:59:21 +0000 Received: from localhost ([127.0.0.1]:43154 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7HyL-00078X-78 for submit@debbugs.gnu.org; Wed, 15 May 2024 12:59:21 -0400 Received: from mail-qk1-f173.google.com ([209.85.222.173]:50281) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7HyI-000780-LZ for 70962@debbugs.gnu.org; Wed, 15 May 2024 12:59:19 -0400 Received: by mail-qk1-f173.google.com with SMTP id af79cd13be357-792e4c2a002so222636085a.0 for <70962@debbugs.gnu.org>; Wed, 15 May 2024 09:59:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715792291; x=1716397091; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=41nUPnhWRpPavxW3XWvfiiBxPhIIUGIx50DZmI1Ws5U=; b=GUdWCxCiJkYJjvt2c44LxDOPpg2ChiMA59v1ZvtsNU2p2tRGdwmlJHwBlZzv6VcyUJ UbpxpElPNVb0MgpVgyiEl1dvSWoPoIkUCBaZXJEGTCc5zfcdKLSjO/WtwOZcitVnzdsE S6ssUI6z295vuEC1keXybrMihtkbHGndGtU76LTwAjUwM3i3olwz1vsfdDXk12aa5PbR PZy52V3uiK6tzva+B2duObNpsgpeSW4zjFfUN8Sb5GE1zi/SMVggkI5/ek4kM3I+eRW9 Gtf7PwpeKZ0+fjDBt+qt9tCFhFVefaGjKL3rHV1N91cEJ71BAPSIOdZYqkMe+bThE89m sTVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715792291; x=1716397091; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=41nUPnhWRpPavxW3XWvfiiBxPhIIUGIx50DZmI1Ws5U=; b=jhfuhJlVHFNLlidxhI9EGwz2u+AISzxqEJZukKR4NXQayEY9RAEu3LJa0wI3bkj91A vfncNGP7n4tUABZ8thLHfIWSlKKXVdtPijb4FIyWNeqYWwNgMmsZtgLj7GeTT0NgCWBh JvOX2o+jm5ZFq+5Ut3tOgo/c0piWsPh8fSVxftYGMveqbssx12RSZP6OSNZIzS/wV2gN L1ZoG94I/UGF8D+SDyRejb2Mp56DyicguQkY6CdTOcbIbr0QbY1vM14/8jSUBhYqtEv3 7QPsAwxsLGE8Ib/0ld05661lcnVSUbitnzeadfm7gn/aNh63ma6Xt0LLBthp6kPpXZCM bGew== X-Gm-Message-State: AOJu0YxW+Va8pkkECv1whWVnyntv7OC2Nn7nNG2s9gUS7KuP4vrsGGt3 iGzsRmsZhtNmPrsf1iuNsmIR85sgLFPAJ3mu3H8cyjI6EIA/PFDZFoSRkw== X-Google-Smtp-Source: AGHT+IHZJXa+SFi8CQFB5MXaYDGaHSmibK3ag/lWUaUh8dNYHKoVM6myyvnUCHf1CBVDMg011gwWgA== X-Received: by 2002:a05:6214:2d42:b0:6a3:2a94:1813 with SMTP id 6a1803df08f44-6a32a941825mr138369926d6.50.1715792290794; Wed, 15 May 2024 09:58:10 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-107.b2b2c.ca. [205.233.125.107]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6a15f194871sm66068896d6.59.2024.05.15.09.58.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 09:58:10 -0700 (PDT) From: Maxim Cournoyer Date: Wed, 15 May 2024 12:57:15 -0400 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: <7cf609dcf83c85b6897c9fb9af46ce8a854a15c8.1715791830.git.maxim.cournoyer@gmail.com> References: <7cf609dcf83c85b6897c9fb9af46ce8a854a15c8.1715791830.git.maxim.cournoyer@gmail.com> MIME-Version: 1.0 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/linux.scm (libbpf): Update to 1.4.1. [phases] {install-linux-bpf-headers}: New phase. [native-inputs]: Add linux-libre-headers-6.8. Change-Id: I969a017b0ed52c1a611b3fe0d90d5b8703d35e73 --- gnu/packages/linux.scm | 41 +++++++++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index dea203a692..cb348276e3 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -9783,7 +9783,7 @@ (define-public cachefilesd (define-public libbpf (package (name "libbpf") - (version "0.8.1") + (version "1.4.1") (source (origin (method git-fetch) @@ -9793,7 +9793,7 @@ (define-public libbpf (file-name (git-file-name name version)) (sha256 (base32 - "1zzpkk4x3f20483dzw43b3ml03d63vvkmqf4j8y3b61b67wm59bm")))) + "1d0bx4bmn80nkdh0dqjfwq6j37is3qwl49cjvx4yxb4vrxq3x05x")))) (build-system gnu-build-system) (arguments (list @@ -9802,12 +9802,37 @@ (define-public libbpf #~(list (string-append "PREFIX=" #$output) (string-append "LIBDIR=$(PREFIX)/lib") (string-append "CC=" #$(cc-for-target))) - #:phases #~(modify-phases %standard-phases - (delete 'configure) - (add-before 'build 'pre-build - (lambda _ - (chdir "src")))))) - (native-inputs (list pkg-config)) + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'pre-build + (lambda _ + (chdir "src"))) + (add-after 'install 'install-linux-bpf-headers + ;; Workaround users such as 'dwarves' requiring btf_enum64 + ;; definition from the kernel Linux >= 6 headers (see: + ;; https://github.com/acmel/dwarves/issues/49). + ;; TODO: Remove once our 'linux-libre-headers' package is + ;; upgraded to a >= 6 release. + (lambda _ + (let ((linux-libre-headers #$(this-package-native-input + "linux-libre-headers"))) + (for-each (lambda (f) + (install-file (string-append linux-libre-headers + "/include/" f) + (string-append #$output "/include/" + (dirname f)))) + ;; This list contains btf.h and its transitive + ;; dependencies. + (list "asm/posix_types.h" + "asm/types.h" + "asm-generic/types.h" + "asm-generic/int-ll64.h" + "linux/btf.h" + "linux/posix_types.h" + "linux/stddef.h" + "linux/types.h")))))))) + (native-inputs (list linux-libre-headers-6.8 pkg-config)) (propagated-inputs (list elfutils zlib)) ;in Requires.private of libbpf.pc (home-page "https://github.com/libbpf/libbpf") (synopsis "BPF CO-RE (Compile Once – Run Everywhere)") From patchwork Wed May 15 16:57:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 64470 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 6785827BBE9; Wed, 15 May 2024 18:01:32 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C51F627BBE2 for ; Wed, 15 May 2024 18:01:28 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7HzI-0001um-Mg; Wed, 15 May 2024 13:00:20 -0400 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 1s7Hz1-0001nK-Vq for guix-patches@gnu.org; Wed, 15 May 2024 13:00:05 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7Hz1-0007Fg-GM for guix-patches@gnu.org; Wed, 15 May 2024 13:00:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s7Hz2-0007Bj-LX; Wed, 15 May 2024 13:00:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70962] [PATCH 06/14] gnu: Add falcosecurity-libs. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: leo@famulari.name, me@tobias.gr, w@wmeyer.eu, guix-patches@gnu.org Resent-Date: Wed, 15 May 2024 17:00:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70962 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70962@debbugs.gnu.org Cc: Maxim Cournoyer , Leo Famulari , Tobias Geerinckx-Rice , Wilko Meyer X-Debbugs-Original-Xcc: Leo Famulari , Tobias Geerinckx-Rice , Wilko Meyer Received: via spool by 70962-submit@debbugs.gnu.org id=B70962.171579236627467 (code B ref 70962); Wed, 15 May 2024 17:00:04 +0000 Received: (at 70962) by debbugs.gnu.org; 15 May 2024 16:59:26 +0000 Received: from localhost ([127.0.0.1]:43158 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7HyO-00078r-Qj for submit@debbugs.gnu.org; Wed, 15 May 2024 12:59:26 -0400 Received: from mail-qk1-f175.google.com ([209.85.222.175]:46358) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7HyM-00078C-2j for 70962@debbugs.gnu.org; Wed, 15 May 2024 12:59:23 -0400 Received: by mail-qk1-f175.google.com with SMTP id af79cd13be357-792b8ebc4eeso535376185a.1 for <70962@debbugs.gnu.org>; Wed, 15 May 2024 09:59:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715792294; x=1716397094; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=iqWs/VWLZxbRK+fEFmwTl251qwOVmr1yc6mfp9h/a9g=; b=R5GJ1NoYQqJw/gctvAgLHLLrXGshmAnVWbDV2h5mBkCpqQYYJ1tRtFSFUWMImjZmzT T553A3NperAI/AtytON8NVEKZunve4PYIgbW/pksj0GlxSd7GJbQvt88gczB2dxMMINw M64Arn9cU/5rxbGlpigrPt4l6u7bUxpjINw3hVLXl8Sj194EWDnCY61Q3Ntn9NmhOtr0 vYzHTPjfSS7m4IhFD5GoXu3w+S5lqj97R7ppU4sKXYsIVTwR9a3IMiS2x9U20HMQPrre 1tSlcsNeLvuQ6wl1CX3DCaOqBzD1i5TVQ6WV0mGAn0sVOYKqkVD+3b1P8uMQVvl+W2Jq Z5rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715792294; x=1716397094; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iqWs/VWLZxbRK+fEFmwTl251qwOVmr1yc6mfp9h/a9g=; b=WvM3jUVMHUh+JQ3Yn646PsdmCQ3W6Ga8qGf80CbwS7TxKTf4DsqNdgeEwgkREjnLoN nL0xehSrSk8EIsAO0+EwErMfmN1e/sBIyqVsxR/jMCbXsm3k2qb0UZK9H6Plc4b1jEwJ DEOXVZaCJ6MERN7poNKthWP1RlpWOPgWaoPz55H2dcjG9+j2tE6YmM+JEIDob31ux+V/ 9/RnfTmOMXR9hicrxhMwmimk4N0d7+/c7m34yJlvpolIhbwUwQoDUrHrFMj84ZJXRQRa R8COEb0dgw7FQNJLJ6EdWSaJ77KwpsMFjy2Ue0n+WrxauvC6d7e4/LTqQK0+MnPS1zsk rhPQ== X-Gm-Message-State: AOJu0YypFPj5S8opSOAQllH4mhT7vo0djFBnqqt3QO8kCydQwYvMgRAQ JtNaSOWlsPNZapFDptKY4+WLegv0RAlbjrH90edReAflWw5Jlhxm+45X6A== X-Google-Smtp-Source: AGHT+IFeu2alq2l97OzNy9r4O1/8u1RYDWRUrNN41fY6b4cG9tJ6SWmsr+1n975FRcjtKmay30csfg== X-Received: by 2002:a05:6214:2c03:b0:69b:683b:8686 with SMTP id 6a1803df08f44-6a168147e59mr175008056d6.3.1715792292198; Wed, 15 May 2024 09:58:12 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-107.b2b2c.ca. [205.233.125.107]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6a15f194871sm66068896d6.59.2024.05.15.09.58.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 09:58:11 -0700 (PDT) From: Maxim Cournoyer Date: Wed, 15 May 2024 12:57:16 -0400 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: <7cf609dcf83c85b6897c9fb9af46ce8a854a15c8.1715791830.git.maxim.cournoyer@gmail.com> References: <7cf609dcf83c85b6897c9fb9af46ce8a854a15c8.1715791830.git.maxim.cournoyer@gmail.com> MIME-Version: 1.0 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/linux.scm (falcosecurity-libs): New variable. * gnu/packages/patches/falcosecurity-libs-install-pman.patch * gnu/packages/patches/falcosecurity-libs-libscap-pc.patch * gnu/packages/patches/falcosecurity-libs-pkg-config.patch * gnu/packages/patches/falcosecurity-libs-shared-library-fix.patch * gnu/packages/patches/falcosecurity-libs-libsinsp-pkg-config.patch: New files. * gnu/local.mk (dist_patch_DATA): Register them. Change-Id: I0cb15e6a25256598678fc20eb298ad947d699ef4 --- gnu/local.mk | 5 + gnu/packages/linux.scm | 92 +++++++++++ .../falcosecurity-libs-install-pman.patch | 14 ++ .../falcosecurity-libs-libscap-pc.patch | 16 ++ ...lcosecurity-libs-libsinsp-pkg-config.patch | 155 ++++++++++++++++++ .../falcosecurity-libs-pkg-config.patch | 23 +++ ...alcosecurity-libs-shared-library-fix.patch | 50 ++++++ 7 files changed, 355 insertions(+) create mode 100644 gnu/packages/patches/falcosecurity-libs-install-pman.patch create mode 100644 gnu/packages/patches/falcosecurity-libs-libscap-pc.patch create mode 100644 gnu/packages/patches/falcosecurity-libs-libsinsp-pkg-config.patch create mode 100644 gnu/packages/patches/falcosecurity-libs-pkg-config.patch create mode 100644 gnu/packages/patches/falcosecurity-libs-shared-library-fix.patch diff --git a/gnu/local.mk b/gnu/local.mk index 7f43f57f57..bb7dfa0b12 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1179,6 +1179,11 @@ dist_patch_DATA = \ %D%/packages/patches/fail2ban-python310-server-action.patch \ %D%/packages/patches/fail2ban-python310-server-actions.patch \ %D%/packages/patches/fail2ban-python310-server-jails.patch \ + %D%/packages/patches/falcosecurity-libs-install-pman.patch \ + %D%/packages/patches/falcosecurity-libs-libscap-pc.patch \ + %D%/packages/patches/falcosecurity-libs-pkg-config.patch \ + %D%/packages/patches/falcosecurity-libs-shared-library-fix.patch \ + %D%/packages/patches/falcosecurity-libs-libsinsp-pkg-config.patch \ %D%/packages/patches/farstream-gupnp.patch \ %D%/packages/patches/farstream-make.patch \ %D%/packages/patches/fastcap-mulGlobal.patch \ diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index cb348276e3..a51ce5c27a 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -100,6 +100,7 @@ (define-module (gnu packages linux) #:use-module (gnu packages) #:use-module (gnu packages acl) + #:use-module (gnu packages adns) #:use-module (gnu packages admin) #:use-module (gnu packages algebra) #:use-module (gnu packages apparmor) @@ -114,10 +115,12 @@ (define-module (gnu packages linux) #:use-module (gnu packages calendar) #:use-module (gnu packages check) #:use-module (gnu packages cpio) + #:use-module (gnu packages cpp) #:use-module (gnu packages crates-io) #:use-module (gnu packages crypto) #:use-module (gnu packages cryptsetup) #:use-module (gnu packages compression) + #:use-module (gnu packages curl) #:use-module (gnu packages databases) #:use-module (gnu packages datastructures) #:use-module (gnu packages dbm) @@ -166,11 +169,14 @@ (define-module (gnu packages linux) #:use-module (gnu packages pkg-config) #:use-module (gnu packages polkit) #:use-module (gnu packages popt) + #:use-module (gnu packages protobuf) #:use-module (gnu packages pulseaudio) #:use-module (gnu packages python) #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) #:use-module (gnu packages readline) + #:use-module (gnu packages regex) + #:use-module (gnu packages rpc) #:use-module (gnu packages rrdtool) #:use-module (gnu packages rsync) #:use-module (gnu packages samba) @@ -178,6 +184,7 @@ (define-module (gnu packages linux) #:use-module (gnu packages serialization) #:use-module (gnu packages slang) #:use-module (gnu packages sqlite) + #:use-module (gnu packages tbb) #:use-module (gnu packages texinfo) #:use-module (gnu packages textutils) #:use-module (gnu packages tls) @@ -9539,6 +9546,91 @@ (define-public fakechroot (home-page "https://github.com/dex4er/fakechroot/") (license license:lgpl2.1+)))) +(define-public falcosecurity-libs + (package + (name "falcosecurity-libs") + (version "0.16.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/falcosecurity/libs/") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1vzymzkfipb3bnjjd9m8ykzj0l94fm8mnpcxfm8mpxz3jbd8xnv9")) + (patches + (search-patches + "falcosecurity-libs-pkg-config.patch" + "falcosecurity-libs-install-pman.patch" + "falcosecurity-libs-libscap-pc.patch" + "falcosecurity-libs-shared-library-fix.patch" + "falcosecurity-libs-libsinsp-pkg-config.patch")))) + (build-system cmake-build-system) + (arguments + (list + #:configure-flags + #~(list "-DUSE_BUNDLED_DEPS=OFF" + "-DBUILD_DRIVER=OFF" + "-DENABLE_DKMS=OFF" + "-DBUILD_LIBSCAP_MODERN_BPF=ON" + "-DSCAP_FILES_SUITE_ENABLE=OFF" ;attempts to download scap files + "-DBUILD_SHARED_LIBS=ON" + #$(string-append "-DFALCOSECURITY_LIBS_VERSION=" version)) + ;; Only the libsinsp test suite is run, as the one for libscap requires + ;; elevated privileges. + #:test-target "run-unit-test-libsinsp" + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'disable-problematic-tests + (lambda _ + (substitute* "userspace/libsinsp/test/user.ut.cpp" + ;; The 'system_lookup' test assumes a root user + ;; exists in the build environment. + (("TEST_F\\(usergroup_manager_test, system_lookup)") + "TEST_F(usergroup_manager_test, DISABLED_system_lookup)")))) + (add-after 'install 'delete-src + (lambda _ + (delete-file-recursively + (string-append #$output "/src"))))))) + (native-inputs (list bpftool + clang + googletest + pkg-config + valijson)) ;header-only library + (inputs + (list elfutils + libbpf + libelf)) + (propagated-inputs + ;; The following inputs are in the 'Requires' field of libscap.pc and + ;; libsinp.pc. + (list c-ares + grpc + jsoncpp + openssl + protobuf + uthash ;included in libscap headers + zlib + ;; These are in the 'Requires.private' field of libscap.pc and + ;; libsinp.pc. They are required because the headers are installed + ;; to a non-standard directory, and thus need to be found via the + ;; 'Cflags' field, which in turn mandates that both the pkg-config + ;; modules listed in the 'Requires' and 'Requires.private' be + ;; available. + curl + re2 + tbb)) + (home-page "https://github.com/falcosecurity/libs/") + (synopsis "libscap and lisbinsp Falco security libraries") + (description "The Falco security libraries include @code{libsinsp} and +@code{libscap}. @code{libscap} manages the data capture process, while +@code{libsinsp} is a system inspection library that enriches events from +@code{libscap} with machine state. @code{libsinsp} also performs events +filtering with rule evaluation through its internal rule engine. These +libraries are used by the @command{sysdig} command-line utility.") + (license license:asl2.0))) + (define-public inputattach (package (name "inputattach") diff --git a/gnu/packages/patches/falcosecurity-libs-install-pman.patch b/gnu/packages/patches/falcosecurity-libs-install-pman.patch new file mode 100644 index 0000000000..38dcc0c4b8 --- /dev/null +++ b/gnu/packages/patches/falcosecurity-libs-install-pman.patch @@ -0,0 +1,14 @@ +Install the pman library and its header. +Upstream status: https://github.com/falcosecurity/libs/pull/1842 + +diff --git a/userspace/libpman/CMakeLists.txt b/userspace/libpman/CMakeLists.txt +index da92e9f27..4b57365fe 100644 +--- a/userspace/libpman/CMakeLists.txt ++++ b/userspace/libpman/CMakeLists.txt +@@ -58,3 +58,6 @@ endif() + if(USE_BUNDLED_LIBBPF) + add_dependencies(pman libbpf) + endif() ++ ++install(TARGETS pman LIBRARY ARCHIVE FRAMEWORK) ++install(FILES include/libpman.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) diff --git a/gnu/packages/patches/falcosecurity-libs-libscap-pc.patch b/gnu/packages/patches/falcosecurity-libs-libscap-pc.patch new file mode 100644 index 0000000000..ff650942ff --- /dev/null +++ b/gnu/packages/patches/falcosecurity-libs-libscap-pc.patch @@ -0,0 +1,16 @@ +libscap: Guard against install_lib_link_libraries-NOTFOUND. +Upstream status: https://github.com/falcosecurity/libs/pull/1842 + +diff --git a/cmake/modules/libscap.cmake b/cmake/modules/libscap.cmake +index 81ad2d28d..8b6b4197e 100644 +--- a/cmake/modules/libscap.cmake ++++ b/cmake/modules/libscap.cmake +@@ -95,7 +95,7 @@ foreach(libscap_install_lib ${LIBSCAP_INSTALL_LIBS}) + list(APPEND libscap_link_libraries ${libscap_install_lib}) + get_target_property(install_lib_link_libraries ${libscap_install_lib} LINK_LIBRARIES) + foreach (install_lib_link_library ${install_lib_link_libraries}) +- if (NOT ${install_lib_link_library} IN_LIST libscap_subdir_targets) ++ if (${install_lib_link_library} AND (NOT ${install_lib_link_library} IN_LIST libscap_subdir_targets)) + if(${install_lib_link_library} MATCHES "/") + # We have a path. Convert it to -L + -l. + get_filename_component(scap_lib_dir ${install_lib_link_library} DIRECTORY) diff --git a/gnu/packages/patches/falcosecurity-libs-libsinsp-pkg-config.patch b/gnu/packages/patches/falcosecurity-libs-libsinsp-pkg-config.patch new file mode 100644 index 0000000000..347e0ac90d --- /dev/null +++ b/gnu/packages/patches/falcosecurity-libs-libsinsp-pkg-config.patch @@ -0,0 +1,155 @@ +libsinsp: Refine pkg-config file generation. +Upstream status: https://github.com/falcosecurity/libs/pull/1842 + +diff --git a/userspace/libscap/libscap.pc.in b/userspace/libscap/libscap.pc.in +index a379744f3..1d4b20056 100644 +--- a/userspace/libscap/libscap.pc.in ++++ b/userspace/libscap/libscap.pc.in +@@ -1,4 +1,4 @@ +-prefix=${pcfiledir}/../.. ++prefix=@CMAKE_INSTALL_PREFIX@ + libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ + includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ + +@@ -6,5 +6,6 @@ Name: libscap + Description: lib for System CAPture + Version: @FALCOSECURITY_LIBS_VERSION@ + +-Libs: -L${libdir} @LIBSCAP_LINK_LIBDIRS_FLAGS@ @LIBSCAP_LINK_LIBRARIES_FLAGS@ ++Requires: zlib ++Libs: -L${libdir} -L{libdir}/@LIBS_PACKAGE_NAME@/libscap @LIBSCAP_LINK_LIBDIRS_FLAGS@ @LIBSCAP_LINK_LIBRARIES_FLAGS@ + Cflags: -I${includedir}/@LIBS_PACKAGE_NAME@/libscap -I${includedir}/@LIBS_PACKAGE_NAME@/driver -I${includedir}/@LIBS_PACKAGE_NAME@ +diff --git a/userspace/libsinsp/CMakeLists.txt b/userspace/libsinsp/CMakeLists.txt +index 6104603e8..832f86067 100644 +--- a/userspace/libsinsp/CMakeLists.txt ++++ b/userspace/libsinsp/CMakeLists.txt +@@ -169,13 +169,9 @@ target_link_libraries(sinsp + "${RE2_LIB}" + ) + +-set(SINSP_PKGCONFIG_LIBRARIES +- scap +- "${ZLIB_LIB}" +- "${CURL_LIBRARIES}" +- "${JSONCPP_LIB}" +- "${RE2_LIB}" +-) ++set(SINSP_PKGCONFIG_LIBRARIES) ++set(SINSP_PKGCONFIG_REQUIRES jsoncpp) ++set(SINSP_PKGCONFIG_REQUIRES_PRIVATE libcurl re2) + + if(NOT EMSCRIPTEN) + target_link_libraries(sinsp +@@ -184,7 +180,8 @@ if(NOT EMSCRIPTEN) + PRIVATE + "${TBB_LIB}" + ) +- list(APPEND SINSP_PKGCONFIG_LIBRARIES "${CARES_LIB}") ++ list(APPEND SINSP_PKGCONFIG_REQUIRES libcares) ++ list(APPEND SINSP_PKGCONFIG_REQUIRES_PRIVATE tbb) + endif() + + if(USE_BUNDLED_VALIJSON) +@@ -248,14 +245,12 @@ if(NOT WIN32) + "${PROTOBUF_LIB}" + "${CARES_LIB}" + ) +- list(APPEND SINSP_PKGCONFIG_LIBRARIES +- "${GRPC_LIBRARIES}" +- "${GRPCPP_LIB}" +- "${GRPC_LIB}" +- "${GPR_LIB}" +- "${PROTOBUF_LIB}" +- "${CARES_LIB}" +- ) ++ list(APPEND SINSP_PKGCONFIG_REQUIRES ++ gpr ++ grpc ++ grpc++ ++ protobuf ++ libcares) + + if(NOT MUSL_OPTIMIZED_BUILD) + target_link_libraries(sinsp INTERFACE rt anl) +@@ -269,7 +264,7 @@ if(NOT WIN32) + endif() # NOT APPLE + + target_link_libraries(sinsp INTERFACE "${OPENSSL_LIBRARIES}") +- list(APPEND SINSP_PKGCONFIG_LIBRARIES "${OPENSSL_LIBRARIES}") ++ list(APPEND SINSP_PKGCONFIG_REQUIRES libcrypto libssl) + + target_link_libraries(sinsp INTERFACE dl pthread) + list(APPEND SINSP_PKGCONFIG_LIBRARIES dl pthread) +@@ -306,41 +301,17 @@ if(NOT DEFINED SINSP_AGENT_CGROUP_MEM_PATH_ENV_VAR) + endif() + add_definitions(-DSINSP_AGENT_CGROUP_MEM_PATH_ENV_VAR="${SINSP_AGENT_CGROUP_MEM_PATH_ENV_VAR}") + +-# Build our pkg-config "Libs:" flags. For now, loop over SINSP_PKGCONFIG_LIBRARIES. If +-# we ever start using pkg_search_module or pkg_check_modules in cmake/modules +-# we could add each module to our "Requires:" line instead. We might need to +-# expand this to use some of the techniques in +-# https://github.com/curl/curl/blob/curl-7_84_0/CMakeLists.txt#L1539 +-set(SINSP_PKG_CONFIG_LIBS) +-set(SINSP_PKG_CONFIG_LIBDIRS "") +-foreach(sinsp_lib ${SINSP_PKGCONFIG_LIBRARIES}) +- if(${sinsp_lib} MATCHES "^-") +- # We have a flag. Pass it through unchanged. +- list(APPEND SINSP_PKG_CONFIG_LIBS ${sinsp_lib}) +- elseif(${sinsp_lib} MATCHES "/") +- # We have a path. Convert it to -L + -l. +- get_filename_component(sinsp_lib_dir ${sinsp_lib} DIRECTORY) +- list(APPEND SINSP_PKG_CONFIG_LIBDIRS -L${sinsp_lib_dir}) +- get_filename_component(sinsp_lib_base ${sinsp_lib} NAME_WE) +- string(REGEX REPLACE "^lib" "" sinsp_lib_base ${sinsp_lib_base}) +- list(APPEND SINSP_PKG_CONFIG_LIBS -l${sinsp_lib_base}) +- elseif(${sinsp_lib} STREQUAL "scap") +- # We require libscap.pc, so skip it. +- else() +- # Assume we have a plain library name. Prefix it with "-l". +- list(APPEND SINSP_PKG_CONFIG_LIBS -l${sinsp_lib}) +- endif() +-endforeach() ++list(REMOVE_DUPLICATES SINSP_PKGCONFIG_LIBRARIES) ++list(REMOVE_DUPLICATES SINSP_PKGCONFIG_REQUIRES) ++list(REMOVE_DUPLICATES SINSP_PKGCONFIG_REQUIRES_PRIVATE) + +-# Build our pkg-config "Cflags:" flags. +-set(SINSP_PKG_CONFIG_INCLUDES "") +-foreach(sinsp_include_directory ${LIBSINSP_INCLUDE_DIRS}) +- list(APPEND SINSP_PKG_CONFIG_INCLUDES -I${sinsp_include_directory}) ++set(SINSP_LINK_FLAGS) ++foreach(sinsp_link_library ${SINSP_PKGCONFIG_LIBRARIES}) ++ list(APPEND SINSP_LINK_FLAGS "-l${sinsp_link_library}") + endforeach() + +-string(REPLACE ";" " " SINSP_PKG_CONFIG_LIBS "${SINSP_PKG_CONFIG_LIBS}") +-list(REMOVE_DUPLICATES SINSP_PKG_CONFIG_LIBDIRS) +-string(REPLACE ";" " " SINSP_PKG_CONFIG_LIBDIRS "${SINSP_PKG_CONFIG_LIBDIRS}") +-list(REMOVE_DUPLICATES SINSP_PKG_CONFIG_INCLUDES) +-string(REPLACE ";" " " SINSP_PKG_CONFIG_INCLUDES "${SINSP_PKG_CONFIG_INCLUDES}") ++string(REPLACE ";" " " LIBSINSP_LINK_FLAGS "${SINSP_LINK_FLAGS}") ++string(REPLACE ";" " " LIBSINSP_REQUIRES "${SINSP_PKGCONFIG_REQUIRES}") ++string(REPLACE ";" " " LIBSINSP_REQUIRES_PRIVATE "${SINSP_PKGCONFIG_REQUIRES_PRIVATE}") ++ + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libsinsp.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libsinsp.pc @ONLY) +diff --git a/userspace/libsinsp/libsinsp.pc.in b/userspace/libsinsp/libsinsp.pc.in +index 9292e73ce..f20da76b3 100644 +--- a/userspace/libsinsp/libsinsp.pc.in ++++ b/userspace/libsinsp/libsinsp.pc.in +@@ -1,4 +1,4 @@ +-prefix=${pcfiledir}/../.. ++prefix=@CMAKE_INSTALL_PREFIX@ + libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ + includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ + +@@ -6,6 +6,7 @@ Name: libsinsp + Description: lib for System INSPection + Version: @FALCOSECURITY_LIBS_VERSION@ + +-Requires: libscap +-Libs: -L${libdir} -lsinsp @SINSP_PKG_CONFIG_LIBDIRS@ @SINSP_PKG_CONFIG_LIBS@ +-Cflags: -I${includedir}/@LIBS_PACKAGE_NAME@/libsinsp -I${includedir}/@LIBS_PACKAGE_NAME@/driver -I${includedir}/@LIBS_PACKAGE_NAME@ @SINSP_PKG_CONFIG_INCLUDES@ ++Requires: libscap @LIBSINSP_REQUIRES@ ++Requires.private: @LIBSINSP_REQUIRES_PRIVATE@ ++Libs: -L${libdir} -lsinsp @LIBSINSP_LINK_FLAGS@ ++Cflags: -I${includedir}/@LIBS_PACKAGE_NAME@/libsinsp -I${includedir}/@LIBS_PACKAGE_NAME@/driver -I${includedir}/@LIBS_PACKAGE_NAME@ diff --git a/gnu/packages/patches/falcosecurity-libs-pkg-config.patch b/gnu/packages/patches/falcosecurity-libs-pkg-config.patch new file mode 100644 index 0000000000..9ddfdfffde --- /dev/null +++ b/gnu/packages/patches/falcosecurity-libs-pkg-config.patch @@ -0,0 +1,23 @@ +userspace: Extend CFLAGS of libscap.pc and libsinsp.pc. +Upstream status: https://github.com/falcosecurity/libs/pull/1842 + +diff --git a/userspace/libscap/libscap.pc.in b/userspace/libscap/libscap.pc.in +index 40b6e96ed..a379744f3 100644 +--- a/userspace/libscap/libscap.pc.in ++++ b/userspace/libscap/libscap.pc.in +@@ -7,4 +7,4 @@ Description: lib for System CAPture + Version: @FALCOSECURITY_LIBS_VERSION@ + + Libs: -L${libdir} @LIBSCAP_LINK_LIBDIRS_FLAGS@ @LIBSCAP_LINK_LIBRARIES_FLAGS@ +-Cflags: -I${includedir}/@LIBS_PACKAGE_NAME@/libscap ++Cflags: -I${includedir}/@LIBS_PACKAGE_NAME@/libscap -I${includedir}/@LIBS_PACKAGE_NAME@/driver -I${includedir}/@LIBS_PACKAGE_NAME@ +diff --git a/userspace/libsinsp/libsinsp.pc.in b/userspace/libsinsp/libsinsp.pc.in +index c1cc4a1e2..9292e73ce 100644 +--- a/userspace/libsinsp/libsinsp.pc.in ++++ b/userspace/libsinsp/libsinsp.pc.in +@@ -8,4 +8,4 @@ Version: @FALCOSECURITY_LIBS_VERSION@ + + Requires: libscap + Libs: -L${libdir} -lsinsp @SINSP_PKG_CONFIG_LIBDIRS@ @SINSP_PKG_CONFIG_LIBS@ +-Cflags: -I${includedir}/@LIBS_PACKAGE_NAME@/libsinsp @SINSP_PKG_CONFIG_INCLUDES@ ++Cflags: -I${includedir}/@LIBS_PACKAGE_NAME@/libsinsp -I${includedir}/@LIBS_PACKAGE_NAME@/driver -I${includedir}/@LIBS_PACKAGE_NAME@ @SINSP_PKG_CONFIG_INCLUDES@ diff --git a/gnu/packages/patches/falcosecurity-libs-shared-library-fix.patch b/gnu/packages/patches/falcosecurity-libs-shared-library-fix.patch new file mode 100644 index 0000000000..3334a89516 --- /dev/null +++ b/gnu/packages/patches/falcosecurity-libs-shared-library-fix.patch @@ -0,0 +1,50 @@ +Fix shared library build. +Upstream status: https://github.com/falcosecurity/libs/pull/1842 + +diff --git a/driver/CMakeLists.txt b/driver/CMakeLists.txt +index 80229cc03..70c9ba65b 100644 +--- a/driver/CMakeLists.txt ++++ b/driver/CMakeLists.txt +@@ -152,6 +152,11 @@ set(DRIVER_SOURCES + ppm_consumer.h + capture_macro.h + socketcall_to_syscall.h ++ syscall_compat_loongarch64.h ++ syscall_compat_ppc64le.h ++ syscall_compat_riscv64.h ++ syscall_compat_s390x.h ++ syscall_compat_x86_64.h + syscall_ia32_64_map.c + ) + +diff --git a/test/libscap/CMakeLists.txt b/test/libscap/CMakeLists.txt +index e88603ebd..fa26ba7ee 100644 +--- a/test/libscap/CMakeLists.txt ++++ b/test/libscap/CMakeLists.txt +@@ -45,6 +45,7 @@ set(LIBSCAP_TESTS_LIBRARIES + "${GTEST_LIB}" + "${GTEST_MAIN_LIB}" + "${CMAKE_THREAD_LIBS_INIT}" ++ "${PROTOBUF_LIB}" + scap + ) + +diff --git a/userspace/libscap/engine/gvisor/CMakeLists.txt b/userspace/libscap/engine/gvisor/CMakeLists.txt +index 6dfbafb14..875847b5d 100644 +--- a/userspace/libscap/engine/gvisor/CMakeLists.txt ++++ b/userspace/libscap/engine/gvisor/CMakeLists.txt +@@ -76,6 +76,14 @@ if (BUILD_SHARED_LIBS) + add_dependencies(scap_engine_gvisor_o uthash) + add_dependencies(scap scap_engine_gvisor_o) + target_sources(scap PRIVATE $) ++ ++ target_include_directories(scap_engine_gvisor_o ++ PRIVATE ++ ${CMAKE_BINARY_DIR} ++ ${CMAKE_CURRENT_BINARY_DIR} ++ ${CMAKE_SOURCE_DIR} ++ ${CMAKE_SOURCE_DIR}/userspace ++ ) + else() + add_library(scap_engine_gvisor + ${scap_engine_gvisor_sources} From patchwork Wed May 15 16:57:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 64460 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 B07A527BBE9; Wed, 15 May 2024 18:00:33 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 94A3E27BBE2 for ; Wed, 15 May 2024 18:00:31 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7HzB-0001rF-Rf; Wed, 15 May 2024 13:00:13 -0400 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 1s7Hz1-0001nH-V2 for guix-patches@gnu.org; Wed, 15 May 2024 13:00:05 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7Hz1-0007Fe-CH for guix-patches@gnu.org; Wed, 15 May 2024 13:00:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s7Hz3-0007Br-21 for guix-patches@gnu.org; Wed, 15 May 2024 13:00:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70962] [PATCH 07/14] gnu: Add sysdig. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 15 May 2024 17:00:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70962 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70962@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 70962-submit@debbugs.gnu.org id=B70962.171579236727481 (code B ref 70962); Wed, 15 May 2024 17:00:05 +0000 Received: (at 70962) by debbugs.gnu.org; 15 May 2024 16:59:27 +0000 Received: from localhost ([127.0.0.1]:43161 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7HyQ-00078y-6i for submit@debbugs.gnu.org; Wed, 15 May 2024 12:59:26 -0400 Received: from mail-qt1-f175.google.com ([209.85.160.175]:47193) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7HyN-00078I-Ag for 70962@debbugs.gnu.org; Wed, 15 May 2024 12:59:24 -0400 Received: by mail-qt1-f175.google.com with SMTP id d75a77b69052e-43df7f42ac9so41523571cf.2 for <70962@debbugs.gnu.org>; Wed, 15 May 2024 09:59:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715792295; x=1716397095; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WIErx2hYyODB3qog9wxnOjRBZAlOLABbdm1cBK3xluY=; b=WKI7XSJS41foFGSEbH4iU4XTs6XT8BzELDsBFr4FKH6QB5UlZr+wa19KkuIRNp7C8A t7RD6JV6xSiIguIxY8NOnCMDVhQfAIaysicSTZEhAWezLaM/ETVSoChmybmQF/4zUa4X w5coxVvtyhIS4Yp8SKLOJ7JZNdR0hR/1jJjSupIB+iQrlU4Jg5HxLo5gKFBxGwAI26cT MmjfY1UBwi9J1GtyvvZE4hMi9H/+/uko+7D2DzjjTVmibO4vJNvgOmJejlh4cImIvGnC IWLwW2OdauK/GE7dippZnGp7x3Du0xiNTIV3LNUD9vLbHgoJP+pRQauC7+11Foo4cJaf TwHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715792295; x=1716397095; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WIErx2hYyODB3qog9wxnOjRBZAlOLABbdm1cBK3xluY=; b=QtyDLyq6BnPBo6j/3A88Dz/bo4fgZEnGfqZSS2pY3Hz8AQObMZ4ua9EMams1k3Kd43 j3trsjI8FJ4/5xJb5yZeIBYSG6mrCa8oV0HiEouy/106rVUMr92w5NW9HwcqcDQl4+dO PQni1xvIA722bJ81M1lvmbT9F5E241+NsJ38xryFTSREeiyIkJ0PZw1jzKUsUacmVdkX KpIh58PmnQ7l7HKD6oz/iqUgjgfYsTfqZ33+6/RdCJw5wkawGMv8BD2lWktAie0HEqKw LFj2sUb5rYNMfJKvs21Ol2DoB6LsW3wDAWl9Wwgv01TusnZL9qgil2UxadJlqEgZUy+S Laeg== X-Gm-Message-State: AOJu0YyCBjpS1Cds5LktAL4ggFuKUSmuLaauN8SaEuu5tAsuuHPxtoxm mR4xAso7IXVd71BGEtPTCk1IuT1SNQWoxs/gkN9U7zCY8R/1IAu1VgXwQA== X-Google-Smtp-Source: AGHT+IFyoRjNiRzLQ30PB4T8+av+RVM4fMoN/re+ZFQGa4V52ymvUxOq5AvHefZXXQgakV/XlaPC7A== X-Received: by 2002:a05:6214:5f02:b0:6a0:a9dc:b117 with SMTP id 6a1803df08f44-6a1680bf323mr187953286d6.0.1715792295411; Wed, 15 May 2024 09:58:15 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-107.b2b2c.ca. [205.233.125.107]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6a15f194871sm66068896d6.59.2024.05.15.09.58.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 09:58:15 -0700 (PDT) From: Maxim Cournoyer Date: Wed, 15 May 2024 12:57:17 -0400 Message-ID: <60acdbbfc5a30227d034368905fb8567c917156b.1715791830.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <7cf609dcf83c85b6897c9fb9af46ce8a854a15c8.1715791830.git.maxim.cournoyer@gmail.com> References: <7cf609dcf83c85b6897c9fb9af46ce8a854a15c8.1715791830.git.maxim.cournoyer@gmail.com> MIME-Version: 1.0 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/admin.scm (sysdig): New variable. * gnu/packages/patches/sysdig-shared-falcosecurity-libs.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. Change-Id: I02b64db7a548e17ea83beb1ea27db87d29e99cf1 --- gnu/local.mk | 1 + gnu/packages/admin.scm | 58 +++++++++++++++ .../sysdig-shared-falcosecurity-libs.patch | 71 +++++++++++++++++++ 3 files changed, 130 insertions(+) create mode 100644 gnu/packages/patches/sysdig-shared-falcosecurity-libs.patch diff --git a/gnu/local.mk b/gnu/local.mk index bb7dfa0b12..81960e1c9b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2076,6 +2076,7 @@ dist_patch_DATA = \ %D%/packages/patches/slim-login.patch \ %D%/packages/patches/slim-display.patch \ %D%/packages/patches/stex-copy-from-immutable-store.patch \ + %D%/packages/patches/sysdig-shared-falcosecurity-libs.patch \ %D%/packages/patches/syslinux-gcc10.patch \ %D%/packages/patches/syslinux-strip-gnu-property.patch \ %D%/packages/patches/snappy-add-O2-flag-in-CmakeLists.txt.patch \ diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 22a2c12244..c36e41cbce 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -114,6 +114,7 @@ (define-module (gnu packages admin) #:use-module (gnu packages c) #:use-module (gnu packages check) #:use-module (gnu packages compression) + #:use-module (gnu packages cpp) #:use-module (gnu packages crates-graphics) #:use-module (gnu packages crates-io) #:use-module (gnu packages crates-windows) @@ -5722,6 +5723,63 @@ (define-public seatd that require it.") (license license:expat))) +(define-public sysdig + ;; Use the latest commit for now, as the latest 0.36.1 release does not yet + ;; support the falcosecurity-libs 0.16 API. + (let ((commit "598ad292b659425e475e5814d9e92c3c29188480") + (revision "0")) + (package + (name "sysdig") + (version (git-version "0.36.1" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/draios/sysdig") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0yyins3rb286dfibadfwwp2gwmdj7fsz3pdkpdvx05yvdqfkqds7")) + (patches + (search-patches "sysdig-shared-falcosecurity-libs.patch")))) + (build-system cmake-build-system) + (arguments + (list #:tests? #f ;no test suite + #:configure-flags + #~(list "-DUSE_BUNDLED_DEPS=OFF" + ;; Already built and part of falcosecurity-libs, but + ;; needed for the 'HAS_MODERN_BPF' define. + "-DBUILD_SYSDIG_MODERN_BPF=ON" + #$(string-append "-DSYSDIG_VERSION=" version)))) + (native-inputs (list pkg-config)) + (inputs + (list falcosecurity-libs + luajit + ncurses + nlohmann-json + yaml-cpp + zlib)) + (home-page "https://github.com/draios/sysdig") + (synopsis "System exploration and troubleshooting tool") + (description "Sysdig is a simple tool for deep system visibility, with +native support for containers. It combines features of multiple system +administration tools such as the @command{strace}, @command{tcpdump}, +@command{htop}, @command{iftop} and @command{lsof} into a single interface. +The novel architecture of the tool means that the performance impact of the +tracing on the system is very light, compared to the likes of +@command{strace}. The @command{sysdig} command has an interface similar to +@command{strace}, while the @command{csysdig} command is better suited for +interactive used, and has a user interface similar to @command{htop}. + +If you use Guix System, the kernel Linux has @acronym{BPF, Berkeley Packet +Filter} support, and you should launch this tool using the @samp{--modern-bpf} +argument of the @command{sysdig} or @command{csysdig} commands. The following +Bash alias can be added to your @file{~/.bash_profile} file: + +sysdig=sysdig --modern-bpf alias cysdig=csysdig --modern-bpf +") ;XXX no @example Texinfo support + (license license:asl2.0)))) + (define-public fail2ban (package (name "fail2ban") diff --git a/gnu/packages/patches/sysdig-shared-falcosecurity-libs.patch b/gnu/packages/patches/sysdig-shared-falcosecurity-libs.patch new file mode 100644 index 0000000000..aaa3417f18 --- /dev/null +++ b/gnu/packages/patches/sysdig-shared-falcosecurity-libs.patch @@ -0,0 +1,71 @@ +Upstream status: https://github.com/draios/sysdig/pull/2093 + +diff --git a/cmake/modules/falcosecurity-libs.cmake b/cmake/modules/falcosecurity-libs.cmake +index 7cee8a3c4..dd59c1b32 100644 +--- a/cmake/modules/falcosecurity-libs.cmake ++++ b/cmake/modules/falcosecurity-libs.cmake +@@ -16,6 +16,19 @@ + # limitations under the License. + # + ++option(USE_BUNDLED_FALCOSECURITY_LIBS "Enable building of the bundled falcosecurity libraries" ${USE_BUNDLED_DEPS}) ++ ++if(NOT USE_BUNDLED_FALCOSECURITY_LIBS) ++ find_package(PkgConfig REQUIRED) ++ pkg_check_modules(LIBSINSP REQUIRED IMPORTED_TARGET libsinsp) ++ message(STATUS "Found libsinsp: ++ include: ${LIBSINSP_INCLUDE_DIRS} ++ lib: ${LIBSINSP_LIBRARIES} ++ cflags: ${LIBSINSP_CFLAGS}") ++ return() ++endif() ++ ++# else(): using bundled falcosecurity libs + set(FALCOSECURITY_LIBS_CMAKE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/falcosecurity-libs-repo") + set(FALCOSECURITY_LIBS_CMAKE_WORKING_DIR "${CMAKE_BINARY_DIR}/falcosecurity-libs-repo") + +diff --git a/userspace/sysdig/CMakeLists.txt b/userspace/sysdig/CMakeLists.txt +index 60f8072ad..86edfc91c 100644 +--- a/userspace/sysdig/CMakeLists.txt ++++ b/userspace/sysdig/CMakeLists.txt +@@ -20,7 +20,6 @@ if(NOT WIN32) + include(ncurses) + endif() # NOT WIN32 + +-include(zlib) + include(luajit) + + include_directories("${PROJECT_BINARY_DIR}/userspace/sinspui") +@@ -108,7 +107,7 @@ if(NOT WIN32) + include_directories(${PROJECT_BINARY_DIR}/driver/src) + + target_link_libraries(sysdig +- sinsp ++ $,sinsp,PkgConfig::LIBSINSP> + "${LUAJIT_LIB}" + "${YAMLCPP_LIB}") + +@@ -117,7 +116,7 @@ if(NOT WIN32) + endif() + + target_link_libraries(csysdig +- sinsp ++ $,sinsp,PkgConfig::LIBSINSP> + "${LUAJIT_LIB}" + "${CURSES_LIBRARIES}" + "${YAMLCPP_LIB}") +@@ -140,12 +139,12 @@ else() + add_definitions(-DNOCURSESUI) + + target_link_libraries(sysdig +- sinsp ++ $,sinsp,PkgConfig::LIBSINSP> + "${LUAJIT_LIB}" + "${YAMLCPP_LIB}") + + target_link_libraries(csysdig +- sinsp ++ $,sinsp,PkgConfig::LIBSINSP> + "${LUAJIT_LIB}" + "${YAMLCPP_LIB}") + From patchwork Wed May 15 16:57:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 64467 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 A8CED27BBEA; Wed, 15 May 2024 18:01:15 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id AAF8B27BBE2 for ; Wed, 15 May 2024 18:01:14 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7HzC-0001rS-5M; Wed, 15 May 2024 13:00:14 -0400 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 1s7Hz5-0001os-O2 for guix-patches@gnu.org; Wed, 15 May 2024 13:00:09 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7Hz1-0007Fr-Pn for guix-patches@gnu.org; Wed, 15 May 2024 13:00:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s7Hz3-0007C3-FL; Wed, 15 May 2024 13:00:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70962] [PATCH 08/14] gnu: Add dwarves. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: leo@famulari.name, me@tobias.gr, w@wmeyer.eu, guix-patches@gnu.org Resent-Date: Wed, 15 May 2024 17:00:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70962 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70962@debbugs.gnu.org Cc: Maxim Cournoyer , Leo Famulari , Tobias Geerinckx-Rice , Wilko Meyer X-Debbugs-Original-Xcc: Leo Famulari , Tobias Geerinckx-Rice , Wilko Meyer Received: via spool by 70962-submit@debbugs.gnu.org id=B70962.171579237027500 (code B ref 70962); Wed, 15 May 2024 17:00:05 +0000 Received: (at 70962) by debbugs.gnu.org; 15 May 2024 16:59:30 +0000 Received: from localhost ([127.0.0.1]:43167 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7HyU-00079T-10 for submit@debbugs.gnu.org; Wed, 15 May 2024 12:59:30 -0400 Received: from mail-qk1-f170.google.com ([209.85.222.170]:43035) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7HyO-00078W-Tc for 70962@debbugs.gnu.org; Wed, 15 May 2024 12:59:25 -0400 Received: by mail-qk1-f170.google.com with SMTP id af79cd13be357-792bd82402cso482116685a.0 for <70962@debbugs.gnu.org>; Wed, 15 May 2024 09:59:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715792297; x=1716397097; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=saP5NNXJ+XzpRkPaysozWLBPOJh4YBQFWsZ8dBFdN7M=; b=S5HkvqD0M2zUS2PQ6HRQX7jDtr79veKP0MIW9HRYeaHQ/hTY6xEbmBWDkcvcOrteCC +iNjjOMHmInMQLbfzwCGu4cenhhgfUxyCjwnfMtBCBREWBL4OTtvVXVVnP13AC5JfFNv gIiHzE8gK9wFJFWdUlZIRHzBbNrE7QRNvpbkreLpeL8sdXc0Qwevn6GnQRGliOkVjG+G 7OM2hyUiQZqakZg8qqeLty38QO5KSXxcHsfvYG5Y6wn9cMdhweoExMeYBAaL6bJijJ33 MqWCdBl7rrxCw3loSJi4cQA8lADK4mQu5cq9ic7vdlf2TWHv2v+RnIfAYi0ejebw4wWH WOBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715792297; x=1716397097; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=saP5NNXJ+XzpRkPaysozWLBPOJh4YBQFWsZ8dBFdN7M=; b=iafNBY6apB1oCKIpnWiKK80l8sn8IDjIp7ctEnupwgspfBXnuE4qqUGvEV5Ddd4tXV a5m+opLSUf98pjYS4e43elSwnq8NarsoVKGKGyNt/mnp6pkJEiVM6VAHe2Bh4tYlQkSA xJU2xCuGyLO588Wchoj8qCeFfx7tvMzEpvLD9LTgdJCTcqBL6/B/VsoPwhe2I1fMxnDN dsAdfXUD7PU3bokPCaB31uiyAmc0pEFM8sEaQc1IEXb8u3YkZcd6bYK8/5kSij2iS7dA mJPrAXRoBkkHGBoiesX6LmNNRWR5uRHQTDcE9ItIKnNlsaSrHs1A/gjDOkOi0afxU+2c 0bYw== X-Gm-Message-State: AOJu0Yyb0OCrplM91kJhnr+Kku+s3ox8APeQF/DnY5sz1rMyeO9Vy/si nNKl3jU9+UkeH4UjhagK1gZKWfNRsHzbsNanlUVATJZpRGj2RKlKl/b++g== X-Google-Smtp-Source: AGHT+IHo0tuMkPdaL9IcgkFE6WqnRhoBn79P5xAy1wLPGag3uwR0fM/S0eaeE1tTgAfKr583OrOTdQ== X-Received: by 2002:a05:6214:398c:b0:6a0:f637:667 with SMTP id 6a1803df08f44-6a33d607dc9mr169176426d6.12.1715792297062; Wed, 15 May 2024 09:58:17 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-107.b2b2c.ca. [205.233.125.107]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6a15f194871sm66068896d6.59.2024.05.15.09.58.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 09:58:16 -0700 (PDT) From: Maxim Cournoyer Date: Wed, 15 May 2024 12:57:18 -0400 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: <7cf609dcf83c85b6897c9fb9af46ce8a854a15c8.1715791830.git.maxim.cournoyer@gmail.com> References: <7cf609dcf83c85b6897c9fb9af46ce8a854a15c8.1715791830.git.maxim.cournoyer@gmail.com> MIME-Version: 1.0 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/linux.scm (dwarves): New variable. Change-Id: Ib2452868eae76bea95060a70e568dfb6e84b2a75 --- gnu/local.mk | 1 + gnu/packages/linux.scm | 48 +++++++++++++++++++ .../dwarves-threading-reproducibility.patch | 23 +++++++++ 3 files changed, 72 insertions(+) create mode 100644 gnu/packages/patches/dwarves-threading-reproducibility.patch diff --git a/gnu/local.mk b/gnu/local.mk index 81960e1c9b..1531da2f87 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1123,6 +1123,7 @@ dist_patch_DATA = \ %D%/packages/patches/dune-istl-fix-solver-playground.patch \ %D%/packages/patches/durden-shadow-arcan.patch \ %D%/packages/patches/dvd+rw-tools-add-include.patch \ + %D%/packages/patches/dwarves-threading-reproducibility.patch \ %D%/packages/patches/dynaconf-unvendor-deps.patch \ %D%/packages/patches/dyninst-fix-glibc-compatibility.patch \ %D%/packages/patches/efivar-211.patch \ diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index a51ce5c27a..5119e7f575 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -2376,6 +2376,54 @@ (define-public dislocker partitions. Write functionality is also provided but check the README.") (license license:gpl2+))) +(define-public dwarves + (package + (name "dwarves") + (version "1.26") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/acmel/dwarves") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0xfq0r3whc3dk922ss8i5vwyfcqhgc95dy27mm69j5niy7i5kzrd")) + (patches + (search-patches "dwarves-threading-reproducibility.patch")))) + (build-system cmake-build-system) + (arguments (list #:configure-flags #~(list "-D__LIB=lib" + "-DLIBBPF_EMBEDDED=OFF") + #:tests? #f)) ;no test suite + (native-inputs (list pkg-config)) + (inputs (list libbpf)) + (home-page "https://github.com/acmel/dwarves") + (synopsis "Debugging information processing library and utilities") + (description "Dwarves is a set of tools that use the debugging information +inserted in ELF binaries by compilers such as GCC, used by well known +debuggers such as GDB. + +Utilities in the Dwarves suite include @command{pahole}, that can be used to +find alignment holes in structures and classes in languages such as C, C++, +but not limited to these. These tools can also be used to encode and read the +BTF type information format used with the kernel Linux @code{bpf} syscall. + +The @command{codiff} command can be used to compare the effects changes in +source code generate on the resulting binaries. + +The @command{pfunct} command can be used to find all sorts of information +about functions, inlines, decisions made by the compiler about inlining, etc. + +The @command{pahole} command can be used to use all this type information to +pretty print raw data according to command line directions. + +Headers can have its data format described from debugging info and offsets from +it can be used to further format a number of records. + +Finally, the @command{btfdiff} command can be used to compare the output of +pahole from BTF and DWARF, to make sure they produce the same results. ") + (license license:gpl2+))) + (define-public fbset (package (name "fbset") diff --git a/gnu/packages/patches/dwarves-threading-reproducibility.patch b/gnu/packages/patches/dwarves-threading-reproducibility.patch new file mode 100644 index 0000000000..8771ca6b0d --- /dev/null +++ b/gnu/packages/patches/dwarves-threading-reproducibility.patch @@ -0,0 +1,23 @@ +Retrieved from nixpkgs. + +This causes pahole to use '-j1' (single thread) when SOURCE_DATE_EPOCH +is set, to ensure it produces reproducible output. + +diff --git a/pahole.c b/pahole.c +index 6fc4ed6..a4e306f 100644 +--- a/pahole.c ++++ b/pahole.c +@@ -1687,8 +1687,11 @@ static error_t pahole__options_parser(int key, char *arg, + class_name = arg; break; + case 'j': + #if _ELFUTILS_PREREQ(0, 178) +- conf_load.nr_jobs = arg ? atoi(arg) : +- sysconf(_SC_NPROCESSORS_ONLN) * 1.1; ++ // Force single thread if reproducibility is desirable. ++ if (!getenv("SOURCE_DATE_EPOCH")) { ++ conf_load.nr_jobs = arg ? atoi(arg) : ++ sysconf(_SC_NPROCESSORS_ONLN) * 1.1; ++ } + #else + fputs("pahole: Multithreading requires elfutils >= 0.178. Continuing with a single thread...\n", stderr); + #endif From patchwork Wed May 15 16:57:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 64469 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 506DF27BBEC; Wed, 15 May 2024 18:01:29 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id DDECF27BBEB for ; Wed, 15 May 2024 18:01:28 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7HzI-0001vC-Ut; Wed, 15 May 2024 13:00:21 -0400 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 1s7Hz5-0001pC-Ra for guix-patches@gnu.org; Wed, 15 May 2024 13:00:09 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7Hz4-0007GK-6s for guix-patches@gnu.org; Wed, 15 May 2024 13:00:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s7Hz3-0007CD-SM; Wed, 15 May 2024 13:00:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70962] [PATCH 09/14] gnu: make-linux-libre*: Set KBUILD_BUILD_VERSION for reproducibility. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: leo@famulari.name, me@tobias.gr, w@wmeyer.eu, guix-patches@gnu.org Resent-Date: Wed, 15 May 2024 17:00:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70962 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70962@debbugs.gnu.org Cc: Maxim Cournoyer , Leo Famulari , Tobias Geerinckx-Rice , Wilko Meyer X-Debbugs-Original-Xcc: Leo Famulari , Tobias Geerinckx-Rice , Wilko Meyer Received: via spool by 70962-submit@debbugs.gnu.org id=B70962.171579237027507 (code B ref 70962); Wed, 15 May 2024 17:00:05 +0000 Received: (at 70962) by debbugs.gnu.org; 15 May 2024 16:59:30 +0000 Received: from localhost ([127.0.0.1]:43169 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7HyU-00079V-IA for submit@debbugs.gnu.org; Wed, 15 May 2024 12:59:30 -0400 Received: from mail-qk1-f169.google.com ([209.85.222.169]:56458) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7HyQ-00078Y-Hk for 70962@debbugs.gnu.org; Wed, 15 May 2024 12:59:26 -0400 Received: by mail-qk1-f169.google.com with SMTP id af79cd13be357-78f056f928eso488455185a.0 for <70962@debbugs.gnu.org>; Wed, 15 May 2024 09:59:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715792298; x=1716397098; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NNS/mLbRooE4YDnUlToMyZc5S9iE4u3Qpmi7kmswJuE=; b=RwGGTsXWTE+2TteBKQcyosBfWSoRzjzJKrbn7i8zfbV9mr1mNxmV5DmZoiHhjaTvti 0g0RYosVPcVbDIFvvojEIUtV5euzup9QfGF+KszeIVwLlsM4Gg2nqvOy/R9KUIyDe7jF ftgDmLtAgmj+iBCqZ5adTwZc4wGQWUUxDKzKYfN2QePI7qjja2gmfKoN7OIz2CWFZ68j FeehYzX1FajpC+GwS2WWHu9Z2KZt9Fq0ueLKNEnGUbJmYQhgvIHOsppaU7vpbg267Qvh iUq1XjTL+LrgpvRP4+OL/841dTpFTyRrPcckHDedxGVaNG2ysBRgT3ev0Sz0L+2pzGng OpSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715792298; x=1716397098; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NNS/mLbRooE4YDnUlToMyZc5S9iE4u3Qpmi7kmswJuE=; b=PMujYoZDG5cD4J4IyRn3uu7fnfFC+s8QjxXnQ+yzgg4OlDumKcgmkOjKKjyn1CJMJZ virkzYQs3FLubOhV31ZCBzbyiDi1M2FwASZCDjHRJT9Mmyn8swBySWjguFgnHxZVoJJu LIMUSfnZ1EkV63nP6ZlgI/WBjuFUCfphbnbni8Vds7rLB1GGRT/LL4S4CFSOP9/YchJv hzN229Z80XkMIxmdCflnsYjrFgZ/p+HbNsfEQxAUUw3l+rIbjVYup/JVVoQH0sSSgjVt qAqBMPfHS07LHr6LNlrZ3tynYPan+qFJ/UQbJA+zuqVfrkr4I30UywwES+pl9jBb6Wb4 fqsg== X-Gm-Message-State: AOJu0YyAKkGQTmHrKVzKBSWayEGPv++pUc336Big0SHP9+pNimirF64B riJ/17xYLd/SaiiWcmX1OEuRbcOEtg9iYrXm2CYnEO0RtbRHXZixH98a3g== X-Google-Smtp-Source: AGHT+IFUMSs7HsIGYSgM7nQun/9nCeVqZjP8mq19Hkfkmo+IsyXsF2yOOr6KItyiGtaWIyPk45F8kA== X-Received: by 2002:a05:6214:5411:b0:6a0:5673:e50e with SMTP id 6a1803df08f44-6a1682346f1mr222515196d6.53.1715792298466; Wed, 15 May 2024 09:58:18 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-107.b2b2c.ca. [205.233.125.107]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6a15f194871sm66068896d6.59.2024.05.15.09.58.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 09:58:18 -0700 (PDT) From: Maxim Cournoyer Date: Wed, 15 May 2024 12:57:19 -0400 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: <7cf609dcf83c85b6897c9fb9af46ce8a854a15c8.1715791830.git.maxim.cournoyer@gmail.com> References: <7cf609dcf83c85b6897c9fb9af46ce8a854a15c8.1715791830.git.maxim.cournoyer@gmail.com> MIME-Version: 1.0 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/linux.scm (make-linux-libre*) [phases] {set-environment}: Set KBUILD_BUILD_VERSION to 1. Change-Id: I6c2e561605a13c757a4eb4d1c59343ba26464067 --- gnu/packages/linux.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 5119e7f575..5386a263cd 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -996,6 +996,7 @@ (define* (make-linux-libre* version gnu-revision source supported-systems (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH")) ;; Other variables useful for reproducibility. + (setenv "KBUILD_BUILD_VERSION" "1") (setenv "KBUILD_BUILD_USER" "guix") (setenv "KBUILD_BUILD_HOST" "guix") From patchwork Wed May 15 16:57:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 64468 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 B3B1F27BBE9; Wed, 15 May 2024 18:01:28 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6F44527BBE2 for ; Wed, 15 May 2024 18:01:26 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7HzH-0001tn-4k; Wed, 15 May 2024 13:00:19 -0400 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 1s7Hz5-0001p8-QN for guix-patches@gnu.org; Wed, 15 May 2024 13:00:09 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7Hz3-0007GG-Vf for guix-patches@gnu.org; Wed, 15 May 2024 13:00:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s7Hz4-0007CL-8v; Wed, 15 May 2024 13:00:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70962] [PATCH 10/14] gnu: make-linux-libre*: Run install targets in parallel. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: leo@famulari.name, me@tobias.gr, w@wmeyer.eu, guix-patches@gnu.org Resent-Date: Wed, 15 May 2024 17:00:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70962 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70962@debbugs.gnu.org Cc: Maxim Cournoyer , Leo Famulari , Tobias Geerinckx-Rice , Wilko Meyer X-Debbugs-Original-Xcc: Leo Famulari , Tobias Geerinckx-Rice , Wilko Meyer Received: via spool by 70962-submit@debbugs.gnu.org id=B70962.171579237127514 (code B ref 70962); Wed, 15 May 2024 17:00:06 +0000 Received: (at 70962) by debbugs.gnu.org; 15 May 2024 16:59:31 +0000 Received: from localhost ([127.0.0.1]:43171 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7HyU-00079d-SA for submit@debbugs.gnu.org; Wed, 15 May 2024 12:59:31 -0400 Received: from mail-yb1-f172.google.com ([209.85.219.172]:50652) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7HyR-00078f-MK for 70962@debbugs.gnu.org; Wed, 15 May 2024 12:59:28 -0400 Received: by mail-yb1-f172.google.com with SMTP id 3f1490d57ef6-dbed0710c74so6118196276.1 for <70962@debbugs.gnu.org>; Wed, 15 May 2024 09:59:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715792300; x=1716397100; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3qLIJiKjlqDr6/0rhoK1uneVr/IFtt8EnXKUNj+2b/Q=; b=JlI3i5Jq+prP4TYeBbwegOfFzBIIRHo1Kdk0KN9aL2DbQ76EV+TAaBOzoeiHdBYCfk uzwEs+/Y6VXsC4ljxI73OmgFhW0xzbx+Tz3X+C52FgwLj7hxlWEI4+WrN8OkfTHAjZYU cAV73f+wkDPwgmBIOmMah/4S5vJnV1M/zWoBNjrvmt61UviZWEFYG18KHmVfaTi1oVp8 wWcscZ8xx6Qy0MR594RXTynUI7FBpn5nEPjH7HhExgIcokRjxy68Et3RnQTTcJblyhD7 R/OGWZhsOGncWQ4aVc3vM6w2YI3P3cec2e0zXP/eR4U661Tk1exUgvuui9HSQbV8/AOd 1tKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715792300; x=1716397100; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3qLIJiKjlqDr6/0rhoK1uneVr/IFtt8EnXKUNj+2b/Q=; b=haKJx3KVkoyD/7W7JvyKkoDmGeT7puq5wQ7csLa9vBWKo5Gip+hGfnuddFr0Zr/hQ3 8LGhhQn2JiXfuST+lIs8KmCLM34SvFsRq/+RKgKG5ij6x9qkJbWZimGVPH0rsegPuPR6 KVdNdK37GsS3dHue5yVgoRLX4u2twu2b2+XtSwYtEZMp/GTqc48tKuCLhBNC6nWBMxy3 pw4N5Ey9NTZVbcOiXekPB4uAQK1+YHbWem+wqyNq7Qr1LtfmkVO/OGg0c0WyfsvD+sjF pZRjaFPpY/ThQJO80EuXkNAi76aCFqcxgo0Nphchg9GQ/ToAQoQRfnmQoL9OtfihED9O rm/A== X-Gm-Message-State: AOJu0YwwK1LgV8bweBpyDO8l0ZAJxjz1d9jqQ6m9JPzJ2j6iQnTRdbn2 HAJ7sy9UpSwd77T3iyjW5ACjeabbI6DP3gNuLBQBdohHER9VtHo7s4bJ/w== X-Google-Smtp-Source: AGHT+IGrMwWwh+OKnrxYFTaGNIlMrjHN5mHy4EqvK6yj3ke+PfJLbpdZSyPNWMvIPiBkonLEwo5vpA== X-Received: by 2002:a25:8102:0:b0:dc2:41de:b744 with SMTP id 3f1490d57ef6-dee4f338307mr14184974276.32.1715792299928; Wed, 15 May 2024 09:58:19 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-107.b2b2c.ca. [205.233.125.107]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6a15f194871sm66068896d6.59.2024.05.15.09.58.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 09:58:19 -0700 (PDT) From: Maxim Cournoyer Date: Wed, 15 May 2024 12:57:20 -0400 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: <7cf609dcf83c85b6897c9fb9af46ce8a854a15c8.1715791830.git.maxim.cournoyer@gmail.com> References: <7cf609dcf83c85b6897c9fb9af46ce8a854a15c8.1715791830.git.maxim.cournoyer@gmail.com> MIME-Version: 1.0 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches This reduces the total build time by about 20%. * gnu/packages/linux.scm (make-linux-libre*) [phases] {install}: Ensure that -jN is used for the install targets. Also honor make flags. Change-Id: Ib3f4fdcbdeab736315a91eafa8d6d1dff5b89884 --- gnu/packages/linux.scm | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 5386a263cd..4547ab525f 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -1049,9 +1049,15 @@ (define* (make-linux-libre* version gnu-revision source supported-systems (close-port port)) (invoke "make" "oldconfig")))) (replace 'install - (lambda _ + (lambda* (#:key make-flags parallel-build? #:allow-other-keys) (let ((moddir (string-append #$output "/lib/modules")) - (dtbdir (string-append #$output "/lib/dtbs"))) + (dtbdir (string-append #$output "/lib/dtbs")) + (make-flags + (append make-flags + (list "-j" + (if parallel-build? + (number->string (parallel-job-count)) + "1"))))) ;; Install kernel image, kernel configuration and link map. (for-each (lambda (file) (install-file file #$output)) (find-files "." "^(\\.config|bzImage|zImage|Image\ @@ -1059,22 +1065,23 @@ (define* (make-linux-libre* version gnu-revision source supported-systems ;; Install device tree files (unless (null? (find-files "." "\\.dtb$")) (mkdir-p dtbdir) - (invoke "make" (string-append "INSTALL_DTBS_PATH=" dtbdir) - "dtbs_install")) + (apply invoke "make" + (string-append "INSTALL_DTBS_PATH=" dtbdir) + "dtbs_install" make-flags)) ;; Install kernel modules (mkdir-p moddir) - (invoke "make" - ;; Disable depmod because the Guix system's module - ;; directory is an union of potentially multiple - ;; packages. It is not possible to use depmod to - ;; usefully calculate a dependency graph while - ;; building only one of them. - "DEPMOD=true" - (string-append "MODULE_DIR=" moddir) - (string-append "INSTALL_PATH=" #$output) - (string-append "INSTALL_MOD_PATH=" #$output) - "INSTALL_MOD_STRIP=1" - "modules_install") + (apply invoke "make" + ;; Disable depmod because the Guix system's module + ;; directory is an union of potentially multiple + ;; packages. It is not possible to use depmod to + ;; usefully calculate a dependency graph while building + ;; only one of them. + "DEPMOD=true" + (string-append "MODULE_DIR=" moddir) + (string-append "INSTALL_PATH=" #$output) + (string-append "INSTALL_MOD_PATH=" #$output) + "INSTALL_MOD_STRIP=1" + "modules_install" make-flags) (let* ((versions (filter (lambda (name) (not (string-prefix? "." name))) (scandir moddir))) @@ -1096,7 +1103,7 @@ (define* (make-linux-libre* version gnu-revision source supported-systems elfutils ;needed to enable CONFIG_STACK_VALIDATION flex bison - util-linux ;needed for hexdump + util-linux ;needed for hexdump ;; These are needed to compile the GCC plugins. gmp mpfr From patchwork Wed May 15 16:57:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 64462 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 A556127BBEE; Wed, 15 May 2024 18:00:52 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 3488127BBE9 for ; Wed, 15 May 2024 18:00:51 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7HzH-0001ud-U5; Wed, 15 May 2024 13:00:19 -0400 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 1s7HzB-0001rG-Qu for guix-patches@gnu.org; Wed, 15 May 2024 13:00:13 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7HzB-0007I3-Ch; Wed, 15 May 2024 13:00:13 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s7Hz4-0007CY-Mu; Wed, 15 May 2024 13:00:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70962] [PATCH 11/14] gnu: linux: Turn %default-extra-linux-options into a procedure. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: pelzflorian@pelzflorian.de, leo@famulari.name, ludo@gnu.org, matt@excalamus.com, me@tobias.gr, w@wmeyer.eu, guix-patches@gnu.org Resent-Date: Wed, 15 May 2024 17:00:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70962 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70962@debbugs.gnu.org Cc: Maxim Cournoyer , Florian Pelz , Leo Famulari , Ludovic =?utf-8?q?Court=C3=A8s?= , Matthew Trzcinski , Tobias Geerinckx-Rice , Wilko Meyer X-Debbugs-Original-Xcc: Florian Pelz , Leo Famulari , Ludovic =?utf-8?q?Court=C3=A8s?= , Matthew Trzcinski , Tobias Geerinckx-Rice , Wilko Meyer Received: via spool by 70962-submit@debbugs.gnu.org id=B70962.171579237227521 (code B ref 70962); Wed, 15 May 2024 17:00:06 +0000 Received: (at 70962) by debbugs.gnu.org; 15 May 2024 16:59:32 +0000 Received: from localhost ([127.0.0.1]:43173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7HyV-00079l-AX for submit@debbugs.gnu.org; Wed, 15 May 2024 12:59:32 -0400 Received: from mail-qv1-f49.google.com ([209.85.219.49]:45285) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7HyS-00078l-Sk for 70962@debbugs.gnu.org; Wed, 15 May 2024 12:59:29 -0400 Received: by mail-qv1-f49.google.com with SMTP id 6a1803df08f44-69b5a87505cso35186676d6.2 for <70962@debbugs.gnu.org>; Wed, 15 May 2024 09:59:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715792301; x=1716397101; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=O2Oyd1fKKlGac2Pyz/JWy50X2x2lIjqEtnTZf9A+DSo=; b=mki3HVO/5vZQG3szEr2R9sgbouLDeQ0sAhgbTUfliwz2Dx1wTRFfIYt5Yx2FKt9iNr 5Ak+2ZT6cKsk5Vm7/Zan/naDMGqxZdQ7o0pcJLVREengzsNvlD74AdCPdyaRBUn621EV jqq+HJWSIHqFett29Kx0VJqBxzgaM0z6w/5ezm2fnW45Bw0BhxLCl/pIshUqCC+jPBs4 87tN6M5Ach8SFD4ATjBarOafj6vSjqkBZ8bj6n+LOSxUqke3msWXK8wpspY8EMIjwBIX P6WRMye/CdTXXKJfXGyw+0aOrvJsmk4XP8G70/h4hV2Pcv34RXrr1pPrxAQVs7q7Qszu JoMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715792301; x=1716397101; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=O2Oyd1fKKlGac2Pyz/JWy50X2x2lIjqEtnTZf9A+DSo=; b=Cv3onfBcioE1PXDGnL148ZeK4qAi/0ZygGVgNG6YcTDMDCfX0nmp0tg3+qqBVE4ku0 liU4oR601pu0qWKn7Rg/RPC01eYQqK3kJ4jC1h1no+JupYiqkx2recIoOjKe/5Qfezyb QEu0oX3GDKU57I7R8F6+2l7X/gpXqEr30uH5bVkh6FqNN+/yNifFNVdK4Y8DTmlFb1pd a9KQkQ6CboqjCVlKxNPo1mAG4FMOFGVaFV43FbA7HTQDPT1gIVLwOQ+DEMe4YSP7HVOx Wx2g7abTqOZ4neioeAaJcC+bKUzdMraFrw39TZVCBdpOEeDiqZewa/zayLSAstgDAqtG YjWQ== X-Gm-Message-State: AOJu0Yzan5ehRroKvAAXkXKT2jrNflYLTC0pWEW8EFbCG19GTdRMaXgD W3fVQ6+lawI656/LsuvfQwagUyqKuRsxKKukZwj1h5/io3y7I3aq2ZpcvA== X-Google-Smtp-Source: AGHT+IEuVLOVuELNjV6OjerEHjcmJHP8/PzwP5GvWpWABt5N0lJdf5Q7Y8BK9dERE1GAOsi8vhsLpw== X-Received: by 2002:a05:6214:5884:b0:6a0:c950:451f with SMTP id 6a1803df08f44-6a16824d066mr224928306d6.56.1715792301215; Wed, 15 May 2024 09:58:21 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-107.b2b2c.ca. [205.233.125.107]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6a15f194871sm66068896d6.59.2024.05.15.09.58.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 09:58:20 -0700 (PDT) From: Maxim Cournoyer Date: Wed, 15 May 2024 12:57:21 -0400 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: <7cf609dcf83c85b6897c9fb9af46ce8a854a15c8.1715791830.git.maxim.cournoyer@gmail.com> References: <7cf609dcf83c85b6897c9fb9af46ce8a854a15c8.1715791830.git.maxim.cournoyer@gmail.com> MIME-Version: 1.0 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches This is to allow version-specific options to the list of defaults. * gnu/packages/linux.scm (%default-extra-linux-options): Transform to... (default-extra-linux-options): ... this procedure, which accepts a 'version' argument. (make-linux-libre, linux-libre-arm-generic, linux-libre-arm-generic-5.10) (linux-libre-arm-generic-5.4, linux-libre-arm64-generic) (linux-libre-arm64-generic-5.10, linux-libre-arm64-generic-5.4) (linux-libre-riscv64-generic, linux-libre-mips64el-fuloong2e) (linux-libre-with-bpf): Adjust accordingly. * doc/guix-cookbook.texi (Customizing the Kernel): Adjust accordingly. Change-Id: Ifd3be8b7ed8699bada224a938dbc84205366ff3d --- doc/guix-cookbook.texi | 17 +++++++++-------- gnu/packages/linux.scm | 24 ++++++++++++------------ 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/doc/guix-cookbook.texi b/doc/guix-cookbook.texi index 3bc63cba7a..6f23fe53ec 100644 --- a/doc/guix-cookbook.texi +++ b/doc/guix-cookbook.texi @@ -1681,7 +1681,7 @@ Customizing the Kernel ;; See kernel-config for an example. (configuration-file #f) (defconfig "defconfig") - (extra-options %default-extra-linux-options)) + (extra-options (default-extra-linux-options version))) ...) @end lisp @@ -1748,7 +1748,7 @@ Customizing the Kernel it: @lisp -(define %default-extra-linux-options +(define (default-extra-linux-options version) `(;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html ("CONFIG_DEVPTS_MULTIPLE_INSTANCES" . #true) ;; Modules required for initrd: @@ -1798,7 +1798,7 @@ Customizing the Kernel %file-systems %efi-support %emulation - (@@@@ (gnu packages linux) %default-extra-linux-options))) + ((@@@@ (gnu packages linux) default-extra-linux-options) version))) (define-public linux-libre-macbook41 ;; XXX: Access the internal 'make-linux-libre*' procedure, which is @@ -1812,11 +1812,12 @@ Customizing the Kernel #:extra-options %macbook41-config-options)) @end lisp -In the above example @code{%file-systems} is a collection of flags enabling -different file system support, @code{%efi-support} enables EFI support and -@code{%emulation} enables a x86_64-linux machine to act in 32-bit mode also. -@code{%default-extra-linux-options} are the ones quoted above, which had to be -added in since they were replaced in the @code{extra-options} keyword. +In the above example @code{%file-systems} is a collection of flags +enabling different file system support, @code{%efi-support} enables EFI +support and @code{%emulation} enables a x86_64-linux machine to act in +32-bit mode also. The @code{default-extra-linux-options} procedure is +the one defined above, which had to be used to avoid loosing the default +configuration options of the @code{extra-options} keyword. This all sounds like it should be doable, but how does one even know which modules are required for a particular system? Two places that can be helpful diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 4547ab525f..eaa9f66d74 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -825,7 +825,7 @@ (define* (kernel-config arch #:key variant) (config (search-auxiliary-file file))) (and config (local-file config)))) -(define %default-extra-linux-options +(define (default-extra-linux-options version) `(;; Make the kernel config available at /proc/config.gz ("CONFIG_IKCONFIG" . #t) ("CONFIG_IKCONFIG_PROC" . #t) @@ -938,7 +938,7 @@ (define* (make-linux-libre version gnu-revision hash-string supported-systems ;; for an example. (configuration-file #f) (defconfig "defconfig") - (extra-options %default-extra-linux-options) + (extra-options (default-extra-linux-options version)) (patches `(,%boot-logo-patch ,@(if (apply-infodoc-patch? version) @@ -964,7 +964,7 @@ (define* (make-linux-libre* version gnu-revision source supported-systems ;; See kernel-config for an example. (configuration-file #f) (defconfig "defconfig") - (extra-options %default-extra-linux-options)) + (extra-options (default-extra-linux-options version))) (package (name (if extra-version (string-append "linux-libre-" extra-version) @@ -1208,7 +1208,7 @@ (define-public linux-libre-arm-generic (append `(;; needed to fix the RTC on rockchip platforms ("CONFIG_RTC_DRV_RK808" . #t)) - %default-extra-linux-options))) + (default-extra-linux-options linux-libre-version)))) (define-public linux-libre-arm-generic-5.10 (make-linux-libre* linux-libre-5.10-version @@ -1221,7 +1221,7 @@ (define-public linux-libre-arm-generic-5.10 (append `(;; needed to fix the RTC on rockchip platforms ("CONFIG_RTC_DRV_RK808" . #t)) - %default-extra-linux-options))) + (default-extra-linux-options linux-libre-5.10-version)))) (define-public linux-libre-arm-generic-5.4 (make-linux-libre* linux-libre-5.4-version @@ -1234,7 +1234,7 @@ (define-public linux-libre-arm-generic-5.4 (append `(;; needed to fix the RTC on rockchip platforms ("CONFIG_RTC_DRV_RK808" . #t)) - %default-extra-linux-options))) + (default-extra-linux-options linux-libre-5.4-version)))) (define-public linux-libre-arm-generic-4.19 (make-linux-libre* linux-libre-4.19-version @@ -1286,7 +1286,7 @@ (define-public linux-libre-arm64-generic ("CONFIG_BATTERY_CW2015" . m) ("CONFIG_CHARGER_GPIO" . m) ("CONFIG_SND_SOC_ES8316" . m)) - %default-extra-linux-options))) + (default-extra-linux-options linux-libre-version)))) (define-public linux-libre-arm64-generic-5.10 (make-linux-libre* linux-libre-5.10-version @@ -1312,7 +1312,7 @@ (define-public linux-libre-arm64-generic-5.10 ("CONFIG_BATTERY_CW2015" . m) ("CONFIG_CHARGER_GPIO" . m) ("CONFIG_SND_SOC_ES8316" . m)) - %default-extra-linux-options))) + (default-extra-linux-options linux-libre-5.10-version)))) (define-public linux-libre-arm64-generic-5.4 (make-linux-libre* linux-libre-5.4-version @@ -1325,7 +1325,7 @@ (define-public linux-libre-arm64-generic-5.4 (append `(;; needed to fix the RTC on rockchip platforms ("CONFIG_RTC_DRV_RK808" . #t)) - %default-extra-linux-options))) + (default-extra-linux-options linux-libre-5.4-version)))) (define-public linux-libre-riscv64-generic (make-linux-libre* linux-libre-version @@ -1349,7 +1349,7 @@ (define-public linux-libre-riscv64-generic ("CONFIG_HW_RANDOM_VIRTIO" . m) ("CONFIG_VIRTIO_CONSOLE" . m) ("CONFIG_CRYPTO_XTS" . m)) - %default-extra-linux-options))) + (default-extra-linux-options linux-libre-version)))) (define-public linux-libre-mips64el-fuloong2e (make-linux-libre* linux-libre-version @@ -1361,7 +1361,7 @@ (define-public linux-libre-mips64el-fuloong2e #:extra-options (append `(("CONFIG_OVERLAY_FS" . m)) - %default-extra-linux-options))) + (default-extra-linux-options linux-libre-version)))) (define-public linux-libre-with-bpf (let ((base-linux-libre @@ -1375,7 +1375,7 @@ (define-public linux-libre-with-bpf #:configuration-file kernel-config #:extra-options (append %bpf-extra-linux-options - %default-extra-linux-options)))) + (default-extra-linux-options linux-libre-6.8-version))))) (package (inherit base-linux-libre) (inputs (modify-inputs (package-inputs base-linux-libre) From patchwork Wed May 15 16:57:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 64459 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 A158C27BBE9; Wed, 15 May 2024 18:00:26 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9C54227BBE2 for ; Wed, 15 May 2024 18:00:24 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7HzE-0001s1-VO; Wed, 15 May 2024 13:00:18 -0400 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 1s7Hz7-0001pK-Is for guix-patches@gnu.org; Wed, 15 May 2024 13:00:09 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7Hz5-0007Gf-Jq for guix-patches@gnu.org; Wed, 15 May 2024 13:00:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s7Hz5-0007Cf-4L; Wed, 15 May 2024 13:00:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70962] [PATCH 12/14] gnu: linux-libre: Enable BTF debug info. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: leo@famulari.name, me@tobias.gr, w@wmeyer.eu, guix-patches@gnu.org Resent-Date: Wed, 15 May 2024 17:00:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70962 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70962@debbugs.gnu.org Cc: Maxim Cournoyer , Leo Famulari , Tobias Geerinckx-Rice , Wilko Meyer X-Debbugs-Original-Xcc: Leo Famulari , Tobias Geerinckx-Rice , Wilko Meyer Received: via spool by 70962-submit@debbugs.gnu.org id=B70962.171579237927544 (code B ref 70962); Wed, 15 May 2024 17:00:07 +0000 Received: (at 70962) by debbugs.gnu.org; 15 May 2024 16:59:39 +0000 Received: from localhost ([127.0.0.1]:43178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7Hyd-0007AB-6y for submit@debbugs.gnu.org; Wed, 15 May 2024 12:59:39 -0400 Received: from mail-ua1-f45.google.com ([209.85.222.45]:53381) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7HyV-000795-Kj for 70962@debbugs.gnu.org; Wed, 15 May 2024 12:59:32 -0400 Received: by mail-ua1-f45.google.com with SMTP id a1e0cc1a2514c-7f17efe79a1so2212500241.2 for <70962@debbugs.gnu.org>; Wed, 15 May 2024 09:59:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715792304; x=1716397104; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=05/FBm9bMsf9bppIqYiu0ZRssu5Jk9Xad7GcSNVkx4Q=; b=hAsDT8wv10x6rtYdIZZC7U9W2US6D9WpH1RUFzbrXA69v9WlOUJVCmbQXAUs5Kl1QK IyZ8krKfl8adfZh5ABMl5B08Db60rDiPj36tluxbrlJEG8dWNZrMweM/jLxsqJXWCrXT Genj6sNKMgPyDw06fgt2+oybddE+c7+PIRxIVYmVoo8kOn6KPA5ACD5yoJXnxssQkrjV dCWNp9fz2G5G+RZa0vY75HjnzTAx4JTjwmEIIkmlHAO+DEb2YvUWgRNR2aaKbVQICrKX RCv96cKg6XwJ6G0cZFOvn/SvImNWDfvL6n2nCm8Q1IkXjRAtSVEY6Y6ZdWZJzWlh+eQg cOVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715792304; x=1716397104; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=05/FBm9bMsf9bppIqYiu0ZRssu5Jk9Xad7GcSNVkx4Q=; b=n7ZNjaxR0PQHwPBoYp7aKph8bHe0Zyd0X3dp8di0YxDWnaEXVobIgGSLwJEguHNZ3j NsDJtY34/m3f1t4LQV0zoWNtKJEKePPF+IroqleHSuokhR5q01NDdez9CJ028KdNVX+I ksw8PDr0z4kZoQo69DhPzdaIedg3rmsl4o0ptmGPLu17yCm3ulMxMRmgcH+FrXsDN3TC B18VfVkK7mxoeXDldNd+TRRDNeqYbZAi8RHmcS/03S9v9WVjeyvROWR/RgUrZHeWVSYV ELl8IyL9XKIkc19j88F12jJYOZzavIc+6BCxGeBSx6mb/QIm1OaAvFWjphNrfCBtSkew DqVw== X-Gm-Message-State: AOJu0Yy8etDMfrNwtFst0JAqR8coR0Wmwt/LdgSp0hp53hCwSbDKhZZc jcXhSw9y8WQpS6UR0YNvoipxSNgG0YTiG2hA8l+yefzAnFKnLwkQacdkkA== X-Google-Smtp-Source: AGHT+IFRzmbPa4ykPNIaRgua/vsZF2/HMVK9Ou4gFINM9lTujh8nPI+QtCjBBHTi2yTvzS9tDexPeQ== X-Received: by 2002:a05:6102:3e8e:b0:47e:f54c:4ba6 with SMTP id ada2fe7eead31-48077e7b77dmr17535151137.27.1715792302574; Wed, 15 May 2024 09:58:22 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-107.b2b2c.ca. [205.233.125.107]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6a15f194871sm66068896d6.59.2024.05.15.09.58.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 09:58:22 -0700 (PDT) From: Maxim Cournoyer Date: Wed, 15 May 2024 12:57:22 -0400 Message-ID: <0ef662fff82aa5034e95f41ff413c06355a0fd70.1715791830.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <7cf609dcf83c85b6897c9fb9af46ce8a854a15c8.1715791830.git.maxim.cournoyer@gmail.com> References: <7cf609dcf83c85b6897c9fb9af46ce8a854a15c8.1715791830.git.maxim.cournoyer@gmail.com> MIME-Version: 1.0 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches This is needed for software making use of eBPF programs, such as the sysdig utility, among others. For more information about BPF, see: . * gnu/packages/linux.scm (%default-extra-linux-options): Enable CONFIG_DEBUG_INFO, CONFIG_DEBUG_INFO_BTF, CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT, CONFIG_BPF_JIT, CONFIG_BPF_JIT_ALWAYS_ON, CONFIG_BPF_SYSCALL and BPF_UNPRIV_DEFAULT_OFF. Disable CONFIG_DEBUG_INFO_REDUCED. (make-linux-libre*) [native-inputs]: Add dwarves, python-wrapper and zlib. Change-Id: Idfc64f82aa404e86168bffcf721a325f9e807f75 --- gnu/packages/linux.scm | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index eaa9f66d74..d2b9344296 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -829,6 +829,24 @@ (define (default-extra-linux-options version) `(;; Make the kernel config available at /proc/config.gz ("CONFIG_IKCONFIG" . #t) ("CONFIG_IKCONFIG_PROC" . #t) + ;; Debugging options. + ("CONFIG_DEBUG_INFO" . #t) ;required by BTF + ,@(if (version>=? version "5.1") + '(("CONFIG_DEBUG_INFO_BTF" . #t)) + '()) + ,@(if (version>=? version "5.12") + '(("CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT" . #t)) + '()) + ("CONFIG_DEBUG_INFO_REDUCED" . #f) ;incompatible with BTF + ;; Tracing and related options. + ,@(if (version>=? version "5.1") + '(("CONFIG_BPF_JIT" . #t) + ("CONFIG_BPF_JIT_ALWAYS_ON" . #t) + ("CONFIG_BPF_SYSCALL" . #t)) + '()) + ,@(if (version>=? version "5.13") + '(("BPF_UNPRIV_DEFAULT_OFF" . #t)) + '()) ;; Some very mild hardening. ("CONFIG_SECURITY_DMESG_RESTRICT" . #t) ;; All kernels should have NAMESPACES options enabled @@ -1107,7 +1125,12 @@ (define* (make-linux-libre* version gnu-revision source supported-systems ;; These are needed to compile the GCC plugins. gmp mpfr - mpc)) + mpc + ;; These are needed when building with the CONFIG_DEBUG_INFO_BTF + ;; support. + dwarves ;for pahole + python-wrapper + zlib)) (home-page "https://www.gnu.org/software/linux-libre/") (synopsis "100% free redistribution of a cleaned Linux kernel") (description "GNU Linux-Libre is a free (as in freedom) variant of the From patchwork Wed May 15 16:57:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 64464 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 0933E27BBE9; Wed, 15 May 2024 18:00:56 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 345E827BBE2 for ; Wed, 15 May 2024 18:00:51 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7HzJ-0001wM-Vl; Wed, 15 May 2024 13:00:22 -0400 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 1s7Hz7-0001q3-Uc for guix-patches@gnu.org; Wed, 15 May 2024 13:00:11 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7Hz7-0007HC-9G; Wed, 15 May 2024 13:00:09 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s7Hz5-0007Co-HP; Wed, 15 May 2024 13:00:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70962] [PATCH 13/14] gnu: linux-libre: Enable Zstd compression of kernel modules. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, leo@famulari.name, ludo@gnu.org, othacehe@gnu.org, rekado@elephly.net, zimon.toutoune@gmail.com, me@tobias.gr, w@wmeyer.eu, guix-patches@gnu.org Resent-Date: Wed, 15 May 2024 17:00:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70962 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70962@debbugs.gnu.org Cc: Maxim Cournoyer , Christopher Baines , Josselin Poiret , Leo Famulari , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice , Wilko Meyer X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Leo Famulari , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice , Wilko Meyer Received: via spool by 70962-submit@debbugs.gnu.org id=B70962.171579238027552 (code B ref 70962); Wed, 15 May 2024 17:00:07 +0000 Received: (at 70962) by debbugs.gnu.org; 15 May 2024 16:59:40 +0000 Received: from localhost ([127.0.0.1]:43180 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7Hyd-0007AD-M2 for submit@debbugs.gnu.org; Wed, 15 May 2024 12:59:40 -0400 Received: from mail-qv1-f54.google.com ([209.85.219.54]:60620) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7HyV-000796-T4 for 70962@debbugs.gnu.org; Wed, 15 May 2024 12:59:33 -0400 Received: by mail-qv1-f54.google.com with SMTP id 6a1803df08f44-69b514d3cf4so78263916d6.0 for <70962@debbugs.gnu.org>; Wed, 15 May 2024 09:59:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715792304; x=1716397104; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=m6cZWtRaw3GPkSQvTE2sZ5G6Gf8d/R777VYqoD9YE/I=; b=Ff/YCx211Dhs7MXY9d+0WlzeR55a7LoMZO10dCEmSj/98bq5MFuss24uVgK5fHljp0 +fVVRP3R+Y7qY1TMYOW479h/8IyxA+l+qVEzV2xJ71p11XLI8IZuAX/iMMXXe2Wgoded 500TouyCTcTci6qeJuo2iLD5LZNpnpTCZ0NQoidVeUV9RN6/olsBq63QZJG29Le9bwXP ZzmRWavf0oJ2KFif1jrhmxtxcWqmG1n24WWaEHkP/5tVz6kw3w1FpcaYQtHpLxCCwkHT /jveAarZGnskjbauYzyxnrZFSiKpzB3q5tNTLkdPHZ3cOdLgdcohIA0314b9PWDFl3cV WvGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715792304; x=1716397104; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=m6cZWtRaw3GPkSQvTE2sZ5G6Gf8d/R777VYqoD9YE/I=; b=IC0EVX4LJgGklI5hZa68ps10C8SDIyxg5k1FfC61n7Mbp0GBpDtD+h03mnz5i0IB4L h8r/IatIsqTDf8Aiz55JAZ/Dq3asPApjV7eOTjD704z8aF++NCznfx+/Tbdz2qBurmmn E3UFtCQ9Ov6ec81lcNJGegI5BphXa0ADHqW+hWAiVOqo9fJWv0BF64wQXwYU5OAGeriS yH948yK1am0FHhc0Ctw2Xw0qxf0ggizjMPUvvXdNX8C3VHD8dSH8uOiPlCc6dHd7HDR5 x9PfwInr3qDVT42oyujqpk/25YPvnrBYHR9Xp9lQJZ9sYFfbbjCABa5Afg1GI7x+Difi ToZw== X-Gm-Message-State: AOJu0Yw8nCvjy8Mmy+Gsxn6oiA2ZDViuN40Pme4HjlvRm5MOh5iOMmLa G/3qARVpq+DHWD9md0BEnlvco4oLrJ5io1p8dt4OqVm0ceps+T1TDukXbA== X-Google-Smtp-Source: AGHT+IH+DH8E49i1wIGYdafVhYC8osRpMAS8j/qDjY84IZ/Kxrokvtq/KoPi+BsLu0tIQQHjx61p/A== X-Received: by 2002:a05:6214:33c1:b0:6a0:54da:b7ca with SMTP id 6a1803df08f44-6a1681956e7mr189988566d6.36.1715792303978; Wed, 15 May 2024 09:58:23 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-107.b2b2c.ca. [205.233.125.107]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6a15f194871sm66068896d6.59.2024.05.15.09.58.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 09:58:23 -0700 (PDT) From: Maxim Cournoyer Date: Wed, 15 May 2024 12:57:23 -0400 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: <7cf609dcf83c85b6897c9fb9af46ce8a854a15c8.1715791830.git.maxim.cournoyer@gmail.com> References: <7cf609dcf83c85b6897c9fb9af46ce8a854a15c8.1715791830.git.maxim.cournoyer@gmail.com> MIME-Version: 1.0 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches This brings the on disk size of the kernel from 164 MiB to 144 MiB, or about 12%. * gnu/packages/linux.scm (default-extra-linux-options) [version>=5.13]: Enable CONFIG_MODULE_COMPRESS_ZSTD, else CONFIG_MODULE_COMPRESS_GZIP. (make-linux-libre*) [phases] {set-environment}: Set ZSTD_CLEVEL environment variable to 19. [native-inputs]: Add zstd. * gnu/build/linux-modules.scm (module-regex): Add .zst to regexp. Update doc. (modinfo-section-contents): Extend support to Zstd compressed module. (dot-ko): Register the 'zstd compression type. (ensure-dot-ko, file-name->module-name, load-linux-module*) (module-name->file-name/guess, write-module-name-database) (write-module-alias-database, write-module-device-database): Update doc. (module-name-lookup): Also consider zstd-compressed modules. * gnu/installer.scm (installer-program): Add guile-zstd extension to gexp. * gnu/system/linux-initrd.scm (flat-linux-module-directory): Likewise. Decompress zstd-compressed modules for use in initrd. * guix/profiles.scm (linux-module-database): Add guile-zstd extension to gexp. Change-Id: Ide899dc5c58ea5033583b1a91a92c025fc8d901a --- gnu/build/linux-modules.scm | 62 +++++++++++++++++++++---------------- gnu/installer.scm | 1 + gnu/packages/linux.scm | 13 ++++++-- gnu/system/linux-initrd.scm | 6 ++-- guix/profiles.scm | 7 +++-- 5 files changed, 57 insertions(+), 32 deletions(-) diff --git a/gnu/build/linux-modules.scm b/gnu/build/linux-modules.scm index 68c32ff873..32baf6c525 100644 --- a/gnu/build/linux-modules.scm +++ b/gnu/build/linux-modules.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2017 Mathieu Othacehe ;;; Copyright © 2018 Danny Milosavljevic ;;; Copyright © 2023 Tobias Geerinckx-Rice +;;; Copyright © 2024 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -26,6 +27,7 @@ (define-module (gnu build linux-modules) #:use-module ((guix build utils) #:select (find-files invoke)) #:use-module (guix build union) #:autoload (zlib) (call-with-gzip-input-port) + #:autoload (zstd) (call-with-zstd-input-port) #:use-module (rnrs io ports) #:use-module (rnrs bytevectors) #:use-module (srfi srfi-1) @@ -108,24 +110,29 @@ (define (key=value->pair str) (cons (string->symbol (string-take str =)) (string-drop str (+ 1 =))))) -;; Matches kernel modules, without compression, with GZIP compression or with -;; XZ compression. -(define module-regex "\\.ko(\\.gz|\\.xz)?$") +;; Matches kernel modules, without compression, with GZIP, XZ or ZSTD +;; compression. +(define module-regex "\\.ko(\\.gz|\\.xz|\\.zst)?$") (define (modinfo-section-contents file) "Return the contents of the '.modinfo' section of FILE as a list of key/value pairs.." + (define (decompress-file decompressor file) + (let ((port (open-file file "r0"))) + (dynamic-wind + (lambda () + #t) + (lambda () + (decompressor port get-bytevector-all)) + (lambda () + (close-port port))))) + (define (get-bytevector file) (cond ((string-suffix? ".ko.gz" file) - (let ((port (open-file file "r0"))) - (dynamic-wind - (lambda () - #t) - (lambda () - (call-with-gzip-input-port port get-bytevector-all)) - (lambda () - (close-port port))))) + (decompress-file call-with-gzip-input-port file)) + ((string-suffix? ".ko.zst" file) + (decompress-file call-with-zstd-input-port file)) (else (call-with-input-file file get-bytevector-all)))) @@ -213,11 +220,12 @@ (define* (dot-ko name #:optional compression) (let ((suffix (match compression ('xz ".ko.xz") ('gzip ".ko.gz") + ('zstd ".ko.zst") (else ".ko")))) (string-append name suffix))) (define (ensure-dot-ko name compression) - "Return NAME with a '.ko[.gz|.xz]' suffix appended, unless it already has + "Return NAME with a '.ko[.gz|.xz|.zst]' suffix appended, unless it already has it." (if (string-contains name ".ko") name @@ -235,7 +243,7 @@ (define (normalize-module-name module) (define (file-name->module-name file) "Return the module name corresponding to FILE, stripping the trailing -'.ko[.gz|.xz]' and normalizing it." +'.ko[.gz|.xz|.zst]' and normalizing it." (normalize-module-name (strip-extension (basename file)))) (define (find-module-file directory module) @@ -333,11 +341,11 @@ (define* (load-linux-module* file (recursive? #t) (lookup-module dot-ko) (black-list (module-black-list))) - "Load Linux module from FILE, the name of a '.ko[.gz|.xz]' file; return true -on success, false otherwise. When RECURSIVE? is true, load its dependencies -first (à la 'modprobe'.) The actual files containing modules depended on are -obtained by calling LOOKUP-MODULE with the module name. Modules whose name -appears in BLACK-LIST are not loaded." + "Load Linux module from FILE, the name of a '.ko[.gz|.xz|.zst]' file; return +true on success, false otherwise. When RECURSIVE? is true, load its +dependencies first (à la 'modprobe'.) The actual files containing modules +depended on are obtained by calling LOOKUP-MODULE with the module name. +Modules whose name appears in BLACK-LIST are not loaded." (define (black-listed? module) (let ((result (member module black-list))) (when result @@ -695,7 +703,7 @@ (define* (module-name->file-name/guess directory name "Guess the file name corresponding to NAME, a module name. That doesn't always work because sometimes underscores in NAME map to hyphens (e.g., \"input-leds.ko\"), sometimes not (e.g., \"mac_hid.ko\"). If the module is -compressed then COMPRESSED can be set to 'xz or 'gzip, depending on the +compressed then COMPRESSED can be set to 'zstd, 'xz or 'gzip, depending on the compression type." (string-append directory "/" (ensure-dot-ko name compression))) @@ -706,6 +714,8 @@ (define (module-name-lookup directory) (define (guess-file-name name) (let ((names (list (module-name->file-name/guess directory name) + (module-name->file-name/guess directory name + #:compression 'zstd) (module-name->file-name/guess directory name #:compression 'xz) (module-name->file-name/guess directory name @@ -729,8 +739,8 @@ (define (module-name-lookup directory) (define (write-module-name-database directory) "Write a database that maps \"module names\" as they appear in the relevant -ELF section of '.ko[.gz|.xz]' files, to actual file names. This format is -Guix-specific. It aims to deal with inconsistent naming, in particular +ELF section of '.ko[.gz|.xz|.zst]' files, to actual file names. This format +is Guix-specific. It aims to deal with inconsistent naming, in particular hyphens vs. underscores." (define mapping (map (lambda (file) @@ -749,8 +759,8 @@ (define (write-module-name-database directory) (pretty-print mapping port)))) (define (write-module-alias-database directory) - "Traverse the '.ko[.gz|.xz]' files in DIRECTORY and create the corresponding -'modules.alias' file." + "Traverse the '.ko[.gz|.xz|.zst]' files in DIRECTORY and create the +corresponding 'modules.alias' file." (define aliases (map (lambda (file) (cons (file-name->module-name file) (module-aliases file))) @@ -796,9 +806,9 @@ (define %not-dash (char-set-complement (char-set #\-))) (define (write-module-device-database directory) - "Traverse the '.ko[.gz|.xz]' files in DIRECTORY and create the corresponding -'modules.devname' file. This file contains information about modules that can -be loaded on-demand, such as file system modules." + "Traverse the '.ko[.gz|.xz|.zst]' files in DIRECTORY and create the +corresponding 'modules.devname' file. This file contains information about +modules that can be loaded on-demand, such as file system modules." (define aliases (filter-map (lambda (file) (match (aliases->device-tuple (module-aliases file)) diff --git a/gnu/installer.scm b/gnu/installer.scm index 3b06b4f01b..3792fc7e35 100644 --- a/gnu/installer.scm +++ b/gnu/installer.scm @@ -386,6 +386,7 @@ (define (installer-program) guile-json-3 guile-git guile-webutils guile-gnutls guile-zlib ;for (gnu build linux-modules) + guile-zstd ;for (gnu build linux-modules) (current-guix)) (with-imported-modules `(,@(source-module-closure `(,@modules diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index d2b9344296..7147a6b41a 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -847,6 +847,10 @@ (define (default-extra-linux-options version) ,@(if (version>=? version "5.13") '(("BPF_UNPRIV_DEFAULT_OFF" . #t)) '()) + ;; Compress kernel modules via Zstd. + ,(if (version>=? version "5.13") + '("CONFIG_MODULE_COMPRESS_ZSTD" . #t) + '("CONFIG_MODULE_COMPRESS_GZIP" . #t)) ;; Some very mild hardening. ("CONFIG_SECURITY_DMESG_RESTRICT" . #t) ;; All kernels should have NAMESPACES options enabled @@ -1036,7 +1040,10 @@ (define* (make-linux-libre* version gnu-revision source supported-systems "EXTRAVERSION ?=")) (setenv "EXTRAVERSION" #$(and extra-version - (string-append "-" extra-version))))) + (string-append "-" extra-version))) + ;; Use the maximum compression available for Zstd-compressed + ;; modules. + (setenv "ZSTD_CLEVEL" "19"))) (replace 'configure (lambda _ (let ((config @@ -1130,7 +1137,9 @@ (define* (make-linux-libre* version gnu-revision source supported-systems ;; support. dwarves ;for pahole python-wrapper - zlib)) + zlib + ;; For Zstd compression of kernel modules. + zstd)) (home-page "https://www.gnu.org/software/linux-libre/") (synopsis "100% free redistribution of a cleaned Linux kernel") (description "GNU Linux-Libre is a free (as in freedom) variant of the diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm index d448c78918..f902637e48 100644 --- a/gnu/system/linux-initrd.scm +++ b/gnu/system/linux-initrd.scm @@ -128,7 +128,7 @@ (define (flat-linux-module-directory linux modules) (define build-exp (with-imported-modules imported-modules - (with-extensions (list guile-zlib) + (with-extensions (list guile-zlib guile-zstd) #~(begin (use-modules (gnu build linux-modules) (guix build utils) @@ -168,7 +168,9 @@ (define (flat-linux-module-directory linux modules) ;; is already gzipped as a whole. (cond ((string-contains file ".ko.gz") - (invoke #+(file-append gzip "/bin/gunzip") file)))) + (invoke #+(file-append gzip "/bin/gunzip") file)) + ((string-contains file ".ko.zst") + (invoke #+(file-append zstd "/bin/zstd") "-d" file)))) (mkdir #$output) (for-each (lambda (module) diff --git a/guix/profiles.scm b/guix/profiles.scm index d41802422b..864ed02b6d 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -7,7 +7,7 @@ ;;; Copyright © 2016, 2017, 2018, 2019, 2021, 2022 Ricardo Wurmus ;;; Copyright © 2016 Chris Marusich ;;; Copyright © 2017 Huang Ying -;;; Copyright © 2017, 2021 Maxim Cournoyer +;;; Copyright © 2017, 2021, 2024 Maxim Cournoyer ;;; Copyright © 2019 Kyle Meyer ;;; Copyright © 2019 Mathieu Othacehe ;;; Copyright © 2020 Danny Milosavljevic @@ -1487,11 +1487,14 @@ (define* (linux-module-database manifest #:optional system) (define guile-zlib (module-ref (resolve-interface '(gnu packages guile)) 'guile-zlib)) + (define guile-zstd + (module-ref (resolve-interface '(gnu packages guile)) 'guile-zstd)) + (define build (with-imported-modules (source-module-closure '((guix build utils) (gnu build linux-modules))) - (with-extensions (list guile-zlib) + (with-extensions (list guile-zlib guile-zstd) #~(begin (use-modules (ice-9 ftw) (ice-9 match) From patchwork Wed May 15 16:57:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 64465 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 412B927BBE9; Wed, 15 May 2024 18:01:07 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id CBE1927BBEA for ; Wed, 15 May 2024 18:01:05 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7HzH-0001to-4L; Wed, 15 May 2024 13:00:19 -0400 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 1s7Hz5-0001pB-RY for guix-patches@gnu.org; Wed, 15 May 2024 13:00:09 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7Hz5-0007GO-Dd for guix-patches@gnu.org; Wed, 15 May 2024 13:00:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s7Hz5-0007Cy-Tr; Wed, 15 May 2024 13:00:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70962] [PATCH 14/14] gnu: linux-libre-with-bpf: Deprecate in favor of linux-libre. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: leo@famulari.name, me@tobias.gr, w@wmeyer.eu, guix-patches@gnu.org Resent-Date: Wed, 15 May 2024 17:00:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70962 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70962@debbugs.gnu.org Cc: Maxim Cournoyer , Leo Famulari , Tobias Geerinckx-Rice , Wilko Meyer X-Debbugs-Original-Xcc: Leo Famulari , Tobias Geerinckx-Rice , Wilko Meyer Received: via spool by 70962-submit@debbugs.gnu.org id=B70962.171579238127560 (code B ref 70962); Wed, 15 May 2024 17:00:07 +0000 Received: (at 70962) by debbugs.gnu.org; 15 May 2024 16:59:41 +0000 Received: from localhost ([127.0.0.1]:43182 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7Hye-0007AL-L2 for submit@debbugs.gnu.org; Wed, 15 May 2024 12:59:41 -0400 Received: from mail-yb1-f172.google.com ([209.85.219.172]:48326) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7HyW-00079I-US for 70962@debbugs.gnu.org; Wed, 15 May 2024 12:59:33 -0400 Received: by mail-yb1-f172.google.com with SMTP id 3f1490d57ef6-dee9943a293so3282009276.0 for <70962@debbugs.gnu.org>; Wed, 15 May 2024 09:59:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715792305; x=1716397105; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cJ7qdwMYvo8B580eFh3gMGb0hMbjBsQmFxXAwFf70Mo=; b=Diip9jsNbQz7fWpkjhHApXgSi8owKQk68As/Oj6f/3w2mSRRWD4PrZNg4NK3LTUl5K D8dLdmi16BamuRUuxeOCvJGbigvAgneFn8keiH+Qc92xb3Lr5hwRwLS1T/9QwnmYbeZm vsEoLwaR5RCABN4yu6HQA6rrwPkkrIIN+OlUuObh7bMFSAcrrUM/Z1J/PtX5ioG4jOWt 4nCIka3xk0bUv0Glj1Hca9MGB0NApJpXpNUW58ZKEYk1AiXkzu8gjELvDy1IVJJDoFKO rkJlxP135R3IPIULGkhGQwIAYd7b4RGSH5+dx9OAPm4VmeLHvSe1nO7zFW0+qwsLCdzt cU/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715792305; x=1716397105; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cJ7qdwMYvo8B580eFh3gMGb0hMbjBsQmFxXAwFf70Mo=; b=xTJfIm1kxmAK2zmOdq3BxrnPONZcJuCx6oT2WHd38YNVgYI/xzEct2mAaFKinT6Zwg n+BJs7Iawvu688skqyw4nWfHaTovY0m7jmK0RkyR0gRA/MNiuQlZC64ts0KiPkq3A2He vXw8lbqXFBF8BEaOffEMlzAUlHlGkelF0kuXE1UyFsBjM0wzRHWdZI9NSjBmh5yseiJk CZTBygrkkHrImMtR1AEmRTK1qkn/5trTbr5Z5GHT/w7TSyLxMfzsyecFNiLThSBcFDlI 10dvjgQnP5qg/VWujm39e6U/887cov+IT8fa2Ar26zjbc8uglhgv/zGwjb2P0/zeYoN/ IPAw== X-Gm-Message-State: AOJu0Yym6sJNbHiRKDSR416/J7r1esSTNZVV/ROuSgwH9VCTTpEF4BSr AfWmxvVetQVrNSH/YWqbegreiRxpTC0LF+VkGjPKwLxAF/YZ+Dskuuqhdg== X-Google-Smtp-Source: AGHT+IHkg7HVmLR4GLCzvyAOD5pA+3k0OqtCcmTJOimk4ZB2mZLfHasnsC0NZFn/NZFU8jvNMDz+2Q== X-Received: by 2002:a25:cd44:0:b0:de6:437:2df5 with SMTP id 3f1490d57ef6-dee4f1b0e6bmr13473684276.26.1715792305279; Wed, 15 May 2024 09:58:25 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-107.b2b2c.ca. [205.233.125.107]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6a15f194871sm66068896d6.59.2024.05.15.09.58.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 09:58:24 -0700 (PDT) From: Maxim Cournoyer Date: Wed, 15 May 2024 12:57:24 -0400 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: <7cf609dcf83c85b6897c9fb9af46ce8a854a15c8.1715791830.git.maxim.cournoyer@gmail.com> References: <7cf609dcf83c85b6897c9fb9af46ce8a854a15c8.1715791830.git.maxim.cournoyer@gmail.com> MIME-Version: 1.0 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches The kernel has progressively enabled the BPF settings, to the point where having a separate kernel for it makes little sense, so repatriate the few non-default BPF-related configs to our main kernel. * gnu/packages/linux.scm (%bpf-extra-linux-options): Delete variable. (default-extra-linux-options): Enable CONFIG_NET_CLS_BPF and CONFIG_NET_ACT_BPF. CONFIG_IKHEADERS is dropped as it adds 4 MiB to the kernel image and appears somewhat redundant with BTF debug info. (linux-libre-with-bpf): Deprecate to linux-libre. Change-Id: Id672241916dcbcdca7cbc16d869d00223446cd3d --- gnu/packages/linux.scm | 46 +++--------------------------------------- 1 file changed, 3 insertions(+), 43 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 7147a6b41a..96921805db 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -847,6 +847,8 @@ (define (default-extra-linux-options version) ,@(if (version>=? version "5.13") '(("BPF_UNPRIV_DEFAULT_OFF" . #t)) '()) + ("CONFIG_NET_CLS_BPF" . m) ;classify packets based on BPF filters + ("CONFIG_NET_ACT_BPF" . m) ;to execute BPF code on packets ;; Compress kernel modules via Zstd. ,(if (version>=? version "5.13") '("CONFIG_MODULE_COMPRESS_ZSTD" . #t) @@ -903,30 +905,6 @@ (define (default-extra-linux-options version) ("CONFIG_CIFS" . m) ("CONFIG_9P_FS" . m))) -;; See https://github.com/iovisor/bcc/blob/master/INSTALL.md#kernel-configuration -(define %bpf-extra-linux-options - `(;; Needed for probes - ("CONFIG_UPROBE_EVENTS" . #t) - ("CONFIG_KPROBE_EVENTS" . #t) - ;; kheaders module also helpful for tracing - ("CONFIG_IKHEADERS" . #t) - ("CONFIG_BPF" . #t) - ("CONFIG_BPF_SYSCALL" . #t) - ("CONFIG_BPF_JIT_ALWAYS_ON" . #t) - ;; optional, for tc filters - ("CONFIG_NET_CLS_BPF" . m) - ;; optional, for tc actions - ("CONFIG_NET_ACT_BPF" . m) - ("CONFIG_BPF_JIT" . #t) - ;; for Linux kernel versions 4.1 through 4.6 - ;; ("CONFIG_HAVE_BPF_JIT" . y) - ;; for Linux kernel versions 4.7 and later - ("CONFIG_HAVE_EBPF_JIT" . #t) - ;; optional, for kprobes - ("CONFIG_BPF_EVENTS" . #t) - ;; kheaders module - ("CONFIG_IKHEADERS" . #t))) - (define (config->string options) (string-join (map (match-lambda ((option . 'm) @@ -1396,25 +1374,7 @@ (define-public linux-libre-mips64el-fuloong2e (default-extra-linux-options linux-libre-version)))) (define-public linux-libre-with-bpf - (let ((base-linux-libre - (make-linux-libre* - linux-libre-6.8-version - linux-libre-6.8-gnu-revision - linux-libre-6.8-source - '("x86_64-linux" "i686-linux" "armhf-linux" - "aarch64-linux" "powerpc64le-linux" "riscv64-linux") - #:extra-version "bpf" - #:configuration-file kernel-config - #:extra-options - (append %bpf-extra-linux-options - (default-extra-linux-options linux-libre-6.8-version))))) - (package - (inherit base-linux-libre) - (inputs (modify-inputs (package-inputs base-linux-libre) - (prepend cpio))) - (synopsis "Linux-libre with BPF support") - (description "This package provides GNU Linux-Libre with support -for @acronym{BPF, the Berkeley Packet Filter}.")))) + (deprecated-package "linux-libre-with-bpf" linux-libre)) ;;;