diff --git a/.fmf/version b/.fmf/version deleted file mode 100644 index d00491f..0000000 --- a/.fmf/version +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/.gitignore b/.gitignore index 3d28a66..04cb066 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ -/icu4c-77_1-data-bin-b.zip -/icu4c-77_1-data-bin-l.zip -/node-v24.4.1-stripped.tar.gz -/packaging-scripts.tar.gz -/node-v24.6.0-stripped.tar.gz +icu4c-77_1-data-bin-b.zip +icu4c-77_1-data-bin-l.zip +node-v24.6.0-stripped.tar.gz +packaging-scripts.tar.gz diff --git a/Makefile b/Makefile deleted file mode 100644 index 4b23044..0000000 --- a/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -# This is a packager-level Makefile, used for task related to the RPM updates. - -# === Paths -# Directory of current Makefile; assumed to be the same as the .spec file. -MAKEDIR := $(dir $(lastword ${MAKEFILE_LIST})) -SPECFILE ?= $(wildcard ${MAKEDIR}nodejs*.spec) - -# === Tools -GIT := git -RPM := rpm -D '_sourcedir ${MAKEDIR}' -RPKG ?= fedpkg -SPECTOOL := rpmdev-spectool --define '_sourcedir ${MAKEDIR}' -TAR := tar - -# === Variables potentially overwritten from environment -# Version we want to update to. -TARGET_VERSION ?= $(error No target version specified for update!) - -# === File lists -# Source files that are not stored directly in git -SOURCES := $(shell ${SPECTOOL} --list-files --source 0,1,2,100 ${SPECFILE}|sed -E 's/^Source[[:digit:]]*: //'|xargs basename -a) -# Packaging support files -PACKAGING := Makefile packaging/make-nodejs-tarball.sh packaging/fill-versions.sh - -# === Control targets / actions === -.PHONY: update clean - -# Update the package to TARGET_VERSION -update: ${SPECFILE} packaging/fill-versions.sh - sed -Ei '/^%nodejs_define_version\s+node\>/s|:[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+-|:${TARGET_VERSION}-|' '${SPECFILE}' - ${MAKE} node-v${TARGET_VERSION}-stripped.tar.gz - packaging/fill-versions.sh '${SPECFILE}' node-v${TARGET_VERSION}-stripped.tar.gz - ${GIT} add '${SPECFILE}' - ${MAKE} sources - -# Remove all downloaded and/or created files -clean: - $(RM) -r node-v*-stripped.tar.gz node-v*/ # main archive and it's expanded contents - $(RM) icu4c-*-data-bin-?.zip # ICU database - $(RM) packaging-scripts.tar.gz # packaging tarball - -# === Recipes for concrete files === - -# Upload new sources to lookaside cache -sources: ${SOURCES} - ${RPKG} new-sources $^ - -node-v%-stripped.tar.gz: packaging/make-nodejs-tarball.sh - $< $* - -icu4c-%-data-bin-b.zip icu4c-%-data-bin-l.zip &: ${SPECFILE} - ${SPECTOOL} --get-files --source 1,2 $< - -packaging-scripts.tar.gz: ${PACKAGING} - ${TAR} -czf $@ $^ diff --git a/gating.yaml b/gating.yaml deleted file mode 100644 index 4ca9235..0000000 --- a/gating.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- !Policy -product_versions: - - rhel-10 -decision_context: osci_compose_gate -rules: - - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/nodejs24.spec b/nodejs24.spec index a65b974..97de293 100644 --- a/nodejs24.spec +++ b/nodejs24.spec @@ -1,3 +1,13 @@ +## START: Set by rpmautospec +## (rpmautospec version 0.6.5) +## RPMAUTOSPEC: autorelease, autochangelog +%define autorelease(e:s:pb:n) %{?-p:0.}%{lua: + release_number = 5; + base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); + print(release_number + base_release_number - 1); +}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} +## END: Set by rpmautospec + # 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} @@ -594,4 +604,34 @@ bash '%{SOURCE10}' "${RPM_BUILD_ROOT}%{_bindir}/node-%{node_version_major}" test %{_pkgdocdir}/npm/ %changelog -%autochangelog +## START: Generated by rpmautospec +* Tue Oct 14 2025 tjuhasz - 1:24.6.0-5 +- Correct dependency version macros + +* Fri Aug 29 2025 Andrei Radchenko - 1:24.6.0-3 +- spec: fix node binary calls to use versioned node-24 binary + +* Wed Aug 20 2025 Andrei Radchenko - 1:24.6.0-2 +- test-plan: adjust variables and filter + +* Tue Aug 19 2025 tjuhasz - 1:24.6.0-1 +- Update to version 24.6.0 + +* Wed Aug 06 2025 Andrei Radchenko - 1:24.4.1-6 +- spec: devel packages explicitly conflicts + +* Wed Jul 23 2025 Jan Staněk - 1:24.4.1-4 +- Disable internet/ tests entirely + +* Tue Jul 22 2025 Jan Staněk - 1:24.4.1-2 +- Make package buildable in centos-stream +- Remove tests that have issues with kojistream network +- Temporarily use vendor copies of dependencies not up-to-date enough in + the system + +* Tue Jul 22 2025 Jan Staněk - 1:24.4.1-1 +- Import SRPM from Fedora Rawhide + +* Mon Jun 09 2025 Johnny Hughes +- RPMAUTOSPEC: unresolvable merge +## END: Generated by rpmautospec diff --git a/packaging/fill-versions.sh b/packaging/fill-versions.sh deleted file mode 100755 index 9bb0b4c..0000000 --- a/packaging/fill-versions.sh +++ /dev/null @@ -1,184 +0,0 @@ -#!/bin/bash -set -e - -usage() { - echo "$(basename "$0")" '' '' - echo Fill versions between BEGIN/END automatic-version-macros in the spec file. -} - -# Format version information in unified style -# usage: format_version [macro options…] -format_version() { - local -r component="${1?No component named!}" && shift - local -r srcpath="${1?No version source specified!}" && shift - local -r version="${1?No version specified}" && shift - - printf '# Version from %s\n' "${srcpath}" - printf '%%nodejs_define_version %s %s%s%s\n' "${component}" "${version}" "${*:+ }" "${*}" -} - -# Find concrete path to the requested file within unpacked source tree. -# usage: find_source_path -find_source_path() { - local -r path_tail="${1?No source path specified!}" - - # currently just verify that the expected path exists - if test -r node-v*/"${path_tail}" - then - printf '%s\n' "${_}" - else - printf >&2 'Path does not exist: %s\n' "${_}" - return 1 - fi -} - -# "Meta"-extraction function. -# Finds the actual source file, extracts the version as specified, -# and outputs properly formatted macro on stdout. -# usage: find_version [extractor_fn_opts]… -# arguments: -# component: name of the vendored component -# source_path: path to the version information source, relative to the root of the extracted tree -# macro_opts: options for %nodejs_define_version macro; use empty string ('') if none shall be used -# extractor_fn: name of the function responsible for extraction of the version string. -# expected signature: extractor_fn [options]… -# extractor_fn_opts: additional options to pass to extractor_fn after source_path -find_version() { - local -r component="${1?No component specified!}" && shift - local -r srcpath="${1?No version source path specified!}" && shift - local -r macro_opts="${1?No %nodejs_define_version macro options specified!}" && shift - local -r extract_fn="${1?No extraction function specified!}" && shift - - local full_source_path version_string - full_source_path="$(find_source_path "${srcpath}")" - version_string="$("${extract_fn}" "${full_source_path}" "$@")" - format_version "${component}" "${full_source_path}" "${version_string}" "${macro_opts}" -} - -# The extraction functions (extractor_fn above) follows. Add to them as necessary. - -# Extract version string from a C #define directive. -# If provided more than one define name, it is assumed these define the version components, -# and they will all be concatenated with a dot. -# usage: version_from_c_define
… -version_from_c_define() { - local -r path="${1?No C header provided!}" && shift - - while test "$#" -gt 0; do - local name="${1}"; shift - # grab either a single numeric component (\d+) - # or a single quoted string (".*?") - # after a #define statement - local regexp="(?<=#define ${name})\s+(\d+|\".*?\")" - - grep --only-matching --perl-regexp "${regexp}" "${path}" \ - | sed -E 's|^[[:space:]"]*||;s|"$||' \ - | if test "$#" -gt 0 # not the last part - then tr '\n' '.' # turn line end into separator dot - else cat # leave as is - fi - done -} - -# Extract version from package.json or similar file -# usage: version_from_json [jq_filter] -# jq_filter defaults to .version -version_from_json() { - local -r path="${1?No JSON path provided!}" && shift - local -r filter="${1-.version}" && shift - - jq --raw-output "${filter}" "${path}" -} - -# There always is a special case. Don't be afraid to use one-off extractor functions. -parse_isu_version() { - local -r path="${1?No ICU metadata JSON path provided!}" - - version_from_json "${path}" '.[0].url' \ - | sed -E 's/.*release-([[:digit:]]+)-([[:digit:]]+).*/\1.\2/g' -} -parse_punycode_version() { - local -r path="${1?No punycode.js path provided!}" - - # Fragile, but I could come up with nothing better yet. - grep --only-matching --perl-regexp \ - "(?<='version': )'\d+\.\d+\.\d+'" "${path}" \ - | tr -d "'" -} -parse_npm_version() { - # NPM was originally a separate package using epoch; we need to keep it - local -r NPM_EPOCH=1 - # NPM is a subpackage with it's own version. Use always-increasing release macro - local -r NPM_RELEASE='%{nodejs_subpackage_release}' - - local -r path="${1?No path to npm package.json provided!}" - - printf '%d:%s-%s\n' "${NPM_EPOCH}" "$(version_from_json "${path}")" "${NPM_RELEASE}" -} -parse_v8_version() { - # v8 was originally a separate package using epoch; we need to keep it - local -r V8_EPOCH=3 - # v8 is a subpackage with it's own version. Use always-increasing release macro - local -r V8_RELEASE='%{nodejs_subpackage_release}' - - local -r path="${1?No path to v8 version header provided!}" - - printf '%d:%s-%s\n' \ - "${V8_EPOCH}" \ - "$(version_from_c_define "${path}" V8_{MAJOR,MINOR}_VERSION V8_BUILD_NUMBER V8_PATCH_LEVEL)" \ - "${V8_RELEASE}" -} - -# Main script -# =========== - -readonly SPEC="$1" TARBALL="$2" -if test -z "${SPEC}"; then echo 'Missing SPEC path!' >&2; usage >&2; exit 1; fi -if test -z "${TARBALL}"; then echo 'Missing TARBALL path!' >&2; usage >&2; exit 1; fi -readonly NEW_SPEC="${SPEC}.new" - -# Start with a clean source tree -rm -rf node-v*/ && tar -xzf "${TARBALL}" - -# Redirect standard output to working copy of the current spec file -exec 3>&1 1>"${NEW_SPEC}" - -# Copy SPEC file up to the BEGIN marker -sed -E '/^#\s*BEGIN automatic-version-macros/q' "${SPEC}" - -# Output libnode.so soname version -soversion_source="$(find_source_path src/node_version.h)" -printf '# Version from %s\n' "${soversion_source}" -printf '%%global node_soversion %s\n' "$(version_from_c_define "${soversion_source}" NODE_MODULE_VERSION)" - -echo - -# Output all the dependency versions. Try to keep them in alphabetical order - -find_version ada deps/ada/ada.h '' version_from_c_define ADA_VERSION -find_version brotli deps/brotli/c/common/version.h '' version_from_c_define BROTLI_VERSION_{MAJOR,MINOR,PATCH} -find_version c_ares deps/cares/include/ares_version.h '' version_from_c_define ARES_VERSION_STR -find_version histogram deps/histogram/include/hdr/hdr_histogram_version.h '' version_from_c_define HDR_HISTOGRAM_VERSION -find_version icu tools/icu/current_ver.dep -p parse_isu_version -find_version libuv deps/uv/include/uv/version.h '' version_from_c_define UV_VERSION_{MAJOR,MINOR,PATCH} -find_version llhttp deps/llhttp/include/llhttp.h '' version_from_c_define LLHTTP_VERSION_{MAJOR,MINOR,PATCH} -find_version nghttp2 deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h '' version_from_c_define NGHTTP2_VERSION -find_version nghttp3 deps/ngtcp2/nghttp3/lib/includes/nghttp3/version.h '' version_from_c_define NGHTTP3_VERSION -find_version ngtcp2 deps/ngtcp2/ngtcp2/lib/includes/ngtcp2/version.h '' version_from_c_define NGTCP2_VERSION -find_version nodejs-cjs-module-lexer deps/cjs-module-lexer/src/package.json '' version_from_json -find_version nodejs-punycode lib/punycode.js '' parse_punycode_version -find_version nodejs-undici deps/undici/src/package.json '' version_from_json -find_version npm deps/npm/package.json '' parse_npm_version -find_version sqlite deps/sqlite/sqlite3.h '' version_from_c_define SQLITE_VERSION -find_version uvwasi deps/uvwasi/include/uvwasi.h '' version_from_c_define UVWASI_VERSION_{MAJOR,MINOR,PATCH} -find_version v8 deps/v8/include/v8-version.h -p parse_v8_version -find_version zlib deps/zlib/zlib.h '' version_from_c_define ZLIB_VERSION - -# Copy rest of the spec file from the END marker till the end -sed -nE '/^#\s*END automatic-version-macros/,$p' "${SPEC}" - -# Restore standard output -exec 1>&3 3>&- - -# Replace the old spec with the updated one -mv "${NEW_SPEC}" "${SPEC}" diff --git a/packaging/make-nodejs-tarball.sh b/packaging/make-nodejs-tarball.sh deleted file mode 100755 index b5d9e78..0000000 --- a/packaging/make-nodejs-tarball.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -# deps: coreutils curl tar -set -e - -# Print usage -usage() { - printf '%s \n' "$(basename "$0")" - printf '%s\n' "Create a NodeJS tarball for given VERSION stripped of parts we cannot ship." -} - -# Log a message -log() { - printf '## %s\n' "$*" -} - -# Tweak default cURL flags -curl() { - command curl --progress-bar "$@" -} - -readonly VERSION="$1"; if test -z "$VERSION"; then - printf '%s\n\n' "No VERSION specified!" - usage >&2 - exit 1 -fi - -readonly BASENAME="node-v${VERSION}" -readonly BASEURL="https://nodejs.org/dist/v${VERSION}" - -log >&2 Downloading and verifying "${BASENAME}.tar.gz" -curl --remote-name "${BASEURL}/${BASENAME}.tar.gz" -curl --silent "${BASEURL}/SHASUMS256.txt" | sha256sum --check --ignore-missing - -log >&2 Repackaging the sources into "${BASENAME}-stripped.tar.gz" -tar -xzf "${BASENAME}.tar.gz" && rm -f "${BASENAME}.tar.gz" -rm -rf "${BASENAME}/deps/openssl" -tar -czf "${BASENAME}-stripped.tar.gz" "${BASENAME}" diff --git a/plans/centos-stream.fmf b/plans/centos-stream.fmf deleted file mode 100644 index b9b4e6f..0000000 --- a/plans/centos-stream.fmf +++ /dev/null @@ -1,23 +0,0 @@ ---- -summary: Package test suite -discover: - how: fmf - url: https://gitlab.com/redhat/centos-stream/tests/nodejs - filter: "component:nodejs24" -environment: - NODEJS_MAIN_PACKAGE: nodejs24 - NODEJS_DEVEL_PACKAGE: nodejs24-devel - NODEJS_BIN_PACKAGE: nodejs24-bin - NPM_BIN_PACKAGE: nodejs24-npm-bin - NODE_BIN: /usr/bin/node-24 - NPM_BIN: /usr/bin/npm-24 - NODE_INCLUDE_PATH: /usr/include/node -prepare: - - name: install tested packages - how: install - package: - - ${NODEJS_MAIN_PACKAGE} - - ${NODEJS_DEVEL_PACKAGE} -execute: - how: tmt -... diff --git a/plans/tier1-internal.fmf b/plans/tier1-internal.fmf deleted file mode 100644 index a2c925e..0000000 --- a/plans/tier1-internal.fmf +++ /dev/null @@ -1,10 +0,0 @@ -summary: Internal Tier1 tests plan -discover: - how: fmf - filter: 'tier: 1' - url: https://pkgs.devel.redhat.com/git/tests/nodejs -execute: - how: tmt -adjust: - enabled: false - when: distro == centos-stream, fedora diff --git a/rpminspect.yaml b/rpminspect.yaml deleted file mode 100644 index 63a8778..0000000 --- a/rpminspect.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# This check is disabled because rpminspect has issues with -# macro nesting and autorelease macro -# which led to continuous need to waive or ignore the failure of the test -# e.g:https://artifacts.dev.testing-farm.io/07049d23-04ed-451c-99f6-eed73e369d28/ -inspections: - disttag: off -# Multiple annochecks are disabled because they are creating Verify type failures -annocheck: - extra_opts: - # Issue: https://github.com/nodejs/node/issues/40368 - # skip test for link time optimalization - # test fails because nodejs is compiled without LTO. - # This is on purpose as it creates issues. - hardened: --skip-lto - # Temporarily disabled - # skip test for GNU Property notes formatting - # test fails because it's missing CET notes - # feature is unsopported by upstream - # See RHEL-85793 for details - hardened: --skip-property-note - hardened: --skip-cf-protection - # Temporarily disabled - # skip test for dynamic tags - # BTI_PLT protection feature is missing from dynamic tags - # libnode.so.127 lacks this feature - # See RHEL-85837 for details - hardened: --skip-dynamic-tags diff --git a/sources b/sources index 4fa4709..7b32dab 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (node-v24.6.0-stripped.tar.gz) = baec00c7d9bc1d86552736541d024983aa1591c7f8a26445113c8346c6699c16e0bd79a6772084fcb4a01ac01988f03beba85b3647f485a12ef6416bad57a1d1 SHA512 (icu4c-77_1-data-bin-b.zip) = 93b4c8228a059546e7c3e337f1f837db255c0046c15f50a31a7bd20daf361174edab05b01faaac1dd4f515ca3c1f1d7fb0f61e4177eb5631833ad1450e252c4e SHA512 (icu4c-77_1-data-bin-l.zip) = 3de15bb5925956b8e51dc6724c2114a1009ec471a2241b09ae09127f1760f44d02cc29cfbeed6cbaac6ee880553ac8395c61c6043c00ddba3277233e19e6490e +SHA512 (node-v24.6.0-stripped.tar.gz) = baec00c7d9bc1d86552736541d024983aa1591c7f8a26445113c8346c6699c16e0bd79a6772084fcb4a01ac01988f03beba85b3647f485a12ef6416bad57a1d1 SHA512 (packaging-scripts.tar.gz) = 5123c6fa3eb89e37a300914184eee10268568efc662a1c5b107900438b35e43c4222c4a31cf02b9d605c693f7e652420fdaf7209e41ba666ff428c3c0d340b7b