diff --git a/_scmsync.obsinfo b/_scmsync.obsinfo index a4cc2b4..dec58da 100644 --- a/_scmsync.obsinfo +++ b/_scmsync.obsinfo @@ -1,3 +1,3 @@ -mtime: 1733332357 -commit: 8800b2b09cf647b9cea744d23141cbca73e6897cda26094650047f982a54ea65 +mtime: 1733403526 +commit: 6dbcf743eb35bc4224b956f23d9ad0e7e6c97950351cf855f1e5024e8267da2c url: https://src.opensuse.org/nodejs/nodejs22.git diff --git a/nodejs.keyring b/nodejs.keyring index dc32334..2d1e055 100644 Binary files a/nodejs.keyring and b/nodejs.keyring differ diff --git a/nodejs22.changes b/nodejs22.changes index 7381ffd..7a27088 100644 --- a/nodejs22.changes +++ b/nodejs22.changes @@ -9,6 +9,8 @@ Wed Dec 4 16:59:08 UTC 2024 - Adam Majer (bsc#1233856, CVE-2024-21538) - icu76.1.patch: upstreamed, dropped - linker_lto_jobs.patch, nodejs-libpath.patch, fix_ci_tests.patch: refreshed +- nodejs.keyring: updated with upstream releaser list +- old_cares.patch: fix with older c-ares ------------------------------------------------------------------- Wed Nov 20 10:04:23 UTC 2024 - Adam Majer diff --git a/nodejs22.spec b/nodejs22.spec index b11dda8..98f1430 100644 --- a/nodejs22.spec +++ b/nodejs22.spec @@ -173,6 +173,7 @@ Patch200: versioned.patch Patch305: qemu_timeouts_arches.patch Patch307: v8-i586.patch Patch309: gcc13.patch +Patch311: old_cares.patch BuildRequires: pkg-config BuildRequires: fdupes @@ -711,7 +712,7 @@ popd %patch -P 305 -p1 %patch -P 307 -p1 %patch -P 309 -p1 - +%patch -P 311 -p1 %if %{node_version_number} == 12 # minimist security update - patch50 diff --git a/old_cares.patch b/old_cares.patch new file mode 100644 index 0000000..e6f906a --- /dev/null +++ b/old_cares.patch @@ -0,0 +1,155 @@ +temporary revert changes until we can upgrade c-ares in SLE-15:Update + +commit bf68733e7f61bf4ff51a456e27123f44a526aebc +Author: Aviv Keller +Date: Wed Oct 30 10:10:28 2024 -0400 + + dns: stop using deprecated `ares_query` + + PR-URL: https://github.com/nodejs/node/pull/55430 + Refs: https://github.com/nodejs/node/issues/52464 + Reviewed-By: Luigi Pinca + Reviewed-By: Matteo Collina + + +Index: node-v22.12.0/src/cares_wrap.cc +=================================================================== +--- node-v22.12.0.orig/src/cares_wrap.cc ++++ node-v22.12.0/src/cares_wrap.cc +@@ -825,62 +825,62 @@ void ChannelWrap::EnsureServers() { + } + + int AnyTraits::Send(QueryWrap* wrap, const char* name) { +- wrap->AresQuery(name, ARES_CLASS_IN, ARES_REC_TYPE_ANY); ++ wrap->AresQuery(name, ns_c_in, ns_t_any); + return ARES_SUCCESS; + } + + int ATraits::Send(QueryWrap* wrap, const char* name) { +- wrap->AresQuery(name, ARES_CLASS_IN, ARES_REC_TYPE_A); ++ wrap->AresQuery(name, ns_c_in, ns_t_a); + return ARES_SUCCESS; + } + + int AaaaTraits::Send(QueryWrap* wrap, const char* name) { +- wrap->AresQuery(name, ARES_CLASS_IN, ARES_REC_TYPE_AAAA); ++ wrap->AresQuery(name, ns_c_in, ns_t_aaaa); + return ARES_SUCCESS; + } + + int CaaTraits::Send(QueryWrap* wrap, const char* name) { +- wrap->AresQuery(name, ARES_CLASS_IN, ARES_REC_TYPE_CAA); ++ wrap->AresQuery(name, ns_c_in, T_CAA); + return ARES_SUCCESS; + } + + int CnameTraits::Send(QueryWrap* wrap, const char* name) { +- wrap->AresQuery(name, ARES_CLASS_IN, ARES_REC_TYPE_CNAME); ++ wrap->AresQuery(name, ns_c_in, ns_t_cname); + return ARES_SUCCESS; + } + + int MxTraits::Send(QueryWrap* wrap, const char* name) { +- wrap->AresQuery(name, ARES_CLASS_IN, ARES_REC_TYPE_MX); ++ wrap->AresQuery(name, ns_c_in, ns_t_mx); + return ARES_SUCCESS; + } + + int NsTraits::Send(QueryWrap* wrap, const char* name) { +- wrap->AresQuery(name, ARES_CLASS_IN, ARES_REC_TYPE_NS); ++ wrap->AresQuery(name, ns_c_in, ns_t_ns); + return ARES_SUCCESS; + } + + int TxtTraits::Send(QueryWrap* wrap, const char* name) { +- wrap->AresQuery(name, ARES_CLASS_IN, ARES_REC_TYPE_TXT); ++ wrap->AresQuery(name, ns_c_in, ns_t_txt); + return ARES_SUCCESS; + } + + int SrvTraits::Send(QueryWrap* wrap, const char* name) { +- wrap->AresQuery(name, ARES_CLASS_IN, ARES_REC_TYPE_SRV); ++ wrap->AresQuery(name, ns_c_in, ns_t_srv); + return ARES_SUCCESS; + } + + int PtrTraits::Send(QueryWrap* wrap, const char* name) { +- wrap->AresQuery(name, ARES_CLASS_IN, ARES_REC_TYPE_PTR); ++ wrap->AresQuery(name, ns_c_in, ns_t_ptr); + return ARES_SUCCESS; + } + + int NaptrTraits::Send(QueryWrap* wrap, const char* name) { +- wrap->AresQuery(name, ARES_CLASS_IN, ARES_REC_TYPE_NAPTR); ++ wrap->AresQuery(name, ns_c_in, ns_t_naptr); + return ARES_SUCCESS; + } + + int SoaTraits::Send(QueryWrap* wrap, const char* name) { +- wrap->AresQuery(name, ARES_CLASS_IN, ARES_REC_TYPE_SOA); ++ wrap->AresQuery(name, ns_c_in, ns_t_soa); + return ARES_SUCCESS; + } + +Index: node-v22.12.0/src/cares_wrap.h +=================================================================== +--- node-v22.12.0.orig/src/cares_wrap.h ++++ node-v22.12.0/src/cares_wrap.h +@@ -246,20 +246,18 @@ class QueryWrap final : public AsyncWrap + return Traits::Send(this, name); + } + +- void AresQuery(const char* name, +- ares_dns_class_t dnsclass, +- ares_dns_rec_type_t type) { ++ void AresQuery(const char* name, int dnsclass, int type) { + channel_->EnsureServers(); + TRACE_EVENT_NESTABLE_ASYNC_BEGIN1( + TRACING_CATEGORY_NODE2(dns, native), trace_name_, this, + "name", TRACE_STR_COPY(name)); +- ares_query_dnsrec(channel_->cares_channel(), +- name, +- dnsclass, +- type, +- Callback, +- MakeCallbackPointer(), +- nullptr); ++ ares_query( ++ channel_->cares_channel(), ++ name, ++ dnsclass, ++ type, ++ Callback, ++ MakeCallbackPointer()); + } + + void ParseError(int status) { +@@ -306,20 +304,19 @@ class QueryWrap final : public AsyncWrap + return wrap; + } + +- static void Callback(void* arg, +- ares_status_t status, +- size_t timeouts, +- const ares_dns_record_t* dnsrec) { ++ static void Callback( ++ void* arg, ++ int status, ++ int timeouts, ++ unsigned char* answer_buf, ++ int answer_len) { + QueryWrap* wrap = FromCallbackPointer(arg); + if (wrap == nullptr) return; + + unsigned char* buf_copy = nullptr; +- size_t answer_len = 0; + if (status == ARES_SUCCESS) { +- // No need to explicitly call ares_free_string here, +- // as it is a wrapper around free, which is already +- // invoked when MallocedBuffer is destructed. +- ares_dns_write(dnsrec, &buf_copy, &answer_len); ++ buf_copy = node::Malloc(answer_len); ++ memcpy(buf_copy, answer_buf, answer_len); + } + + wrap->response_data_ = std::make_unique();