-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Meta: Build without root #11224
Meta: Build without root #11224
Conversation
What type of performance impact does this have? If it is significant, maybe consider checking if the user is a sudoer first, and if not, fall back to this? |
Thanks for responding! I have not noticed a large speed impact, but my computer is not fast, nor does it have an SSD disk, so others may notice it more than me. I'm sure any impact is absorbed by my slow spinning disk. One advantage to using fuse2fs if it is available is that there is no need to type your password at the sudo prompt anymore. I noticed that even awesomekling does that in some of his videos. That may offset any decrease in performance from running ext2 in userspace. |
So I ran a quick test, and on my system, using fuse2fs is nearly one second faster than root. Using fuse2fs: time rsync -aH --chown=0:0 --inplace Build/i686/Root/ mnt/ Using root with a loopback mount: time rsync -aH --chown=0:0 --inplace Build/i686/Root/ mnt/ Your mileage may vary. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions! |
This pull request has been closed because it has not had recent activity. Feel free to re-open if you wish to still contribute these changes. Thank you for your contributions! |
@cdfrey would you mind fixing the conflict? |
When calling sub-programs from shell with exec, the useful || die idiom does not actually do anything, since the first script is gone.
This is a whitespace only commit to avoid confusion with the next feature commit.
The fuse2fs tool that is part of e2fsprogs-1.46 has a 'fakeroot' mount option. This allows a non-root users to modify file ownership and permissions without actually being root. This package is available in Debian bullseye and buster-backports. If available, the script assumes the user wants to use it. Otherwise, it falls back to the usual root requirements. Now that root is not required, the root check in build-root-filesystem.sh is not necessary. Since build-root-filesystem.sh has 'set -e' enabled, removing this check will not cause a change in functionality.
0feefef
to
14b0187
Compare
The fuse2fs tool that is part of e2fsprogs-1.46 has a 'fakeroot' mount option. This allows a non-root users to modify file ownership and permissions without actually being root. This package is available in Debian bullseye and buster-backports.
If fuse2fs is available, the script now assumes the user wants to use it. Otherwise, it falls back to the usual root requirements.