From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 8YriB6MXiWJtbgAAbAwnHQ (envelope-from ) for ; Sat, 21 May 2022 18:47:31 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id yKTDBqMXiWLorAAAauVa8A (envelope-from ) for ; Sat, 21 May 2022 18:47:31 +0200 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 B420F2F355 for ; Sat, 21 May 2022 18:47:30 +0200 (CEST) Received: from localhost ([::1]:38940 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nsSGH-0005WJ-Kx for larch@yhetil.org; Sat, 21 May 2022 12:47:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56362) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsSFq-0005UU-LH for guix-patches@gnu.org; Sat, 21 May 2022 12:47:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48963) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nsSFq-0000Ib-CS for guix-patches@gnu.org; Sat, 21 May 2022 12:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nsSFq-00075G-AB for guix-patches@gnu.org; Sat, 21 May 2022 12:47:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55407] [PATCH] system: Improve warning when using LUKS mapped devices without UUIDs. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 21 May 2022 16:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55407 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: 55407-done@debbugs.gnu.org Received: via spool by 55407-done@debbugs.gnu.org id=D55407.165315157424942 (code D ref 55407); Sat, 21 May 2022 16:47:02 +0000 Received: (at 55407-done) by debbugs.gnu.org; 21 May 2022 16:46:14 +0000 Received: from localhost ([127.0.0.1]:42860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsSF3-0006Tr-T3 for submit@debbugs.gnu.org; Sat, 21 May 2022 12:46:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34746) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsSF0-0006M9-NF for 55407-done@debbugs.gnu.org; Sat, 21 May 2022 12:46:12 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54226) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsSEv-00006I-D3; Sat, 21 May 2022 12:46:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=H+LL2vRwkQJNnhVWrG9x6cg6WKxaTGl2wyU3z4Jo2DM=; b=f7UpfxyW9XcoCo82JJIf jFrWjKGw2scA8yFAzGOqVh6Z5HfUv56tXtZ6lHxaFlj/B6DHbZ1sPHl03pLXSPcSDxX8gN6ODbkYX 6I419nkVEGKn/KOPgmHUEC7sGHCy/me4uX/Yo2YmR8P2PNjbIVX71sL9iY4tkfHUxAJ8a0eFE1s7a lXJMLLmEFAzunXOJF1BKg+QfTiD6juYzqND65JGogVMQfuixPE8fzptHkayTc5vGvN+UuyYhfWPHC s9vaL7qT0rF1uJcr00axhoU95hnKTUe4VkiBbMLyBIW0/eL5qq4MD8+6FE2GY+L8HA5o9fJOmAw6v +FLqz81yLvMFnQ==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:51825 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsSEv-00066w-0h; Sat, 21 May 2022 12:46:05 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20220514060532.1011-1-maxim.cournoyer@gmail.com> <87ee0q1sfq.fsf@gnu.org> <87o7zrbju2.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 2 Prairial an 230 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 21 May 2022 18:46:03 +0200 In-Reply-To: <87o7zrbju2.fsf@gmail.com> (Maxim Cournoyer's message of "Sat, 21 May 2022 00:17:25 -0400") Message-ID: <87h75iu94k.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1653151650; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=H+LL2vRwkQJNnhVWrG9x6cg6WKxaTGl2wyU3z4Jo2DM=; b=cHAvZNy7tqh5iFPh4dTOxqGcXX61P4jxr9/nbP9NMS+TJ1hWP3UXFdJzPBjocdrG9g6Eea 72MjPS0UEugBKzsBL3xvmWMxZE8gxNmlEGwOlVLPZBZ5OVag6g3ZOPTZgsZVuxGSz/u5xx 3RudiyIwa1zN6snXTbpQDKQkcxBhRn7vpNyKiKi8gBL7o3BctWGbYX3I6E1u9MtBzszu1P qv9dqmGkBHf2XqEI02fcKLlnvxuR2cp9ZOYjINWC4svEQaOz+oqqDMEgaVXNr9L8mrndXK 8AgmvKV7YMZZYoiaNAjBkj+3VfK/P1CiU/7F00XfkL2XhiSd3TvIwIW+i19YTA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653151650; a=rsa-sha256; cv=none; b=I7wvm0PMCaXHSZb8voF1YkPq7h+X5wmNV3vddHD5wS6jHxws6tm5Is9U1fW+ub+pEsgYLj Dl98k2PC28+3GJjgQ92HHpkcIY8k6CZZLEke+F0ftUBu0csEwM1R7QgyH2uyVOOhH7l6zB u4mkj4F/WDHvfAt/uioBvwz+fpbpeDWRPECSwHFEM5OhbGyK/sPCt8uOtAxiEdwzPqji0M gQwr9iaHrsS4U1OLP+QiNeJP8JOXiO7IHceADTqvCsGxukdtpXR6fbLk3wYsICHBvQRPrs PlDuDX/eJJLVVskujmhoDJRfN2AJKDy3gxRzN+DRvfsnZMkLvKW+c9QtnygwpQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=f7UpfxyW; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Spam-Score: -5.65 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=f7UpfxyW; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Queue-Id: B420F2F355 X-Spam-Score: -5.65 X-Migadu-Scanner: scn0.migadu.com X-TUID: WVYyAYJQHKyB Hi! Maxim Cournoyer skribis: >>> + (warning (N_ "\ >>> +the following mapped device may not be mounted by the bootloader: ~s >>> +hint: specify the mapped device source via its LUKS UUID.~%" >>> + "\ >>> +the following mapped devices may not be mounted by the bootloader: ~s >>> +hint: specify the mapped device sources via their LUKS UUID.~%" >>> + (length non-uuid-crypto-devices)) >>> + (map mapped-device-source non-uuid-crypto-devices))) >> >> By convention, warnings should fit on a single line and not be full >> sentences. > > This is a Guix-specific convention, right? I couldn't find a reference > to it in the GNU Standards (info standards) document. It=E2=80=99s more or less the GNU convention (info "(standards) Errors"). The bit about hints is Guix-specific, but it=E2=80=99s the same idea: havin= g a consistent way to report diagnostics. > I'd be more of the thinking that warnings directed at *users* should > be as human readable as possible; the motivation for my fix was > because that for more than a year, I read that warning without having > clue about what it really meant and had to review the source to get > the answer. Yes, and I agree that=E2=80=99s a problem. Hopefully hints help address th= at. (The Elm compiler for instance is famous for having verbose diagnostics *and* hints. Perhaps something to look at and take inspiration from in the future.) > It produced this output: > > /home/maxim/stow/guix/hurd.scm:109:8: warning: mapped device '/dev/sda2' = may be ignored by bootloader > /home/maxim/stow/guix/hurd.scm:113:8: warning: mapped device '/dev/sdb2' = may be ignored by bootloader > /home/maxim/stow/guix/hurd.scm:117:8: warning: mapped device '/dev/sdc2' = may be ignored by bootloader > hint: Specify mapped device sources via their LUKS UUID. Nice. You could even add an @example block in the hint to illustrate what that means. > Pushed as 39a9404c99. Thank you! Ludo=E2=80=99.