diff --git a/_service b/_service index a84e34b..a7a21c8 100644 --- a/_service +++ b/_service @@ -2,8 +2,8 @@ git https://github.com/bitwarden/clients.git - desktop-v2024.9.0 - 2024.9.0 + desktop-v2024.10.0 + 2024.10.0 bitwarden bitwarden_license/* diff --git a/bitwarden-2024.10.0.obscpio b/bitwarden-2024.10.0.obscpio new file mode 100644 index 0000000..7eb7292 --- /dev/null +++ b/bitwarden-2024.10.0.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:26b5c39cde7b9bc25a503ec8ef9fcfde7e262b00ebd01a2c9967a3c1e3ff3172 +size 43877901 diff --git a/bitwarden-2024.9.0.obscpio b/bitwarden-2024.9.0.obscpio deleted file mode 100644 index c7771fd..0000000 --- a/bitwarden-2024.9.0.obscpio +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:467129673a0cdacf3baca394b03da71a026ca06bc5114cd9f5b6f56687862468 -size 42984461 diff --git a/bitwarden.changes b/bitwarden.changes index 225b9b6..9c6766a 100644 --- a/bitwarden.changes +++ b/bitwarden.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Oct 25 20:27:27 UTC 2024 - Bruno Pitrus + +- New upstream release 2024.10.0 + * no changelog provided +- Add native-messaging.main-fix-path.patch +- Remove a temporarily-nonfree new dependency that is currently dead code (gh#bitwarden/clients#11611) + * add remove-sdk-internal.patch + ------------------------------------------------------------------- Thu Sep 19 17:13:10 UTC 2024 - Bruno Pitrus diff --git a/bitwarden.obsinfo b/bitwarden.obsinfo index 2634455..e5ea4a1 100644 --- a/bitwarden.obsinfo +++ b/bitwarden.obsinfo @@ -1,4 +1,4 @@ name: bitwarden -version: 2024.9.0 -mtime: 1726620110 -commit: 601c13ae1b5ea45c1a47426c9adf190a14ebbd59 +version: 2024.10.0 +mtime: 1729194341 +commit: 0074d2f49ef4712920a13755ab07217ea1e57fd6 diff --git a/bitwarden.spec b/bitwarden.spec index 151314d..47f6dd5 100644 --- a/bitwarden.spec +++ b/bitwarden.spec @@ -22,7 +22,7 @@ Name: bitwarden -Version: 2024.9.0 +Version: 2024.10.0 Release: 0 Summary: A secure and free password manager for all of your devices Group: Productivity/Security @@ -61,7 +61,10 @@ Patch5: remove-argon2-browser.patch Patch7: bug-reporting-url.patch Patch8: no-sourcemaps.patch Patch9: main-getPath-exe.patch +Patch10: native-messaging.main-fix-path.patch +#patches to remove stuff we do not want +Patch500: remove-sdk-internal.patch #patches to use system libs Patch1000: system-libargon2.patch @@ -127,6 +130,9 @@ Bitwarden is a free and open-source password management service that stores sens %prep %autosetup -p1 -a1 +#fix exe path +sed -i 's[XXXLIBDIRXXX[%{_libdir}[g' apps/desktop/src/main/native-messaging.main.ts + # Remove unused postinstall script (electron-rebuild) sed -i '/"postinstall":/d' apps/desktop/package.json @@ -187,6 +193,7 @@ auditable='auditable -vv' cd apps/desktop pushd desktop_native cargo -vv $auditable rustc --offline --release --package desktop_napi --lib --crate-type cdylib +RUSTFLAGS="$RUSTFLAGS -Crelocation-model=pie" cargo -vv $auditable rustc --offline --release --package desktop_proxy --bin desktop_proxy popd npm run build @@ -197,6 +204,7 @@ cd build mkdir -pv node_modules/@bitwarden/desktop-napi cp -plv ../desktop_native/napi/{package.json,index.js} -t node_modules/@bitwarden/desktop-napi cp -plvT ../desktop_native/target/release/*.so node_modules/@bitwarden/desktop-napi/desktop_napi.node +cp -plv -t . ../desktop_native/target/release/desktop_proxy rm -fv ../../../node_modules/argon2/build-tmp-napi-v3/node_gyp_bins/python3 cp -plvr ../../../node_modules/argon2 -t node_modules/ cp -plvr ../../../node_modules/node-gyp-build -t node_modules/ @@ -258,6 +266,7 @@ find -name '.gitignore' -type f -print -delete #Fix file mode find . -type f -exec chmod 644 {} \; find . -name '*.node' -exec chmod 755 {} \; +chmod 755 desktop_proxy # Remove empty directories find . -type d -empty -print -delete diff --git a/main-getPath-exe.patch b/main-getPath-exe.patch index 9d59c2e..f61a4e8 100644 --- a/main-getPath-exe.patch +++ b/main-getPath-exe.patch @@ -1,11 +1,11 @@ ---- bitwarden-2024.8.2/apps/desktop/src/main.ts.orig 2024-09-05 19:34:54.000000000 +0200 -+++ bitwarden-2024.8.2/apps/desktop/src/main.ts 2024-09-12 16:26:40.135229235 +0200 -@@ -218,7 +218,7 @@ export class Main { +--- clients/apps/desktop/src/main.ts.orig 2024-10-17 19:47:51.775405137 +0200 ++++ clients/apps/desktop/src/main.ts 2024-10-17 21:04:06.768260922 +0200 +@@ -231,7 +231,7 @@ export class Main { this.logService, this.windowMain, app.getPath("userData"), - app.getPath("exe"), + '/usr/bin/bitwarden-desktop', + app.getAppPath(), ); - this.desktopAutofillSettingsService = new DesktopAutofillSettingsService(stateProvider); diff --git a/native-messaging.main-fix-path.patch b/native-messaging.main-fix-path.patch new file mode 100644 index 0000000..d9d6936 --- /dev/null +++ b/native-messaging.main-fix-path.patch @@ -0,0 +1,30 @@ +--- bitwarden-2024.10.0/apps/desktop/src/main/native-messaging.main.ts.orig 2024-10-17 21:45:41.000000000 +0200 ++++ bitwarden-2024.10.0/apps/desktop/src/main/native-messaging.main.ts 2024-10-25 22:25:27.180541673 +0200 +@@ -328,26 +328,7 @@ export class NativeMessagingMain { + } + + private binaryPath() { +- const ext = process.platform === "win32" ? ".exe" : ""; +- +- if (isDev()) { +- const devPath = path.join( +- this.appPath, +- "..", +- "desktop_native", +- "target", +- "debug", +- `desktop_proxy${ext}`, +- ); +- +- // isDev() returns true when using a production build with ELECTRON_IS_DEV=1, +- // so we need to fall back to the prod binary if the dev binary doesn't exist. +- if (existsSync(devPath)) { +- return devPath; +- } +- } +- +- return path.join(path.dirname(this.exePath), `desktop_proxy${ext}`); ++ return 'XXXLIBDIRXXX/bitwarden/desktop_proxy' + } + + private getRegeditInstance() { diff --git a/remove-argon2-browser.patch b/remove-argon2-browser.patch index bdb57a4..a80697e 100644 --- a/remove-argon2-browser.patch +++ b/remove-argon2-browser.patch @@ -2,32 +2,32 @@ Remove dependency on argon-browser2 which should be dead code after https://gith We used to path this to use node_modules/argon2 but cannot anymore due to sandbox now being enabled; fortunately, upstream at the same time moved the crypto to main process. Therefore the WASM implementation in web-crypto-function should be dead code now and can be removed because we do not want to compile WASM. ---- bitwarden/apps/desktop/webpack.renderer.js.old 2023-02-15 19:02:44.000000000 +0100 -+++ bitwarden/apps/desktop/webpack.renderer.js 2023-02-18 18:41:53.074156675 +0100 -@@ -40,11 +40,6 @@ +--- clients/apps/desktop/webpack.renderer.js.orig 2024-10-17 19:47:51.805420136 +0200 ++++ clients/apps/desktop/webpack.renderer.js 2024-10-17 21:00:08.105664818 +0200 +@@ -41,11 +41,6 @@ const common = { }, type: "asset/resource", }, - { -- test: /\.wasm$/, +- test: /argon2(-simd)?\.wasm$/, - loader: "base64-loader", - type: "javascript/auto", - }, ], }, plugins: [], -@@ -127,11 +122,6 @@ +@@ -142,11 +137,6 @@ const renderer = { test: /[\/\\]@angular[\/\\].+\.js$/, parser: { system: true }, }, - { -- test: /\.wasm$/, +- test: /argon2(-simd)?\.wasm$/, - loader: "base64-loader", - type: "javascript/auto", - }, ], + noParse: /argon2(-simd)?\.wasm$/, }, - plugins: [ --- a/libs/common/src/platform/services/web-crypto-function.service.ts +++ b/libs/common/src/platform/services/web-crypto-function.service.ts @@ -1,4 +1,3 @@ diff --git a/remove-sdk-internal.patch b/remove-sdk-internal.patch new file mode 100644 index 0000000..ae3fd90 --- /dev/null +++ b/remove-sdk-internal.patch @@ -0,0 +1,106 @@ +https://github.com/bitwarden/sdk-internal might be now free software +but we currently don't want to build it as it's a huge WASM blob that is not currently used for anything. +This patch will be removed once some _actual_ JS functionality gets migrated to wasm + +--- bitwarden-2024.10.0/apps/desktop/config/base.json.orig 2024-10-17 21:45:41.000000000 +0200 ++++ bitwarden-2024.10.0/apps/desktop/config/base.json 2024-10-25 21:36:08.368540114 +0200 +@@ -1,6 +1,6 @@ + { + "flags": { +- "sdk": true ++ "sdk": false + }, + "devFlags": {} + } +--- bitwarden-2024.10.0/apps/desktop/src/app/services/services.module.ts.orig 2024-10-17 21:45:41.000000000 +0200 ++++ bitwarden-2024.10.0/apps/desktop/src/app/services/services.module.ts 2024-10-25 18:50:26.084318326 +0200 +@@ -61,7 +61,6 @@ import { Message, MessageListener, Messa + import { SubjectMessageSender } from "@bitwarden/common/platform/messaging/internal"; + import { TaskSchedulerService } from "@bitwarden/common/platform/scheduling"; + import { MemoryStorageService } from "@bitwarden/common/platform/services/memory-storage.service"; +-import { DefaultSdkClientFactory } from "@bitwarden/common/platform/services/sdk/default-sdk-client-factory"; + import { NoopSdkClientFactory } from "@bitwarden/common/platform/services/sdk/noop-sdk-client-factory"; + import { SystemService } from "@bitwarden/common/platform/services/system.service"; + import { GlobalStateProvider, StateProvider } from "@bitwarden/common/platform/state"; +@@ -308,7 +307,7 @@ const safeProviders: SafeProvider[] = [ + }), + safeProvider({ + provide: SdkClientFactory, +- useClass: flagEnabled("sdk") ? DefaultSdkClientFactory : NoopSdkClientFactory, ++ useClass: NoopSdkClientFactory, + deps: [], + }), + ]; +--- bitwarden-2024.10.0/libs/common/src/platform/abstractions/sdk/sdk.service.ts.orig 2024-10-17 21:45:41.000000000 +0200 ++++ bitwarden-2024.10.0/libs/common/src/platform/abstractions/sdk/sdk.service.ts 2024-10-25 21:29:50.614089204 +0200 +@@ -1,9 +1,8 @@ + import { Observable } from "rxjs"; + +-import { BitwardenClient } from "@bitwarden/sdk-internal"; + + export abstract class SdkService { +- client$: Observable; ++ client$: Observable; + supported$: Observable; + + abstract failedToInitialize(): Promise; +--- bitwarden-2024.10.0/libs/common/src/platform/abstractions/sdk/sdk-client-factory.ts.orig 2024-10-17 21:45:41.000000000 +0200 ++++ bitwarden-2024.10.0/libs/common/src/platform/abstractions/sdk/sdk-client-factory.ts 2024-10-25 21:32:14.591461794 +0200 +@@ -1,10 +1,9 @@ +-import type { BitwardenClient } from "@bitwarden/sdk-internal"; + + /** + * Factory for creating SDK clients. + */ + export abstract class SdkClientFactory { + abstract createSdkClient( +- ...args: ConstructorParameters +- ): Promise; ++ ...args: ConstructorParameters ++ ): Promise; + } +--- bitwarden-2024.10.0/libs/common/src/platform/services/sdk/noop-sdk-client-factory.ts.orig 2024-10-17 21:45:41.000000000 +0200 ++++ bitwarden-2024.10.0/libs/common/src/platform/services/sdk/noop-sdk-client-factory.ts 2024-10-25 21:41:45.940577943 +0200 +@@ -1,4 +1,3 @@ +-import type { BitwardenClient } from "@bitwarden/sdk-internal"; + + import { SdkClientFactory } from "../../abstractions/sdk/sdk-client-factory"; + +@@ -9,8 +8,8 @@ import { SdkClientFactory } from "../../ + */ + export class NoopSdkClientFactory implements SdkClientFactory { + createSdkClient( +- ...args: ConstructorParameters +- ): Promise { ++ ...args: ConstructorParameters ++ ): Promise { + return Promise.reject(new Error("SDK not available")); + } + } +--- bitwarden-2024.10.0/libs/common/src/platform/services/sdk/default-sdk.service.ts.orig 2024-10-17 21:45:41.000000000 +0200 ++++ bitwarden-2024.10.0/libs/common/src/platform/services/sdk/default-sdk.service.ts 2024-10-25 22:08:02.781934761 +0200 +@@ -1,6 +1,5 @@ + import { concatMap, firstValueFrom, shareReplay } from "rxjs"; + +-import { LogLevel, DeviceType as SdkDeviceType } from "@bitwarden/sdk-internal"; + + import { ApiService } from "../../../abstractions/api.service"; + import { DeviceType } from "../../../enums/device-type.enum"; +@@ -19,7 +18,7 @@ export class DefaultSdkService implement + userAgent: this.userAgent ?? navigator.userAgent, + }; + +- return await this.sdkClientFactory.createSdkClient(settings, LogLevel.Info); ++ return await this.sdkClientFactory.createSdkClient(settings, 'unused'); + }), + shareReplay({ refCount: true, bufferSize: 1 }), + ); +@@ -52,7 +51,7 @@ export class DefaultSdkService implement + }); + } + +- private toDevice(device: DeviceType): SdkDeviceType { ++ private toDevice(device: DeviceType): any { + switch (device) { + case DeviceType.Android: + return "Android"; diff --git a/remove-unnecessary-deps.patch b/remove-unnecessary-deps.patch index fe304ad..43d590a 100644 --- a/remove-unnecessary-deps.patch +++ b/remove-unnecessary-deps.patch @@ -1,7 +1,7 @@ @types/semver and path-browserify is normally included transitively by storybook which we delete, adding it here explicitely because it is needed for build ---- clients-desktop-v2024.9.0/package.json.orig -+++ clients-desktop-v2024.9.0/package.json +--- clients-desktop-v2024.10.0/package.json.orig 2024-10-17 19:25:36.768284926 +0200 ++++ clients-desktop-v2024.10.0/package.json 2024-10-17 19:42:05.732483029 +0200 @@ -13,7 +13,6 @@ }, "homepage": "https://bitwarden.com", @@ -32,7 +32,7 @@ "@babel/core": "7.24.9", "@babel/preset-env": "7.24.8", - "@compodoc/compodoc": "1.1.25", -- "@electron/notarize": "2.4.0", +- "@electron/notarize": "2.5.0", - "@electron/rebuild": "3.6.0", "@ngtools/webpack": "16.2.14", - "@storybook/addon-a11y": "8.2.9", @@ -45,8 +45,8 @@ - "@storybook/manager-api": "8.2.9", - "@storybook/theming": "8.2.9", - "@types/argon2-browser": "1.18.4", -- "@types/chrome": "0.0.270", -- "@types/firefox-webext-browser": "111.0.5", +- "@types/chrome": "0.0.272", +- "@types/firefox-webext-browser": "120.0.4", - "@types/inquirer": "8.2.10", "@types/jest": "29.5.12", - "@types/jquery": "3.5.30", @@ -58,7 +58,7 @@ - "@types/koa-json": "2.0.23", - "@types/lowdb": "1.0.15", "@types/lunr": "2.3.7", - "@types/node": "20.16.4", + "@types/node": "20.16.10", - "@types/node-fetch": "2.6.4", "@types/node-forge": "1.3.11", "@types/node-ipc": "9.2.3", @@ -70,17 +70,17 @@ - "@typescript-eslint/eslint-plugin": "7.16.1", - "@typescript-eslint/parser": "7.16.1", - "@webcomponents/custom-elements": "1.6.0", -- "@yao-pkg/pkg": "5.12.1", +- "@yao-pkg/pkg": "5.14.0", "autoprefixer": "10.4.20", - "babel-loader": "9.1.3", - "base64-loader": "1.0.0", - "browserslist": "4.23.2", -- "chromatic": "11.7.1", - "concurrently": "8.2.2", +- "chromatic": "11.10.2", + "concurrently": "9.0.1", "copy-webpack-plugin": "12.0.2", "cross-env": "7.0.3", "css-loader": "7.1.2", - "electron": "32.0.1", + "electron": "32.1.1", - "electron-builder": "24.13.3", "electron-log": "5.0.1", - "electron-reload": "2.0.0-alpha.1", @@ -108,30 +108,30 @@ "jest-mock-extended": "3.0.7", - "jest-preset-angular": "14.1.1", - "lint-staged": "15.2.8", - "mini-css-extract-plugin": "2.8.1", + "mini-css-extract-plugin": "2.9.1", "node-ipc": "9.2.1", + "path-browserify": "^1.0.1", "postcss": "8.4.38", "postcss-loader": "8.1.1", - "prettier": "3.3.3", -- "prettier-plugin-tailwindcss": "0.6.6", +- "prettier-plugin-tailwindcss": "0.6.8", - "process": "0.11.10", - "regedit": "^3.0.3", + "regedit": "3.0.3", - "remark-gfm": "4.0.0", "rimraf": "6.0.1", "sass": "1.74.1", - "sass-loader": "14.2.1", + "sass-loader": "16.0.1", - "storybook": "8.2.9", - "style-loader": "3.3.4", -- "tailwindcss": "3.4.10", +- "tailwindcss": "3.4.11", - "ts-jest": "29.2.2", "ts-loader": "9.5.1", "tsconfig-paths-webpack-plugin": "4.1.0", - "type-fest": "2.19.0", "typescript": "5.1.6", - "url": "0.11.3", + "url": "0.11.4", - "util": "0.12.5", -- "wait-on": "8.0.0", +- "wait-on": "8.0.1", "webpack": "5.94.0", - "webpack-cli": "5.1.4", - "webpack-dev-server": "5.0.4", @@ -140,10 +140,12 @@ }, "dependencies": { "@angular/animations": "16.2.12", -@@ -157,55 +84,28 @@ +@@ -157,57 +84,28 @@ "@angular/platform-browser": "16.2.12", "@angular/platform-browser-dynamic": "16.2.12", "@angular/router": "16.2.12", +- "@bitwarden/sdk-internal": "0.1.3", +- "@electron/fuses": "1.8.0", - "@koa/multer": "3.0.2", - "@koa/router": "12.0.1", "@microsoft/signalr": "8.0.7", @@ -151,7 +153,7 @@ "@ng-select/ng-select": "11.2.0", "argon2": "0.40.1", - "argon2-browser": "1.18.0", - "big-integer": "1.6.51", + "big-integer": "1.6.52", - "bootstrap": "4.6.0", - "braintree-web-drop-in": "1.43.0", "buffer": "6.0.3", @@ -160,10 +162,10 @@ "commander": "11.1.0", - "core-js": "3.36.1", - "form-data": "4.0.0", -- "https-proxy-agent": "7.0.2", +- "https-proxy-agent": "7.0.5", - "inquirer": "8.2.6", - "jquery": "3.7.1", -- "jsdom": "24.1.3", +- "jsdom": "25.0.1", "jszip": "3.10.1", - "koa": "2.15.0", - "koa-bodyparser": "4.4.1", @@ -186,7 +188,7 @@ - "qrious": "4.0.2", "rxjs": "7.8.1", - "tabbable": "6.2.0", - "tldts": "6.1.41", + "tldts": "6.1.48", "utf-8-validate": "6.0.4", "zone.js": "0.13.3", "zxcvbn": "4.4.2" @@ -196,14 +198,14 @@ "@storybook/angular": { "zone.js": "$zone.js" }, ---- clients/apps/desktop/desktop_native/napi/package.json.orig 2024-07-15 19:10:33.919215714 +0200 -+++ clients/apps/desktop/desktop_native/napi/package.json 2024-07-15 19:25:13.322024338 +0200 -@@ -10,9 +10,6 @@ +--- clients-desktop-v2024.10.0/apps/desktop/desktop_native/napi/package.json.orig 2024-10-17 19:25:31.222180130 +0200 ++++ clients-desktop-v2024.10.0/apps/desktop/desktop_native/napi/package.json 2024-10-17 19:43:45.262219326 +0200 +@@ -8,9 +8,6 @@ }, "author": "", "license": "GPL-3.0", - "devDependencies": { -- "@napi-rs/cli": "2.16.2" +- "@napi-rs/cli": "2.18.4" - }, "napi": { "name": "desktop_napi", diff --git a/vendor.tar.zst b/vendor.tar.zst index 8f20253..d4b2cea 100644 --- a/vendor.tar.zst +++ b/vendor.tar.zst @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cc49c941e3e00407a08671d102c38b4afbb18ae7c3f8f8c5907f2ec10e096b87 -size 43258187 +oid sha256:a7d9a45904752aa44bff0ad0f79f1d055b9b264ec6ee72e14a1bbe334ea6119e +size 43653045