Swap definition order for metadata fields

In some environments, a variant of rpm parser is used that does not
expand Lua or shell invocations. In that environment, using
%nodejs_define_version for defining (parts of) Name:, Version:, or
Release: fields will result in them being empty or incomplete

This swaps the definition order around, so that the fields are set
first with the verbatim values.

Signed-off-by: Jan Staněk <jstanek@redhat.com>
This commit is contained in:
Jan Staněk 2026-03-18 14:23:16 +01:00
parent cb29e3511f
commit 358199c9e6
No known key found for this signature in database
GPG Key ID: 2972F2037B243B6D

View File

@ -1,9 +1,18 @@
Name: nodejs24
Epoch: 1
Version: 24.13.0
Release: %{autorelease}
Summary: JavaScript runtime
License: Apache-2.0 AND Artistic-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BlueOak-1.0.0 AND CC-BY-3.0 AND CC0-1.0 AND ISC AND MIT
URL: https://nodejs.org
# This should be moved to rpm-redhat-config or similar as soon as feasible
# NOTE: %%SOURCE macros are not yet defined, so explicit path is needed
%{load:%{_sourcedir}/nodejs.srpm.macros}
# === Versions of any software shipped in the main nodejs tarball
%nodejs_define_version node 1:24.13.0-%{autorelease} -p
%nodejs_define_version node %{epoch}:%{version}-%{autorelease} -p
# Special release for sub-packages with their own version string.
# The complex release string ensures that the subpackage release is always increasing,
@ -77,15 +86,6 @@
# place for (npm) packages specific to this stream
%global nodejs_private_sitelib %{_prefix}/lib/node_modules_%{node_version_major}
Name: nodejs%{node_version_major}
Epoch: %{node_epoch}
Version: %{node_version}
Release: %{node_release}
Summary: JavaScript runtime
License: Apache-2.0 AND Artistic-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BlueOak-1.0.0 AND CC-BY-3.0 AND CC0-1.0 AND ISC AND MIT
URL: https://nodejs.org
ExclusiveArch: %{nodejs_arches}
# v8 does not build on i686 any more
ExcludeArch: %{ix86}