From 245cdf94f5aa310d3926d87e2d192ebc64d8c311 Mon Sep 17 00:00:00 2001 From: kxxt Date: Mon, 4 Dec 2023 23:10:19 +0800 Subject: [PATCH] upgpatch: bitwarden 2023.10.1-1 Fix a mistake in my previous PR. --- bitwarden/builder-util+23.6.0.patch | 124 ---------------------------- bitwarden/riscv64.patch | 2 +- 2 files changed, 1 insertion(+), 125 deletions(-) diff --git a/bitwarden/builder-util+23.6.0.patch b/bitwarden/builder-util+23.6.0.patch index 5a9a6b2ec..6f01a6e8a 100644 --- a/bitwarden/builder-util+23.6.0.patch +++ b/bitwarden/builder-util+23.6.0.patch @@ -36,127 +36,3 @@ index a8827f5..2f5a626 100644 default: throw new Error(`Unsupported arch ${name}`); } -diff --git a/node_modules/builder-util/out/arch.js.orig b/node_modules/builder-util/out/arch.js.orig -new file mode 100644 -index 0000000..a8827f5 ---- /dev/null -+++ b/node_modules/builder-util/out/arch.js.orig -@@ -0,0 +1,92 @@ -+"use strict"; -+Object.defineProperty(exports, "__esModule", { value: true }); -+exports.getArtifactArchName = exports.defaultArchFromString = exports.archFromString = exports.getArchSuffix = exports.getArchCliNames = exports.toLinuxArchString = exports.Arch = void 0; -+var Arch; -+(function (Arch) { -+ Arch[Arch["ia32"] = 0] = "ia32"; -+ Arch[Arch["x64"] = 1] = "x64"; -+ Arch[Arch["armv7l"] = 2] = "armv7l"; -+ Arch[Arch["arm64"] = 3] = "arm64"; -+ Arch[Arch["universal"] = 4] = "universal"; -+})(Arch = exports.Arch || (exports.Arch = {})); -+function toLinuxArchString(arch, targetName) { -+ switch (arch) { -+ case Arch.x64: -+ return targetName === "flatpak" ? "x86_64" : "amd64"; -+ case Arch.ia32: -+ return targetName === "pacman" ? "i686" : "i386"; -+ case Arch.armv7l: -+ return targetName === "snap" || targetName === "deb" ? "armhf" : targetName === "flatpak" ? "arm" : "armv7l"; -+ case Arch.arm64: -+ return targetName === "pacman" || targetName === "flatpak" ? "aarch64" : "arm64"; -+ default: -+ throw new Error(`Unsupported arch ${arch}`); -+ } -+} -+exports.toLinuxArchString = toLinuxArchString; -+function getArchCliNames() { -+ return [Arch[Arch.ia32], Arch[Arch.x64], Arch[Arch.armv7l], Arch[Arch.arm64]]; -+} -+exports.getArchCliNames = getArchCliNames; -+function getArchSuffix(arch, defaultArch) { -+ return arch === defaultArchFromString(defaultArch) ? "" : `-${Arch[arch]}`; -+} -+exports.getArchSuffix = getArchSuffix; -+function archFromString(name) { -+ switch (name) { -+ case "x64": -+ return Arch.x64; -+ case "ia32": -+ return Arch.ia32; -+ case "arm64": -+ return Arch.arm64; -+ case "arm": -+ case "armv7l": -+ return Arch.armv7l; -+ case "universal": -+ return Arch.universal; -+ default: -+ throw new Error(`Unsupported arch ${name}`); -+ } -+} -+exports.archFromString = archFromString; -+function defaultArchFromString(name) { -+ return name ? archFromString(name) : Arch.x64; -+} -+exports.defaultArchFromString = defaultArchFromString; -+function getArtifactArchName(arch, ext) { -+ let archName = Arch[arch]; -+ const isAppImage = ext === "AppImage" || ext === "appimage"; -+ if (arch === Arch.x64) { -+ if (isAppImage || ext === "rpm" || ext === "flatpak") { -+ archName = "x86_64"; -+ } -+ else if (ext === "deb" || ext === "snap") { -+ archName = "amd64"; -+ } -+ } -+ else if (arch === Arch.ia32) { -+ if (ext === "deb" || isAppImage || ext === "snap" || ext === "flatpak") { -+ archName = "i386"; -+ } -+ else if (ext === "pacman" || ext === "rpm") { -+ archName = "i686"; -+ } -+ } -+ else if (arch === Arch.armv7l) { -+ if (ext === "snap") { -+ archName = "armhf"; -+ } -+ else if (ext === "flatpak") { -+ archName = "arm"; -+ } -+ } -+ else if (arch === Arch.arm64) { -+ if (ext === "pacman" || ext === "rpm" || ext === "flatpak") { -+ archName = "aarch64"; -+ } -+ } -+ return archName; -+} -+exports.getArtifactArchName = getArtifactArchName; -+//# sourceMappingURL=arch.js.map -\ No newline at end of file -diff --git a/node_modules/builder-util/out/arch.js.rej b/node_modules/builder-util/out/arch.js.rej -new file mode 100644 -index 0000000..1f2ad9c ---- /dev/null -+++ b/node_modules/builder-util/out/arch.js.rej -@@ -0,0 +1,19 @@ -+--- node_modules/builder-util/out/arch.js -++++ node_modules/builder-util/out/arch.js -+@@ -20,13 +21,15 @@ function toLinuxArchString(arch, targetName) { -+ return targetName === "snap" || targetName === "deb" ? "armhf" : targetName === "flatpak" ? "arm" : "armv7l"; -+ case Arch.arm64: -+ return targetName === "pacman" || targetName === "rpm" || targetName === "flatpak" ? "aarch64" : "arm64"; -++ case Arch.riscv64: -++ return "riscv64"; -+ default: -+ throw new Error(`Unsupported arch ${arch}`); -+ } -+ } -+ exports.toLinuxArchString = toLinuxArchString; -+ function getArchCliNames() { -+- return [Arch[Arch.ia32], Arch[Arch.x64], Arch[Arch.armv7l], Arch[Arch.arm64]]; -++ return [Arch[Arch.ia32], Arch[Arch.x64], Arch[Arch.armv7l], Arch[Arch.arm64], Arch[Arch.riscv64]]; -+ } -+ exports.getArchCliNames = getArchCliNames; -+ function getArchSuffix(arch, defaultArch) { diff --git a/bitwarden/riscv64.patch b/bitwarden/riscv64.patch index b59474140..f3e28c742 100644 --- a/bitwarden/riscv64.patch +++ b/bitwarden/riscv64.patch @@ -25,7 +25,7 @@ - 'fdc047aadc1cb947209d7ae999d8a7f5f10ae46bf71687080bc13bc3082cc5166bbbe88c8f506b78adb5d772f5366ec671b04a2f761e7d7f249ebe5726681e30') + 'fdc047aadc1cb947209d7ae999d8a7f5f10ae46bf71687080bc13bc3082cc5166bbbe88c8f506b78adb5d772f5366ec671b04a2f761e7d7f249ebe5726681e30' + '4087cd10bbaad8c44917eba6a74ea26ad9d38a3c5f6ad920cb6804e4526e5e66f75c71eab60ba48997daf2f1e199b2a170c070d900cba599e4947eb48474da0c' -+ 'a7d87843bc31b94ebe47af10c7dbf0d7ed2b6507cc39f4140363d37d549eea940f4d9d5bb71b1a836751a37d20931faa80631aec511d5c1329803339c35a1b4c' ++ '91672ce7bcb803bf7b4ac50683c9b232773f22ef19ef6f29d82c55aaad69013b0922bb0122b2f2dcfe8bb7eab8ea1241aba2a31439acc0b693e3ac631c229fab' + '0caa1f3c0439275807f90f8a484651fa6008d0985dc3a515a60323016d9b65cbf3897bfc87e45c18c7f26468bc3eab4c67b2e010077ad202a2959b5529bd0f8c' + '6dc694e0c37c126419838622560380a5e5195c49e687ee5398305bd3c0b237c0d335ff97cfa10c3a65b3683d81ad8c56e350f67b01f679d17b7347dbdb2f46bf' + 'SKIP')