Skip to content

Commit

Permalink
Migrate kerberos patch
Browse files Browse the repository at this point in the history
  • Loading branch information
bigorn0 committed Aug 26, 2024
1 parent 5c6b894 commit a38403e
Showing 1 changed file with 30 additions and 56 deletions.
86 changes: 30 additions & 56 deletions patches/kerberos+2.1.0.patch → patches/kerberos+2.1.2.patch
Original file line number Diff line number Diff line change
@@ -1,44 +1,36 @@
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).
+This typically enable cross building an Electron application.
+
+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 @@
Expand All @@ -51,56 +43,38 @@ 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",
+ "install": "prebuild-install --runtime napi",
"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

0 comments on commit a38403e

Please sign in to comment.