From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id EEp4LZVNcmUuOwAAauVa8A:P1 (envelope-from ) for ; Thu, 07 Dec 2023 23:56:21 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id EEp4LZVNcmUuOwAAauVa8A (envelope-from ) for ; Thu, 07 Dec 2023 23:56:21 +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 7CCA917040 for ; Thu, 7 Dec 2023 23:56:21 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=fq4aKYmj; 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=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1701989781; 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=TAGGa/+6uQgdyewhkB0TaUum+9meBRMc9tHDsaF/b+g=; b=hrL8SGI30x169Y0qiwRW6ThdI9YJs9BBbanTwfCgfjg3Nr1ENc8l+nPfvaiqhkE39tYz1A 1cxkJbtFNB/KrIgYtG9Q2ugxcyChcJ2alC4v8kcYrIkE33XRkqR9ooxkcDNXCQqcb+EqAM M6sMvzKzL94TY7xWZ93waR25bQWuzt1R4ugOBoqMzpVFMvKPNgmi4sDPqONROnPqgOiJwu N92z4NnJOnquIKf12xD0MtS9s4WeMgXTKT7b5XAAys93mIX9YhTXQxnvt2GdkFhK0hLSf9 pxS6EvydizFy9dLanJIUBngHu4u9Tlzm8WAbkl3azC2iqwIWIMTFsPHtmBV2ow== 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=fq4aKYmj; 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=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1701989781; a=rsa-sha256; cv=none; b=JtFf8vn7Bv5UE4MFVFTTQHEceMH7k/3fODKh5N69d+f6O9qbSQpWfT2zt48lgdZ02PdAWP XtJQ0vcqS4WwfEFyg+eKrIL0rbADrVFB51OEfPUvU2drucwtf5IwPziDt0ox2PY1IaaotE V2y2IjRU1q6g6D1L55Ud2XEmlFROAkAaFmbJsgNWSPZoOwChYyp3X5y0Oixcr48Bf2I0xQ FhwT0JHCJMiyLxgxdhiCDnODd0LbfG3prJhU+6p86djSJW3qp86Fd5YAluD9mCVJeEH8d9 V9Pu1XOi/fMhMZZ7GsaKAYL0rA7yv4vJUAHhRDCVUVEdXEDEqEcH6JDx4I0QsA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rBNHh-0000Wu-G8; Thu, 07 Dec 2023 17:55:57 -0500 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 1rBNHc-0000QF-P7 for guix-patches@gnu.org; Thu, 07 Dec 2023 17:55:54 -0500 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 1rBNHb-0002fj-PX for guix-patches@gnu.org; Thu, 07 Dec 2023 17:55:52 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rBNHo-0006tJ-BC for guix-patches@gnu.org; Thu, 07 Dec 2023 17:56:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67686] [PATCH core-updates v2 5/7] gnu: glibc: Install C.UTF-8 locale. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 07 Dec 2023 22:56:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67686 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67686@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 67686-submit@debbugs.gnu.org id=B67686.170198971526335 (code B ref 67686); Thu, 07 Dec 2023 22:56:04 +0000 Received: (at 67686) by debbugs.gnu.org; 7 Dec 2023 22:55:15 +0000 Received: from localhost ([127.0.0.1]:43351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBNH0-0006qa-Vb for submit@debbugs.gnu.org; Thu, 07 Dec 2023 17:55:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56938) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBNGv-0006oy-QK for 67686@debbugs.gnu.org; Thu, 07 Dec 2023 17:55:10 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rBNGd-0002Jp-U9; Thu, 07 Dec 2023 17:54:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=TAGGa/+6uQgdyewhkB0TaUum+9meBRMc9tHDsaF/b+g=; b=fq4aKYmjELrEcRcRCuc4 G1QJm9XYMizko2yP9L35Gb41Hi/GBfk4tJXasZTyiXk6paRODF/oOhDoXuy/PRzsZPBugJCnsZxIg lU9Rfk3lTRgTIU7GKBiQYAL26WkM6fP/3FG/yV8nEkDwcHexVWaLUobv5ny92frmqtAoGWlYePdBO DRepJQeDWfeL29WK32+oGJsgN0HT1Ou1RlOIklcR3mGXvkHgYbTsuAiP+b8U4ZO31iCM0C7ETc5vZ 9wHi2t+ST3XvISCc5uJ+mInhyodDtCKJil6fQW6dw6SqNc1/iaL73i2jPKpRP9EHGFq1WFTnnGBWA xSIEecELde6mNg==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Thu, 7 Dec 2023 23:54:08 +0100 Message-ID: <5380d8d651e2c9a927a8fb53132f6aa9c6132a7c.1701989279.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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: -5.85 X-Spam-Score: -5.85 X-Migadu-Queue-Id: 7CCA917040 X-Migadu-Scanner: mx12.migadu.com X-TUID: tNMkaIw9arsh * gnu/packages/base.scm (glibc)[arguments]: Add ‘install-utf8-c-locale’ phase. (glibc-2.35)[arguments]: Delete ‘install-utf8-c-locale’ phase. (glibc-2.33, glibc-2.32, glibc-2.31): Inherit from ‘glibc-2.35’. Change-Id: I7ba515184c7b7c40eaefd355639ffef8eeca66d8 --- gnu/packages/base.scm | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index c5eac8a2da..1144110309 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -1023,6 +1023,26 @@ (define-public glibc (map (cut string-append slib "/" <>) files)))))) + (add-after 'install 'install-utf8-c-locale + (lambda* (#:key outputs #:allow-other-keys) + ;; Install the C.UTF-8 locale so there's always a UTF-8 + ;; locale around. + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (locale (string-append out "/lib/locale/" + ,(package-version + this-package)))) + (mkdir-p locale) + + ;; FIXME: When cross-compiling, attempt to use + ;; 'localedef' from the same libc version. + (invoke ,(if (%current-target-system) + "true" + '(string-append bin "/localedef")) + "--no-archive" "--prefix" locale + "-i" "C" "-f" "UTF-8" + (string-append locale "/C.UTF-8"))))) + ,@(if (target-hurd?) '((add-after 'install 'augment-libc.so (lambda* (#:key outputs #:allow-other-keys) @@ -1108,11 +1128,19 @@ (define-public glibc-2.35 "glibc-hurd-clock_t_centiseconds.patch" "glibc-hurd-clock_gettime_monotonic.patch" "glibc-hurd-mach-print.patch" - "glibc-hurd-gettyent.patch")))))) + "glibc-hurd-gettyent.patch")))) + (arguments + (substitute-keyword-arguments (package-arguments glibc) + ((#:phases phases) + ;; The C.UTF-8 fails to build in glibc 2.35: + ;; . + ;; It is missing altogether in versions earlier than 2.35. + `(modify-phases ,phases + (delete 'install-utf8-c-locale))))))) (define-public glibc-2.33 (package - (inherit glibc) + (inherit glibc-2.35) (name "glibc") (version "2.33") (source (origin @@ -1139,7 +1167,7 @@ (define-public glibc-2.33 (define-public glibc-2.32 (package - (inherit glibc) + (inherit glibc-2.35) (version "2.32") (source (origin (inherit (package-source glibc)) @@ -1194,7 +1222,7 @@ (define-public glibc-2.32 (define-public glibc-2.31 (package - (inherit glibc) + (inherit glibc-2.35) (version "2.31") (source (origin (inherit (package-source glibc)) -- 2.41.0