diff options
author | Markus Richter | 2019-01-11 14:09:03 +0100 |
---|---|---|
committer | Markus Richter | 2019-01-11 14:09:03 +0100 |
commit | 5f2e8119dc74e93f8d88816d034d262079c0e541 (patch) | |
tree | ce094f2e1075a45f4279f8fd54abf5ee4b3c2c52 | |
parent | 60f27b58114bf52c4f2c75be64a28f87ec6538e7 (diff) | |
download | aur-5f2e8119dc74e93f8d88816d034d262079c0e541.tar.gz |
fit to upstream, implement woraround for yubikey support not compiling on aarch64
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | 0001-Disable-Vault.patch | 14 | ||||
-rw-r--r-- | PKGBUILD | 16 | ||||
-rw-r--r-- | bitwarden_rs.service | 7 |
4 files changed, 29 insertions, 14 deletions
@@ -1,6 +1,6 @@ pkgbase = bitwarden_rs-git pkgdesc = An unofficial lightweight implementation of the bitwarden-server using rust and sqlite. Does NOT include the web-interface. - pkgver = 1.3.0.r0.ge061462 + pkgver = 1.6.0.r2.g6f52104 pkgrel = 1 url = https://github.com/dani-garcia/bitwarden_rs install = bitwarden_rs.install @@ -21,8 +21,8 @@ pkgbase = bitwarden_rs-git source = 0001-Disable-Vault.patch sha512sums = SKIP sha512sums = 399e63002acb764895bbcf3b983642c8858343b36909eeeb73133de1a9740a3d81232bc206ff6bf3daed50f72354c5e6fd5314d0d044acd9f1cb23a933b1dd74 - sha512sums = 773dc0830b4eaf3a1d4134a52a6157e6a94265c6212ae8cc24b9584f9c444b9a0f822325f487ce9c23c363f743f1f64f269352f030e98e336816aee0a68048f6 - sha512sums = a9ed56a349ba6243fbb5aa775681feecbf5dff62acb301e0f214455eb0e55b9c9d01ef8c19432b6b204bc0bc9be43adb2f33d0c48712419d4030182b13931754 + sha512sums = 4ce188956f6fe7cfdb711b1505f6344ed2775751ea112a0506dc96455c2705ab8529ec442e4747d7810fc3535b4ca78d1864e874dab5b5306373587097e02658 + sha512sums = a6f2361c7aa83e63b9a557500406b0cd660e0d7f8b16345f859faa3f96e22bdcecd7589711960486fa0401896291f7d46f66882744c69117fc146056f4a49028 pkgname = bitwarden_rs-git diff --git a/0001-Disable-Vault.patch b/0001-Disable-Vault.patch index 5f460a778be7..a17e9065ffe9 100644 --- a/0001-Disable-Vault.patch +++ b/0001-Disable-Vault.patch @@ -1,13 +1,13 @@ -diff --git a/.env b/.env -index 475df85..4dfbb0e 100644 ---- a/.env -+++ b/.env -@@ -12,7 +12,7 @@ +diff --git a/.env.template b/.env.template +index 51bb9e0..2e838fc 100644 +--- a/.env.template ++++ b/.env.template +@@ -17,7 +17,7 @@ ## Web vault settings # WEB_VAULT_FOLDER=web-vault/ -# WEB_VAULT_ENABLED=true +WEB_VAULT_ENABLED=false - ## Controls if new users can register - # SIGNUPS_ALLOWED=true + ## Controls the WebSocket server address and port + # WEBSOCKET_ADDRESS=0.0.0.0 @@ -2,7 +2,7 @@ pkgname=bitwarden_rs-git _pkgbase=bitwarden_rs -pkgver=1.3.0.r0.ge061462 +pkgver=1.6.0.r2.g6f52104 pkgrel=1 pkgdesc="An unofficial lightweight implementation of the bitwarden-server using rust and sqlite. Does NOT include the web-interface." arch=('i686' 'x86_64' 'armv7h' 'aarch64') @@ -24,8 +24,8 @@ source=('git+https://github.com/dani-garcia/bitwarden_rs.git' noextract=() sha512sums=('SKIP' '399e63002acb764895bbcf3b983642c8858343b36909eeeb73133de1a9740a3d81232bc206ff6bf3daed50f72354c5e6fd5314d0d044acd9f1cb23a933b1dd74' - '773dc0830b4eaf3a1d4134a52a6157e6a94265c6212ae8cc24b9584f9c444b9a0f822325f487ce9c23c363f743f1f64f269352f030e98e336816aee0a68048f6' - 'a9ed56a349ba6243fbb5aa775681feecbf5dff62acb301e0f214455eb0e55b9c9d01ef8c19432b6b204bc0bc9be43adb2f33d0c48712419d4030182b13931754') + '4ce188956f6fe7cfdb711b1505f6344ed2775751ea112a0506dc96455c2705ab8529ec442e4747d7810fc3535b4ca78d1864e874dab5b5306373587097e02658' + 'a6f2361c7aa83e63b9a557500406b0cd660e0d7f8b16345f859faa3f96e22bdcecd7589711960486fa0401896291f7d46f66882744c69117fc146056f4a49028') pkgver() { @@ -43,11 +43,19 @@ build() { cargo build --release } +# for aarch64, disable yubikey support (https://github.com/dani-garcia/bitwarden_rs/issues/262) +build_aarch64() { + #build bitwarden_rs + cd "$srcdir/$_pkgbase" + patch -N -p1 -i "$srcdir/0001-Disable-Vault.patch" + cargo build --release --no-default-features +} + package() { # setup systemd service install -D -m 0644 "$srcdir/bitwarden_rs.service" "$pkgdir/usr/lib/systemd/system/bitwarden_rs.service" # copy default config file - install -D -m 0644 "$srcdir/$_pkgbase/.env" "$pkgdir/etc/bitwarden_rs.env" + install -D -m 0644 "$srcdir/$_pkgbase/.env.template" "$pkgdir/etc/bitwarden_rs.env" # copy binary install -D -m0755 "$srcdir/$_pkgbase/target/release/bitwarden_rs" "$pkgdir/usr/bin/bitwarden_rs" } diff --git a/bitwarden_rs.service b/bitwarden_rs.service index ff6e7a7a8061..458600a27ea6 100644 --- a/bitwarden_rs.service +++ b/bitwarden_rs.service @@ -4,18 +4,25 @@ Documentation=https://github.com/dani-garcia/bitwarden_rs After=network.target [Service] +# The user/group bitwarden_rs is run under. the working directory (see below) should allow write and read access to this user/group User=bitwarden_rs Group=bitwarden_rs +# The location of the .env file for configuration EnvironmentFile=/etc/bitwarden_rs.env +# The location of the compiled binary ExecStart=/usr/bin/bitwarden_rs +# Set reasonable connection and process limits LimitNOFILE=1048576 LimitNPROC=64 +# Isolate bitwarden_rs from the rest of the system PrivateTmp=true PrivateDevices=true ProtectHome=true ProtectSystem=strict +# Only allow writes to the following directory and set it to the working directory (user and password data are stored here) WorkingDirectory=/var/lib/bitwarden_rs ReadWriteDirectories=/var/lib/bitwarden_rs +# Allow bitwarden_rs to bind ports in the range of 0-1024 AmbientCapabilities=CAP_NET_BIND_SERVICE [Install] |