From a38403e971923539de4ff9624fae1ac25016f6e8 Mon Sep 17 00:00:00 2001 From: Ugo Bechameil Date: Mon, 26 Aug 2024 15:18:02 +0200 Subject: [PATCH] Migrate kerberos patch --- ...beros+2.1.0.patch => kerberos+2.1.2.patch} | 86 +++++++------------ 1 file changed, 30 insertions(+), 56 deletions(-) rename patches/{kerberos+2.1.0.patch => kerberos+2.1.2.patch} (51%) diff --git a/patches/kerberos+2.1.0.patch b/patches/kerberos+2.1.2.patch similarity index 51% rename from patches/kerberos+2.1.0.patch rename to patches/kerberos+2.1.2.patch index edefafc..582ed88 100644 --- a/patches/kerberos+2.1.0.patch +++ b/patches/kerberos+2.1.2.patch @@ -1,19 +1,10 @@ -diff --git a/node_modules/kerberos/.npmignore b/node_modules/kerberos/.npmignore -new file mode 100644 -index 0000000..14e8972 ---- /dev/null -+++ b/node_modules/kerberos/.npmignore -@@ -0,0 +1,5 @@ -+HISTORY.md -+prebuilds/ -+build/ -+src/ -+binding.gyp diff --git a/node_modules/kerberos/README.md b/node_modules/kerberos/README.md -index 20b6884..efcae67 100644 +index b662364..3aa6a78 100644 --- a/node_modules/kerberos/README.md +++ b/node_modules/kerberos/README.md -@@ -1,3 +1,10 @@ +@@ -1,5 +1,12 @@ + Kerberos + ======== +# Repackaged version of Kerberos + +This is a convenience package that will install all prebuilds for all supported platforms, to the contrary to the upstream package that constraint the installation only to the runtime platform (os/cpu). @@ -21,24 +12,25 @@ index 20b6884..efcae67 100644 + +The package is cleaned up to only embbed the necessary. + - Kerberos - ======== The `kerberos` package is a C++ extension for Node.js that provides cross-platform support for kerberos authentication using GSSAPI on linux/osx, and SSPI on windows. Much of the code in this module is adapted from [ccs-kerberos](https://github.com/apple/ccs-pykerberos) and [winkerberos](https://github.com/mongodb-labs/winkerberos). + + ### Requirements diff --git a/node_modules/kerberos/lib/kerberos.js b/node_modules/kerberos/lib/kerberos.js -index 09f8425..4245ecf 100644 +index 09f8425..58fb13c 100644 --- a/node_modules/kerberos/lib/kerberos.js +++ b/node_modules/kerberos/lib/kerberos.js -@@ -1,6 +1,6 @@ +@@ -1,6 +1,8 @@ 'use strict'; -- + -const kerberos = require('bindings')('kerberos'); +const os = require('os'); +const kerberos = require(/* webpackIgnore: true */ `@hackolade/kerberos-${os.platform()}-${os.arch()}`); ++ const KerberosClient = kerberos.KerberosClient; const KerberosServer = kerberos.KerberosServer; const defineOperation = require('./util').defineOperation; diff --git a/node_modules/kerberos/package.json b/node_modules/kerberos/package.json -index f4923f6..17548eb 100644 +index e824340..c51931c 100644 --- a/node_modules/kerberos/package.json +++ b/node_modules/kerberos/package.json @@ -5,9 +5,6 @@ @@ -51,28 +43,34 @@ index f4923f6..17548eb 100644 "README.md" ], "repository": { -@@ -27,11 +24,10 @@ +@@ -26,13 +23,9 @@ + "bugs": { "url": "https://jira.mongodb.org/projects/NODE/issues/" }, - "dependencies": { +- "dependencies": { - "bindings": "^1.5.0", - "node-addon-api": "^6.1.0", -- "prebuild-install": "7.1.1" -+ "node-addon-api": "^6.1.0" - }, +- "prebuild-install": "^7.1.2" +- }, "devDependencies": { + "@types/node": "^20.14.9", + "bindings": "^1.5.0", - "chai": "^4.3.7", + "chai": "^4.4.1", "chai-string": "^1.5.0", "chalk": "^4.1.2", -@@ -45,19 +41,20 @@ - "mongodb": "^5.7.0", - "node-gyp": "^9.4.0", - "prebuild": "^11.0.4", +@@ -44,8 +37,10 @@ + "jsdoc-to-markdown": "^8.0.1", + "mocha": "^10.4.0", + "mongodb": "^6.5.0", ++ "node-addon-api": "^6.1.0", + "node-gyp": "^10.1.0", + "prebuild": "^13.0.0", + "prebuild-install": "7.1.1", - "prettier": "^2.8.8", - "request": "^2.88.2", - "standard-version": "^9.5.0" + "prettier": "^3.2.5", + "request": "^2.88.2" + }, +@@ -55,7 +50,7 @@ + } }, "scripts": { - "install": "prebuild-install --runtime napi || node-gyp rebuild", @@ -80,27 +78,3 @@ index f4923f6..17548eb 100644 "format-cxx": "clang-format -i 'src/**/*'", "format-js": "eslint lib test --fix", "check:lint": "eslint lib test", - "precommit": "check-clang-format", - "test": "mocha test", - "docs": "jsdoc2md --template etc/README.hbs --plugin dmd-clear --files lib/kerberos.js > README.md", -- "rebuild": "prebuild --runtime napi --compile", -+ "rebuild": "electron-rebuild -w .", - "prebuild": "prebuild --runtime napi --strip --verbose --all", - "release": "standard-version -i HISTORY.md" - }, -diff --git a/node_modules/kerberos/prebuilds/darwin-arm64/kerberos.node b/node_modules/kerberos/prebuilds/darwin-arm64/kerberos.node -new file mode 100755 -index 0000000..40ddfe9 -Binary files /dev/null and b/node_modules/kerberos/prebuilds/darwin-arm64/kerberos.node differ -diff --git a/node_modules/kerberos/prebuilds/darwin-x64/kerberos.node b/node_modules/kerberos/prebuilds/darwin-x64/kerberos.node -new file mode 100755 -index 0000000..cec7c1f -Binary files /dev/null and b/node_modules/kerberos/prebuilds/darwin-x64/kerberos.node differ -diff --git a/node_modules/kerberos/prebuilds/linux-x64/kerberos.node b/node_modules/kerberos/prebuilds/linux-x64/kerberos.node -new file mode 100755 -index 0000000..e466b95 -Binary files /dev/null and b/node_modules/kerberos/prebuilds/linux-x64/kerberos.node differ -diff --git a/node_modules/kerberos/prebuilds/win32-x64/kerberos.node b/node_modules/kerberos/prebuilds/win32-x64/kerberos.node -new file mode 100644 -index 0000000..8fe6e3e -Binary files /dev/null and b/node_modules/kerberos/prebuilds/win32-x64/kerberos.node differ