Closed IverCoder closed 1 year ago
Started test build 62620
Build 62620 successful To test this build, install it from the testing repository:
flatpak install --user https://dl.flathub.org/build-repo/45254/cc.arduino.IDE2.flatpakref
Right now, Arduino litters the home directory with
.arduino
folders and has access to the entire home directory even though sketches are only stored in theArduino
folder by default.This PR modifies the build files to limit home directory access and remaps the dotfolders to the
~/var/app/cc.arduino.IDE2
folder.
This is a good idea in theory. However, while the folder that Arduino opens when saving a project is the sketchbook location, the application allows someone to save (and open) their project anywhere. When initially packaging the application I decided to keep the folder access to the home folder as alot of hobbyists will not always save their projects to the sketchbook folder (as this is an IDE).
With the target audience of arduino being so wide there is a chance that not everyone will understand quite how flatpak works and when following guides on how to add libraries, change sketchbook locations etc documenting and instructing users where to find these folders changing their locations may confuse people. Also while restricting folder access is one of the aims of flatpak with the nature of an IDE it becomes difficult to justify without inconveniencing people.
Finally, this decision was also made to ensure that the flatpak release of the Arduino IDE v2 is compatible when moving from a different version or packaging format of the IDE. For example on Flathub the v1 version (https://github.com/flathub/cc.arduino.arduinoide) also uses the default folders so changing this would mean people would have to intervene on the upgrade process. Keeping this compatibility is especially important if an ARM release is made for the v2 version of the IDE as people who use Raspberry Pi's for the IDE will want to just install and upgrade their version of the IDE with as little hassle as possible.
I hope i wrote that in a clear way! Let me know your thoughts as i am interested in hearing your POV Joshua.
PS. adding the content rating is also a good idea but as the IDE doesn't technically have a content rating (or require one) this could be misleading.
EDIT: While i remember, making this change now after the release (and after people are using it) is more likely to cause more frustration and inconvenience than its worth for this change.
You have a good point, I think things like this are best done manually by people who want it, enabling it for everyone might be an unneeded trouble. Also, per the OARS stuff, I think Arduino's API for downloading board packages triggers the Information Sharing clause? Though please correct me if I'm wrong here.
Overall it might be good if this change is done as a paragraph in the Flathub description and as a Markdown doc detailing the procedure and other stuff, so people who want to control filesystem access get an easy tutorial, and leaving the defaults for people who are fine with it.
Started test build 62630
You have a good point, I think things like this are best done manually by people who want it, enabling it for everyone might be an unneeded trouble. Also, per the OARS stuff, I think Arduino's API for downloading board packages triggers the Information Sharing clause? Though please correct me if I'm wrong here.
Overall it might be good if this change is done as a paragraph in the Flathub description and as a Markdown doc detailing the procedure and other stuff, so people who want to control filesystem access get an easy tutorial, and leaving the defaults for people who are fine with it.
This sounds like a good idea. Also leaving the OARS in should be fine and if there is an issue we can remove it at a later date.
I'll work on it on a new repo, I messed up my current fork lol
Build 62630 successful To test this build, install it from the testing repository:
flatpak install --user https://dl.flathub.org/build-repo/45264/cc.arduino.IDE2.flatpakref
Started test build 62633
Build 62633 was cancelled
Right now, Arduino litters the home directory with
.arduino
folders and has access to the entire home directory even though sketches are only stored in theArduino
folder by default.This PR modifies the build files to limit home directory access and remaps the dotfolders to the
~/var/app/cc.arduino.IDE2
folder. There's now also a tutorial to change where sketches can be saved by default if the user wants to do so.