From patchwork Thu Apr 25 15:54:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 63363 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 46F4227BBE2; Thu, 25 Apr 2024 16:58:58 +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 8866D27BBEA for ; Thu, 25 Apr 2024 16:58:56 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s01UE-0000rz-BT; Thu, 25 Apr 2024 11:58: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 1s01UC-0000qw-1A for guix-patches@gnu.org; Thu, 25 Apr 2024 11:58:12 -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 1s01UB-00035O-OP for guix-patches@gnu.org; Thu, 25 Apr 2024 11:58:11 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s01UT-00077k-BD for guix-patches@gnu.org; Thu, 25 Apr 2024 11:58:29 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70569] [PATCH 1/3] gnu: nss-3.98: Streamline source origin via inheritance. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 25 Apr 2024 15:58:28 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70569 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70569@debbugs.gnu.org Cc: john.kehayias@protonmail.com, Maxim Cournoyer Received: via spool by 70569-submit@debbugs.gnu.org id=B70569.171406063726622 (code B ref 70569); Thu, 25 Apr 2024 15:58:28 +0000 Received: (at 70569) by debbugs.gnu.org; 25 Apr 2024 15:57:17 +0000 Received: from localhost ([127.0.0.1]:33123 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s01TF-0006uX-2U for submit@debbugs.gnu.org; Thu, 25 Apr 2024 11:57:16 -0400 Received: from mail-qk1-x72e.google.com ([2607:f8b0:4864:20::72e]:49590) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s01SD-0006i8-Vr for 70569@debbugs.gnu.org; Thu, 25 Apr 2024 11:56:16 -0400 Received: by mail-qk1-x72e.google.com with SMTP id af79cd13be357-78d62c1e82bso85764985a.3 for <70569@debbugs.gnu.org>; Thu, 25 Apr 2024 08:55:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714060546; x=1714665346; 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=7ta2m/htvrUXYalG3Oepb/ow1SMJl1vkqu0wbtI7SNA=; b=aMbcBUG7jNm3GnNqPMKm9BWOxo/SJ5CxV0nahB6iZ1PZx6PGmAFEXsdKX8+kYSSfet VYbhr9tfKBBr0FG8ksSnl0HutGeAy6k6kRm7aAXLqNbJNYDbGGsjNhsdywJL2ro7LRC8 +QKTq6FpUGKB22y2XeAHVEdBHDC+JVR29/Jd9VIVmAm4IRgRgVtKPYoC2T2s4ZQa8j/U ohzNDh9SoElXSqXC50MDLZ8p4mHld+wONQRB479S9mSBqPXQzxZ8Vqr8ifbFqlIcvfjm 6TgS7dJIi1emnPC7Kzd9rhaclX0lJ9BiaZAVnieQO23dETwp8btFP9c3fd2Xv4KoUwP1 HcKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714060546; x=1714665346; 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=7ta2m/htvrUXYalG3Oepb/ow1SMJl1vkqu0wbtI7SNA=; b=MhLmB7j5ZRhIcYLf9dbQ41dIEMzc14dvNLm9n7JoPtuArauUiKWEyXn3Rc+wh+sxAN bFxJVJKbZO+Wb1Iz9pWTjcvDWSQRD+x1nIYFL9yDJ8dH81HGKBVatopwloQMcLULWt7V g9Y0ed8CPGDoWB+UuweE67hRKu0XKHw72Aowk04CDx/V1Nh6KkMi7UDu1AmKPOg5oNrB pO03kmXiF+d2phxZD+jxbDLmIjz1DIUnmEL3iQ5tdjM+4tUl7lQz80su8kbumGG8U/Aa 7aEzIF41l1SSPA4/xQVJO8H4iFyW/EiNQ1FZamST+wYMzeFW/YrlcW2t1A8GcVWmPwKO rHQw== X-Gm-Message-State: AOJu0Yx3A9Kfeo4Y8xIxtezv4pVcGWpokyk2Y2PGhMbshZad0PpwR7nE GBSupwrt5vn4Qs5bMSvJbKFY12/JuDzAth8SxNRPA5iYHb3/TAmOufh16w== X-Google-Smtp-Source: AGHT+IEwpRVO0y30wd1JCiSMnZgy+j0BjS+Cn0DnSxk03/aGnyMJWOYuD57fRlDK3DslJJirgRZE+Q== X-Received: by 2002:a05:620a:8391:b0:790:9711:f06b with SMTP id pb17-20020a05620a839100b007909711f06bmr4367006qkn.34.1714060546339; Thu, 25 Apr 2024 08:55:46 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-124-191.b2b2c.ca. [205.233.124.191]) by smtp.gmail.com with ESMTPSA id xx24-20020a05620a5d9800b0078f1583f724sm6464519qkn.59.2024.04.25.08.55.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 08:55:45 -0700 (PDT) From: Maxim Cournoyer Date: Thu, 25 Apr 2024 11:54:28 -0400 Message-ID: <3418fbe66a1573937f44c1902bba6e9950426886.1714060468.git.maxim.cournoyer@gmail.com> 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 * gnu/packages/nss.scm (nss-3.98): Simplify source via inheritance. Change-Id: I6c1df497a7ff538162afa128eca676997d76e28f --- gnu/packages/nss.scm | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/gnu/packages/nss.scm b/gnu/packages/nss.scm index 00770f11a9..a2843be17a 100644 --- a/gnu/packages/nss.scm +++ b/gnu/packages/nss.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice ;;; Copyright © 2020, 2021 Marius Bakke ;;; Copyright © 2020 Jonathan Brielmaier -;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer +;;; Copyright © 2021, 2022, 2023, 2024 Maxim Cournoyer ;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. @@ -253,7 +253,7 @@ (define-public nss-3.98 (inherit nss) (version "3.98") (source (origin - (method url-fetch) + (inherit (package-source nss)) (uri (let ((version-with-underscores (string-join (string-split version #\.) "_"))) (string-append @@ -262,17 +262,7 @@ (define-public nss-3.98 "nss-" version ".tar.gz"))) (sha256 (base32 - "1kh98amfklrq6915n4mlbrcqghc3srm7rkzs9dkh21jwscrwqjgm")) - ;; Create nss.pc and nss-config. - (patches (search-patches "nss-3.56-pkgconfig.patch" - "nss-getcwd-nonnull.patch" - "nss-increase-test-timeout.patch")) - (modules '((guix build utils))) - (snippet - '(begin - ;; Delete the bundled copy of these libraries. - (delete-file-recursively "nss/lib/zlib") - (delete-file-recursively "nss/lib/sqlite"))))) + "1kh98amfklrq6915n4mlbrcqghc3srm7rkzs9dkh21jwscrwqjgm")))) (arguments (substitute-keyword-arguments (package-arguments nss) ((#:phases phases) From patchwork Thu Apr 25 15:54:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 63362 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 23AD427BBEC; Thu, 25 Apr 2024 16:58:57 +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 21F9A27BBE2 for ; Thu, 25 Apr 2024 16:58:56 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s01UI-0000sx-Ah; Thu, 25 Apr 2024 11:58: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 1s01UF-0000sU-Iu for guix-patches@gnu.org; Thu, 25 Apr 2024 11:58:15 -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 1s01UE-00035Z-V2 for guix-patches@gnu.org; Thu, 25 Apr 2024 11:58:14 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s01UW-00078A-In for guix-patches@gnu.org; Thu, 25 Apr 2024 11:58:32 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70569] [PATCH 2/3] gnu: nss: Graft with version 3.98 [security fixes]. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 25 Apr 2024 15:58:32 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70569 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70569@debbugs.gnu.org Cc: john.kehayias@protonmail.com, Maxim Cournoyer Received: via spool by 70569-submit@debbugs.gnu.org id=B70569.171406065026771 (code B ref 70569); Thu, 25 Apr 2024 15:58:32 +0000 Received: (at 70569) by debbugs.gnu.org; 25 Apr 2024 15:57:30 +0000 Received: from localhost ([127.0.0.1]:33127 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s01TM-0006w6-Lw for submit@debbugs.gnu.org; Thu, 25 Apr 2024 11:57:28 -0400 Received: from mail-qk1-x735.google.com ([2607:f8b0:4864:20::735]:55784) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s01SG-0006ii-LU for 70569@debbugs.gnu.org; Thu, 25 Apr 2024 11:56:24 -0400 Received: by mail-qk1-x735.google.com with SMTP id af79cd13be357-790605809cbso85878085a.3 for <70569@debbugs.gnu.org>; Thu, 25 Apr 2024 08:55:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714060549; x=1714665349; 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=vzIMD86nCHAvpaNMSERVLroZEb9eDbw5S5WjGkM6fNM=; b=aQ65pT8hig15aL7MWn11uvwtfdsleTkzWfRfTaupMZJlBTqVNEGt2M18d0l++k1ZdB FH1/C0breblj3nC7nlOx9aFffuZ1+jMNh70F7JytPsvKBTO2n3tmlZmGT1HRyYKxaoKu 2WeALprhv3PTcvZwRFc0RhlvFY2Yw5gDF/x7vIqeC9yJiPQHl9MO3N0+DDzCPz/O8ZLX NhTpYnn9/WozMa6LMciIMIoW0M4FXuNqUhCUvftkOUY358ioe830xi5lK0o1sumzMerU dEj1LFpoqavalEplpMoqjq58myunn0zIgcI2ucFRRwSS9sB9IZyikZZrD0MIeUqWzJbi s2/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714060549; x=1714665349; 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=vzIMD86nCHAvpaNMSERVLroZEb9eDbw5S5WjGkM6fNM=; b=QUK2Njtb8qi1zH9aXnCvFq5R2XiGlm1o4jnObe2dZmUtFDpBihHpDuYf93JguewWJF vYjAoGOE+VgO2BGl9ejYMRWhij2deACdFbzeu/VDagfxKS49mauqnmZqBUs4+1JGUNyR YPNG3W+yHn6np+qKSzGR7dNY5bFpOlpi5Agw2SWnzIJb1OxunTDbMNf1B+CAuZxYsB95 SSgu4DcQPs+GHvC8GlfuocFZhUOu6L4R4Xp8zux5CM2Mk8MKJAHP7dLK8APBwMoF+O0R GDvw9IOl452vNscQP1xhKHYJZyOWjU9SGVXXUKo+e6JQ8QqoHRx4tVBUs94Si5TpTjF2 K6Uw== X-Gm-Message-State: AOJu0YxyWaKGa7p/qnn9uQTsKnWVZ8bwbe0wC2EjBBwuoXKRndWctZW3 +s31npWZX09e3dlkh/+LigKcwhT+4Ipn6OmS1S+svpDnIRcnj6MDaXTtYg== X-Google-Smtp-Source: AGHT+IFW0nsVuASOka/u8m7yaKqfwFSdgFVkvPieqQnG52vSitK48RaYE43egMXPFA4SXguLnGlINg== X-Received: by 2002:a05:620a:40c3:b0:790:a727:8f60 with SMTP id g3-20020a05620a40c300b00790a7278f60mr559889qko.9.1714060548711; Thu, 25 Apr 2024 08:55:48 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-124-191.b2b2c.ca. [205.233.124.191]) by smtp.gmail.com with ESMTPSA id xx24-20020a05620a5d9800b0078f1583f724sm6464519qkn.59.2024.04.25.08.55.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 08:55:48 -0700 (PDT) From: Maxim Cournoyer Date: Thu, 25 Apr 2024 11:54:29 -0400 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 fixes CVE-2023-5388, CVE-2023-6135 and CVE-2024-0743. * gnu/packages/nss.scm (nss) [replacement]: New field. (nss-3.98): Rename variable to... (nss/fixed): ... this. Make it a hidden package. * gnu/packages/librewolf.scm (librewolf) [inputs]: Replace nss-3.98 with nss/fixed. Change-Id: I8cc667c53a270dfe00738bf731923f1342036624 --- gnu/packages/librewolf.scm | 2 +- gnu/packages/nss.scm | 71 ++++++++++++++++++++------------------ 2 files changed, 38 insertions(+), 35 deletions(-) diff --git a/gnu/packages/librewolf.scm b/gnu/packages/librewolf.scm index 87b76c661f..1717bad0b5 100644 --- a/gnu/packages/librewolf.scm +++ b/gnu/packages/librewolf.scm @@ -581,7 +581,7 @@ (define-public librewolf mesa mit-krb5 nspr - nss-3.98 + nss/fixed pango pciutils pipewire diff --git a/gnu/packages/nss.scm b/gnu/packages/nss.scm index a2843be17a..8f6ed06e63 100644 --- a/gnu/packages/nss.scm +++ b/gnu/packages/nss.scm @@ -110,6 +110,7 @@ (define-public nss ;; version and source to avoid a top-level variable reference & module ;; cycle. (version "3.88.1") + (replacement nss/fixed) (source (origin (method url-fetch) (uri (let ((version-with-underscores @@ -248,38 +249,40 @@ (define-public nss security standards.") (license license:mpl2.0))) -(define-public nss-3.98 - (package - (inherit nss) - (version "3.98") - (source (origin - (inherit (package-source nss)) - (uri (let ((version-with-underscores - (string-join (string-split version #\.) "_"))) - (string-append - "https://ftp.mozilla.org/pub/mozilla.org/security/nss/" - "releases/NSS_" version-with-underscores "_RTM/src/" - "nss-" version ".tar.gz"))) - (sha256 - (base32 - "1kh98amfklrq6915n4mlbrcqghc3srm7rkzs9dkh21jwscrwqjgm")))) - (arguments - (substitute-keyword-arguments (package-arguments nss) - ((#:phases phases) - #~(modify-phases #$phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (if tests? - (begin - ;; Use 127.0.0.1 instead of $HOST.$DOMSUF as HOSTADDR for - ;; testing. The latter requires a working DNS or /etc/hosts. - (setenv "DOMSUF" "localdomain") - (setenv "USE_IP" "TRUE") - (setenv "IP_ADDRESS" "127.0.0.1") +(define-public nss/fixed + (let ((actual-version "3.98")) + (hidden-package + (package + (inherit nss) + (version (string-append actual-version ".0")) ;for grafts requirements + (source (origin + (inherit (package-source nss)) + (uri (let ((version-with-underscores + (string-join (string-split actual-version #\.) "_"))) + (string-append + "https://ftp.mozilla.org/pub/mozilla.org/security/nss/" + "releases/NSS_" version-with-underscores "_RTM/src/" + "nss-" actual-version ".tar.gz"))) + (sha256 + (base32 + "1kh98amfklrq6915n4mlbrcqghc3srm7rkzs9dkh21jwscrwqjgm")))) + (arguments + (substitute-keyword-arguments (package-arguments nss) + ((#:phases phases) + #~(modify-phases #$phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (if tests? + (begin + ;; Use 127.0.0.1 instead of $HOST.$DOMSUF as HOSTADDR for + ;; testing. The latter requires a working DNS or /etc/hosts. + (setenv "DOMSUF" "localdomain") + (setenv "USE_IP" "TRUE") + (setenv "IP_ADDRESS" "127.0.0.1") - ;; The "PayPalEE.cert" certificate expires every six months, - ;; leading to test failures: - ;; . To - ;; work around that, set the time to roughly the release date. - (invoke "faketime" "2024-01-23" "./nss/tests/all.sh")) - (format #t "test suite not run~%")))))))))) + ;; The "PayPalEE.cert" certificate expires every six months, + ;; leading to test failures: + ;; . To + ;; work around that, set the time to roughly the release date. + (invoke "faketime" "2024-01-23" "./nss/tests/all.sh")) + (format #t "test suite not run~%")))))))))))) From patchwork Thu Apr 25 15:54:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 63361 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 BF3FD27BBEA; Thu, 25 Apr 2024 16:58: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 E8CAA27BBE2 for ; Thu, 25 Apr 2024 16:58:28 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s01U9-0000qZ-NS; Thu, 25 Apr 2024 11:58:09 -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 1s01U7-0000pB-Fc for guix-patches@gnu.org; Thu, 25 Apr 2024 11:58:07 -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 1s01U7-00034l-0o for guix-patches@gnu.org; Thu, 25 Apr 2024 11:58:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s01UO-00076t-CP for guix-patches@gnu.org; Thu, 25 Apr 2024 11:58:24 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70569] [PATCH 3/3] system: Warn when multiple nss-certs packages are used. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 25 Apr 2024 15:58:23 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70569 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70569@debbugs.gnu.org Cc: john.kehayias@protonmail.com, Maxim Cournoyer , Ian Eure Received: via spool by 70569-submit@debbugs.gnu.org id=B70569.171406063426570 (code B ref 70569); Thu, 25 Apr 2024 15:58:23 +0000 Received: (at 70569) by debbugs.gnu.org; 25 Apr 2024 15:57:14 +0000 Received: from localhost ([127.0.0.1]:33120 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s01T9-0006ti-U7 for submit@debbugs.gnu.org; Thu, 25 Apr 2024 11:57:12 -0400 Received: from mail-ot1-x336.google.com ([2607:f8b0:4864:20::336]:55706) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s01SI-0006jE-MJ for 70569@debbugs.gnu.org; Thu, 25 Apr 2024 11:56:25 -0400 Received: by mail-ot1-x336.google.com with SMTP id 46e09a7af769-6ea2ac4607aso590841a34.3 for <70569@debbugs.gnu.org>; Thu, 25 Apr 2024 08:55:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714060551; x=1714665351; 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=nlbj8Ge6bkCLfPtYGl2p+4nEOq41iOUyfqgRdNqij3g=; b=GlcRH99eCeRjvW+dudkd5PSJ0mD55XSuMNS8SvFBbuRXSsg+MWmogu/hLV64QeBxK7 zi9aCovgDhJeh+OdxXsSYk2IH6uNbrvzOrIN2fBENxHbHpPjhGRg2VoEv0NVlDBBCAuF qN8ZU+tAeFUuhzEJDd6wPeiWDNSCoIMGsr+5MiTnmXT2WmrBybgoel27f2yXxJ5U+lLd YLPgvS5ukyQxfdJJWFVH+nTICk4pkHclw/epYWfPd3NvkgwOJ88jDOi8c2ANbAt7TtSL hqeYB1TDxCrmHIR8Ib3SK1waiN2D5hWtj6nqFVWiKIxV28FUAPu2N0wPnXE0WfsqU+Bn 8q8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714060551; x=1714665351; 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=nlbj8Ge6bkCLfPtYGl2p+4nEOq41iOUyfqgRdNqij3g=; b=X36o6QS2rhqsy+BjJgT7oGA/lcmhcjnAZK0npsCWv4ua7YnJcaRJKKjeC+LO5wQrqw 5mdDqotfzbfUvr6x1585w62UAeAPIXrr4DQVQpyb3UTJDqHj1bGYM2oFRJ/ZeEmhfD9M 72Uai0Y88G56fEQ+dV5R9nPwzh/wn+u9SpEQGkjRu3bRp8TBjUwegtbwMcFE+SGATjvd xuZYg+QrsvJujZ3SEBnt1qY9/yAZjZDrDwRv9pnV2tWt20VU93pe0Dmr/J/UyldC3Xys pga75yD0omf4RSGYQjE0pxcp1d6mK78zzb3A0ABkFIH+mEJO/lGuH1KQbieyvWAhWUmT 96rA== X-Gm-Message-State: AOJu0Yy14Fa7/NXz6aa9StyU6o1etSMTPQutxVIwKykiokFkCPzOk1LT E6uErpb6yxlkHdqrjUBm9iaNx4wM6I8/Q0ZHLsY62qSIv3XChqFfedOstw== X-Google-Smtp-Source: AGHT+IE2qMTz88n1fhy9rhNEE/QA6i9L6VOjefniNSXga/CaOw6JdGAj4GHlqzjgaGJsW4sVGu6Whg== X-Received: by 2002:a05:6830:44:b0:6eb:7c8a:5e40 with SMTP id d4-20020a056830004400b006eb7c8a5e40mr7490353otp.11.1714060550883; Thu, 25 Apr 2024 08:55:50 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-124-191.b2b2c.ca. [205.233.124.191]) by smtp.gmail.com with ESMTPSA id xx24-20020a05620a5d9800b0078f1583f724sm6464519qkn.59.2024.04.25.08.55.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 08:55:50 -0700 (PDT) From: Maxim Cournoyer Date: Thu, 25 Apr 2024 11:54:30 -0400 Message-ID: <3c869bd9be359f4c524d26789b1260f266a6a949.1714060468.git.maxim.cournoyer@gmail.com> 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 can happen due to users providing 'nss-certs' and adding it to the %base-packages, which now include 'nss-certs'. * gnu/system.scm (operating-system-packages): Warn when multiple nss-certs packages are detected; keep only the latest one. Change-Id: I6104f134ea1cc155ae9e8e0ae70bb5a38fc05800 Reported-by: Ian Eure --- gnu/system.scm | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/gnu/system.scm b/gnu/system.scm index c7f8003ad2..025834328c 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -43,7 +43,8 @@ (define-module (gnu system) #:use-module (guix deprecation) #:use-module (guix derivations) #:use-module (guix profiles) - #:use-module ((guix utils) #:select (substitute-keyword-arguments)) + #:use-module ((guix utils) #:select (substitute-keyword-arguments + version>?)) #:use-module (guix i18n) #:use-module (guix diagnostics) #:use-module (guix ui) @@ -275,7 +276,7 @@ (define-record-type* operating-system (issue operating-system-issue ; string (default %default-issue)) - (packages operating-system-packages ; list of (PACKAGE OUTPUT...) + (packages %operating-system-packages ; list of (PACKAGE OUTPUT...) (default %base-packages)) ; or just PACKAGE (timezone operating-system-timezone @@ -316,6 +317,29 @@ (define-deprecated (operating-system-hosts-file os) hosts-service-type (%operating-system-hosts-file os)) +;;; XXX: Remove after a new release of Guix no longer suggests to install +;;; nss-certs. +(define (operating-system-packages os) + "Return the packages of the OS record object." + ;; This wrapper is used to warn users that their operating system packages + ;; field contains a duplicated nss-certs packages. + (let* ((packages (%operating-system-packages os)) + (nss-certs-packages (sort (filter (lambda (p) + (string=? "nss-certs" (package-name p))) + packages) + (lambda (x y) + ;; Sort from newer to older versions. + (version>? (package-version x) + (package-version y)))))) + (if (> (length nss-certs-packages) 1) + (begin + (warning #f + (G_ "multiple 'nss-certs' packages found; 'nss-certs' \ +is now included by default in '%base-packages'; ensure it is not explicitly \ +listed in the operating system 'packages' field~%")) + (fold delete packages (drop nss-certs-packages 1))) + packages))) + (define* (operating-system-kernel-arguments os root-device #:key (version %boot-parameters-version)) "Return all the kernel arguments, including the ones not specified directly