Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no findmnt #189

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

- name: Install dependencies
run: |
sudo apt-get install util-linux expect mergerfs attr pandoc
sudo apt-get install expect mergerfs attr pandoc

- name: Checkout
uses: actions/checkout@v4
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ commands that you don't already trust on your system, (i.e. network calls are al

`try` relies on the following Debian packages

* `util-linux` (for standard Linux utilities, `findmnt`)
* `attr` (for `getfattr`)
* `pandoc` and `autoconf` (if working from a GitHub clone)

Expand Down
1 change: 0 additions & 1 deletion shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ pkgs.mkShell {
expect
mergerfs
attr
util-linux
time
shellcheck
];
Expand Down
1 change: 0 additions & 1 deletion test/missing_unionfs_mergerfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ run_nix() {
pkgs.mkShell {
buildInputs = with pkgs; [
attr
util-linux
];
}
EOF
Expand Down
15 changes: 2 additions & 13 deletions try
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ export TRY_COMMAND
try() {
START_DIR="$PWD"

if ! command -v findmnt >/dev/null
then
error "findmnt not found, please install util-linux" "$TRY_COMMAND" 2
fi

if [ "$SANDBOX_DIR" ]
then
## If the name of a sandbox is given then we need to exit prematurely if its directory doesn't exist
Expand Down Expand Up @@ -78,7 +73,6 @@ try() {
DIRS_AND_MOUNTS="$SANDBOX_DIR"/mounts
export DIRS_AND_MOUNTS
find / -maxdepth 1 >"$DIRS_AND_MOUNTS"
findmnt --real -r -o target -n >>"$DIRS_AND_MOUNTS"
sort -u -o "$DIRS_AND_MOUNTS" "$DIRS_AND_MOUNTS"

# Calculate UPDATED_DIRS_AND_MOUNTS that contains the merge arguments in LOWER_DIRS
Expand Down Expand Up @@ -114,13 +108,6 @@ try() {
#
# KK 2023-06-29 This approach (of mounting each root directory separately) was necessary because we could not mount `/` in an overlay.
# However, this might be solvable using mergerfs/unionfs, allowing us to mount an overlay on a unionfs of the `/` once.
#
# findmnt
# --real: only list real filesystems
# -n: no header
# -r: raw output
# -o target: only print the mount target
# then we want to exclude the root partition "/"
while IFS="" read -r mountpoint
do
## Only make the directory if the original is a directory too
Expand Down Expand Up @@ -230,6 +217,8 @@ do
## We should try to investigate either:
## 1. Not doing another overlay if we have done it for a parent directory (we can keep around a list of overlays and skip if we are in a child)
## 2. Do one unionfs+overlay at the root `/` once and be done with it!
##
## EZ 2025-01-10 We have removed findmnt since it is unneccessary #189

if [ -z "$UNION_HELPER" ]
then
Expand Down
Loading