summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2020-12-23 08:45:03 -0500
committerbill-auger <mr.j.spam.me@gmail.com>2020-12-23 10:20:50 -0500
commitb17ecdffc6ee3aaa09920ab3d213ef80c72006c0 (patch)
tree5d4d758a1f1084fad356dbd66a71e42b30eebdde
parent4208fa824778c0b5880ede6db70f2a949f773b5a (diff)
[icu-65-compat][icu-compat]: upgrade to v68 - rename package
-rw-r--r--libre/icu-65-compat/icu-65.1-initialized-buffer-uloc_getKeywordValue.patch23
-rw-r--r--libre/icu-65-compat/icu-65.1-prevent-SEGV_MAPERR-in-append.patch118
-rw-r--r--libre/icu-compat/PKGBUILD (renamed from libre/icu-65-compat/PKGBUILD)58
3 files changed, 21 insertions, 178 deletions
diff --git a/libre/icu-65-compat/icu-65.1-initialized-buffer-uloc_getKeywordValue.patch b/libre/icu-65-compat/icu-65.1-initialized-buffer-uloc_getKeywordValue.patch
deleted file mode 100644
index 475921d23..000000000
--- a/libre/icu-65-compat/icu-65.1-initialized-buffer-uloc_getKeywordValue.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From fab4c3c719977205a3f005ddfd7fffbb9c19c587 Mon Sep 17 00:00:00 2001
-From: Frank Tang <ftang@chromium.org>
-Date: Wed, 30 Oct 2019 17:45:22 -0700
-Subject: [PATCH] ICU-20884 initialized buffer uloc_getKeywordValue
-
----
- icu4c/source/common/uloc.cpp | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/icu4c/source/common/uloc.cpp b/icu4c/source/common/uloc.cpp
-index 6a9bfcfbff5..ea81c0ce87f 100644
---- a/icu4c/source/common/uloc.cpp
-+++ b/icu4c/source/common/uloc.cpp
-@@ -766,6 +766,9 @@ uloc_getKeywordValue(const char* localeID,
- char* buffer, int32_t bufferCapacity,
- UErrorCode* status)
- {
-+ if (buffer != nullptr) {
-+ buffer[0] = '\0';
-+ }
- const char* startSearchHere = NULL;
- const char* nextSeparator = NULL;
- char keywordNameBuffer[ULOC_KEYWORD_BUFFER_LEN];
diff --git a/libre/icu-65-compat/icu-65.1-prevent-SEGV_MAPERR-in-append.patch b/libre/icu-65-compat/icu-65.1-prevent-SEGV_MAPERR-in-append.patch
deleted file mode 100644
index 07b3db677..000000000
--- a/libre/icu-65-compat/icu-65.1-prevent-SEGV_MAPERR-in-append.patch
+++ /dev/null
@@ -1,118 +0,0 @@
-From b7d08bc04a4296982fcef8b6b8a354a9e4e7afca Mon Sep 17 00:00:00 2001
-From: Frank Tang <ftang@chromium.org>
-Date: Sat, 1 Feb 2020 02:39:04 +0000
-Subject: [PATCH] ICU-20958 Prevent SEGV_MAPERR in append
-
-See #971
----
- icu4c/source/common/unistr.cpp | 6 ++-
- icu4c/source/test/intltest/ustrtest.cpp | 62 +++++++++++++++++++++++++
- icu4c/source/test/intltest/ustrtest.h | 1 +
- 3 files changed, 68 insertions(+), 1 deletion(-)
-
-diff --git a/icu4c/source/common/unistr.cpp b/icu4c/source/common/unistr.cpp
-index 901bb3358ba..077b4d6ef20 100644
---- a/icu4c/source/common/unistr.cpp
-+++ b/icu4c/source/common/unistr.cpp
-@@ -1563,7 +1563,11 @@ UnicodeString::doAppend(const UChar *srcChars, int32_t srcStart, int32_t srcLeng
- }
-
- int32_t oldLength = length();
-- int32_t newLength = oldLength + srcLength;
-+ int32_t newLength;
-+ if (uprv_add32_overflow(oldLength, srcLength, &newLength)) {
-+ setToBogus();
-+ return *this;
-+ }
-
- // Check for append onto ourself
- const UChar* oldArray = getArrayStart();
-diff --git a/icu4c/source/test/intltest/ustrtest.cpp b/icu4c/source/test/intltest/ustrtest.cpp
-index b6515ea813c..ad38bdf53a3 100644
---- a/icu4c/source/test/intltest/ustrtest.cpp
-+++ b/icu4c/source/test/intltest/ustrtest.cpp
-@@ -67,6 +67,7 @@ void UnicodeStringTest::runIndexedTest( int32_t index, UBool exec, const char* &
- TESTCASE_AUTO(TestWCharPointers);
- TESTCASE_AUTO(TestNullPointers);
- TESTCASE_AUTO(TestUnicodeStringInsertAppendToSelf);
-+ TESTCASE_AUTO(TestLargeAppend);
- TESTCASE_AUTO_END;
- }
-
-@@ -2310,3 +2311,64 @@ void UnicodeStringTest::TestUnicodeStringInsertAppendToSelf() {
- str.insert(2, sub);
- assertEquals("", u"abbcdcde", str);
- }
-+
-+void UnicodeStringTest::TestLargeAppend() {
-+ if(quick) return;
-+
-+ IcuTestErrorCode status(*this, "TestLargeAppend");
-+ // Make a large UnicodeString
-+ int32_t len = 0xAFFFFFF;
-+ UnicodeString str;
-+ char16_t *buf = str.getBuffer(len);
-+ // A fast way to set buffer to valid Unicode.
-+ // 4E4E is a valid unicode character
-+ uprv_memset(buf, 0x4e, len * 2);
-+ str.releaseBuffer(len);
-+ UnicodeString dest;
-+ // Append it 16 times
-+ // 0xAFFFFFF times 16 is 0xA4FFFFF1,
-+ // which is greater than INT32_MAX, which is 0x7FFFFFFF.
-+ int64_t total = 0;
-+ for (int32_t i = 0; i < 16; i++) {
-+ dest.append(str);
-+ total += len;
-+ if (total <= INT32_MAX) {
-+ assertFalse("dest is not bogus", dest.isBogus());
-+ } else {
-+ assertTrue("dest should be bogus", dest.isBogus());
-+ }
-+ }
-+ dest.remove();
-+ total = 0;
-+ for (int32_t i = 0; i < 16; i++) {
-+ dest.append(str);
-+ total += len;
-+ if (total + len <= INT32_MAX) {
-+ assertFalse("dest is not bogus", dest.isBogus());
-+ } else if (total <= INT32_MAX) {
-+ // Check that a string of exactly the maximum size works
-+ UnicodeString str2;
-+ int32_t remain = INT32_MAX - total;
-+ char16_t *buf2 = str2.getBuffer(remain);
-+ if (buf2 == nullptr) {
-+ // if somehow memory allocation fail, return the test
-+ return;
-+ }
-+ uprv_memset(buf2, 0x4e, remain * 2);
-+ str2.releaseBuffer(remain);
-+ dest.append(str2);
-+ total += remain;
-+ assertEquals("When a string of exactly the maximum size works", (int64_t)INT32_MAX, total);
-+ assertEquals("When a string of exactly the maximum size works", INT32_MAX, dest.length());
-+ assertFalse("dest is not bogus", dest.isBogus());
-+
-+ // Check that a string size+1 goes bogus
-+ str2.truncate(1);
-+ dest.append(str2);
-+ total++;
-+ assertTrue("dest should be bogus", dest.isBogus());
-+ } else {
-+ assertTrue("dest should be bogus", dest.isBogus());
-+ }
-+ }
-+}
-diff --git a/icu4c/source/test/intltest/ustrtest.h b/icu4c/source/test/intltest/ustrtest.h
-index 218befdcc68..4a356a92c7a 100644
---- a/icu4c/source/test/intltest/ustrtest.h
-+++ b/icu4c/source/test/intltest/ustrtest.h
-@@ -97,6 +97,7 @@ class UnicodeStringTest: public IntlTest {
- void TestWCharPointers();
- void TestNullPointers();
- void TestUnicodeStringInsertAppendToSelf();
-+ void TestLargeAppend();
- };
-
- #endif
diff --git a/libre/icu-65-compat/PKGBUILD b/libre/icu-compat/PKGBUILD
index edd52b8ef..48136c768 100644
--- a/libre/icu-65-compat/PKGBUILD
+++ b/libre/icu-compat/PKGBUILD
@@ -1,7 +1,8 @@
# Maintainer (Arch): Andreas Radke <andyrtr@archlinux.org>
# Contributor (Arch): Art Gramlich <art@gramlich-net.com>
-# Contributor (Parabola): Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-# Contributor (Parabola): Eli Schwartz <eschwartz@archlinux.org>
+# Contributor: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
+# Contributor: Eli Schwartz <eschwartz@archlinux.org>
+
# parabola changes and rationale:
#
@@ -36,16 +37,15 @@
# an automatic builder for all packages yet even if there is work in this
# direction.
#
-# In the meantime, this version of ICU is meant to enable Parabola packages to
-# link against it at runtime. This enables all the Parabola packages to depend
-# only on the ICU version, which is usually the upstream distribution's ICU but
-# is occasionally this ICU if the Parabola package has not yet been rebuilt
-# after an ICU update.
+# In the meantime, this version of ICU exists for Parabola packages to link against
+# at runtime. In this way, Parabola packages can depend only on the "sodeps" exposed
+# by ICU, which is usually provided by the upstream distribution's ICU; but may be
+# this ICU, if the Parabola package has yet to be rebuilt agianst the upgraded ICU.
#
# It is inspired by the admittedly awkward hack of versioned library
-# dependencies more commonly seen in e.g. the AUR as 'icu65' or somesuch which
-# proprietary binaries built against Debian's ICU will depend on, but awkward
-# is in the eyes of the beholder and this elegantly scales to Parabola's needs,
+# dependencies more commonly seen (e.g. in the AUR as 'icu65') on which
+# proprietary binaries built against Debian's ICU will depend. It is awkward,
+# in the eyes of the beholder and this elegantly scales to Parabola's needs,
# without consuming increasing resources, which is the best definition of "not
# awkward".
#
@@ -73,11 +73,12 @@
# own, ldconfig will create untracked symlinks which were supposed to be
# installed by the icu package.
-pkgname=icu-65-compat
+
_pkgname=icu
-pkgver=65.1
-pkgrel=3
-pkgrel+=.parabola2
+pkgname=${_pkgname}-compat
+pkgver=67.1 # should always be one major version behind core/icu
+pkgrel=1
+pkgrel+=.parabola1
pkgdesc="International Components for Unicode library"
pkgdesc+=" (compatibility libraries for the previous release)"
arch=(x86_64)
@@ -85,36 +86,19 @@ arch+=(armv7h i686)
url="http://site.icu-project.org/home"
license=('custom:icu')
depends=('gcc-libs' 'sh')
-# require the main ICU version always be > this one
-depends+=("icu>$pkgver")
-conflicts=("icu<=$pkgver")
+depends+=("icu>$pkgver") # core/icu should always be one major version ahead
+conflicts=("icu<=$pkgver") # core/icu should always be one major version ahead
makedepends=('python')
provides=(libicu{data,i18n,io,test,tu,uc}.so)
-replaces=('icu-parabola')
-conflicts=('icu-parabola')
-source=(https://github.com/unicode-org/icu/releases/download/release-${pkgver//./-}/${_pkgname}4c-${pkgver//./_}-src.tgz{,.asc}
- icu-65.1-initialized-buffer-uloc_getKeywordValue.patch::https://github.com/unicode-org/icu/commit/fab4c3c719.patch
- icu-65.1-prevent-SEGV_MAPERR-in-append.patch::https://github.com/unicode-org/icu/commit/b7d08bc04a.patch)
+source=(https://github.com/unicode-org/icu/releases/download/release-${pkgver//./-}/${_pkgname}4c-${pkgver//./_}-src.tgz{,.asc})
# https://github.com/unicode-org/icu/releases/download/release-65-1/SHASUM512.txt - no checksum file for v67 release
-sha512sums=('8f1ef33e1f4abc9a8ee870331c59f01b473d6da1251a19ce403f822f3e3871096f0791855d39c8f20c612fc49cda2c62c06864aa32ddab2dbd186d2b21ce9139'
- 'SKIP'
- '8898fe0fa9805304cd2fc02c00ab1131861836f4d11887f82450c2378666cb03bce0c5038d3f0bdcdd1c1cdee2a00a61ef85602ed0e0c74ad2e58578b1940123'
- '580283cdd95fb7b8410cb3a6c0f47a6c8e53e0fdc9c213b04cd133ba4120381533ff2aef89ddab968150754bd9ca3a536d5c592c6881e625eb8ee6de8723de1b')
+sha512sums=('4779f1ce1ca7976f6fad6768853ea8c540da54d11509e3b6cfd864a04b5f2db1c3d4b546387f91ad02fb90804525bc37d2543173f0d705d6ca11dc6f2b7640a8'
+ 'SKIP')
validpgpkeys=('BA90283A60D67BA0DD910A893932080F4FB419E3') # "Steven R. Loomis (filfla-signing) <srloomis@us.ibm.com>"
validpgpkeys+=('9731166CD8E23A83BEE7C6D3ACA5DBE1FD8FABF1') # "Steven R. Loomis (ICU Project) <srl@icu-project.org>"
validpgpkeys+=('FFA9129A180D765B7A5BEA1C9B432B27D1BA20D7') # "Fredrik Roubert <fredrik@roubert.name>"
validpgpkeys+=('E4098B78AFC94394F3F49AA903996C7C83F12F11') # "keybase.io/srl295 <srl295@keybase.io>"
-validpgpkeys+=('4569BBC09DA846FC91CBD21CE1BBA44593CF2AE0') # "Steven R. Loomis (codesign-qormi) <srloomis@us.ibm.com>"
-
-prepare() {
- cd icu
-
- # https://unicode-org.atlassian.net/browse/ICU-20884
- patch -Np2 -i ../icu-65.1-initialized-buffer-uloc_getKeywordValue.patch
-
- # https://github.com/unicode-org/icu/pull/971
- patch -Np2 -i ../icu-65.1-prevent-SEGV_MAPERR-in-append.patch
-}
+validpgpkeys=('4569BBC09DA846FC91CBD21CE1BBA44593CF2AE0') # "Steven R. Loomis (codesign-qormi) <srloomis@us.ibm.com>"
build() {
cd icu/source