From patchwork Thu Feb 22 16:10:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 60895 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 0BA1E27BBE9; Thu, 22 Feb 2024 16:18:09 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,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 15BD427BBE2 for ; Thu, 22 Feb 2024 16:18:08 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdBkt-0003gT-IS; Thu, 22 Feb 2024 11:17:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rdBka-0003PP-Hb for guix-patches@gnu.org; Thu, 22 Feb 2024 11:16:45 -0500 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 1rdBka-0004bR-52; Thu, 22 Feb 2024 11:16:44 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rdBkw-0003UI-F8; Thu, 22 Feb 2024 11:17:06 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68813] [core-updates PATCH 08/20] gnu: pkg-config: Alias to pkgconf-as-pkg-config. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: efraim@flashner.co.il, ekaitz@elenq.tech, ludo@gnu.org, guix-patches@gnu.org Resent-Date: Thu, 22 Feb 2024 16:17:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68813 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68813@debbugs.gnu.org Cc: Maxim Cournoyer , Efraim Flashner , Ekaitz Zarraga , Ludovic =?utf-8?q?Court=C3=A8s?= X-Debbugs-Original-Xcc: Efraim Flashner , Ekaitz Zarraga , Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 68813-submit@debbugs.gnu.org id=B68813.170861858513148 (code B ref 68813); Thu, 22 Feb 2024 16:17:06 +0000 Received: (at 68813) by debbugs.gnu.org; 22 Feb 2024 16:16:25 +0000 Received: from localhost ([127.0.0.1]:38591 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdBkG-0003Pk-H6 for submit@debbugs.gnu.org; Thu, 22 Feb 2024 11:16:25 -0500 Received: from mail-qv1-f44.google.com ([209.85.219.44]:46363) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdBk6-0003O1-9r for 68813@debbugs.gnu.org; Thu, 22 Feb 2024 11:16:15 -0500 Received: by mail-qv1-f44.google.com with SMTP id 6a1803df08f44-68f41af71ebso56523856d6.1 for <68813@debbugs.gnu.org>; Thu, 22 Feb 2024 08:15:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708618485; x=1709223285; 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=wSVKz+rOx4S221MCHjST7bemk95nh9/2CnHpLd1O/9k=; b=XRn1Gtm4HT2F0ZZkNGiZ5jBJ5FzLP7zReeU61aPzIKLfwme3Z4EzcOxcvYQlrJHcxX vUXLuf7/RCYC3AvzK1pKT9FeuKnWKDMXTH+J/ua4eCfhIJFQXy/QLxE/AWM6k5flXtqa fAvxLnb+C3VPDHLUBUIGeU5CXjv+SxQjaxwZrES6DE9qqfcOxidvozCBVlpaUTIy+oqc dsSZRiIWRxHS+/4bB3qb8WptPKwhB8+dIwy0+l9sg37h/yTH0kN4/NDHa5yY0GAveVxy 8Dc6rtFGlleTvEzd+BYMzPGJoXMCgcuOfP+KufUcsvXokShq9Ai+mVauW7SpefgsVC12 k25g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708618485; x=1709223285; 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=wSVKz+rOx4S221MCHjST7bemk95nh9/2CnHpLd1O/9k=; b=O4q7HxlOwNGV92570/+zYW4T0rc9DonKY/CzZS+4++DHLiVenAltw0KEXcWu46LFu7 ag+AYNMF7Ng+RSpvdM+is6OfmmGcrOLFFjWZA+fAZpMlLk0Q6Z/M/gi22VFhqFeN47kr 0n/MbnPSoP9/dIsKpoBa7uGskU2WoVNPyLSi8WCoNdtN6ciQGhWz6DgM2SX4MCqGfoJy WhlZ7jHE3T3D9zLeirHIQYLFLhFNhH5zmaXyGkTrV/OWALtbrOkbSeuqcot9N4hbpdj1 0mB4BnvSyKovR4LkH5joh5HZWs6dFGLyj+8Fo32EU+S5qC57VGwIpfk5TXmcp6LN6DvP vv+A== X-Gm-Message-State: AOJu0Yzd3yWobd000VxRaE3XTz9s6Z9CoE5eawsrOZmtjPJfwPd5nBUq kOyZS1Pz+J48p5LPATM8EK7P1D6GM80/SWsQR9+bbCqI2BhF9CDY8XIdasxD X-Google-Smtp-Source: AGHT+IFwMCEChw5f6y3uDXBDrTWGuxeussDaWgZA8fScYg92neeA4LwNyseXe4XFbCGBRIfaHGWGbg== X-Received: by 2002:a05:6214:626:b0:68f:52ee:f350 with SMTP id a6-20020a056214062600b0068f52eef350mr15858494qvx.13.1708618485584; Thu, 22 Feb 2024 08:14:45 -0800 (PST) Received: from localhost.localdomain (dsl-155-144.b2b2c.ca. [66.158.155.144]) by smtp.gmail.com with ESMTPSA id od5-20020a0562142f0500b0068fa74cfa79sm2078437qvb.117.2024.02.22.08.14.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 08:14:45 -0800 (PST) From: Maxim Cournoyer Date: Thu, 22 Feb 2024 11:10:07 -0500 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: 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 switches the default pkg-config implementation used in Guix to pkgconf. * gnu/packages/pkg-config.scm (pkg-config): Define as pkgconf-as-pkg-config. (%pkgconf-with-tests): Renamed from %pkgconf. (%pkgconf): New minimal variant to avoid circular dependencies for bootstrap sensitive packages. (%pkgconf-as-pkg-config): Delete now inherited hidden property. * gnu/packages/commencement.scm (make-gnu-make-final): Replace %pkg-config with %pkgconf-as-pkg-config. Change-Id: Id2b9f40f8f09babae9c6dfc47d1de071ce78e011 --- gnu/packages/commencement.scm | 13 ++++++------- gnu/packages/pkg-config.scm | 25 +++++++++++++++++++++---- 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 3e5e21ca03..e9474a797e 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -3346,13 +3346,13 @@ (define with-boot5 with-boot4) (define (make-gnu-make-final) "Compute the final GNU Make, which uses the final Guile." + ;; Avoid a circular dependency by creating a new bootstrap pkg-config + ;; variant. (let ((pkg-config (package - (inherit %pkg-config) ;the native pkg-config - (inputs `(("guile" ,guile-final) - ,@(%boot5-inputs))) - (arguments - `(#:implicit-inputs? #f - ,@(package-arguments %pkg-config)))))) + ;; Refer to %pkgconf-as-pkg-config instead of + ;; pkgconf-as-pkg-config to ensure native package is + ;; used. + (inherit (with-boot5 %pkgconf-as-pkg-config))))) (package (inherit (package-with-bootstrap-guile gnu-make)) (inputs `(("guile" ,guile-final) @@ -3362,7 +3362,6 @@ (define (make-gnu-make-final) `(#:implicit-inputs? #f ,@(package-arguments gnu-make)))))) - (define coreutils-final ;; The final Coreutils. Treat them specially because some packages, such as ;; Findutils, keep a reference to the Coreutils they were built with. diff --git a/gnu/packages/pkg-config.scm b/gnu/packages/pkg-config.scm index e8d63be3d7..934449aad2 100644 --- a/gnu/packages/pkg-config.scm +++ b/gnu/packages/pkg-config.scm @@ -31,7 +31,9 @@ (define-module (gnu packages pkg-config) #:use-module (gnu packages bash) #:use-module (gnu packages check) #:use-module (guix memoization) - #:export (pkg-config + #:use-module (srfi srfi-1) + #:export (old-pkg-config ;the original + pkg-config ;alias for pkgconf-as-pkg-config pkgconf pkgconf-as-pkg-config)) @@ -89,7 +91,9 @@ (define-public %pkg-config it can be used for defining the location of documentation tools, for instance."))) -(define-public %pkgconf +;;; This is the package exposed to the CLI, to ease updates via 'guix +;;; refresh'. +(define-public %pkgconf-with-tests (package (name "pkgconf") (version "2.1.0") @@ -119,6 +123,13 @@ (define-public %pkgconf pkgconf.") (license isc))) +;;; This is the minimal, untested variant used to avoid circular dependencies. +(define-public %pkgconf + (hidden-package + (package/inherit %pkgconf-with-tests + (arguments (list #:tests? #f)) + (native-inputs '())))) + (define-public %pkgconf-as-pkg-config (package/inherit %pkgconf (name "pkgconf-as-pkg-config") @@ -145,7 +156,8 @@ (define-public %pkgconf-as-pkg-config (string-append #$output "/share/aclocal")))))))) (native-inputs '()) (inputs (list %pkgconf)) - (propagated-inputs '()))) + (propagated-inputs '()) + (properties (alist-delete 'hidden? (package-properties %pkgconf))))) ;;; @@ -220,7 +232,7 @@ (define pkgconf-as-pkg-config-for-target ;; These are a hacks for automatically choosing the native or the cross ;; `pkg-config' depending on whether it's being used in a cross-build ;; environment or not. -(define-syntax pkg-config +(define-syntax old-pkg-config (identifier-syntax (pkg-config-for-target (%current-target-system)))) (define-syntax pkgconf @@ -230,6 +242,11 @@ (define-syntax pkgconf-as-pkg-config (identifier-syntax (pkgconf-as-pkg-config-for-target (%current-target-system)))) +;;; This alias is to ensure we use pkgconf instead of pkg-config across Guix, +;;; which includes welcome refinements such as proper handling of the +;;; Requires.private field. +(define pkg-config pkgconf-as-pkg-config) + ;;; ;;; pkg-config packages for native use (build-time only).