diff --git a/nodejs20.spec b/nodejs20.spec index b07983d..7f71459 100644 --- a/nodejs20.spec +++ b/nodejs20.spec @@ -184,6 +184,8 @@ BuildRequires: libatomic BuildRequires: ninja-build BuildRequires: unzip + + Provides: nodejs = %{nodejs_envr} %if %{with bundled} @@ -221,6 +223,11 @@ BuildRequires: openssl-devel >= %{openssl11_minimum} %global ssl_configure --shared-openssl %{openssl_fips_configure} %endif + +# dtrace is not supported on Node.js 19+ +%global dtrace_configure %{nil} + + # we need the system certificate store Requires: ca-certificates @@ -508,6 +515,7 @@ export PATH="${cwd}/.bin:$PATH" --shared \ --libdir=%{_lib} \ %{ssl_configure} \ + %{dtrace_configure} \ %{!?with_bundled_zlib:--shared-zlib} \ --shared-brotli \ --shared-libuv \ @@ -534,6 +542,8 @@ mv %{buildroot}%{nodejs_sitelib} \ %if 0%{?nodejs_default} ln -srf %{buildroot}%{nodejs_private_sitelib} \ %{buildroot}%{nodejs_sitelib} +%else +rm -f %{buildroot}%{_datadir}/systemtap/tapset/node.stp %endif @@ -733,6 +743,8 @@ end %{_bindir}/node %doc %{_mandir}/man1/node.1* %{nodejs_sitelib} + + %endif %{_bindir}/node-%{nodejs_major} diff --git a/packaging/nodejs.spec.j2 b/packaging/nodejs.spec.j2 index 7e46dd9..f9e3f17 100644 --- a/packaging/nodejs.spec.j2 +++ b/packaging/nodejs.spec.j2 @@ -186,6 +186,10 @@ BuildRequires: libatomic BuildRequires: ninja-build BuildRequires: unzip +{% if NODE_MAJOR < 19 -%} +BuildRequires: systemtap-sdt-devel +{% endif %} + Provides: nodejs = %{nodejs_envr} %if %{with bundled} @@ -223,6 +227,18 @@ BuildRequires: openssl-devel >= %{openssl11_minimum} %global ssl_configure --shared-openssl %{openssl_fips_configure} %endif +{% if NODE_MAJOR < 19 -%} +%if 0%{?nodejs_default} +%global dtrace_configure --with-dtrace +%else +# dtrace is only installed for the default version +%global dtrace_configure %{nil} +%endif +{% else %} +# dtrace is not supported on Node.js 19+ +%global dtrace_configure %{nil} +{% endif %} + # we need the system certificate store Requires: ca-certificates @@ -511,6 +527,7 @@ export PATH="${cwd}/.bin:$PATH" --shared \ --libdir=%{_lib} \ %{ssl_configure} \ + %{dtrace_configure} \ %{!?with_bundled_zlib:--shared-zlib} \ --shared-brotli \ --shared-libuv \ @@ -537,6 +554,8 @@ mv %{buildroot}%{nodejs_sitelib} \ %if 0%{?nodejs_default} ln -srf %{buildroot}%{nodejs_private_sitelib} \ %{buildroot}%{nodejs_sitelib} +%else +rm -f %{buildroot}%{_datadir}/systemtap/tapset/node.stp %endif @@ -736,6 +755,14 @@ end %{_bindir}/node %doc %{_mandir}/man1/node.1* %{nodejs_sitelib} + +{% if NODE_MAJOR < 19 -%} +%dir %{_datadir}/systemtap +%dir %{_datadir}/systemtap/tapset +%{_datadir}/systemtap/tapset/node.stp +%dir %{_usr}/lib/dtrace +%{_usr}/lib/dtrace/node.d +{% endif %} %endif %{_bindir}/node-%{nodejs_major}