From patchwork Sun Jan 28 11:22:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julius Kriukas X-Patchwork-Id: 866815 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=kriukas.lt header.i=@kriukas.lt header.b="bz18ftK6"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zTqxt2zG5z9sCZ for ; Sun, 28 Jan 2018 22:22:56 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 9A3EA87C97; Sun, 28 Jan 2018 11:22:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ur6CM3r-39rF; Sun, 28 Jan 2018 11:22:53 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id EFC8B87C49; Sun, 28 Jan 2018 11:22:52 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 37E181C2DB8 for ; Sun, 28 Jan 2018 11:22:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 322E987C49 for ; Sun, 28 Jan 2018 11:22:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vm110Ynt3Htt for ; Sun, 28 Jan 2018 11:22:50 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.dom0.lt (mail.dom0.lt [46.166.167.86]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 5812487C29 for ; Sun, 28 Jan 2018 11:22:49 +0000 (UTC) From: Julius Kriukas DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=kriukas.lt; s=dom0; t=1517138565; bh=4GEC11cWocIuCAw94dqjU5wwBLC1aEs/qEGWiZtC/FE=; h=From:To:Cc:Subject:Date:From; b=bz18ftK6kRrIPCTXypEyO44zgZS+gAbaXlmfplD8/h5dDHvA0H8QpTp2ngVfwrUFs hT+ACk+Ij64P/U0Crhz/fsRGAyM2wUGmXkPZ1sRwbKGM4h/3UjAk1uiZWGhzUeCE2N sLkWU1N+ZL9mrHAneMUw+LcZCXugAXHERZJZxMsnLjxLS2rTDl9wOFpp5nNW95k95B r1n/xNLThkXaTs/Au578ClpPqzVxyY1pawq26F6jPnIlxo1P5kTFb7auDy0f1zotXJ 5CSwMzDatWmKUmQLaKLlFYjfOEGE5lUG05AQc9vRuEcEtVq+FXfJ79kgFVNd0d4+0V WGz1tcEH5oVxw== To: buildroot@buildroot.org Date: Sun, 28 Jan 2018 13:22:05 +0200 Message-Id: <20180128112205.15275-1-julius@kriukas.lt> X-Mailer: git-send-email 2.15.1 Subject: [Buildroot] [PATCH 1/1] Change host locale from C to en_US.UTF-8 for reproducable builds X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Julius Kriukas MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" When BR2_REPRODUCIBLE is enabled building systemd fails with error: [1/1080] Generating systemd.bg.catalog with a meson_exe.py custom command. FAILED: catalog/systemd.bg.catalog /buildroot/output/host/bin/python3 /buildroot/output/host/bin/meson --internal exe /buildroot/output/build/systemd-236/build/meson-private/meson_exe_sed_232a0623cc7ce2cd67ec72ed784b76307102ed76.dat Warning: You are using 'ANSI_X3.4-1968' which is not a Unicode-compatible locale. You might see errors if you use UTF-8 strings as filenames, as strings, or as file contents. Please switch to a UTF-8 locale for your platform. ... UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 1079: ordinal not in range(128) package/pkg-generic.mk:247: recipe for target '/buildroot/output/build/systemd-236/.stamp_built' failed make: *** [/buildroot/output/build/systemd-236/.stamp_built] Error 1 Other packages using meson build system might fail as well. This patch changes default host system locale from C to en_US.UTF-8 to fix this issue. Any Unicode-compatible locale would be suitable here. Signed-off-by: Julius Kriukas --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 7d8ab51a8c..5991c6a221 100644 --- a/Makefile +++ b/Makefile @@ -250,8 +250,8 @@ endif # timezone and locale may affect build output ifeq ($(BR2_REPRODUCIBLE),y) export TZ = UTC -export LANG = C -export LC_ALL = C +export LANG = en_US.UTF-8 +export LC_ALL = en_US.UTF-8 export GZIP = -n BR2_VERSION_GIT_EPOCH = $(shell GIT_DIR=$(TOPDIR)/.git $(GIT) log -1 --format=%at) export SOURCE_DATE_EPOCH ?= $(if $(wildcard $(TOPDIR)/.git),$(BR2_VERSION_GIT_EPOCH),$(BR2_VERSION_EPOCH))