Bug 2369466 - Review Request: nodejs24 - JavaScript runtime
Summary: Review Request: nodejs24 - JavaScript runtime
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jarek Prokop
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-05-30 17:55 UTC by Jan Staněk
Modified: 2025-07-16 12:50 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-07-16 12:50:46 UTC
Type: ---
Embargoed:
jprokop: fedora-review+


Attachments (Terms of Use)
The .spec file difference from Copr build 9110281 to 9193802 (10.35 KB, patch)
2025-06-20 20:11 UTC, Fedora Review Service
no flags Details | Diff
The .spec file difference from Copr build 9193802 to 9228084 (1.01 KB, patch)
2025-06-30 23:51 UTC, Fedora Review Service
no flags Details | Diff
The .spec file difference from Copr build 9228084 to 9262511 (4.13 KB, patch)
2025-07-10 11:57 UTC, Fedora Review Service
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Github nodejs node issues 58954 0 None open nodejs 24.0.1 tries and fails to link v8's maglev on s390x 2025-07-04 12:05:57 UTC

Description Jan Staněk 2025-05-30 17:55:52 UTC
Spec URL: https://download.copr.fedorainfracloud.org/results/jstanek/nodejs-ng/fedora-rawhide-x86_64/09104635-nodejs24/nodejs24.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/jstanek/nodejs-ng/fedora-rawhide-x86_64/09104635-nodejs24/nodejs24-24.0.1-1.fc43.src.rpm
Description: NodeJS JavaScript runtime platform, with refactored/rewritten packaging script
Fedora Account System Username: jstanek

---

This is a review for new approach to packaging NodeJS for Fedora. It's expected to be taken by one of the RedHat nodejs team members; nevertheless, feedback from others is also welcome.

Note that I'm leaving for PTO on Monday and will be away the whole week, so feedback from me will be slow.

Comment 1 Fedora Review Service 2025-05-30 17:56:25 UTC
The ticket summary is not in the correct format.
Expected:

    Review Request: <main package name here> - <short summary here>

Found:

    Review Request: nodejs24 – JavaScript runtime

As a consequence, the package name cannot be parsed and submitted to
be automatically build. Please modify the ticket summary and trigger a
build by typing [fedora-review-service-build].


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 2 Andrei 2025-06-02 08:58:17 UTC
Spec URL: https://download.copr.fedorainfracloud.org/results/jstanek/nodejs-ng/fedora-rawhide-x86_64/09104635-nodejs24/nodejs24.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/jstanek/nodejs-ng/fedora-rawhide-x86_64/09104635-nodejs24/nodejs24-24.0.1-1.fc43.src.rpm
Description: NodeJS JavaScript runtime platform, with refactored/rewritten packaging script
Fedora Account System Username: jstanek

Trying to trigger copr build

Comment 3 Andrei 2025-06-02 09:26:12 UTC
[fedora-review-service-build]

Comment 4 Fedora Review Service 2025-06-02 09:26:26 UTC
The ticket summary is not in the correct format.
Expected:

    Review Request: <main package name here> - <short summary here>

Found:

    Review Request: nodejs24 – JavaScript runtime

As a consequence, the package name cannot be parsed and submitted to
be automatically build. Please modify the ticket summary and trigger a
build by typing [fedora-review-service-build].


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 5 Andrei 2025-06-02 09:34:35 UTC
[fedora-review-service-build]

Comment 6 Fedora Review Service 2025-06-02 11:16:26 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/9110281
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2369466-nodejs24/fedora-rawhide-x86_64/09110281-nodejs24/fedora-review/review.txt

Please take a look if any issues were found.


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 7 Andrei 2025-06-11 10:28:39 UTC
[fedora-review]

Comment 8 Andrei 2025-06-17 08:43:28 UTC
Issues:
=======
- Dist tag is present.
  Note: Multiple Release: tags found
  See: https://docs.fedoraproject.org/en-US/packaging-guidelines/DistTag/
- If (and only if) the source package includes the text of the license(s)
  in its own file, then that file, containing the text of the license(s)
  for the package is included in %license.
  Note: License file LICENSE.txt is not marked as %license
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/LicensingGuidelines/#_license_text
- Large documentation must go in a -doc subpackage. Large could be size
  (~1MB) or number of files.
  Note: Documentation size is 51717521 bytes in 478 files.
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/#_documentation

===== MUST items =====

C/C++:
[x]: Package does not contain kernel modules.
[x]: If your application is a C or C++ application you must list a
     BuildRequires against gcc, gcc-c++ or clang.
[x]: Header files in -devel subpackage, if present.
[x]: ldconfig not called in %post and %postun for Fedora 28 and later.
[x]: Package does not contain any libtool archives (.la)
[x]: Package contains no static executables.
[x]: Rpath absent or only used for internal libs.
[x]: Development (unversioned) .so files in -devel subpackage, if present.

Generic:
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
     Note: Using prebuilt packages
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[?]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "MIT License", "*No copyright* MIT
     License", "ISC License", "*No copyright* Mozilla Public License 2.0",
     "BSD 3-Clause License", "MIT License [generated file]", "FSF Unlimited
     License (with License Retention) [generated file]", "FSF Unlimited
     License [generated file]", "BSD 2-Clause License and/or Public
     domain", "Unicode License Agreement - Data Files and Software (2016)",
     "*No copyright* BSD 2-Clause License and/or ISC License and/or MIT
     License", "*No copyright* ISC License", "*No copyright* Artistic
     License 2.0", "Apache License 2.0 and/or MIT License", "*No copyright*
     Apache License 2.0", "ISC License and/or MIT License", "*No copyright*
     Creative Commons Attribution 4.0 and/or MIT License", "Apache License
     and/or BSD 3-Clause License", "zlib License", "*No copyright* zlib
     License", "Apache License 2.0", "GNU General Public License v2.0 or
     later [generated file]", "GNU General Public License v3.0 or later",
     "X11 License [generated file]", "GNU General Public License v2.0 or
     later", "FSF All Permissive License", "GNU Lesser General Public
     License, Version 2.1", "FSF Unlimited License (with License Retention)
     and/or GNU General Public License, Version 2", "FSF Unlimited License
     (with License Retention)", "*No copyright* Public domain", "GNU
     General Public License", "*No copyright* BSD 3-Clause License and/or
     MIT License", "BSD 2-Clause License and/or MIT License", "*No
     copyright* BSD 3-Clause License", "ICU License", "BSD 2-Clause
     License", "*No copyright* BSD 2-Clause License", "*No copyright*
     Creative Commons Attribution 3.0", "*No copyright* Creative Commons
     CC0 1.0", "*No copyright* Apache License", "*No copyright* GNU Lesser
     General Public License, Version 2.1", "GNU General Public License,
     Version 2", "*No copyright* GNU General Public License, Version 2",
     "*No copyright* ISC License and/or MIT License", "*No copyright* GNU
     General Public License", "Apple Public Source License 2.0", "Apache
     License 2.0 and/or BSD 3-Clause License", "BSD 3-Clause License and/or
     GNU General Public License, Version 2", "GNU Lesser General Public
     License v2.1 or later". 18866 files have unknown license. Detailed
     output of licensecheck in /home/aradchen/2369466-nodejs24/srpm/review-
     nodejs24/licensecheck.txt
[?]: License file installed when any subpackage combination is installed.
[?]: If the package is under multiple licenses, the licensing breakdown
     must be documented in the spec.
==================== take a look =====================================
[ ]: Package requires other packages for directories it uses.
     Note: No known owner of /usr/share/doc/nodejs24/npm
[ ]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/share/doc/nodejs24/npm,
     /usr/share/node-24
==================== take a look =====================================
[x]: %build honors applicable compiler flags or justifies otherwise.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[x]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[?]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[ ]: Only use %_sourcedir in very specific situations.
     Note: %_sourcedir/$RPM_SOURCE_DIR is used.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Useful -debuginfo package or justification otherwise.
[x]: Package is not known to require an ExcludeArch tag.
[x]: Package complies to the Packaging Guidelines
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: The License field must be a valid SPDX expression.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package must not depend on deprecated() packages.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

===== SHOULD items =====

Generic:
[x]: Reviewer should test that the package builds in mock.
[x]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[x]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
     nodejs24-devel , v8-13.6-devel , nodejs24-libs , nodejs24-full-i18n ,
     nodejs24-docs , nodejs24-npm
[x]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[x]: SourceX tarball generation or download is documented.
     Note: Package contains tarball without URL, check comments
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: %check is present and all tests pass.
[?]: Packages should try to preserve timestamps of original installed
     files.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: The placement of pkgconfig(.pc) files are correct.
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[!]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.
     Note: Arch-ed rpms have a total of 33034240 bytes in /usr/share
     nodejs24-full-i18n-24.0.1-1.fc43.x86_64.rpm:31938560
     See:
     https://fedoraproject.org/wiki/Packaging:ReviewGuidelines#Package_Review_Guidelines
[x]: Rpmlint is run on debuginfo package(s).
     Note: No rpmlint messages.
[x]: Rpmlint is run on all installed packages.
     Note: No rpmlint messages.
[x]: Spec file according to URL is the same as in SRPM.

Rpmlint
-------
Checking: nodejs24-24.0.1-1.fc43.x86_64.rpm
          nodejs24-devel-24.0.1-1.fc43.x86_64.rpm
          v8-13.6-devel-13.6.233.8-1.24.0.1.1.fc43.x86_64.rpm
          nodejs24-libs-24.0.1-1.fc43.x86_64.rpm
          nodejs24-full-i18n-24.0.1-1.fc43.x86_64.rpm
          nodejs24-docs-24.0.1-1.fc43.noarch.rpm
          nodejs24-npm-11.3.0-1.24.0.1.1.fc43.x86_64.rpm
          nodejs24-24.0.1-1.fc43.src.rpm
============================ rpmlint session starts ============================
....large 
 8 packages and 0 specfiles checked; 128 errors, 365 warnings, 44 filtered, 128 badness; has taken 13.8 s 

--------
Few issues on rpmlint that could be easy fix and/or generally brought my attention:
--------
nodejs24-npm.x86_64: E: zero-length /usr/lib/node_modules_24/npm/.npmrc
	not sure, maybe linter expects to have this file to be hidden? (.npmrc), we have it just npmrc

nodejs24.spec:3: E: use-of-RPM_SOURCE_DIR
	its intentional, loading scripts (WIP)

nodejs24-docs.noarch: W: unexpanded-macro dependency nodejs%{nodejs_version_major} = 1:24.0.1-1.fc43 %{nodejs_version_major}
	typo (nodejs->node)

nodejs24-full-i18n.x86_64: E: no-binary
	maybe we should add "BuildArches: noarch"
 
nodejs24-npm.x86_64: E: no-binary
	also add "BuildArches: noarch" perhaps

nodejs24-npm.x86_64: E: invalid-locale-man-dir /usr/share/man/nodejs-24/man1/npm-undeprecate.1.gz
nodejs24-npm.x86_64: E: invalid-locale-man-dir /usr/share/man/nodejs-24/man1/npm-uninstall.1.gz
nodejs24-npm.x86_64: E: invalid-locale-man-dir /usr/share/man/nodejs-24/man1/npm-unpublish.1.gz
nodejs24-npm.x86_64: E: invalid-locale-man-dir /usr/share/man/nodejs-24/man1/npm-unstar.1.gz
nodejs24-npm.x86_64: E: invalid-locale-man-dir /usr/share/man/nodejs-24/man1/npm-update.1.gz
nodejs24-npm.x86_64: E: invalid-locale-man-dir /usr/share/man/nodejs-24/man1/npm-version.1.gz
nodejs24-npm.x86_64: E: invalid-locale-man-dir /usr/share/man/nodejs-24/man1/npm-view.1.gz
nodejs24-npm.x86_64: E: invalid-locale-man-dir /usr/share/man/nodejs-24/man1/npm-whoami.1.gz
	sort of intentional, should be called ../LANGCODE/.., not ../nodejs-24/..
	skip probably
        ```
	# Install HTML documentation to %%_pkgdocdir
	mkdir -p "${RPM_BUILD_ROOT}%{_pkgdocdir}/npm/"
	cp -prt  "${RPM_BUILD_ROOT}%{_pkgdocdir}/npm/" deps/npm/docs
        ```

Comment 9 Jan Staněk 2025-06-20 11:43:49 UTC
Working on the issues. Progress so far:

> nodejs24-npm.x86_64: E: invalid-locale-man-dir /usr/share/man/nodejs-24/man1/npm-undeprecate.1.gz
Moved the versioned man dir into /usr/share/node-24/man (%{nodejs_datadir}/man). This has the unfortunate side effect of not compressing the man pages automatically, but changing the symlinks to point to compressed names (ending in .gz), thus making them dangling. Solved for now by compressing the man pages manually; this is possibly something up for further discussion, but I feel not worth blocking on right now.

> nodejs24-npm.x86_64: E: zero-length /usr/lib/node_modules_24/npm/.npmrc
This seems to be an upstream configuration for maintaining npm using npm, and should not be needed for installations at all. I have remove this one to avoid confusion with the distro-wide npmrc that we create.

There are some other files in npm deps that are empty, but as we generally do not touch these dependencies, they should be safe to ignore.

> nodejs24-full-i18n.x86_64: E: no-binary
Well, there is no executable binary, but there is a architecture-dependent data file – the Unicode database. Either little- or big-endian version is installed, depending on the architecture, and we do not want to mix those. Hence, this cannot be noarch.

> nodejs24-npm.x86_64: E: no-binary
This is more up to debate, the npm is currently not containing any architecture-specific binary files (just javascript), but it can grow one in deps at any time, if a native extension anywhere is introduced. OTOH, that introduction should fail the build, so I'll probably be adding the `BuildArch: noarch` here. WDYT?

New spec and SRPM incoming once the current COPR run finishes.

Comment 11 Fedora Review Service 2025-06-20 20:11:23 UTC
Created attachment 2094545 [details]
The .spec file difference from Copr build 9110281 to 9193802

Comment 12 Fedora Review Service 2025-06-20 20:11:25 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/9193802
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2369466-nodejs24/fedora-rawhide-x86_64/09193802-nodejs24/fedora-review/review.txt

Please take a look if any issues were found.


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 13 Andrei 2025-06-24 10:31:02 UTC
> I'll probably be adding the `BuildArch: noarch` here. WDYT?
yep, lets make rpminspect little more happy

I assume we are going to keep working on it for some time with all meta packages and alts and whatnot, so I am keeping this review open

Comment 14 Jan Staněk 2025-06-24 12:53:38 UTC
(In reply to Andrei from comment #13)
> > I'll probably be adding the `BuildArch: noarch` here. WDYT?
> yep, lets make rpminspect little more happy
Making another build with this included.

> I assume we are going to keep working on it for some time with all meta
> packages and alts and whatnot, so I am keeping this review open.
Let's treat this as "alternate stream only" for now – we want to introduce nodejs24 proper soon-ish, so let's not wait until all of the large changes are accepted. I would finalize this once we are happy to start shipping it alongside the current nodejs22 an nodejs20.

Comment 16 TomasJuhasz 2025-06-30 11:28:22 UTC
[fedora-review-service-build]

Comment 17 TomasJuhasz 2025-06-30 13:07:35 UTC
Few small rpmlint complains:
1.) Non-executable npm scripts.
> nodejs24-npm.noarch: E: non-executable-script /usr/lib/node_modules_24/npm/lib/utils/completion.sh 644 /bin/bash
and other javascript/python files on path: 
> /usr/lib/node_modules_24/npm/

Caused by this block (line 411):
># === NPM installation and tweaks
># Correct permissions in provided scripts
># - There are executable scripts for Windows PowerShell; RPM would try to pull it as a dependency
># - Not all executable bits should be removed; the -not -path lines are the ones that will be kept untouched
>declare NPM_DIR="${RPM_BUILD_ROOT}%{nodejs_common_sitelib}/npm"
>find "${NPM_DIR}" \
>    -not -path "${NPM_DIR}/bin/*" \
>    -not -path "${NPM_DIR}/node_modules/node-gyp/bin/node-gyp.js" \
>    -not -path "${NPM_DIR}/node_modules/@npmcli/run-script/lib/node-gyp-bin/node-gyp" \
>    -type f -executable \
>    -execdir chmod -x '{}' +

Used to remove permissions from power-shell scripts (e.g. /usr/lib/node_modules_24/npm/bin/npm.ps1), but it's probably not necessary as these already don't have execute privileges.

2.) Spelling of ICU
>nodejs24-full-i18n.x86_64: E: spelling-error ('icu', '%description -l en_US icu -> ICU, icy, Cu')
3.) Empty roadmap file
>nodejs24-npm.noarch: E: zero-length /usr/lib/node_modules_24/npm/node_modules/smart-buffer/docs/ROADMAP.md
(Empty file created 7 years ago and never used - maybe eventually it could be stripped during creation of tarball, but probably not a high priority.)

Comment 18 Jarek Prokop 2025-06-30 16:10:01 UTC
Taking for review.

Comment 19 Fedora Review Service 2025-06-30 23:51:05 UTC
Created attachment 2095800 [details]
The .spec file difference from Copr build 9193802 to 9228084

Comment 20 Fedora Review Service 2025-06-30 23:51:07 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/9228084
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2369466-nodejs24/fedora-rawhide-x86_64/09228084-nodejs24/fedora-review/review.txt

Please take a look if any issues were found.


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 21 Jarek Prokop 2025-07-01 09:22:29 UTC
So far the biggest problem is that scratch-build in Fedora Koji fails:

It seems that the current state is: macro fails, the %if further down only has that macro, if it is undefined in this case, the build fails.

> https://koji.fedoraproject.org/koji/taskinfo?taskID=134584043 mock_output.log
~~~
sh: line 1: hexdump: command not found

error: unexpected end of expression:  

error:                                ^
error: /chroot_tmpdir/srpm_unpacked/SPECS/nodejs24.spec:400: bad %if condition:  
~~~

2 notes for this:
~~~
BuildRequires: %{_bindir}/hexdump
BuildRequires: %{_bindir}/awk
BuildRequires: %{_bindir}/grep
~~~
should prevent this. I have used that approach here: https://koji.fedoraproject.org/koji/taskinfo?taskID=134584200 
and the following in tandem:

Prepending 0 to prevent syntactical errors when it fails:
~~~
%if 0%{little_endian}
~~~

And lastly, the echo uses `-N`, seems the intent was `-n`?:
~~~
%global little_endian   %(echo -n I|hexdump -o|awk '{print substr($2,6,1); exit}')
~~~
otherwise the echo echoes out too much.

Though currently I am wondering whether we could grab the 1 or 0 from lua with some magic...

https://koji.fedoraproject.org/koji/taskinfo?taskID=134584199 failed on ppc64le and i686, the ppc64le seem to be around some builtin SIMD ppc functions: `__builtin_vsx_xvcvspuxds`, or maybe something with ICU data maybe.

Package not building in koji is currently the main stop.

> License:

Having enumerated which files have which license would be nice-to-have.

> Macro consistency

Openssl has a version requirement in macro so it is later used as `pkgconfig(openssl) >= %{openssl_minimal_version}` while compilers use explicit versions: `BuildRequires:  gcc >= 10.0, gcc-c++ >= 10.0, pkgconf, ninja-build` %{gcc_minimal_version} could be defined together with the openssl's minimal version.

> v8 vs v8-devel

If we have nodejs-libs as providing v8, why is there a separation of nodejs-devel and v8-devel?

Furthermore, %install seems to establish symlinks for v8 and v8-devel as well if I'm reading that section correctly, so v8-devel could probably be a part of nodejs-devel

Comment 22 Vít Ondruch 2025-07-01 09:58:39 UTC
> v8 vs v8-devel

This was announced back in 2019 on fedora-devel via "Node.js packages now provide v8-devel" email. Since the ML is now ATM due to infrastructure move, let me quote the email:


~~~
I've just submitted nodejs-10.15.3-1 into Bodhi and buildroot
overrides for F29 and F30 (it was built for Rawhide last night).

This new build provides two new subpackages:
 * `nodejs-libs` provides libnode.so which is ABI-compatible with
libv8_libbase.so.6 and libv8_libplatform.so.6, for which it provides
compatibility symlinks.
* `v8-devel` provides the appropriate C headers to build against v8 as libnode.

Thank you very much to Elliot Sales de Andrade who did most of the
work to make this happen. This should now make it possible to build
and provide R-V8 for Fedora.

For right now, we're only providing v8-devel from the Node.js 10.x
release. Once Node.js 12.x is released at the end of the month, I will
probably package that up and make it the default for Fedora 31 (as
well as providing a modular version for F29 and F30).
~~~

Comment 23 Jan Staněk 2025-07-01 13:26:16 UTC
(In reply to TomasJuhasz from comment #17)
> Few small rpmlint complains:
> 1.) Non-executable npm scripts.
> > nodejs24-npm.noarch: E: non-executable-script /usr/lib/node_modules_24/npm/lib/utils/completion.sh 644 /bin/bash
> and other javascript/python files on path: 
> > /usr/lib/node_modules_24/npm/
> 
> Caused by this block (line 411):
> ># === NPM installation and tweaks
> ># Correct permissions in provided scripts
> ># - There are executable scripts for Windows PowerShell; RPM would try to pull it as a dependency
> ># - Not all executable bits should be removed; the -not -path lines are the ones that will be kept untouched
> >declare NPM_DIR="${RPM_BUILD_ROOT}%{nodejs_common_sitelib}/npm"
> >find "${NPM_DIR}" \
> >    -not -path "${NPM_DIR}/bin/*" \
> >    -not -path "${NPM_DIR}/node_modules/node-gyp/bin/node-gyp.js" \
> >    -not -path "${NPM_DIR}/node_modules/@npmcli/run-script/lib/node-gyp-bin/node-gyp" \
> >    -type f -executable \
> >    -execdir chmod -x '{}' +
> 
> Used to remove permissions from power-shell scripts (e.g.
> /usr/lib/node_modules_24/npm/bin/npm.ps1), but it's probably not necessary
> as these already don't have execute privileges.

Experimenting with the removal now. I'll check what interpreters it will pull in addition of what is already required. As bunch of those scripts just happen to be shipped in the bundled dependencies and never intended to be run by the end user, we might end removing them anyway and just ignore rpmlint here.

> 2.) Spelling of ICU
> >nodejs24-full-i18n.x86_64: E: spelling-error ('icu', '%description -l en_US icu -> ICU, icy, Cu')

Will be fixed (`full-icu support` -> `full ICU support`).

> 3.) Empty roadmap file
> >nodejs24-npm.noarch: E: zero-length /usr/lib/node_modules_24/npm/node_modules/smart-buffer/docs/ROADMAP.md
> (Empty file created 7 years ago and never used - maybe eventually it could
> be stripped during creation of tarball, but probably not a high priority.)

Generally, I would ignore this sort of warnings from the bundled dependencies – they are far from perfect, but can change from release to release, and they are usually not worth worrying about.

(In reply to Jarek Prokop from comment #21)
> So far the biggest problem is that scratch-build in Fedora Koji fails:
> 
> It seems that the current state is: macro fails, the %if further down only
> has that macro, if it is undefined in this case, the build fails.
> 
> > https://koji.fedoraproject.org/koji/taskinfo?taskID=134584043 mock_output.log

Cannot open the link right now (yay infra migration!), so bit of a guesswork will be included.

> ~~~
> sh: line 1: hexdump: command not found
> 
> error: unexpected end of expression:  
> 
> error:                                ^
> error: /chroot_tmpdir/srpm_unpacked/SPECS/nodejs24.spec:400: bad %if
> condition:  
> ~~~

This is very weird – hexdump should be included in util-linux rpm, and both util-linux and gawk are part of the buildsys-build group (according to my laptop), so they should be installed in the buildroot by default and we should not be needing them listed as BuildRequires. Our COPR builds provide them by default, so I'm very confused why koji would not.

> 2 notes for this:
> ~~~
> BuildRequires: %{_bindir}/hexdump
> BuildRequires: %{_bindir}/awk
> BuildRequires: %{_bindir}/grep
> ~~~
> should prevent this.

Guessing, but it won't. The `%()` construct will attempt to resolve at spec parse time, so even before the BuildRequires can be acted upon. Again, not sure why those packages won't be there automatically. 

> I have used that approach here:
> https://koji.fedoraproject.org/koji/taskinfo?taskID=134584200 
> and the following in tandem:
> 
> Prepending 0 to prevent syntactical errors when it fails:
> ~~~
> %if 0%{little_endian}
> ~~~

That is a workaround, and in this case, I would rather get a syntax error than just continuing assuming big-endian system.

> And lastly, the echo uses `-N`, seems the intent was `-n`?:
> ~~~
> %global little_endian   %(echo -n I|hexdump -o|awk '{print substr($2,6,1);
> exit}')
> ~~~
> otherwise the echo echoes out too much.

That actually is a typo, thanks!

> Though currently I am wondering whether we could grab the 1 or 0 from lua
> with some magic...

Did not find anything. Previously, python was used to extract the value (`1 if sys.byteorder == "little" else 0`), which was more readable, but required python to be installed in the buildroot beforehand. Not sure how or if that worked. Unfortunately, I did not find anything similar in lua, but perhaps you will have a better luck.

> https://koji.fedoraproject.org/koji/taskinfo?taskID=134584199 failed on
> ppc64le and i686, the ppc64le seem to be around some builtin SIMD ppc
> functions: `__builtin_vsx_xvcvspuxds`, or maybe something with ICU data
> maybe.

If you run it with the changes you mentioned above, than you might very well ended with big-endian data on little-endian system, in which case I would expect problems.

This entire issue makes me think that maybe we could be fine with having larger full-i18n-subpackage and just install both variants of the database on any system. Granted, it would meant always wasting 32MiB of space by providing a file that would never be used natively… WDYT?

> > License:
> 
> Having enumerated which files have which license would be nice-to-have.

As far as I know, nobody knows, even in upstream. The best effort is to have a look into the LICENSE file, which should actually be an assembly of the various licenses extracted from the sources (https://github.com/nodejs/node/blob/main/tools/license-builder.sh).

> > Macro consistency
> 
> Openssl has a version requirement in macro so it is later used as
> `pkgconfig(openssl) >= %{openssl_minimal_version}` while compilers use
> explicit versions: `BuildRequires:  gcc >= 10.0, gcc-c++ >= 10.0, pkgconf,
> ninja-build` %{gcc_minimal_version} could be defined together with the
> openssl's minimal version.

Good point. I'll review the usage of the openssl_minimal_version macro (again, inherited from the previous spec version), and either introduce the gcc equivalent, or get rid of it, depending on on how many places it is actually used and how much readability it adds.


> v8 vs v8-devel

Because that was the case in previous NodeJS streams and I did not want to touch it. The v8-devel package is actually a versioned one (e.g. v8-13.6-devel), perhaps to be able to use versions from multiple streams in parallel… I'm not sure. This is perhaps something we can investigate in the future.

Comment 24 Jan Staněk 2025-07-01 14:00:09 UTC
> Experimenting with the removal now. I'll check what interpreters it will pull in addition of what is already required. As bunch of those scripts just happen to be shipped in the bundled dependencies and never intended to be run by the end user, we might end removing them anyway and just ignore rpmlint here.

So without the block, `nodejs24-npm` now additionally requires `/usr/bin/node` (!), and `/usr/bin/python3`. I consider these to being "phony" ones, as again, none of the now-executable scripts are expected to be run by the end user, or used by anything we officially ship. We either have to change the un-versioned node hashbang to use `/usr/bin/node-24`, or go back to stripping the executable bits.

Comment 25 Jarek Prokop 2025-07-01 15:54:24 UTC
> This is very weird – hexdump should be included in util-linux rpm, and both util-linux and gawk are part of the buildsys-build group (according to my laptop), so they should be installed in the buildroot by default and we should not be needing them listed as BuildRequires. Our COPR builds provide them by default, so I'm very confused why koji would not.

It is, though I wouldn't believe koji 100% right now. It seems as though it isn't available in some specific buildroots. I fired off multiple ones and I don't think every single one failed the same on the srpm rebuild.

> As far as I know, nobody knows, even in upstream

I see.

> That actually is a typo, thanks!

That might be a reason for the failure. I kicked off a build on s390x machine, if that passes through OK, I'd say the build item is LGTM. I still have a few more bits to go through though.

> Because that was the case in previous NodeJS streams and I did not want to touch it. The v8-devel package is actually a versioned one (e.g. v8-13.6-devel), perhaps to be able to use versions from multiple streams in parallel… I'm not sure. This is perhaps something we can investigate in the future.

Thanks, yeah, makes sense. Certainly not a blocker for now.

Comment 26 Jan Staněk 2025-07-04 12:05:57 UTC
> That might be a reason for the failure. I kicked off a build on s390x machine, if that passes through OK, I'd say the build item is LGTM. I still have a few more bits to go through though.

From conversations off bugzilla, s390x has problem linking the v8 version included with this version of Node. Reported upstream: https://github.com/nodejs/node/issues/58954

Comment 27 Jan Staněk 2025-07-10 10:25:30 UTC
Spec URL: https://download.copr.fedorainfracloud.org/results/jstanek/nodejs-ng/fedora-rawhide-x86_64/09259745-nodejs24/nodejs24.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/jstanek/nodejs-ng/fedora-rawhide-x86_64/09259745-nodejs24/nodejs24-24.0.1-20.fc43.src.rpm

Updated with various patches for build failures on alternate architectures (s390x, ppc64le). Build failures on i686 were numerous enough to disable that architecture entirely – upstream v8 no longer supports it, and patching that downstream is not worth the effort.

@jprokop, please take it for another round, hopefully this will be the last one.

Comment 28 Fedora Review Service 2025-07-10 11:57:07 UTC
Created attachment 2096858 [details]
The .spec file difference from Copr build 9228084 to 9262511

Comment 29 Fedora Review Service 2025-07-10 11:57:19 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/9262511
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2369466-nodejs24/fedora-rawhide-x86_64/09262511-nodejs24/fedora-review/review.txt

Please take a look if any issues were found.


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 30 Jarek Prokop 2025-07-10 13:38:52 UTC
Considering the unit testing part is quite new to node IIRC, it's not blocking (seems the test-should-pass.txt is much bigger than that list of not found so I'm assuming it ran properly) so I'd consider it "cosmetic issue", but there is following in build log:
```
+ bash /builddir/build/SOURCES/test-runner.sh /builddir/build/BUILD/nodejs24-24.0.1-build/BUILDROOT/usr/bin/node-24 test/ /builddir/build/SOURCES/test-should-pass.txt
Started test run:
Test script not found: test//es-module/test-require-module-tla.js
Test script not found: test//fixtures/print
Test script not found: test//parallel/test-assert-objects.js
Test script not found: test//parallel/test-fs-truncate-fd.js
Test script not found: test//parallel/test-global-customevent-disabled.js
Test script not found: test//parallel/test-global-webcrypto-disbled.js
Test script not found: test//parallel/test-http-outgoing-internal-headernames-getter.js
Test script not found: test//parallel/test-http-outgoing-internal-headernames-setter.js
Test script not found: test//parallel/test-http-outgoing-internal-headers.js
Test script not found: test//parallel/test-net-deprecated-setsimultaneousaccepts.js
Test script not found: test//parallel/test-net-server-simultaneous-accepts-produce-warning-once.js
Test script not found: test//parallel/test-process-assert.js
All tests succesfully passed.
```

Comment 31 Jarek Prokop 2025-07-10 13:45:46 UTC
>[ ]: Package requires other packages for directories it uses.
>     Note: No known owner of /usr/share/doc/nodejs24/npm
>[ ]: Package must own all directories that it creates.
>     Note: Directories without known owners: /usr/share/doc/nodejs24/npm,
>     /usr/share/node-24

there seem to be %dir on these directories in packages that use them, but maybe fedora-review might've gotten a bit confused about them.
AFAICT, RPM knows about these in the built packages (or it was fixed since running the template) and are present correctly where needed.

Raised items of not being able to build on all the major Fedora arches and the macro use for BRs were cleared, rest of the package was checked last time (and now), LGTM.

Package Approved!

Comment 32 Jan Staněk 2025-07-10 14:03:36 UTC
(In reply to Jarek Prokop from comment #30)
> Considering the unit testing part is quite new to node IIRC, it's not
> blocking (seems the test-should-pass.txt is much bigger than that list of
> not found so I'm assuming it ran properly) so I'd consider it "cosmetic
> issue", but there is following in build log:
> 
> ```
> + bash /builddir/build/SOURCES/test-runner.sh
> /builddir/build/BUILD/nodejs24-24.0.1-build/BUILDROOT/usr/bin/node-24 test/
> /builddir/build/SOURCES/test-should-pass.txt
> Started test run:
> Test script not found: test//es-module/test-require-module-tla.js
> ...
> ```

The test-should-pass.txt was taken directly from nodejs22 and not adjusted, due to the slew of other necessary changes. We'll adjust this in the near future.

> Package Approved!

Thanks, importing now!

Comment 33 Fedora Admin user for bugzilla script actions 2025-07-10 14:12:49 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/nodejs24

Comment 34 Fedora Update System 2025-07-16 12:47:08 UTC
FEDORA-2025-80715f1faa (nodejs24-24.4.0-3.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-80715f1faa

Comment 35 Fedora Update System 2025-07-16 12:50:46 UTC
FEDORA-2025-80715f1faa (nodejs24-24.4.0-3.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.