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 ms13.migadu.com with LMTPS id YBLEDxcg8Wa7AAAA62LTzQ:P1 (envelope-from ) for ; Mon, 23 Sep 2024 08:00:23 +0000 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 YBLEDxcg8Wa7AAAA62LTzQ (envelope-from ) for ; Mon, 23 Sep 2024 10:00:23 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=urdB2F1l; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=IVpP8962; 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"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1727078423; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=cZGfFolfMKyyogZvmytRgnMVvr92sgUDE7C5lXePWd8=; b=fIrVgv0JRGQXO2VbwM2j/dtF10J8wjqTMe9tQUdnSUk9HNNOb5z8OwAsQvKcNV9gagqNQw FBz5ylgW94DorTI7Nirg/SQbaWd9MGv64sqq7DaeOI/NtB/xaPt+dlfycCzYh1wwcCT1AU 4EpOwYRlEzeZFpWb9kIeKaeAsOl3D84wGbx6EHgf9PDqQ4sFWkWIWdUBb+cDRMQ/vwCqV+ Pp+5QfOQzyNdIfhpopMzFmTRgHvcfUFWFltYxzn5afMJ3I2/xsTK35/DbEsbC/mYWRmsSf j4WGqWsvdFk8WaGpNZIFctnHsTpa7FSRCT+UMau0qeoO0P1UTDNpEvK9JpkjOA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=urdB2F1l; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=IVpP8962; 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"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1727078423; a=rsa-sha256; cv=none; b=TLQLCZ0jAZVEgPUUqoKtP/tcjjO5phuMbAidQ7CKqBoKVH3HPuHP+5uvXRQk4IQ3k3ajuK Bh6DoXIAY7JQOAIC3QHDoUg4n6E2Kj+C+z8JHWSynDiCR8dIxqqXV2iM+6Z3ow20woHZbG /WCdT33a8sAoyqdekPMUHcA03TKQlJnHCPKrz3v5r8s8H3tQ2OEe3eaVQcYAh/QOl7B/Fd kPHgnSe3UaXie8TZGe6zuaixeku5EJJBZTOU7ZueLsXqf6Dkcqeb/QgiUkv6jIWSQHfTxC SuzrZZoXiTjgzJU6Wt43/2UQVZ6STqDg1+r6WNsMoaTK/wyHd9pRxnP6iWhdCg== 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 A619B83B23 for ; Mon, 23 Sep 2024 10:00:22 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ssdzH-0004X3-1L; Mon, 23 Sep 2024 04: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 1ssdz7-0004Vp-Ua for guix-patches@gnu.org; Mon, 23 Sep 2024 03:59:55 -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 1ssdz0-00069v-Pk; Mon, 23 Sep 2024 03:59:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=cZGfFolfMKyyogZvmytRgnMVvr92sgUDE7C5lXePWd8=; b=urdB2F1lwdCB1WyXlAb5ezLLpivTIEr/KA7/PQ7nVpSpY2S7Vgxne1ok08L89I9poGtR0JDOY+8oxhXCJ1ii9FCkH2Ut/VLVdQWljWmJ5CNKQ/1Y0Fawmi0Omexq2xNXthKZjnQcq6LO2PMKDrNce4bHr1cjrpvE1C2w2klNyPF2HLHQZfGOeMZOsVWkJq/6t6yp9qMgWt8eLQYKGT4IGfKU/N+EUGSVJYmwUV6rgWI+83tnPTfRU+CmfqSgimrUANDufhYbZV/Q2L5B6xp6kKoJOSw7HnXb5yxX+P+I4K8Xoue1Szsvailb76AjdzP+6g80qXkIfvxIv2kl9WRU/g==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ssdzH-0004Ql-5P; Mon, 23 Sep 2024 04:00:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73434] [PATCH] lint: Check for minimal variants. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Mon, 23 Sep 2024 08:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73434 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73434@debbugs.gnu.org Cc: Efraim Flashner , Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by submit@debbugs.gnu.org id=B.172707834516907 (code B ref -1); Mon, 23 Sep 2024 08:00:03 +0000 Received: (at submit) by debbugs.gnu.org; 23 Sep 2024 07:59:05 +0000 Received: from localhost ([127.0.0.1]:43107 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ssdyL-0004Oc-4S for submit@debbugs.gnu.org; Mon, 23 Sep 2024 03:59:05 -0400 Received: from lists.gnu.org ([209.51.188.17]:45062) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ssdyH-0004OB-4o for submit@debbugs.gnu.org; Mon, 23 Sep 2024 03:59: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 1ssdvn-00008H-Aa for guix-patches@gnu.org; Mon, 23 Sep 2024 03:56:27 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ssdvk-00061T-Cg for guix-patches@gnu.org; Mon, 23 Sep 2024 03:56:26 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-42cb60aff1eso40230495e9.0 for ; Mon, 23 Sep 2024 00:56:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727078181; x=1727682981; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:from:to:cc:subject:date:message-id:reply-to; bh=cZGfFolfMKyyogZvmytRgnMVvr92sgUDE7C5lXePWd8=; b=IVpP8962Jju7ySRRxAbouzeB31mcO/IFDtV5Oc2vCWCxwO2f9W8FKZmcRuaOWxyi54 ZcxlhuQyMJ5iV7d+TOXEUPDx/JQiFpqxcGkG04eDRymvpkXIvT0wFKlzD2d5wDnc7U09 zz6iDpx/HDEEeh80/PVAhSeD3CLxY16cAyoCC62pyCMz1S8qUnbL8e0zdLMROhvotQMH IIa7l3XMGrvK3gaOHq0sqw3RhLcE9BFwE5dQbxDJW6zyw9DMxC7GU/PWRB8SXpVH2EbV Uv/EGObCOAhqIPgXAz4bTcD37kHVMZlAdljNa1GerOzgg/0oWxXJCNxRq/C3ghO3nT58 3ffg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727078181; x=1727682981; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=cZGfFolfMKyyogZvmytRgnMVvr92sgUDE7C5lXePWd8=; b=fXmcC4mSsT0Wh/nU0L59BdIYRHfaxwDrWm0MG/8P7kONJfBiUy41lo5Eg51mBqCPie OmrN7CorfFFigftZHSbvGxwNLAMC18SnEiPL5qCeg//oc3spIKRb6A11t0ftpi+/gHc2 I17mhyrSt3nkKnm4BYQH8tk+OUl/CwdeHKTJonB9Fj1EbnYkHD3hIuU5ONSoSb8elHAz ZT5W/EGyHi7bK7JnZuTaOp4I4eOn9G6a/h3+1TdrhHpW7R+1BdnVSM7YR6CNcruLdsYA HZkFU2+OVLQccqJ+hJiJl7ATW3/VL2snhNLMfUtlsVH/OtMnD0Z4axWujyGkpsDWI16/ tT8g== X-Gm-Message-State: AOJu0Ywxl3yaBhnb23PqigcF9ff6xNs0OAVENcbHqBxTA+4RCN+E234l EhiVQRzUIPLKg1TOVEi9vk5fY9KGTKAIAetyJAVqx5fQ/KRYQ8cCbU5HRkU7 X-Google-Smtp-Source: AGHT+IGYP7YaUjkCQdQ7+EbfbcLsUYAF6p/8Eiv9Iz/YG/EULSZdyznacNVd7DaqspdEaL25SKJIFQ== X-Received: by 2002:a05:600c:3b18:b0:42c:b187:bdeb with SMTP id 5b1f17b1804b1-42e7c1a4676mr68295375e9.29.1727078180712; Mon, 23 Sep 2024 00:56:20 -0700 (PDT) Received: from localhost ([141.226.162.35]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42e754a619dsm121373405e9.30.2024.09.23.00.56.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2024 00:56:20 -0700 (PDT) From: Efraim Flashner Date: Mon, 23 Sep 2024 10:56:01 +0300 Message-ID: X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=efraim.flashner@gmail.com; helo=mail-wm1-x32b.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.201, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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+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-Queue-Id: A619B83B23 X-Migadu-Scanner: mx11.migadu.com X-Spam-Score: -5.96 X-Migadu-Spam-Score: -5.96 X-TUID: iKnNYLiwm0lk * guix/lint.scm (check-inputs-should-use-a-minimal-variant): New procedure. (%local-checkers): Add it. Change-Id: Ifbf808063e4e125c7070505a8a6215128d84b40b --- guix/lint.scm | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/guix/lint.scm b/guix/lint.scm index 7612832a5a6..8c6c20c7237 100644 --- a/guix/lint.scm +++ b/guix/lint.scm @@ -7,7 +7,7 @@ ;;; Copyright © 2016 Hartmut Goebel ;;; Copyright © 2017 Alex Kost ;;; Copyright © 2017, 2021 Tobias Geerinckx-Rice -;;; Copyright © 2017, 2018, 2020 Efraim Flashner +;;; Copyright © 2017, 2018, 2020, 2024 Efraim Flashner ;;; Copyright © 2018, 2019 Arun Isaac ;;; Copyright © 2020 Chris Marusich ;;; Copyright © 2020 Timothy Sample @@ -96,6 +96,7 @@ (define-module (guix lint) #:export (check-description-style check-inputs-should-be-native check-inputs-should-not-be-an-input-at-all + check-inputs-should-use-a-minimal-variant check-input-labels check-wrapper-inputs check-patch-file-names @@ -598,6 +599,21 @@ (define (check-inputs-should-not-be-an-input-at-all package) (package-input-intersection (package-direct-inputs package) input-names)))) +(define (check-inputs-should-use-a-minimal-variant package) + ;; Emit a warning if some inputs of PACKAGE should likely be replaced + ;; with their minimal variant. + (let ((input-names '("bash" + "cmake" + "gettext"))) + (map (lambda (input) + (make-warning + package + (G_ "'~a' should probably switched for its minimal variant") + (list input) + #:field 'inputs)) + (package-input-intersection (package-direct-inputs package) + input-names)))) + (define (check-input-labels package) "Emit a warning for labels that differ from the corresponding package name." (define (check input-kind package-inputs) @@ -1978,6 +1994,10 @@ (define %local-checkers (name 'inputs-should-not-be-input) (description "Identify inputs that shouldn't be inputs at all") (check check-inputs-should-not-be-an-input-at-all)) + (lint-checker + (name 'inputs-should-be-minimal) + (description "Identify inputs that should use their minimal variant") + (check check-inputs-should-use-a-minimal-variant)) (lint-checker (name 'input-labels) (description "Identify input labels that do not match package names") base-commit: 41e408eb1f93d96b549d345e2de74143220b7b76 -- Efraim Flashner רנשלפ םירפא GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted