From a4e3fc00ec5b5df6a468ff09441549e038d27512 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 8 Jan 2020 00:33:36 +0100 Subject: [PATCH 1/2] Upgrade to 1.13.1 --- README.md | 2 +- conf/app.src | 4 ++-- conf/bitwarden_rs.env | 4 ++++ manifest.json | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4d5b6ed..c5a931f 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to ## Overview Open source password management solutions. -**Shipped version:** 1.13.0 +**Shipped version:** 1.13.1 ## Important points to read before installing diff --git a/conf/app.src b/conf/app.src index daa5e8a..5bfe565 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/dani-garcia/bitwarden_rs/archive/1.13.0.tar.gz -SOURCE_SUM=ef17482b98b8caa089c957bc3db53f3adcbcdd1b8b64cb4b94612875bf939e259b9ef5928d2aaf99490534a83b48a3ec06933c28b243be1c41bf3dfbe68f5c8d +SOURCE_URL=https://github.com/dani-garcia/bitwarden_rs/archive/1.13.1.tar.gz +SOURCE_SUM=f032749606745ab1fd78cc0429fff3e9711522a94098f57d0134fa0f8dbfc07814d5b2a71e53028f8f911fd9c233fdedb8f68822096229a00cef189b41b6e717 SOURCE_SUM_PRG=sha512sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/bitwarden_rs.env b/conf/bitwarden_rs.env index fdaeb61..807ddc0 100644 --- a/conf/bitwarden_rs.env +++ b/conf/bitwarden_rs.env @@ -21,6 +21,10 @@ ## Automatically reload the templates for every request, slow, use only for development # RELOAD_TEMPLATES=false +## Client IP Header, used to identify the IP of the client, defaults to "X-Client-IP" +## Set to the string "none" (without quotes), to disable any headers and just use the remote IP +# IP_HEADER=X-Client-IP + ## Cache time-to-live for successfully obtained icons, in seconds (0 is "forever") # ICON_CACHE_TTL=2592000 ## Cache time-to-live for icons which weren't available, in seconds (0 is "forever") diff --git a/manifest.json b/manifest.json index 4004e5a..8c77293 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Manage passwords and other sensitive informations", "fr": "Géres les mots de passe et autres informations sensibles" }, - "version": "1.13.0~ynh1", + "version": "1.13.1~ynh1", "url": "https://github.com/dani-garcia/bitwarden_rs", "license": "GPL-3.0-or-later", "maintainer": { From 395706f048f155c40e7ab87921565131183087a2 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 10 Jan 2020 00:42:40 +0100 Subject: [PATCH 2/2] several fixes --- scripts/backup | 5 +---- scripts/change_url | 5 +---- scripts/install | 14 +++++--------- scripts/restore | 5 +---- scripts/upgrade | 13 +++++-------- 5 files changed, 13 insertions(+), 29 deletions(-) diff --git a/scripts/backup b/scripts/backup index a804c08..979b2a6 100644 --- a/scripts/backup +++ b/scripts/backup @@ -83,10 +83,7 @@ ynh_backup --src_path="/etc/systemd/system/$app.service" #================================================= ynh_print_info --message="Starting a systemd service..." -ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Rocket has launched from" -if [ "${PACKAGE_CHECK_EXEC:-0}" -eq 1 ]; then - sleep 60 -fi +ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Rocket has launched from" --length=100 #================================================= # END OF SCRIPT diff --git a/scripts/change_url b/scripts/change_url index 2b2dc97..eff7469 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -118,10 +118,7 @@ fi #================================================= ynh_print_info --message="Starting a systemd service..." -ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Rocket has launched from" -if [ "${PACKAGE_CHECK_EXEC:-0}" -eq 1 ]; then - sleep 60 -fi +ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Rocket has launched from" --length=100 #================================================= # RELOAD NGINX diff --git a/scripts/install b/scripts/install index 160eb0c..e18e24c 100644 --- a/scripts/install +++ b/scripts/install @@ -121,16 +121,16 @@ ynh_print_info --message="Making install..." chown -R "$app":"$app" "$final_path" # Install rustup with the toolchain needed by bitwarden_rs -pushd "$final_path" || exit +pushd "$final_path" sudo -u "$app" RUSTUP_HOME="$final_path"/.rustup CARGO_HOME="$final_path"/.cargo bash -c 'curl -sSf -L https://static.rust-lang.org/rustup.sh | sh -s -- -y --default-toolchain=$(cat build/rust-toolchain)' -popd || exit +popd export PATH="$PATH:$final_path/.cargo/bin:$final_path/.local/bin:/usr/local/sbin" # Compile bitwarden_rs -pushd "$final_path"/build || exit +pushd "$final_path"/build sudo -u "$app" env PATH="$PATH" cargo build --features sqlite --release -popd || exit +popd # Install bitwarden_rs cp -a "$final_path"/build/target/release/. "$final_path"/live/. @@ -204,11 +204,7 @@ yunohost service add $app --description "$app daemon for Bitwarden" --log "/var/ ynh_print_info --message="Starting a systemd service..." # Start a systemd service -ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Rocket has launched from" -if [ "${PACKAGE_CHECK_EXEC:-0}" -eq 1 ]; then - ynh_systemd_action --service_name="$app" --action="restart" --log_path="systemd" --line_match="Rocket has launched from" - sleep 60 -fi +ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Rocket has launched from" --length=100 #================================================= # SETUP FAIL2BAN diff --git a/scripts/restore b/scripts/restore index 4c314bb..d60119c 100644 --- a/scripts/restore +++ b/scripts/restore @@ -120,10 +120,7 @@ yunohost service add $app --description "$app daemon for Bitwarden" --log "/var/ ynh_print_info --message="Starting a systemd service..." -ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Rocket has launched from" -if [ "${PACKAGE_CHECK_EXEC:-0}" -eq 1 ]; then - sleep 60 -fi +ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Rocket has launched from" --length=100 #================================================= # RESTORE THE LOGROTATE CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index c494d6a..b19f400 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -128,16 +128,16 @@ chown -R "$app":"$app" "$final_path" if [ "$upgrade_type" == "UPGRADE_APP" ] then # Install rustup with the toolchain needed by bitwarden_rs - pushd "$final_path" || exit + pushd "$final_path" sudo -u "$app" RUSTUP_HOME="$final_path"/.rustup CARGO_HOME="$final_path"/.cargo bash -c 'curl -sSf -L https://static.rust-lang.org/rustup.sh | sh -s -- -y --default-toolchain=$(cat build/rust-toolchain)' - popd || exit + popd export PATH="$PATH:$final_path/.cargo/bin:$final_path/.local/bin:/usr/local/sbin" # Compile bitwarden_rs - pushd "$final_path"/build || exit + pushd "$final_path"/build sudo -u "$app" env PATH="$PATH" cargo build --features sqlite --release - popd || exit + popd # Install bitwarden_rs cp -a "$final_path"/build/target/release/. "$final_path"/live/. @@ -226,10 +226,7 @@ fi #================================================= ynh_print_info --message="Starting a systemd service..." -ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Rocket has launched from" -if [ "${PACKAGE_CHECK_EXEC:-0}" -eq 1 ]; then - sleep 60 -fi +ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Rocket has launched from" --length=100 #================================================= # RELOAD NGINX