-
Notifications
You must be signed in to change notification settings - Fork 3
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
Run Chip Tool without sudo #55
Conversation
✅ Previously there was an issue where history is not persisted (#20). Using this branch, running a few commands in interactive mode, we can see the history is now stored in
|
✅ There is a concern that a system reboot will wipe Tested this on two device:
chip-tool logs first-run-after-reboot.txt |
❌ If
Need to run
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the change and thorough testing.
I believe this will result in a backward incompatible change, because existing installations will lose their state once upgraded to use a different directory.
The post-refresh hook could be used to stage the upgrade. In this case, to copy files to the new location (SNAP_USER_COMMON for the root user). I'm not so concerned about the functionality issue for those switching users. What matters is enabling upgraded installations to continue working (with sudo).
Removed outdated path rewrites and unnecessary mounts.
Copy system wide common files to root user specific common directory.
f03c277
to
3c7190a
Compare
Make sure we can still control a paired device after upgrading
Snapd already prints that hook is running, so no need for more logging
Add a section explaining the change to no requiring sudo Add commands to move to a new user and fix a know error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. It looks good apart from a few minor issues.
Use version functions from utils package
Pass test struct everywhere we want to fail
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great. Thanks a lot for the fix and adding tests.
Chip Tool snap has changes to work without root privileges: canonical/chip-tool-snap#55
Chip Tool snap has changed and now works without root privileges: canonical/chip-tool-snap#55
Chip Tool snap has changed and now works without root privileges: canonical/chip-tool-snap#55
We had to use sudo because of the directory where Chip Tool stores its config and data (Resolves #17). After an upstream changes we can set the
TMPDIR
env var to tell Chip Tool where to store its data.This PR tries to:
TMPDIR
to snap home dir (SNAP_USER_COMMON
) using command chainLog output of Chip Tool on where exactly data is stored:
This looks like
chip_tool_*
files are stored in the correct persistent directory, butchip_*
files are still stored under/tmp
.