From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id GGO0L3CazGFT6gAAgWs5BA (envelope-from ) for ; Wed, 29 Dec 2021 18:27:12 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id cFVTKHCazGESeQAAG6o9tA (envelope-from ) for ; Wed, 29 Dec 2021 18:27:12 +0100 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 6D41521205 for ; Wed, 29 Dec 2021 18:27:12 +0100 (CET) Received: from localhost ([::1]:47560 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n2cjH-0000PK-J1 for larch@yhetil.org; Wed, 29 Dec 2021 12:27:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49474) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n2cj8-0000OR-5a for bug-guix@gnu.org; Wed, 29 Dec 2021 12:27:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:38684) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n2cj7-00039W-Sh for bug-guix@gnu.org; Wed, 29 Dec 2021 12:27:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n2cj7-00005r-Mu for bug-guix@gnu.org; Wed, 29 Dec 2021 12:27:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#52831: [installer] Locale problems with nss-certs Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 29 Dec 2021 17:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52831 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Leo Famulari Received: via spool by 52831-submit@debbugs.gnu.org id=B52831.164079877432745 (code B ref 52831); Wed, 29 Dec 2021 17:27:01 +0000 Received: (at 52831) by debbugs.gnu.org; 29 Dec 2021 17:26:14 +0000 Received: from localhost ([127.0.0.1]:50230 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n2ciM-0008W4-Jr for submit@debbugs.gnu.org; Wed, 29 Dec 2021 12:26:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48530) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n2ciL-0008Vt-8w for 52831@debbugs.gnu.org; Wed, 29 Dec 2021 12:26:13 -0500 Received: from [2001:470:142:3::e] (port=46044 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n2ciF-0002uo-Nx; Wed, 29 Dec 2021 12:26:07 -0500 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=eJHQyq/Sw4/uWi5SMr4+rQrHWSrgliJc1utRfhX9RQc=; b=QQWNH0VByrnnPYuzXvB5 M3gQyUGlgjtRogCyjTyfHUe2D5oNAkaav2V//2C7kjtPOmfLhKUZRPOSrdHo+wZfvep3zxsT9cdkh u+s+VsvLwKr8nLh24ZB44Z6libbf0WpSON+DOIqOez7Hjh+OnUvwvP/ZOhcFByFHsBrNRrkLSRZOj npI5J9fFnjlUNEAHufVX1HitqillSxt9WN3vmh+LoupXy85dIOG25iI6IfK8EqfrwUv6kGLa6btZb 6Uog8Y01sDMU1r9Qm32ypVswaXganW7b59qfpnrITTlGM+E0LceOS2n1MK9ftisOHfmkNkha5kxMD vIUgoQ6pxRYmDg==; Received: from [2a01:cb18:832e:5f00:3563:417e:2a38:86d8] (port=51766 helo=meije) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n2ciF-0006zy-Qb; Wed, 29 Dec 2021 12:26:08 -0500 From: Mathieu Othacehe References: Date: Wed, 29 Dec 2021 18:26:05 +0100 In-Reply-To: (Leo Famulari's message of "Mon, 27 Dec 2021 14:52:31 -0500") Message-ID: <878rw3l3v6.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 52831@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1640798832; 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: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=eJHQyq/Sw4/uWi5SMr4+rQrHWSrgliJc1utRfhX9RQc=; b=uHRwFRQoIiGnOJzS4qnEM6yy2O1lvoFBrRiws/U12gGVotXDYkJUZMhh1VDz9C0LV4aV4R Qr8pvOEOW53zdMojKvRMiXkbzTKlm5adhF8M6/cA/wYyriM81mXj0654jpIWTKADexcPrI ZtBP4R0/QpTYmTgdOnJjfhV1ynp753ooqdpYCY//Dzh6q4LHxigmQeH0+o0tTMw9yzpeZT 8WVvusPQ/YTSCaRVgmZLqSXPJeRD7Q7JkL/pRJmJ3y8yU9SDYP2zgrwGfX3Ca6iws4qBMO FsDR78LlBe4gy/QjMJE+tqlclUavE9CFbBIR206JgA1YSWhNzD7LizjzZIRAsw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640798832; a=rsa-sha256; cv=none; b=YTB2AkDzFU0AvQQ1/94xt0dtttBhabfAt9ggntM1yyBgTWZlK8jcfWks4M1ymRX19NLanU FRgV++RN7n9ciYjLrGvGp5iXE2E8z87FCFlurUkVpN3G67aLTAM3LSrPKb1Es6/sO2AHYl xd5H4lYr/tHCsgoHTttzEhMqHAh5xNibzQy72k6r+uy41Dwgt/Kp7ftNym2c2f7mYH7fcB KuavaL2kAoPQUv1+0C5CFt2oBTvPWR6M+aZtOqeCSdKhPrJKc+w5xM4A+LtICFxpOhBOBS D4MEQxP8ZRyulnfkSlnY24kOSaXNk9N8fbVDprcdqJfmxkCsz61786vvxkguJA== 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=QQWNH0VB; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.77 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=QQWNH0VB; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 6D41521205 X-Spam-Score: -3.77 X-Migadu-Scanner: scn1.migadu.com X-TUID: tY70rD388wtA Hello Leo, > While testing the Guix System installer, I noticed that installation of > nss-certs has some problems that seem related to locales. What locale did you pick in the installer? I think the issue lies in the (gnu installer utils) module, run-command procedure: --8<---------------cut here---------------start------------->8--- (when locale (let ((supported? (false-if-exception (setlocale LC_ALL locale)))) ;; If LOCALE is not supported, then set LANGUAGE, which might at ;; least give us translated messages. (if supported? (setenv "LC_ALL" locale) (setenv "LANGUAGE" (string-take locale (or (string-index locale #\_) (string-length locale))))))) --8<---------------cut here---------------end--------------->8--- If you pick a locale such as en_AG.utf8 which is not supported by the glibc-utf8-locales package, then supported? is #f, which means that LC_ALL is never set. The following patch fixes it for me. --8<---------------cut here---------------start------------->8--- diff --git a/gnu/installer/utils.scm b/gnu/installer/utils.scm index bb97bc5560..d745996a3a 100644 --- a/gnu/installer/utils.scm +++ b/gnu/installer/utils.scm @@ -97,10 +97,12 @@ (define (pause) ;; least give us translated messages. (if supported? (setenv "LC_ALL" locale) - (setenv "LANGUAGE" - (string-take locale - (or (string-index locale #\_) - (string-length locale))))))) + (begin + (setlocale LC_ALL "en_US.utf8") + (setenv "LANGUAGE" + (string-take locale + (or (string-index locale #\_) + (string-length locale)))))))) (guard (c ((invoke-error? c) (newline) --8<---------------cut here---------------end--------------->8--- WDYT? Thanks, Mathieu