Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package nodejs21 for openSUSE:Factory 
checked in at 2024-01-04 15:56:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nodejs21 (Old)
 and      /work/SRC/openSUSE:Factory/.nodejs21.new.28375 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "nodejs21"

Thu Jan  4 15:56:50 2024 rev:4 rq:1136239 version:21.4.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/nodejs21/nodejs21.changes        2023-12-17 
21:28:50.830006415 +0100
+++ /work/SRC/openSUSE:Factory/.nodejs21.new.28375/nodejs21.changes     
2024-01-04 15:58:06.734085496 +0100
@@ -1,0 +2,5 @@
+Tue Jan  2 14:25:03 UTC 2024 - Adam Majer <[email protected]>
+
+- c-ares-fixes.patch: fixes unit tests for new c-ares
+
+-------------------------------------------------------------------

New:
----
  c-ares-fixes.patch

BETA DEBUG BEGIN:
  New:
- c-ares-fixes.patch: fixes unit tests for new c-ares
BETA DEBUG END:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ nodejs21.spec ++++++
--- /var/tmp/diff_new_pack.sZNsr1/_old  2024-01-04 15:58:07.534114721 +0100
+++ /var/tmp/diff_new_pack.sZNsr1/_new  2024-01-04 15:58:07.534114721 +0100
@@ -49,6 +49,11 @@
 %bcond_with libalternatives
 %endif
 
+# nodejs20+ is not for SLE12
+%if %{node_version_number} >= 20 && 0%{?suse_version} > 0 && 0%{?suse_version} 
< 1500
+ExclusiveArch do_not_build
+%endif
+
 %if %node_version_number >= 12
 %define openssl_req_ver 1.1.1
 %else
@@ -172,6 +177,7 @@
 Patch305:       qemu_timeouts_arches.patch
 Patch308:       node-gyp-config.patch
 Patch309:       gcc13.patch
+Patch311:       c-ares-fixes.patch
 
 BuildRequires:  pkg-config
 BuildRequires:  fdupes
@@ -672,6 +678,7 @@
 
 %if %{node_version_number} >= 19
 %patch308 -p1
+%else
 %endif
 %endif
 
@@ -686,7 +693,9 @@
 %patch13 -p1
 %patch100 -p1
 %patch101 -p1
+%if 0%{?suse_version} >= 1500 || 0%{?suse_version} == 0
 %patch102 -p1
+%endif
 # Add check_output to configure script (not part of Python 2.6 in SLE11).
 %if 0%{?suse_version} == 1110
 %endif
@@ -701,6 +710,7 @@
 
 %patch305 -p1
 %patch309 -p1
+%patch311 -p1
 
 %if %{node_version_number} == 12
 # minimist security update - patch50


++++++ c-ares-fixes.patch ++++++
Index: node-v21.4.0/test/parallel/test-dns-resolveany-bad-ancount.js
===================================================================
--- node-v21.4.0.orig/test/parallel/test-dns-resolveany-bad-ancount.js
+++ node-v21.4.0/test/parallel/test-dns-resolveany-bad-ancount.js
@@ -7,6 +7,8 @@ const dgram = require('dgram');
 const dnsPromises = dns.promises;
 
 const server = dgram.createSocket('udp4');
+const resolver = new dns.Resolver({ timeout: 100, tries: 1 });
+const resolverPromises = new dnsPromises.Resolver({ timeout: 100, tries: 1 });
 
 server.on('message', common.mustCall((msg, { address, port }) => {
   const parsed = dnstools.parseDNSPacket(msg);
@@ -18,16 +20,20 @@ server.on('message', common.mustCall((ms
     questions: parsed.questions,
     answers: { type: 'A', address: '1.2.3.4', ttl: 123, domain },
   });
-  // Overwrite the # of answers with 2, which is incorrect.
+  // Overwrite the # of answers with 2, which is incorrect. The response is
+  // discarded in c-ares >= 1.21.0. This is the reason why a small timeout is
+  // used in the `Resolver` constructor. See
+  // https://github.com/nodejs/node/pull/50743#issue-1994909204
   buf.writeUInt16LE(2, 6);
   server.send(buf, port, address);
 }, 2));
 
 server.bind(0, common.mustCall(async () => {
   const address = server.address();
-  dns.setServers([`127.0.0.1:${address.port}`]);
+  resolver.setServers([`127.0.0.1:${address.port}`]);
+  resolverPromises.setServers([`127.0.0.1:${address.port}`]);
 
-  dnsPromises.resolveAny('example.org')
+  resolverPromises.resolveAny('example.org')
     .then(common.mustNotCall())
     .catch(common.expectsError({
       // May return EBADRESP or ETIMEOUT
@@ -36,7 +42,7 @@ server.bind(0, common.mustCall(async ()
       hostname: 'example.org'
     }));
 
-  dns.resolveAny('example.org', common.mustCall((err) => {
+  resolver.resolveAny('example.org', common.mustCall((err) => {
     assert.notStrictEqual(err.code, 'SUCCESS');
     assert.strictEqual(err.syscall, 'queryAny');
     assert.strictEqual(err.hostname, 'example.org');

Reply via email to