From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id 8HYaGqV9KmYiZgAA62LTzQ:P1 (envelope-from ) for ; Thu, 25 Apr 2024 17:58:29 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 8HYaGqV9KmYiZgAA62LTzQ (envelope-from ) for ; Thu, 25 Apr 2024 17:58:29 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=GlcRH99e; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1714060709; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=nlbj8Ge6bkCLfPtYGl2p+4nEOq41iOUyfqgRdNqij3g=; b=dND2aFEeBIntR7NbZVr8izez2pEaBTTL40jRR+40msX7QHY0N/UWFchKDi65vIB3ABXhmw AClhfkXMbBbHUq3vxOGsO+YTHAOLz1vhHOcb5pb/cBHoLM6gJS+NPR+LKk0I5GzTm1hvCM CVRStXF+gvBQeX4Yhq41gOTZzt92ZKvWQTJHqngqU1gccpoMnmehtjhFFcp7V8StlYY6OY J7lh61EyYjBm1Ha1J8zmMmbsHYi8MmDP0cF7swOrgk4ePQgR9p7U6kWamVYwIFFfaM3w0g AWJtFtwYoSoZwDny8amTkCbNi6B5zEtTqpsg8SI6RYMmEDYP7I+X/HcSqheayQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=GlcRH99e; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1714060709; a=rsa-sha256; cv=none; b=YGadILevdr+MbTB4+bjLacRfTgzzjBDsW5gQefcPGDYAZwYzLT+Pg+ZNyy45CK5PyGVVgU fLtto+2rEvuWxmKzra90UtabKqhHx9N/UZBdHVQa68w8GeK55psfJWUwSS+g69uKxAz4xi 8G/yObFZGPGtJK2wUXcoHVKJAFiaJFucHG2dnYvxQ9BJrA5mEGwZf9Pfl9YnyAWoq4RncZ BZa1HhF7PrzTyxJDR1UsQ4OttOOA2U5KcJcGT0R1k6AvSMV7dTf3mYyFpCnTyImfYXW9uA 5L3ygfUteDE18BmRNTHKbrhc7xD5J1sAL0+YS6PJ0cc7gvrwZ0WWoNZ5mspJ6Q== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1325572AF4 for ; Thu, 25 Apr 2024 17:58:29 +0200 (CEST) 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 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -3.29 X-Migadu-Scanner: mx11.migadu.com X-Spam-Score: -3.29 X-Migadu-Queue-Id: 1325572AF4 X-TUID: tYE3zh8JJqN1 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 -- 2.41.0