summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Richter2018-08-22 23:47:30 +0200
committerMarkus Richter2018-08-22 23:49:02 +0200
commit4dd02f3ab2badb3ef368ec8048a8b05ecb6ae523 (patch)
treef016cf7e4b9047773b9adc9ed90b27c67d7e5d9b
parent86a7c91213f60bb3f42f7bce537d32a540f0a0d7 (diff)
downloadaur-4dd02f3ab2badb3ef368ec8048a8b05ecb6ae523.tar.gz
updpkg:2.1.1
-rw-r--r--.SRCINFO14
-rw-r--r--0001-Change-Vault-Settings.patch14
-rw-r--r--0001-Set-Vault-BaseURL.patch23
-rw-r--r--PKGBUILD29
4 files changed, 47 insertions, 33 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 97505e29521a..18df9f9422f7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = bitwarden_rs-vault
pkgdesc = Integrates the Vault Web-Interface into bitwarden_rs.
- pkgver = 1.27.0
- pkgrel = 2
+ pkgver = 2.1.1
+ pkgrel = 1
url = https://github.com/bitwarden/web
install = bitwarden_rs-vault.install
arch = any
@@ -9,11 +9,13 @@ pkgbase = bitwarden_rs-vault
makedepends = npm
depends = bitwarden_rs
conflicts = bitwarden_rs-vault-git
- source = https://github.com/bitwarden/web/archive/v1.27.0.tar.gz
- source = 0001-Change-Vault-Settings.patch
+ source = https://github.com/bitwarden/web/archive/v2.1.1.tar.gz
+ source = https://github.com/bitwarden/jslib/archive/4ca7a9709e9ccd0e67ce09309ae605f2057bf089.tar.gz
+ source = 0001-Set-Vault-BaseURL.patch
source = bitwarden_rs-vault.install
- sha512sums = 493588b8ec965775d0bcb58e5830d6c523131858957d5656d0480edcc93a45860606d190f0d0847ce529f43911efad4af7ca8bd2b0f21d12c05da333dcb1b4d5
- sha512sums = c2c8971abc23d874d8f822f59f1543c3f3a5bba106b146ec2065256c77209857e5915281de1b93efe8b937a1c172592e0c20b8ac1b50bf323eb54014b097156c
+ sha512sums = c5a61ecda4b7ea010c62f561c85ae325dc71a22af898809dd3a853f311b404354bd9bbd81b58f3edd1e438df881abda51d972d5a40fa53d3776a6cd261ab00c5
+ sha512sums = 4a59194a426a91df029cfd3b8ebc576d2033bdaafa3daa47c89b1405f646af27e9c6b6793a3735cedd46efe0c99e8010565905885cff714573600bdc4265f854
+ sha512sums = 7f69c25e19f6cc1dac3e227b764e664af66f89cf05f4b0f21fa427624e698cf96066ee85ccc8d0cb65fbb3fd97336897784c5895dfc4a7a5f2f3cd62c5114791
sha512sums = 5265612afd40cb757e7d6550ca902f9c02c558e7d03607a181df923374efdf9eff85296c216db7c96d9987eb1fe0834a7eb90de7dcd988c9f7443dc69b9469b1
pkgname = bitwarden_rs-vault
diff --git a/0001-Change-Vault-Settings.patch b/0001-Change-Vault-Settings.patch
deleted file mode 100644
index 145362c937a5..000000000000
--- a/0001-Change-Vault-Settings.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- settings.Production.json 2018-05-31 20:33:00.000000000 +0200
-+++ settings.Production.json 2018-07-11 23:39:12.479350252 +0200
-@@ -2,8 +2,8 @@
- "appSettings": {
- "apiUri": "/api",
- "identityUri": "/identity",
-- "iconsUri": "https://icons.bitwarden.com",
-- "stripeKey": "pk_live_bpN0P37nMxrMQkcaHXtAybJk",
-- "braintreeKey": "production_qfbsv8kc_njj2zjtyngtjmbjd"
-+ "iconsUri": "/icons",
-+ "stripeKey": "",
-+ "braintreeKey": ""
- }
- }
diff --git a/0001-Set-Vault-BaseURL.patch b/0001-Set-Vault-BaseURL.patch
new file mode 100644
index 000000000000..492f6b647376
--- /dev/null
+++ b/0001-Set-Vault-BaseURL.patch
@@ -0,0 +1,23 @@
+--- a/src/app/services/services.module.ts
++++ b/src/app/services/services.module.ts
+@@ -116,17 +116,15 @@ const exportService = new ExportService(folderService, cipherService, apiService
+ const importService = new ImportService(cipherService, folderService, apiService, i18nService, collectionService);
+ const auditService = new AuditService(cryptoFunctionService, apiService);
+
+-const analytics = new Analytics(window, () => platformUtilsService.isDev() || platformUtilsService.isSelfHost(),
++const analytics = new Analytics(window, () => platformUtilsService.isDev() || platformUtilsService.isSelfHost() || true,
+ platformUtilsService, storageService, appIdService);
+ containerService.attachToWindow(window);
+
+ export function initFactory(): Function {
+ return async () => {
+ await (storageService as HtmlStorageService).init();
+- const isDev = platformUtilsService.isDev();
+- if (!isDev && platformUtilsService.isSelfHost()) {
+- environmentService.baseUrl = window.location.origin;
+- }
++ const isDev = false;
++ environmentService.baseUrl = window.location.origin;
+ await apiService.setUrls({
+ base: isDev ? null : window.location.origin,
+ api: isDev ? 'http://localhost:4000' : null,
diff --git a/PKGBUILD b/PKGBUILD
index fae51b9b9cad..714236e0a7f2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,8 +1,9 @@
# Maintainer: Markus Richter <mqus at disroot dot org>
+_jslib_commit="4ca7a9709e9ccd0e67ce09309ae605f2057bf089"
pkgname=bitwarden_rs-vault
-pkgver=1.27.0
-pkgrel=2
+pkgver=2.1.1
+pkgrel=1
pkgdesc="Integrates the Vault Web-Interface into bitwarden_rs."
arch=('any')
url="https://github.com/bitwarden/web"
@@ -12,32 +13,34 @@ depends=('bitwarden_rs')
conflicts=("bitwarden_rs-vault-git")
install=bitwarden_rs-vault.install
source=("https://github.com/bitwarden/web/archive/v$pkgver.tar.gz"
- "0001-Change-Vault-Settings.patch"
+ "https://github.com/bitwarden/jslib/archive/${_jslib_commit}.tar.gz"
+ "0001-Set-Vault-BaseURL.patch"
"$pkgname.install")
-sha512sums=('493588b8ec965775d0bcb58e5830d6c523131858957d5656d0480edcc93a45860606d190f0d0847ce529f43911efad4af7ca8bd2b0f21d12c05da333dcb1b4d5'
- 'c2c8971abc23d874d8f822f59f1543c3f3a5bba106b146ec2065256c77209857e5915281de1b93efe8b937a1c172592e0c20b8ac1b50bf323eb54014b097156c'
+sha512sums=('c5a61ecda4b7ea010c62f561c85ae325dc71a22af898809dd3a853f311b404354bd9bbd81b58f3edd1e438df881abda51d972d5a40fa53d3776a6cd261ab00c5'
+ '4a59194a426a91df029cfd3b8ebc576d2033bdaafa3daa47c89b1405f646af27e9c6b6793a3735cedd46efe0c99e8010565905885cff714573600bdc4265f854'
+ '7f69c25e19f6cc1dac3e227b764e664af66f89cf05f4b0f21fa427624e698cf96066ee85ccc8d0cb65fbb3fd97336897784c5895dfc4a7a5f2f3cd62c5114791'
'5265612afd40cb757e7d6550ca902f9c02c558e7d03607a181df923374efdf9eff85296c216db7c96d9987eb1fe0834a7eb90de7dcd988c9f7443dc69b9469b1')
prepare() {
- #follow https://github.com/dani-garcia/bitwarden_rs/blob/master/BUILD.md AND remove the package-lock to fix gulp execution (see https://github.com/gulpjs/gulp/issues/2162 )
+ #patch paths
cd "$srcdir/web-$pkgver"
- #fix gulp install
- rm package-lock.json
- #patch all
- patch -N -i "$srcdir/0001-Change-Vault-Settings.patch"
+ patch -N -i "$srcdir/0001-Set-Vault-BaseURL.patch" "src/app/services/services.module.ts"
+ #simulate git-submodules
+ rmdir jslib
+ ln -s "../jslib-${_jslib_commit}" jslib
+
}
build() {
#build vault webinterface
cd "$srcdir/web-$pkgver"
npm install --cache "${srcdir}/npm-cache"
-
- npx gulp dist:selfHosted
+ npm run dist:selfhost --cache "${srcdir}/npm-cache"
}
package() {
# install vault files
install -d "$pkgdir/usr/share/bitwarden_rs"
- cp -r "$srcdir/web-$pkgver/dist" "$pkgdir/usr/share/bitwarden_rs/vault"
+ cp -r "$srcdir/web-$pkgver/build" "$pkgdir/usr/share/bitwarden_rs/vault"
}