diff --git a/Cargo.lock b/Cargo.lock index d88b8b4..d24996f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -284,9 +284,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "clap" -version = "4.5.8" +version = "4.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84b3edb18336f4df585bc9aa31dd99c036dfa5dc5e9a2939a722a188f3a8970d" +checksum = "35723e6a11662c2afb578bcf0b88bf6ea8e21282a953428f240574fcc3a2b5b3" dependencies = [ "clap_builder", "clap_derive", @@ -294,9 +294,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.8" +version = "4.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1c09dd5ada6c6c78075d6fd0da3f90d8080651e2d6cc8eb2f1aaa4034ced708" +checksum = "49eb96cbfa7cfa35017b7cd548c75b14c3118c98b423041d70562665e07fb0fa" dependencies = [ "anstream", "anstyle", @@ -306,9 +306,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.8" +version = "4.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" +checksum = "5d029b67f89d30bbb547c89fd5161293c0aec155fc691d7924b64550662db93e" dependencies = [ "heck", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index 62befa3..3e17bbd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ bat = { version = "0.23.0", default-features = false, features = [ ] } byteorder = "1.5.0" cfg-if = "1.0.0" -clap = { version = "4.5.8", features = ["derive"] } +clap = { version = "4.5.11", features = ["derive"] } color-eyre = { version = "0.6.3", features = ["issue-url"] } config = "0.14.0" ctrlc = "3.4.4" diff --git a/README.md b/README.md index be676df..eb17468 100644 --- a/README.md +++ b/README.md @@ -47,15 +47,15 @@ force it to puts its data somewhere nice and proper. - opt-in immutable fs outside of rule rewrites, ie only the files/directories you specify in rules are writable - `0.5.0`: boxxy can scan your homedir to automatically suggest rules for - you! ![image of boxxy scan](https://cdn.mewna.xyz/2023/03/25/G6hrd3iQjEy65.png) + you! ![image of boxxy scan](https://amyware.nyc3.digitaloceanspaces.com/2023/03/25/G6hrd3iQjEy65.png) - `0.6.0`: boxxy can use project-local `boxxy.yaml` files, and can load - `.env` files for you! ![image of 0.6.0 features](https://cdn.mewna.xyz/2023/03/28/Jawp5It1xrnWN.png) -- `0.6.1`: boxxy rules can inject env vars: ![image of 0.6.1 features](https://cdn.mewna.xyz/2023/03/29/ukcWuiYdtI8yq.png) + `.env` files for you! ![image of 0.6.0 features](https://amyware.nyc3.digitaloceanspaces.com/2023/03/28/Jawp5It1xrnWN.png) +- `0.6.1`: boxxy rules can inject env vars: ![image of 0.6.1 features](https://amyware.nyc3.digitaloceanspaces.com/2023/03/29/ukcWuiYdtI8yq.png) - `0.7.2`: boxxy can fork the boxxed process into the background with the `--daemon` flag. - `0.8.0`: boxxy can pass rules at the command line with `--rule`, and disable loading config files with `--no-config`. -- `0.8.2`: Explain how to run AppImages properly: ![image of 0.8.2 features](https://cdn.mewna.xyz/2023/10/31/yMiHJaURUud6E.png) +- `0.8.2`: Explain how to run AppImages properly: ![image of 0.8.2 features](https://amyware.nyc3.digitaloceanspaces.com/2023/10/31/yMiHJaURUud6E.png) ### potential drawbacks @@ -99,6 +99,26 @@ git:(mistress) | ▶ - stop using symlinks!!! - no more dev config files when writing code +## requirements + +boxxy requires `newuidmap` to function, which is not included by default in all +distributions. To install: + +Alpine: +```sh +$ apk add shadow-uidmap +``` + +Debian / Ubuntu: +```sh +$ apt install uidmap +``` + +RHEL / Fedora: +```sh +$ yum install shadow-utils +``` + ## configuration The boxxy configuration file lives in `~/.config/boxxy/boxxy.yaml`. If none diff --git a/src/enclosure/mod.rs b/src/enclosure/mod.rs index 1a39c16..7fc411a 100644 --- a/src/enclosure/mod.rs +++ b/src/enclosure/mod.rs @@ -378,7 +378,7 @@ impl Enclosure { debug!("removing temporary file {}", file.display()); std::fs::remove_file(file)?; } - for dir in &self.created_directories { + for dir in (&self.created_directories).iter().rev() { debug!("removing temporary directory {}", dir.display()); std::fs::remove_dir(dir)?; }