Bug 51743
| Summary: | Не работает команда `node-gyp rebuild` | ||
|---|---|---|---|
| Product: | Branch p11 | Reporter: | Alexander Makeenkov <amakeenk> |
| Component: | node-gyp | Assignee: | Vitaly Lipatov <lav> |
| Status: | CLOSED FIXED | QA Contact: | qa-p11 <qa-p11> |
| Severity: | normal | ||
| Priority: | P5 | CC: | kozhevnikovvs, lav, obidinog, sychkinsv |
| Version: | unspecified | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
Актуально для node-gyp-11.0.0-alt1 node-22.19.0-alt1 gyp info it worked if it ends with ok gyp info using node-gyp@11.0.0 gyp info using node@22.19.0 | linux | x64 gyp info find Python using Python version 3.13.11 found at "/usr/bin/python3" gyp ERR! build error gyp ERR! stack Error: You must run `node-gyp configure` first! gyp ERR! stack at loadConfigGypi (/usr/lib/node_modules/node-gyp/lib/build.js:49:15) gyp ERR! stack at async build (/usr/lib/node_modules/node-gyp/lib/build.js:36:3) gyp ERR! stack at async run (/usr/lib/node_modules/node-gyp/bin/node-gyp.js:81:18) gyp ERR! System Linux 6.12.61-6.12-alt1 gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "rebuild" gyp ERR! cwd /tmp/.private/root/05_node-gyp_rebuild_test-rIAfKp2TfO gyp ERR! node -v v22.19.0 gyp ERR! node-gyp -v v11.0.0 gyp ERR! not ok У меня воспроизводится поломка, но с другой ошибкой node-gyp rebuild gyp info it worked if it ends with ok gyp info using node-gyp@11.0.0 gyp info using node@22.19.0 | linux | x64 gyp info find Python using Python version 3.13.11 found at "/bin/python3" gyp ERR! build error gyp ERR! stack Error: You must run `node-gyp configure` first! gyp ERR! stack at loadConfigGypi (/usr/lib/node_modules/node-gyp/lib/build.js:49:15) gyp ERR! stack at async build (/usr/lib/node_modules/node-gyp/lib/build.js:36:3) gyp ERR! stack at async run (/usr/lib/node_modules/node-gyp/bin/node-gyp.js:81:18) gyp ERR! System Linux 6.12.54-6.12-alt1 gyp ERR! command "/usr/bin/node" "/bin/node-gyp" "rebuild" gyp ERR! cwd /srv/lav/Projects/git-alt/node/8 gyp ERR! node -v v22.19.0 gyp ERR! node-gyp -v v11.0.0 gyp ERR! not ok Она из-за пустого build/config.gypi но node-gyp configure это лечит. Воспроизводится: gyp info it worked if it ends with ok gyp info using node-gyp@12.2.0 gyp info using node@22.19.0 | linux | x64 gyp info find Python using Python version 3.13.12 found at "/usr/bin/python3" gyp ERR! build error gyp ERR! stack Error: You must run `node-gyp configure` first! gyp ERR! stack at loadConfigGypi (/usr/lib/node_modules/node-gyp/lib/build.js:49:15) gyp ERR! stack at async build (/usr/lib/node_modules/node-gyp/lib/build.js:36:3) gyp ERR! stack at async run (/usr/lib/node_modules/node-gyp/bin/node-gyp.js:81:18) gyp ERR! System Linux 6.12.33-6.12-alt1 gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "rebuild" gyp ERR! cwd /home/test gyp ERR! node -v v22.19.0 gyp ERR! node-gyp -v v12.2.0 gyp ERR! not ok node-gyp-13.1.0-alt2 -> sisyphus: Sun Oct 11 2026 Vitaly Lipatov <lav@altlinux.ru> 13.1.0-alt2 - fix node-gyp rebuild: await build dir creation in system nodedir patch (closes: #51743) - drop no-op gyp_script substitution Версия пакета: node-gyp-10.1.0-alt2 Ошибка воспроизводится на p11. На Sisyphus (node-gyp-13.1.0-alt2) ошибка не воспроизвелась. Подтверждаю: воспроизводится на p11 (docker, node-gyp-10.1.0-alt2, node-22.23.3-alt1, минимальный аддон на node-addon-api): `node-gyp rebuild` падает с "You must run `node-gyp configure` first!", build/config.gypi остаётся пустым. В Sisyphus (node-gyp-13.1.0-alt2) тот же сценарий собирается успешно (gyp info ok, hello_world.node создан). Исправление для p11 - перенос из Sisyphus. node-gyp-13.1.0-alt2 -> p11: Sun Oct 11 2026 Vitaly Lipatov <lav@altlinux.ru> 13.1.0-alt2 - fix node-gyp rebuild: await build dir creation in system nodedir patch (closes: #51743) - drop no-op gyp_script substitution Sun Oct 11 2026 Vitaly Lipatov <lav@altlinux.ru> 13.1.0-alt1 - new version 13.1.0 - require node >= 22.22.2 (upstream engines) - security fixes: + CVE-2026-53655, GHSA-vmf3-w455-68vh: fix tar parser interpretation differential via PAX size override on GNU long-name/long-link headers. + CVE-2026-59871, GHSA-w8wr-v893-vjvp: fix tar process crash via PAX numeric path type confusion. + CVE-2026-59873, GHSA-23hp-3jrh-7fpw: fix tar decompression/parse DoS via unlimited input. + CVE-2026-59874, GHSA-8x88-c5mf-7j5w: fix tar infinite loop on negative entry size in archive replace. + CVE-2026-59875, GHSA-gvwx-54wh-qm9j: fix tar uncaught exception DoS via NUL byte in PAX path/linkpath. + CVE-2026-73566, GHSA-r292-9mhp-454m: fix tar stack overflow DoS via crafted long-path archive. + CVE-2026-33671, GHSA-c2c7-rcm5-vvqj: fix picomatch ReDoS via extglob quantifiers. + CVE-2026-33672, GHSA-3v7f-55p6-f55p: fix picomatch method injection in POSIX character classes. Thu Mar 12 2026 Vitaly Lipatov <lav@altlinux.ru> 12.2.0-alt1 - new version 12.2.0 Sun Feb 09 2025 Vitaly Lipatov <lav@altlinux.ru> 11.0.0-alt1 - new version 11.0.0 (with rpmrb script) |

Description
Alexander Makeenkov 2024-10-17 17:43:12 MSKВерсия пакета: node-gyp-10.1.0-alt1 Шаги воспроизведения: ``` # apt-get install node-gyp npm node-addon-api $ npm install bindings $ cat > binding.gyp <<EOF { "targets": [ { "cflags!": [ "-fno-exceptions" ], "cflags_cc!": [ "-fno-exceptions" ], "include_dirs" : [ "<!@(node -p \"require('node-addon-api').include\")" ], "target_name": "hello_world", "sources": [ "hello_world.cc" ], 'defines': [ 'NAPI_DISABLE_CPP_EXCEPTIONS' ] } ] } EOF $ cat > hello_world.cc <<EOF #include <napi.h> Napi::String SayHi(const Napi::CallbackInfo& info) { Napi::Env env = info.Env(); return Napi::String::New(env, "Hi!"); } Napi::Object init(Napi::Env env, Napi::Object exports) { exports.Set(Napi::String::New(env, "sayHi"), Napi::Function::New(env, SayHi)); return exports; }; NODE_API_MODULE(hello_world, init); EOF $ cat > main.js <<EOF const hello_world = require('bindings')('hello_world') console.log(hello_world.sayHi()); EOF $ node-gyp configure $ node-gyp build $ node main.js $ node-gyp rebuild ``` Получаемый результат: ``` $ node-gyp rebuild gyp info it worked if it ends with ok gyp info using node-gyp@10.1.0 gyp info using node@20.17.0 | linux | x64 gyp info find Python using Python version 3.12.7 found at "/usr/bin/python3" gyp ERR! build error gyp ERR! stack Error: You must run `node-gyp configure` first! gyp ERR! stack at loadConfigGypi (/usr/lib/node_modules/node-gyp/lib/build.js:48:15) gyp ERR! stack at async build (/usr/lib/node_modules/node-gyp/lib/build.js:35:3) gyp ERR! stack at async run (/usr/lib/node_modules/node-gyp/bin/node-gyp.js:81:18) gyp ERR! System Linux 6.6.56-un-def-alt1 gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "rebuild" gyp ERR! cwd /home/test/q gyp ERR! node -v v20.17.0 gyp ERR! node-gyp -v v10.1.0 gyp ERR! not ok ``` Выполнение configure не помогает, ошибка с таким же сообщением всё равно остаётся.