All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Palethorpe <rpalethorpe@suse.de>
To: Akihiko Odaki <akihiko.odaki@daynix.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/3] Makefile: set LC_ALL and LANG to C
Date: Mon, 07 Nov 2022 11:41:15 +0000	[thread overview]
Message-ID: <874jvbx9hq.fsf@suse.de> (raw)
In-Reply-To: <82b10e4d-292f-51c2-da70-0c2ad7722a8f@daynix.com>

Hello,

Akihiko Odaki <akihiko.odaki@daynix.com> writes:

> On 2022/10/21 20:53, Petr Vorel wrote:
>> * have reproducible builds (no locale dependencies)
>> * English only output - easier to debug problem
>> Signed-off-by: Petr Vorel <pvorel@suse.cz>
>> ---
>> NOTE: if we want to have only reproducible build, but keep localized
>> messages, we could use kernel approach:
>> unexport LC_ALL
>> LC_COLLATE=C
>> LC_NUMERIC=C
>> export LC_COLLATE LC_NUMERIC
>> They deliberately kept LC_CTYPE to have localized messages.
>> See also
>> c051346b7db2 ("Makefile: set LC_CTYPE, LC_COLLATE, LC_NUMERIC to C")
>> 07105202bdeb ("Makefile: do not override LC_CTYPE")

I would prefer to copy the kernel. If someone sends us compilation
messages in a language we don't understand then we can ask them to set
the locale before compiling.

I think ensuring our build scripts produce the same executable output on
different locales is nice though.

>>   Makefile | 4 ++++
>>   1 file changed, 4 insertions(+)
>> diff --git a/Makefile b/Makefile
>> index d4399bae6..ea11ac7f3 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -21,6 +21,10 @@
>>   # Ngie Cooper, July 2009
>>   #
>>   +# Avoid funny character set dependencies
>> +export LANG=C
>
> Hi,
>
> Setting LANG should not be necessary as long as LC_ALL is set. That is
> what my patch "tst_test.sh: Normalize the locale" does.

Yes, I don't understand what LANG is doing here. AFAICT it is just sets
a default for undefined settings and will be overrided by LC_ALL.

>
> Regards,
> Akihiko Odaki
>
>> +export LC_ALL=C
>> +
>>   top_srcdir		?= $(CURDIR)
>>     include $(top_srcdir)/include/mk/env_pre.mk

Setting to changes-requested in patchwork because of LANG and LC_ALL is
overkill IMO.

-- 
Thank you,
Richard.

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2022-11-07 11:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-21 11:53 [LTP] [PATCH 0/3] LC_ALL for build, remove outdated doc Petr Vorel
2022-10-21 11:53 ` [LTP] [PATCH 1/3] Makefile: set LC_ALL and LANG to C Petr Vorel
2022-10-22  0:28   ` Akihiko Odaki
2022-11-07 11:41     ` Richard Palethorpe [this message]
2022-10-21 11:53 ` [LTP] [PATCH 2/3] Makefile: Update copyright, use SPDX Petr Vorel
2022-11-07 12:03   ` Richard Palethorpe
2022-11-07 14:44     ` Petr Vorel
2022-10-21 11:53 ` [LTP] [PATCH 3/3] doc: Remove mini-howto-building-ltp-from-git.txt Petr Vorel
2022-11-07 12:03   ` Richard Palethorpe
2022-11-07 14:43     ` Petr Vorel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874jvbx9hq.fsf@suse.de \
    --to=rpalethorpe@suse.de \
    --cc=akihiko.odaki@daynix.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.