feat: Add atomic distribution support #503
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for Linux systems where /usr is read only by utilizing /usr/local which is writable on Universal Blue based distributions. The PR has been tested on Bazzite. List of changes:
cli/CMakeLists.txt
: C++ standard has been upgraded from C++ 11 to C++ 17. This is necessary to use std::filesystem.cli/src/main.cc
: new logic has been added to check if /usr/bin/steam is modifiable. If it is not, an attempt is made to create a copy at/usr/local/bin
. If it is successful, patching is performed in/usr/local/bin/steam
. If it fails, millennium exits.scripts/install.sh
: Script checks if /usr/bin is writable, if not it /usr/local/bin is checked. If that also fails, script exits.scripts/posix/start.sh
: .so file is searched in both /usr/local/bin and /usr/bin. Lack of file in either directory is harmless.src/sys/env.cc
: If/usr/local/bin/millennium
exists, /usr/ is changed to /usr/local (done 3 times)Todo / Caveats:
/usr/bin/bazzite-steam
to launch Steam on desktop. This needs to be changed to/usr/bin/local/steam
or simplysteam
which is not prevented by read only /usr.