Package: mozjs60 Version: 60.2.3-1 Severity: serious Tags: patch Justification: fails to build from source (but built successfully in the past) User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu disco ubuntu-patch
In Ubuntu, the attached patch was applied to achieve the following: * icu_61_updates.patch: Cherrypick from upstream for icu >= 61. This should be fairly self-explanatory. A clean cherry-pick from upstream to fix tests on icu >= 61, unsticking the ICU transition currently underway. ... Adam -- System Information: Debian Release: buster/sid APT prefers disco APT policy: (500, 'disco') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.18.0-10-lowlatency (SMP w/4 CPU cores; PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_CA:en (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled
diff -Nru mozjs60-60.2.3/debian/patches/icu_61_updates.patch mozjs60-60.2.3/debian/patches/icu_61_updates.patch --- mozjs60-60.2.3/debian/patches/icu_61_updates.patch 1969-12-31 17:00:00.000000000 -0700 +++ mozjs60-60.2.3/debian/patches/icu_61_updates.patch 2018-11-14 12:48:17.000000000 -0700 @@ -0,0 +1,70 @@ + +# HG changeset patch +# User André Bargull <andre.barg...@gmail.com> +# Date 1522161640 25200 +# Node ID 3214fb35ccd684ada1d5cd230563c80b7f795fe7 +# Parent b8ff6d9ecca3199c1b6721645c17c46f8a860cd3 +Bug 1445465 - Part 3: Update tests. r=Waldo + +diff --git a/js/src/tests/non262/Intl/NumberFormat/StringBuffer.js b/js/src/tests/non262/Intl/NumberFormat/StringBuffer.js +--- a/js/src/tests/non262/Intl/NumberFormat/StringBuffer.js ++++ b/js/src/tests/non262/Intl/NumberFormat/StringBuffer.js +@@ -5,13 +5,33 @@ + + // The implementation of the format function uses the C++ StringBuffer class, + // which changes its storage model at 32 characters, and uses it in a way which + // also means that there's no room for null-termination at this limit. + // This test makes sure that none of this affects the output. + + var format = new Intl.NumberFormat("it-IT", {minimumFractionDigits: 1}); + +-assertEq(format.format(1123123123123123123123.1), "1.123.123.123.123.120.000.000,0"); +-assertEq(format.format(12123123123123123123123.1), "12.123.123.123.123.100.000.000,0"); +-assertEq(format.format(123123123123123123123123.1), "123.123.123.123.123.000.000.000,0"); ++assertEq(format.format(1123123123123123123123.1), "1.123.123.123.123.123.100.000,0"); ++assertEq(format.format(12123123123123123123123.1), "12.123.123.123.123.122.000.000,0"); ++assertEq(format.format(123123123123123123123123.1), "123.123.123.123.123.120.000.000,0"); ++ ++// Ensure the ICU output matches Number.prototype.toFixed. ++function formatToFixed(x) { ++ var mfd = format.resolvedOptions().maximumFractionDigits; ++ var s = x.toFixed(mfd); ++ ++ // To keep it simple we assume |s| is always in exponential form. ++ var m = s.match(/^(\d)\.(\d+)e\+(\d+)$/); ++ assertEq(m !== null, true); ++ s = m[1] + m[2].padEnd(m[3], "0"); ++ ++ // Group digits and append fractional part. ++ m = s.match(/\d{1,3}(?=(?:\d{3})*$)/g); ++ assertEq(m !== null, true); ++ return m.join(".") + ",0"; ++} ++ ++assertEq(formatToFixed(1123123123123123123123.1), "1.123.123.123.123.123.100.000,0"); ++assertEq(formatToFixed(12123123123123123123123.1), "12.123.123.123.123.122.000.000,0"); ++assertEq(formatToFixed(123123123123123123123123.1), "123.123.123.123.123.120.000.000,0"); + + reportCompare(0, 0, "ok"); +diff --git a/js/src/tests/non262/Intl/NumberFormat/formatToParts.js b/js/src/tests/non262/Intl/NumberFormat/formatToParts.js +--- a/js/src/tests/non262/Intl/NumberFormat/formatToParts.js ++++ b/js/src/tests/non262/Intl/NumberFormat/formatToParts.js +@@ -210,17 +210,16 @@ var arPercentFormatter = + + assertParts(arPercentFormatter, -135.32, + [MinusSign("\u{061C}-"), + Integer("١٣"), + Group("٬"), + Integer("٥٣٢"), + Decimal("٫"), + Fraction("٠٠"), +- Literal("\xA0"), + PercentSign("٪\u{061C}")]); + + // Decimals. + + var usDecimalOptions = + { + style: "decimal", + maximumFractionDigits: 7 // minimum defaults to 0 + diff -Nru mozjs60-60.2.3/debian/patches/series mozjs60-60.2.3/debian/patches/series --- mozjs60-60.2.3/debian/patches/series 2018-10-05 05:07:35.000000000 -0600 +++ mozjs60-60.2.3/debian/patches/series 2018-11-14 12:48:47.000000000 -0700 @@ -18,3 +18,4 @@ tests-Use-DEB_HOST_ARCH_BITS-to-skip-some-tests-on-64-bit.patch Skip-some-i18n-tests-because-we-are-now-using-system-ICU.patch tests-Expect-a-test-to-fail-on-big-endian.patch +icu_61_updates.patch