From patchwork Fri Oct 17 20:39:08 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 72626 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3E40CCD199 for ; Fri, 17 Oct 2025 20:40:13 +0000 (UTC) Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by mx.groups.io with SMTP id smtpd.web11.3155.1760733613073587507 for ; Fri, 17 Oct 2025 13:40:13 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=XYGJQij4; spf=softfail (domain: sakoman.com, ip: 209.85.210.172, mailfrom: steve@sakoman.com) Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-7930132f59aso3258701b3a.0 for ; Fri, 17 Oct 2025 13:40:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1760733612; x=1761338412; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=qrAfwPQC5NJUk1AFgkSKQpV0On3kcL9ufu6BmtATLOw=; b=XYGJQij4Hye+MLMU34vZyITR+U5Q6FGtEWMH3JVTMWGcqaJfQXv2ZPgc9OIOKm5La/ DWEeenxhCZestOCPZws9gvIJLsMWiY0P/O4pw4mpGZuuvFFilozl9i32hZD1QGTl1tXX zWMhfuCijUYkOsEat9FUAzPlXiAy6dsI88bVCso3lc33RaymAa9WEYd9hu0ZGNy7eB73 rMIMD1YUy/RJ2lwrXlxVfO8TrwyGiGn4q2fIgD8C5y4c7qGSA4reUH3LvtySnObIyXRx jyuxtQhOU8E+O85iG3DLbXD+XJjgZXcbu8SjrZMRGbWYU/Tlw+zwVsDGWpdhvTJ7Dcbm KWPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760733612; x=1761338412; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qrAfwPQC5NJUk1AFgkSKQpV0On3kcL9ufu6BmtATLOw=; b=rw7JVdAKUBM0k5utkb0Y2gsvpDxnoicAFJNqpwbHNixtDf0almCpWvytuXJrTap82k JbO9+zTuTtqo/xM0IGYe4eHFoK1GhDxOGt6gx+vvvxENi1kMALRktv47QUl+6cSPIq2m Wz6xj+veeJ7Y3BrBn7aJfJ3qiDQfPBL33rWzRERi6z3xA+jEzeNOGGPIHCzfEmV6LeRl doy8joFKVdJGi9A81X/yFGgi+UofeJ23l4CgZI+s6VN0zBOAp2zNcJU1rzb2YlKL02u8 0w9ebR2W4PnNbBDY49OKiTG8Aw+gLiiJ8NdP0Dg7gkWUFzvOURSishLE4Hs42sz1kG8/ ommA== X-Gm-Message-State: AOJu0YxN4z3PnEiYZZIfa0qrIj//QcQgqgiot94FLVAT4zFtEFS6knUt NHEm+Ki/QSFQ7te0cF3Bshvlk8/94Z1PSQkhsZirGELlCYkYTuIEsU8mZfEqOthKpUFx15ovYfq Ud6Ft/Wg= X-Gm-Gg: ASbGnctOaAtagJQj0bCATtQ0vTNqHcyfzaWAGzjLjashdxLiloGkdDKR3mL1Z+kxOdD 3KpRjON/zzJ9RVtFbGCC40vY1C65fRWLAs3sXueHOl1HDKbxGIn0luWaAgk1d79nZtdaGqQUSxq kphPCJGaIXOUDWohz+5fwu0pc0CPLX5E0lQdFDqgsrqsYfI2Vl7ECKUXYcqK8dPUTfIeCyUIrVy vtWkSQkJLbBBkZxJ9r6J+ULl2Qf/0i43umAvyQ3azK3GazezUuSvz8kQi2nvnX2Cj2qANkXLkKx Lnb0ffraWxV0/x66qiSpnGxGVeYGLjCK5nlfZKPp3dBXkjnGXDj6aIHncHgtnOjWFIecjkjNuQS pRlfSprSy3uSs+3X31BhZGyxGxUyI+4ZfJQq4ZIaBzPQJUpJWEyoaUmf1JfvptAWMhzCGHN8zyz Ec X-Google-Smtp-Source: AGHT+IEYbP0azrLkCDcSKH8h7DBFZY/3Hq3HCtKoyqhA7l56+ti2Ju8Ux0DbzRqorR1wZqsnTteEnw== X-Received: by 2002:a05:6a00:856:b0:781:18dd:31de with SMTP id d2e1a72fcca58-7a220aabb73mr6466539b3a.12.1760733612213; Fri, 17 Oct 2025 13:40:12 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:aaee:e640:34cd:6f2]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7a2300f254esm477061b3a.45.2025.10.17.13.40.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Oct 2025 13:40:11 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 25/26] icu: Backport patch to fix build issues with long paths (>512 chars) Date: Fri, 17 Oct 2025 13:39:08 -0700 Message-ID: <0860992436092f7651e22e2b894f0d0a365a9bb0.1760733431.git.steve@sakoman.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 17 Oct 2025 20:40:13 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/225059 From: Carlos Alberto Lopez Perez There is a bug libicu that causes libicu to be installed incorrectly when the build system uses long paths (more than 512 chars). This condition is not very difficult to trigger on a OE build system due to the long paths an the deep of the directories that are usually generated by default. Also the bug is very subtle and won't be detected by the QA post-install processes because what this bug causes is that a different version of libicudata.so.X.Y (one without data) is installed instead of the one containing the data, but there won't be any file missed on the installation (just that it installed the wrong one). See: https://unicode-org.atlassian.net/browse/ICU-22813 This patch backports the fix from upstream/main (From OE-Core rev: 67d1352873957decacde30ff208fb7bb635b0c5d) Signed-off-by: Carlos Alberto Lopez Perez Signed-off-by: Richard Purdie Signed-off-by: Benjamin Hahn Signed-off-by: Steve Sakoman --- ...813_rise_buffer_sizes_pkgdata_PR3058.patch | 72 +++++++++++++++++++ meta/recipes-support/icu/icu_74-2.bb | 1 + 2 files changed, 73 insertions(+) create mode 100644 meta/recipes-support/icu/icu/ICU-22813_rise_buffer_sizes_pkgdata_PR3058.patch diff --git a/meta/recipes-support/icu/icu/ICU-22813_rise_buffer_sizes_pkgdata_PR3058.patch b/meta/recipes-support/icu/icu/ICU-22813_rise_buffer_sizes_pkgdata_PR3058.patch new file mode 100644 index 0000000000..5b97350e6f --- /dev/null +++ b/meta/recipes-support/icu/icu/ICU-22813_rise_buffer_sizes_pkgdata_PR3058.patch @@ -0,0 +1,72 @@ +From db70adaddcfa8050db6a69cdfef080a7f1423ad7 Mon Sep 17 00:00:00 2001 +From: Carlos Alberto Lopez Perez +Date: Mon, 1 Jul 2024 22:15:18 +0100 +Subject: [PATCH] ICU-22813 Rise the size of the buffers used for the command + strings at pkgdata + +The tool pkgdata uses snprintf() to build the strings of the commands that +will execute later during the install process. But the maximum size of this +buffers is not enough when there is a long path. + +This has caused issues on some CI systems that use very long paths, causing +the install process to produce a wrong result. + +The maximum path on Linux is 4096 (defined as PATH_MAX at ) +So the size of SMALL_BUFFER_MAX_SIZE should be 4096 to avoid errors related +to truncated paths. + +Upstream-Status: Backport [https://github.com/unicode-org/icu/pull/3058] + +Signed-off-by: Carlos Alberto Lopez Perez +--- + tools/pkgdata/pkgdata.cpp | 6 +++--- + tools/toolutil/pkg_genc.h | 5 ++--- + 2 files changed, 5 insertions(+), 6 deletions(-) + +diff --git a/tools/pkgdata/pkgdata.cpp b/tools/pkgdata/pkgdata.cpp +index c2ac112..8d08c85 100644 +--- a/tools/pkgdata/pkgdata.cpp ++++ b/tools/pkgdata/pkgdata.cpp +@@ -1134,7 +1134,7 @@ static int32_t pkg_createSymLinks(const char *targetDir, UBool specialHandling) + + static int32_t pkg_installLibrary(const char *installDir, const char *targetDir, UBool noVersion) { + int32_t result = 0; +- char cmd[SMALL_BUFFER_MAX_SIZE]; ++ char cmd[LARGE_BUFFER_MAX_SIZE]; + + auto ret = snprintf(cmd, + sizeof(cmd), +@@ -1205,7 +1205,7 @@ static int32_t pkg_installLibrary(const char *installDir, const char *targetDir, + + static int32_t pkg_installCommonMode(const char *installDir, const char *fileName) { + int32_t result = 0; +- char cmd[SMALL_BUFFER_MAX_SIZE] = ""; ++ char cmd[LARGE_BUFFER_MAX_SIZE] = ""; + + if (!T_FileStream_file_exists(installDir)) { + UErrorCode status = U_ZERO_ERROR; +@@ -1237,7 +1237,7 @@ static int32_t pkg_installCommonMode(const char *installDir, const char *fileNam + #endif + static int32_t pkg_installFileMode(const char *installDir, const char *srcDir, const char *fileListName) { + int32_t result = 0; +- char cmd[SMALL_BUFFER_MAX_SIZE] = ""; ++ char cmd[LARGE_BUFFER_MAX_SIZE] = ""; + + if (!T_FileStream_file_exists(installDir)) { + UErrorCode status = U_ZERO_ERROR; +diff --git a/tools/toolutil/pkg_genc.h b/tools/toolutil/pkg_genc.h +index 2dd1b45..f811fe5 100644 +--- a/tools/toolutil/pkg_genc.h ++++ b/tools/toolutil/pkg_genc.h +@@ -59,9 +59,8 @@ + #define PKGDATA_FILE_SEP_STRING U_FILE_SEP_STRING + #endif + +-#define LARGE_BUFFER_MAX_SIZE 2048 +-#define SMALL_BUFFER_MAX_SIZE 512 +-#define SMALL_BUFFER_FLAG_NAMES 32 ++#define LARGE_BUFFER_MAX_SIZE 16384 ++#define SMALL_BUFFER_MAX_SIZE 4096 + #define BUFFER_PADDING_SIZE 20 + + /** End platform defines **/ diff --git a/meta/recipes-support/icu/icu_74-2.bb b/meta/recipes-support/icu/icu_74-2.bb index 83753a18e5..104acd37c2 100644 --- a/meta/recipes-support/icu/icu_74-2.bb +++ b/meta/recipes-support/icu/icu_74-2.bb @@ -122,6 +122,7 @@ SRC_URI = "${BASE_SRC_URI};name=code \ file://fix-install-manx.patch \ file://0001-icu-Added-armeb-support.patch \ file://CVE-2025-5222.patch \ + file://ICU-22813_rise_buffer_sizes_pkgdata_PR3058.patch \ " SRC_URI:append:class-target = "\