spkenv / spk

A Package Manager for high velocity software environments, built on spfs.
https://spkenv.dev
Apache License 2.0
40 stars 6 forks source link

tidy up spfs edit and fuse backend interaction #790

Open dcookspi opened 1 year ago

dcookspi commented 1 year ago

spfs edit isn't telling the user the correct things when the (read-only) fuse backend is being used:

> spfs run "" -- ""
* You are now in a configured subshell *
> spfs edit
INFO edit mode enabled              <-- except it's not, the runtime is, but the fuse filesystem isn't
> touch /spfs/testfile
touch: cannot touch '/spfs/testfile': Read-only file system    

edit could output a different message in this situation.

This is not a problem for the overlayfs or overlayfs+fuse backends.

rydrman commented 1 year ago

When not read-only, the spfs-fuse process is supposed to receive a rw option which causes the filesystem to fail to mount. I would expect the remount to fail during edit, but it seems this not happening that way anymore?

https://github.com/imageworks/spk/blob/main/crates/spfs/src/env.rs#L923

https://github.com/imageworks/spk/blob/main/crates/spfs-cli/cmd-fuse/src/cmd_fuse.rs#L155

dcookspi commented 1 year ago

Yes, it isn't happening. I reset my spfs to the main branch and tried this interaction with backend = FuseOnly configured:

> spfs shell 4H3VQSHBTDI7JK4772NNDVO3RNHEVFDYD7EPG6DQ2UGSMT6MR6HA====
* You are now in a configured subshell *
> spfs edit
 INFO edit mode enabled
> touch /spfs/ook
touch: cannot touch '/spfs/ook': Read-only file system
>