-
Notifications
You must be signed in to change notification settings - Fork 88
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
Increase portability of tmpfs implementation to support BSDs #348
base: master
Are you sure you want to change the base?
Conversation
…th '-exec basename' since we just want the filename. Issue graysky2#344
…d use of non-portable --no-target-directory. Issue graysky2#344
Not sure how I feel about this since I do not have any BSD boxes/VMs for testing... have you been running the modified code on BSD? |
I have been running the modified code, but only under OpenBSD. I'd certainly prefer others running different BSDs and Linux distros confirm that this work there too. To be honest, I wasn't sure what you'd think either and am not in a rush to have these changes merged. I mainly wanted to put the idea out there, with some suggested changes, as food for thought. Edit: I'm happy to try to keep this PR updated as I maintain my OpenBSD port (though it hasn't been accepted into ports tree yet as there wasn't enough initial interest.) |
OK, let's keep this open as you said. Thank for your work to bring it to other users. |
Per Issue #344, this increases portability to BSDs (tmpfs implementation only, of course). Specifically, the following are addressed:
bash
rm
instead of non-portableunlink
find
's-printf
cp
's--reflink=auto
mv
's--no-target-directory
pgrep
's-c
modinfo
if using OverlayFSThese changes have been extracted from my own patches for an OpenBSD port (https://github.com/morgant/my-openbsd-ports/blob/main/www/profile-sync-daemon/patches/patch-common_profile-sync-daemon_in). As noted in Issue #344, there are some additional options that differ across implementations of
du
&stat
, but I have left those changes out as there may still be some differences between BSDs that would be best applied as OS-specific patches. Similarly, OpenBSD'srsync
port doesn't support the-X
option since the file system doesn't support metadata, so that should remain as an OpenBSD-specific patch.