summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Slater <joe.slater@windriver.com>2021-08-25 15:13:59 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-01 16:28:04 +0100
commit9b2c41c6a9e33572a1d93a71b783bba82a8299ca (patch)
treed11225e73357425be73a1d67b31a6880d2e95ae3
parentb89bb2651d7c01084c84c40c3095ef93b36807fb (diff)
downloadpoky-9b2c41c6a9e33572a1d93a71b783bba82a8299ca.tar.gz
icu: increase pkgdata command buffer size
Mitigate pathname truncation when installing in a project with a very long pathname. (From OE-Core rev: 6cb98cbd789d53768c5d26729f10655762114e6e) Signed-off-by: Joe Slater <joe.slater@windriver.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-support/icu/icu/0001-pkgdata-increase-command-buffer-size.patch46
-rw-r--r--meta/recipes-support/icu/icu_68.2.bb1
2 files changed, 47 insertions, 0 deletions
diff --git a/meta/recipes-support/icu/icu/0001-pkgdata-increase-command-buffer-size.patch b/meta/recipes-support/icu/icu/0001-pkgdata-increase-command-buffer-size.patch
new file mode 100644
index 0000000000..a5483568bb
--- /dev/null
+++ b/meta/recipes-support/icu/icu/0001-pkgdata-increase-command-buffer-size.patch
@@ -0,0 +1,46 @@
1From ab6b1acdeed76899f8227c38ab7e7675c7673ff1 Mon Sep 17 00:00:00 2001
2From: Joe Slater <joe.slater@windriver.com>
3Date: Thu, 5 Aug 2021 09:23:48 -0700
4Subject: [PATCH 1/1] pkgdata: increase command buffer size
5
6Make cmd LARGE_BUFFER_SIZE to avoid pathname truncation
7when install paths are longer than about 150 characters.
8
9https://unicode-org.atlassian.net/browse/ICU-21702 has been
10created to address this issue and error reporting.
11
12Upstream-Status: Submitted [ICU-21702 opened]
13
14Signed-off-by: Joe Slater <joe.slater@windriver.com>
15---
16 source/tools/pkgdata/pkgdata.cpp | 6 +++---
17 1 file changed, 3 insertions(+), 3 deletions(-)
18
19diff --git a/source/tools/pkgdata/pkgdata.cpp b/source/tools/pkgdata/pkgdata.cpp
20index 5ab682e..d4b70ef 100644
21--- a/tools/pkgdata/pkgdata.cpp
22+++ b/tools/pkgdata/pkgdata.cpp
23@@ -1131,17 +1131,17 @@ normal_symlink_mode:
24
25 static int32_t pkg_installLibrary(const char *installDir, const char *targetDir, UBool noVersion) {
26 int32_t result = 0;
27- char cmd[SMALL_BUFFER_MAX_SIZE];
28+ char cmd[LARGE_BUFFER_MAX_SIZE];
29
30 auto ret = snprintf(cmd,
31- SMALL_BUFFER_MAX_SIZE,
32+ LARGE_BUFFER_MAX_SIZE,
33 "cd %s && %s %s %s%s%s",
34 targetDir,
35 pkgDataFlags[INSTALL_CMD],
36 libFileNames[LIB_FILE_VERSION],
37 installDir, PKGDATA_FILE_SEP_STRING, libFileNames[LIB_FILE_VERSION]);
38 (void)ret;
39- U_ASSERT(0 <= ret && ret < SMALL_BUFFER_MAX_SIZE);
40+ U_ASSERT(0 <= ret && ret < LARGE_BUFFER_MAX_SIZE);
41
42 result = runCommand(cmd);
43
44--
452.29.2
46
diff --git a/meta/recipes-support/icu/icu_68.2.bb b/meta/recipes-support/icu/icu_68.2.bb
index 1ca87feee4..130212d245 100644
--- a/meta/recipes-support/icu/icu_68.2.bb
+++ b/meta/recipes-support/icu/icu_68.2.bb
@@ -107,6 +107,7 @@ SRC_URI = "${BASE_SRC_URI};name=code \
107 file://filter.json \ 107 file://filter.json \
108 file://fix-install-manx.patch \ 108 file://fix-install-manx.patch \
109 file://0001-icu-Added-armeb-support.patch \ 109 file://0001-icu-Added-armeb-support.patch \
110 file://0001-pkgdata-increase-command-buffer-size.patch \
110 " 111 "
111 112
112SRC_URI_append_class-target = "\ 113SRC_URI_append_class-target = "\