From patchwork Thu Mar 1 18:26:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 130384 Delivered-To: patch@linaro.org Received: by 10.80.172.228 with SMTP id x91csp3132571edc; Thu, 1 Mar 2018 10:27:14 -0800 (PST) X-Google-Smtp-Source: AG47ELt8xNGXmBI9JjJKt5NafNYWVH4dQ4+E5pHtcqRFpnYpiZarbu/j2AHyihsQj4AEzj8GAqnO X-Received: by 10.101.82.203 with SMTP id z11mr2285329pgp.245.1519928834121; Thu, 01 Mar 2018 10:27:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519928834; cv=none; d=google.com; s=arc-20160816; b=GdqX5DxKJ0bCjr/gB0xJP0y3FERjTyixjfnQIxvT60b7XmhNS9uDlyi1TMtNDe4Cx1 1kgY11/ZCh7noUMzN2HOWJFcWOI3I34wvgt48W2HSpI/1rvKay4A/5mGZR8qZ/FPcLbf S8fZHGsJk/vTr7TFkbaR21DXiUXPu6q4oAruyJtrXpiU6ooWs5jgf2DRnmvfcEk+liuV IQbEsUBD838ey5SZBpuQSfahKHJEO66+oQ5T1vnJlWNvEGpXs6BuaHxxnEM0sA3DIq9L ityGdE6pPiUMMiBwzeZ9x4+urGyucqOmdtT7rkmYh55sBAb0yIWcLNPGZX5jjdSrGwOJ 6+aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=cQO6LUPjdDobDTjB4Wi0Gdn9lzFLMYmcqriBJc/kwzs=; b=vCxO/I66EM0vfglyKD17gh6vvCRcblVZ98aYIlneHdgEPtGhDQaP2y7uv2a8dK5kwF f5otizlqoh9hd2uBAlZTg5dmLNAZP7XKR02wUYozz3BCblEQuCrRDILIMj/EZcr3NJcY F7nYOaX8qaP72drDjukO1G8qslZr2iu0qzIktOX3vehDi5s/aivuhI+NQ7oTVyrZKPVz rd6azzH0RgmgTsvLTYl/JYNBkd7MfiCt6Vxw0je7DR5DYfqGZgqiBh7/4rJuEnIksYRs 6yFgawh5zWwjxlpHM6XvZZ++3Fgjd9s7pCwUX0FskwGjmDOcsX8piYjrUqbkncsu6ash CSzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=p1eMVgNE; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id a189si2789281pgc.123.2018.03.01.10.27.13; Thu, 01 Mar 2018 10:27:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=p1eMVgNE; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id CDC49788C7; Thu, 1 Mar 2018 18:26:55 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by mail.openembedded.org (Postfix) with ESMTP id 8288978882 for ; Thu, 1 Mar 2018 18:26:45 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id q83so13982940wme.5 for ; Thu, 01 Mar 2018 10:26:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=5jRtp5aKnWWjVdqmzqzmLfl+BSy7s6k0k8N6juY3WpA=; b=p1eMVgNEGVUrHC/4GqtSpOrdEQzFronfPNjUOkBLUCDPU6DrXL7fg2hNNz4/UdG3XN 5+zTjckUmEsERTOgGO04tT6m9d0Ac7xKJKR0RNl0SdVPApNzSpXhED9FaQxCG2jiZBeu mZcc4RMB+3ZraSI4wF6SNCzrfvp3UgSBvZ7l4zT+a8s8R2KpMf512MLHSx1JxT5y8aqD e/+1qLxWDUkYcKyGC+7WxpE6xIBPZ5ArGsWgMvW5UNmM7MaTC/NSKOoz3qHzN3mSbgjL +vr8oT4xc8bx1qPY9E86rF4u5mSnLwwMlIcQQTqHi3aimgJ441bDzXVKrI3IdUeyjouT RDJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=5jRtp5aKnWWjVdqmzqzmLfl+BSy7s6k0k8N6juY3WpA=; b=DvTC2kfyIWyZ0M+fXcNI6IWwnqCd+6NAq8ZyEVkZWu0JeJyvzQgIwA4SyCXZgmZfwE 1PRRG2hYP51tKQ7qOA9gpesFXleokc5pGG/LmCwoHWQkiLbcK4ZMKXIa8m4w0V67geyd CXl8Dynsw8r9HRNA4EnW5AF6QF+fRjnxLjsGFZM56rWo+Bw4GiblqhEdvJTfmpgWGcBN g5USjZixyY/oDzUO3KadlOdw3Bd5VeewiEdT5JtuyywH5zZxoiVY/g3mqlGJmiCRE81l hpmD7yyedWprGjT5/6ncknVI0j2T+bh872AKAyxXI4ei7R5/siCO+p8Mg/qwuz7IbB44 2p3g== X-Gm-Message-State: AElRT7E0pgHsxmpbzhrMzKFAgB1UjeNHSwSvMclb7ZH3to4YrnJloeu4 IZu/7NIMvFOiBi2+XLlDjGolajLs X-Received: by 10.28.109.148 with SMTP id b20mr2726155wmi.92.1519928806174; Thu, 01 Mar 2018 10:26:46 -0800 (PST) Received: from flashheart.burtonini.com (35.106.2.81.in-addr.arpa. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id h188sm4955285wmf.23.2018.03.01.10.26.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Mar 2018 10:26:45 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Thu, 1 Mar 2018 18:26:28 +0000 Message-Id: <20180301182634.20502-5-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180301182634.20502-1-ross.burton@intel.com> References: <20180301182634.20502-1-ross.burton@intel.com> Subject: [OE-core] [PATCH 05/11] cross-localedef-native: add way to specify which locale archive to write X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org localedef has no way to specify which locale archive to use, and the compile-time default isn't useful as it points to the work directory. Add support to read an environmental variable for the path, and don't fail to write a new locale archive. Signed-off-by: Ross Burton --- .../glibc/cross-localedef-native_2.27.bb | 1 + meta/recipes-core/glibc/glibc/archive-path.patch | 39 ++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 meta/recipes-core/glibc/glibc/archive-path.patch -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-core/glibc/cross-localedef-native_2.27.bb b/meta/recipes-core/glibc/cross-localedef-native_2.27.bb index d633e9bc37e..f1e4a657cf4 100644 --- a/meta/recipes-core/glibc/cross-localedef-native_2.27.bb +++ b/meta/recipes-core/glibc/cross-localedef-native_2.27.bb @@ -35,6 +35,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ file://0021-eglibc-Install-PIC-archives.patch \ file://0022-eglibc-Forward-port-cross-locale-generation-support.patch \ file://0023-Define-DUMMY_LOCALE_T-if-not-defined.patch \ + file://archive-path.patch \ " # Makes for a rather long rev (22 characters), but... # diff --git a/meta/recipes-core/glibc/glibc/archive-path.patch b/meta/recipes-core/glibc/glibc/archive-path.patch new file mode 100644 index 00000000000..b0d3158cfe4 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/archive-path.patch @@ -0,0 +1,39 @@ +localedef --add-to-archive uses a hard-coded locale path which doesn't exist in +normal use, and there's no way to pass an alternative filename. + +Add a fallback of $LOCALEARCHIVE from the environment, and allow creation of new locale archives that are not the system archive. + +Upstream-Status: Inappropriate (OE-specific) +Signed-off-by: Ross Burton + +diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c +index ca332a34..6b7ba9b2 100644 +--- a/locale/programs/locarchive.c ++++ b/locale/programs/locarchive.c +@@ -569,10 +569,13 @@ open_archive (struct locarhandle *ah, bool readonly) + /* If ah has a non-NULL fname open that otherwise open the default. */ + if (archivefname == NULL) + { +- archivefname = default_fname; +- if (output_prefix) +- memcpy (default_fname, output_prefix, prefix_len); +- strcpy (default_fname + prefix_len, ARCHIVE_NAME); ++ archivefname = getenv("LOCALEARCHIVE"); ++ if (archivefname == NULL) { ++ archivefname = default_fname; ++ if (output_prefix) ++ memcpy (default_fname, output_prefix, prefix_len); ++ strcpy (default_fname + prefix_len, ARCHIVE_NAME); ++ } + } + + while (1) +@@ -585,7 +588,7 @@ open_archive (struct locarhandle *ah, bool readonly) + the default locale archive we ignore the failure and + list an empty archive, otherwise we print an error + and exit. */ +- if (errno == ENOENT && archivefname == default_fname) ++ if (errno == ENOENT) + { + if (readonly) + {