From 5f850f8c86a1a938f2458ae088dba28f90e5be02 Mon Sep 17 00:00:00 2001 From: asonix Date: Sat, 23 Mar 2024 18:59:48 -0500 Subject: [PATCH] Prepare 0.5.10 release --- Cargo.lock | 2 +- Cargo.toml | 2 +- pict-rs.nix | 2 +- pict-rs.toml | 5 +++++ releases/0.5.10.md | 31 +++++++++++++++++++++++++++++++ 5 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 releases/0.5.10.md diff --git a/Cargo.lock b/Cargo.lock index a272f4f..a44bb75 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1819,7 +1819,7 @@ dependencies = [ [[package]] name = "pict-rs" -version = "0.5.9" +version = "0.5.10" dependencies = [ "actix-form-data", "actix-web", diff --git a/Cargo.toml b/Cargo.toml index ca38916..ea61a6e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pict-rs" description = "A simple image hosting service" -version = "0.5.9" +version = "0.5.10" authors = ["asonix "] license = "AGPL-3.0" readme = "README.md" diff --git a/pict-rs.nix b/pict-rs.nix index 4c4ebbc..4fb1bfc 100644 --- a/pict-rs.nix +++ b/pict-rs.nix @@ -11,7 +11,7 @@ rustPlatform.buildRustPackage { pname = "pict-rs"; - version = "0.5.9"; + version = "0.5.10"; src = ./.; cargoLock = { diff --git a/pict-rs.toml b/pict-rs.toml index e27990f..586c022 100644 --- a/pict-rs.toml +++ b/pict-rs.toml @@ -37,6 +37,11 @@ max_file_count = 1 # default: The system's advertised temporary directory ("/tmp" on most linuxes) temporary_directory = "/tmp" +## Optional: whether to delete the contents of $temporary_directory/pict-rs on launch +# environment variable: PICTRS__SERVER__CLEANUP_TEMPORARY_DIRECTORY +# default: true +cleanup_temporary_directory = true + ## Optional: path to server certificate to enable TLS # environment variable: PICTRS__SERVER__CERTIFICATE # default: empty diff --git a/releases/0.5.10.md b/releases/0.5.10.md new file mode 100644 index 0000000..413a797 --- /dev/null +++ b/releases/0.5.10.md @@ -0,0 +1,31 @@ +# pict-rs 0.5.10 + +## Overview + +pict-rs 0.5.10 is a small release with changes to how pict-rs handles temporary files. + +### Changes + +- [Temporary File Cleanup](#temporary-file-cleanup) + + +## Upgrade Notes + +There are no significant changes from 0.5.9. Upgrading should be as simple as pulling the new +version. + + +## Descriptions + +### Temporary File Cleanup + +pict-rs now nests its temporary files inside a `pict-rs` toplevel temporary folder. This is useful +because pict-rs 0.5.10 introduces a new behavior: it will completely delete that folder and its +contents on launch. If you are running multiple copies of pict-rs on the same host and they share +your temporary folder, this might cause problems. In that scenario, this behavior can be disabled by +setting `PICTRS__SERVER__CLEANUP_TEMPORARY_DIRECTORY=false` or passing +`--no-cleanup-temporary-directory` on the commandline. + +This new behavior has been introduced in order to better clean up after crashes. If pict-rs is +killed while processing media, maybe due to an OOM, it will leave files behind in the temporary +directory. This can cause the temporary directory to grow, leading to memory or disk problems.