diff --git a/README.md b/README.md index d5dbc06..33cdb2a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Bitwarden_rs debian package helper +# vaultwarden debian package helper -[Bitwarden_rs](https://github.com/dani-garcia/bitwarden_rs) is an "Unofficial Bitwarden compatible server written in Rust". +[vaultwarden](https://github.com/dani-garcia/vaultwarden) is an "Unofficial Bitwarden compatible server written in Rust". This repository will help you produce a debian package. @@ -20,8 +20,8 @@ cd bitwarden_rs-debian ./build.sh -r # target bitwarden_rs version, example 1.19.0 ``` -The `build.sh` script will build bitwarden_rs for the same Debian version which targets bitwarden_rs. -That means, to build bitwarden_rs v1.19.0, make sure to checkout tag `v1.19.0` of this project. +The `build.sh` script will build bitwarden_rs for the same Debian version which targets vaultwarden. +That means, to build vaultwarden v1.19.0, make sure to checkout tag `v1.19.0` of this project. To compile for a different Debian version, specify the release name (e.g. Stretch, Buster) using the `-o` option. You can compile for arm32v7 or amd64 architecture using the `-a` option, only the Buster (default) release of debian is supported by arm32v7. @@ -31,7 +31,7 @@ To compile for a different Debian version, specify the release name (e.g. Stretc ## Post installation -The packaged systemd unit is **disabled**, you need to configure bitwarden_rs through its +The packaged systemd unit is **disabled**, you need to configure vaultwarden through its [EnvFile](https://www.freedesktop.org/software/systemd/man/systemd.service.html#Command%20lines): `/etc/bitwarden_rs/config.env` @@ -55,4 +55,4 @@ You will also probably want to setup a reverse proxy. See [COPYING](./COPYING) for the full license. -Please note this does not assume anything about [bitwarden_rs](https://github.com/dani-garcia/bitwarden_rs)'s own license. +Please note this does not assume anything about [vaultwarden](https://github.com/dani-garcia/vaultwarden)'s own license. diff --git a/build.sh b/build.sh index 9eaea49..652b62b 100755 --- a/build.sh +++ b/build.sh @@ -20,7 +20,7 @@ while getopts ":r:o:d:a:" opt; do ;; esac done -if [ -z "$REF" ]; then REF=$(curl -s https://api.github.com/repos/dani-garcia/bitwarden_rs/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | cut -c 1-); fi +if [ -z "$REF" ]; then REF=$(curl -s https://api.github.com/repos/dani-garcia/vaultwarden/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | cut -c 1-); fi if [ -z "$OS_VERSION_NAME" ]; then OS_VERSION_NAME='buster'; fi if [ -z "$DB_TYPE" ]; then DB_TYPE="sqlite"; fi if [ -z "$ARCH_DIR" ]; then ARCH_DIR="amd64"; fi @@ -29,7 +29,7 @@ if [[ "$ARCH" =~ ^arm ]]; then ARCH="armhf"; fi # Clone bitwarden_rs if [ ! -d "$SRC" ]; then - git clone https://github.com/dani-garcia/bitwarden_rs.git "$SRC" + git clone https://github.com/dani-garcia/vaultwarden.git "$SRC" fi cd "$SRC" || exit CREF="$(git branch | grep \* | cut -d ' ' -f2)" @@ -77,5 +77,5 @@ docker build -t bitwarden-deb "$SRC" --build-arg DB=$DB_TYPE --target dpkg -f "$ pushd "$SRC"; git clean -fd; popd CID=$(docker run -d bitwarden-deb) -docker cp "$CID":/bitwarden_package/bitwarden-rs.deb "$DST/bitwarden_rs-${OS_VERSION_NAME}-${REF}-${DB_TYPE}-${ARCH_DIR}.deb" +docker cp "$CID":/bitwarden_package/vaultwarden.deb "$DST/vaultwarden-${OS_VERSION_NAME}-${REF}-${DB_TYPE}-${ARCH_DIR}.deb" docker rm "$CID" diff --git a/patch/amd64/Dockerfile.patch b/patch/amd64/Dockerfile.patch index 0f7cfd2..179494e 100644 --- a/patch/amd64/Dockerfile.patch +++ b/patch/amd64/Dockerfile.patch @@ -21,6 +21,6 @@ +COPY debian/config.env /bitwarden_package/etc/bitwarden_rs +COPY debian/bitwarden_rs.service /bitwarden_package/usr/lib/systemd/system +COPY --from=vault /web-vault /bitwarden_package/usr/share/bitwarden_rs/web-vault -+COPY --from=build app/target/release/bitwarden_rs /bitwarden_package/usr/local/bin ++COPY --from=build app/target/release/vaultwarden /bitwarden_package/usr/local/bin + -+RUN dpkg-deb --build . bitwarden-rs.deb ++RUN dpkg-deb --build . vaultwarden.deb diff --git a/patch/armv7/Dockerfile.patch b/patch/armv7/Dockerfile.patch index dcf4487..aee809e 100644 --- a/patch/armv7/Dockerfile.patch +++ b/patch/armv7/Dockerfile.patch @@ -21,6 +21,6 @@ +COPY debian/config.env /bitwarden_package/etc/bitwarden_rs +COPY debian/bitwarden_rs.service /bitwarden_package/usr/lib/systemd/system +COPY --from=vault /web-vault /bitwarden_package/usr/share/bitwarden_rs/web-vault -+COPY --from=build app/target/armv7-unknown-linux-gnueabihf/release/bitwarden_rs /bitwarden_package/usr/local/bin ++COPY --from=build app/target/armv7-unknown-linux-gnueabihf/release/vaultwarden /bitwarden_package/usr/local/bin + -+RUN dpkg-deb --build . bitwarden-rs.deb ++RUN dpkg-deb --build . vaultwarden.deb