Bug 2009880

Summary: rh-nodejs14-nodejs: Provide full-i18n subpackage
Product: Red Hat Software Collections Reporter: Carlos Santos <casantos>
Component: nodejsAssignee: Jan Staněk <jstanek>
Status: CLOSED ERRATA QA Contact: Jan Houska <jhouska>
Severity: low Docs Contact:
Priority: low    
Version: rh-nodejs14CC: hhorak, jstanek, lkuprova, midawson, sgallagh, zsvetlik
Target Milestone: alphaKeywords: Triaged
Target Release: 3.7   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-02-06 19:39:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Carlos Santos 2021-10-01 20:41:55 UTC
Description of problem:

According to the release notes [1]

    From Node.js 14 LTS, the full-icu option is enabled by default. This option
    enables full ICU data set. 

1. https://access.redhat.com/documentation/en-us/red_hat_build_of_node.js/14/html/release_notes_for_node.js_14/features-nodejs

This does not match the nodejs.spec in the rhscl-3.8-rh-nodejs14-rhel-7 branch,
which contains:

    %build

    [...]
    # This is not autotools, even if it resembles it
   ./configure --prefix=%{_prefix} \
        %{?with_debug:--debug} \
        --with-dtrace --with-intl=small-icu \
        --shared-openssl --openssl-use-def-ca-store --openssl-is-fips \
        %{!?el7:--shared-zlib} \
        %{!?with_bootstrap:--shared-http-parser}
    [...]

Version-Release number of selected component (if applicable):

rh-nodejs14-3.6-1.el7.x86_64

How reproducible:

Alsways

Steps to Reproduce:
1. Download the upstream test:

   $ wget -O btest402.js https://raw.githubusercontent.com/srl295/btest402/master/btest402.js

2. Run the test:

   $ scl enable rh-nodejs14 bash
   $ node btest402.js 

Actual results:

You have console.log.
Running btest..
+ Congrats, you have the Intl object.
en:
 date: (supported:en) Saturday, January 3, 1970
 Intl.v8BreakIterator error (NOT part of EcmaScript402): TypeError: Intl.v8BreakIterator is not a constructor

mt:
 date: (supported:) Saturday, January 3, 1970
 Intl.v8BreakIterator error (NOT part of EcmaScript402): TypeError: Intl.v8BreakIterator is not a constructor

ja:
 date: (supported:) Saturday, January 3, 1970
 Intl.v8BreakIterator error (NOT part of EcmaScript402): TypeError: Intl.v8BreakIterator is not a constructor

tlh:
 date: (supported:) Saturday, January 3, 1970
 Intl.v8BreakIterator error (NOT part of EcmaScript402): TypeError: Intl.v8BreakIterator is not a constructor


--------- Analysis ---------
* You have the 'Intl' object. Congratulations! You have the possibility of being EcmaScript 402 compliant.
* Klingon isn't a supported language by the date formatter. It is without honor!
* The English and Maltese look the same to me. Probably a 'small' build.
* Japanese isn't a supported language by the date formatter. Could be a 'small' build.

----------------
SUMMARY:Have Intl, Date:no 'tlh', Date:'mt'=='en', Date:no 'ja', 

Expected results:

Should pass the full test.

Additional info:

Comment 4 Stephen Gallagher 2022-01-18 20:21:26 UTC
The documentation is indeed misleading, but not for exactly the reasons expected. When I deviated the Fedora package from upstream in Node.js 14, I did so because I was splitting the installation so it could be miniaturized for container usage. So we build against the `small-icu`, but we also have a package that can drop the full-icu data files in place: nodejs-full-i18n.

This gives us more flexibility than upstream, because we can shrink the footprint as needed.

Comment 19 Jan Staněk 2022-11-28 13:20:22 UTC
Update: The issue was addressed in newer NodeJS streams (16 and 18) already; but from the look of things, still not in rhscl, which slipped through the cracks. Sorry about that.

I'm renaming this bug so it will show in our review searches, and will try to include fix in the next rh-nodejs14-nodejs rebase.

Comment 28 errata-xmlrpc 2023-02-06 19:39:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: rh-nodejs14-nodejs and rh-nodejs14-nodejs-nodemon security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:0612