public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/nodejs22] rawhide: Add rolling-stream option
Date: Thu, 30 Jul 2026 11:40:47 GMT	[thread overview]
Message-ID: <178541164779.1.15013140082806846358.rpms-nodejs22-ef243e35cc76@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/nodejs22
            Branch : rawhide
            Commit : ef243e35cc76fe837986501936ac4515a757dd17
            Author : Jan Staněk <jstanek@redhat.com>
            Date   : 2026-07-29T12:37:56+02:00
            Stats  : +76/-11 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/nodejs22/c/ef243e35cc76fe837986501936ac4515a757dd17?branch=rawhide

            Log:
            Add rolling-stream option

This also bumps the npm epoch:

The npm-bin was incorrectly using the main node version.
Since the fix consists of switching to a different versioning scheme for
that package, an epoch bump is in order.

Signed-off-by: Jan Staněk <jstanek@redhat.com>

---
diff --git a/nodejs22.spec b/nodejs22.spec
index e42c14a..4b42ca0 100644
--- a/nodejs22.spec
+++ b/nodejs22.spec
@@ -45,7 +45,7 @@
 # Version from node-v22.23.1/deps/undici/src/package.json
 %nodejs_define_version nodejs-undici 6.27.0
 # Version from node-v22.23.1/deps/npm/package.json
-%nodejs_define_version npm 1:10.9.8-%{nodejs_subpackage_release}
+%nodejs_define_version npm 2:10.9.8-%{nodejs_subpackage_release}
 # Version from node-v22.23.1/deps/sqlite/sqlite3.h
 %nodejs_define_version sqlite 3.51.3
 # Version from node-v22.23.1/deps/uvwasi/include/uvwasi.h
@@ -60,6 +60,8 @@
 # Use all vendored dependencies when bootstrapping
 %bcond all_deps_bundled %{with bootstrap}
 
+# Generate unversioned names; TODO: figure out the condition
+%bcond rolling_stream 1
 
 # === Additional definitions ===
 # Architecture-dependent suffix for requiring/providing .so names
@@ -174,8 +176,8 @@ Node.js uses an event-driven, non-blocking I/O model that
 makes it lightweight and efficient, perfect for data-intensive
 real-time applications that run across distributed devices.
 
-%package        devel
-Summary:        JavaScript runtime – development headers
+
+%global devel_metadata %{expand:\
 Requires:       nodejs%{node_version_major}%{?_isa} = %{node_evr}
 Requires:       nodejs%{node_version_major}-libs%{?_isa} = %{node_evr}
 Requires:       nodejs-packaging
@@ -192,9 +194,12 @@ Provides: alternative-for(nodejs-devel) = %{node_evr}
 Conflicts: alternative-for(nodejs-devel)
 # previously VP used for the same reason as alternative-for() above
 Conflicts: nodejs-devel-pkg
-%obsolete_default_stream_rpm devel
-
+}
 
+%package        devel
+Summary:        JavaScript runtime – development headers
+%devel_metadata
+%obsolete_default_stream_rpm devel
 
 %description    devel
 Development headers for the Node.js JavaScript runtime.
@@ -270,7 +275,6 @@ your node programs. It manages dependencies and does other cool stuff.
 
 %package        bin
 Summary:        Node.js JavaScript runtime – unversioned symlinks
-Group:          Development/Languages
 BuildArch:      noarch
 Requires:       nodejs%{node_version_major} = %{node_evr}
 Provides:       alternative-for(nodejs-bin) = %{node_evr}
@@ -281,7 +285,9 @@ Binary symlinks for Node.js JavaScript runtime.
 
 %package        npm-bin
 Summary:        Node.js Package Manager – binary symlinks
-Group:          Development/Languages
+Epoch:          %{npm_epoch}
+Version:        %{npm_version}
+Release:        %{npm_release}
 BuildArch:      noarch
 Requires:       nodejs%{node_version_major}-npm = %{npm_evr}
 Requires(meta): nodejs%{node_version_major}-bin = %{node_evr}
@@ -291,6 +297,53 @@ Conflicts:      alternative-for(nodejs-npm-bin)
 %description    npm-bin
 Binary symlinks for Node.js Package Manager.
 
+# === Rolling stream metadata ===
+%if %{with rolling_stream}
+
+%package -n     nodejs
+Summary:        Node.js JavaScript runtime – rolling stream
+Requires:       nodejs%{node_version_major} = %{node_evr}
+Recommends:     nodejs-npm = %{npm_evr}
+# For rolling stream, the -bin packages are merged into the main packages,
+# as that was determined to be a better user experience
+Provides:       nodejs-bin = %{node_evr}
+Provides:       alternative-for(nodejs-bin) = %{node_evr}
+Conflicts:      alternative-for(nodejs-bin)
+
+%description -n nodejs
+This is a meta-package that installs the recommended version of Node.js
+JavaScript runtime. It relies on nodejs%{version} to provide all necessary dependencies.
+
+%package -n     nodejs-devel
+Summary:        Node.js development headers – rolling stream
+%devel_metadata
+
+%description -n nodejs-devel
+Meta-package that installs the nodejs%{version}-devel package, which contains
+development headers for the appropriate Node.js JavaScript runtime.
+
+%package -n     nodejs-npm
+Summary:        Node.js Package Manager meta-package
+Epoch:          %{npm_epoch}
+Version:        %{npm_version}
+Release:        %{npm_release}
+
+Requires:       nodejs = %{node_evr}
+Requires:       nodejs%{node_version_major}-npm = %{npm_evr}
+Provides:       npm = %{npm_evr}
+# Similarly to main nodejs package, the nodejs-npm-bin is merged to this one.
+Provides:       nodejs-npm-bin = %{npm_evr}
+Requires(meta): nodejs = %{node_evr}
+Provides:       alternative-for(nodejs-npm-bin) = %{npm_evr}
+Conflicts:      alternative-for(nodejs-npm-bin)
+
+%description -n nodejs-npm
+Meta-package that installs the nodejs%{version}-npm package,
+which contains the appropriate version of Node.js Package Manager.
+
+%endif
+# ↪ %%{with rolling_stream}
+
 %prep
 %autosetup -n node-v%{node_version} -S git_am
 # clean the archive of the de-vendored dependencies, ensuring they are not used
@@ -626,10 +679,12 @@ end
 # Versioned man page when -bin is not installed
 %{_mandir}/man1/node-%{node_version_major}.1*
 
-%files      bin
+%global     files_bin %{expand:
 %license    LICENSE
 %{_bindir}/node
 %{_mandir}/man1/node.1*
+}
+%files      bin %{files_bin}
 
 %files      libs
 %license    LICENSE
@@ -638,7 +693,7 @@ end
 %{_libdir}/libv8_libbase.so.%{v8_version_major}.%{v8_version_minor}
 %{_libdir}/libv8_libplatform.so.%{v8_version_major}.%{v8_version_minor}
 
-%files      devel
+%global     files_devel %{expand:
 %license    LICENSE
 %dir        %{nodejs_datadir}/
 %{_includedir}/node/
@@ -649,6 +704,8 @@ end
 %{_rpmconfigdir}/fileattrs/nodejs%{node_version_major}_abi.attr
 %{_rpmconfigdir}/nodejs%{node_version_major}_abi.req
 %{nodejs_datadir}/common.gypi
+}
+%files      devel %{files_devel}
 
 %files -n   v8-%{v8_version_major}.%{v8_version_minor}-devel
 %license    LICENSE
@@ -682,7 +739,7 @@ end
 %{nodejs_private_sitelib}/npm/
 %exclude    %{nodejs_datadir}/man/man1/node*.1*
 
-%files      npm-bin
+%global     files_npm_bin %{expand:
 %license    deps/npm/LICENSE
 %{_bindir}/npm
 %{_bindir}/npx
@@ -691,6 +748,8 @@ end
 %exclude %{_mandir}/man1/node-%{node_version_major}.1*
 %exclude %{_mandir}/man1/npm-%{node_version_major}.1*
 %exclude %{_mandir}/man1/npx-%{node_version_major}.1*
+}
+%files      npm-bin %{files_npm_bin}
 
 %files      docs
 %doc        doc/README.md
@@ -699,5 +758,11 @@ end
 %{_pkgdocdir}/html/
 %{_pkgdocdir}/npm/
 
+%if %{with rolling_stream}
+%files -n   nodejs %{files_bin}
+%files -n   nodejs-npm %{files_npm_bin}
+%files -n   nodejs-devel %{files_devel}
+%endif
+
 %changelog
 %autochangelog

diff --git a/packaging/fill-versions.sh b/packaging/fill-versions.sh
index 63e5a8a..3ac8318 100755
--- a/packaging/fill-versions.sh
+++ b/packaging/fill-versions.sh
@@ -107,7 +107,7 @@ parse_punycode_version() {
 }
 parse_npm_version() {
     # NPM was originally a separate package using epoch; we need to keep it
-    local -r NPM_EPOCH=1
+    local -r NPM_EPOCH=2
     # NPM is a subpackage with it's own version. Use always-increasing release macro
     local -r NPM_RELEASE='%{nodejs_subpackage_release}'
 

                 reply	other threads:[~2026-07-30 11:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178541164779.1.15013140082806846358.rpms-nodejs22-ef243e35cc76@fedoraproject.org \
    --to=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox