Skip to content

adding arduino-linux-setup.sh script #6053

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

Closed
wants to merge 7 commits into from

Conversation

artynet
Copy link
Contributor

@artynet artynet commented Mar 10, 2017

The shell script helps the linux user to quickly configure the OS environment to work with the Arduino IDE. It mainly performs these tasks :

  • writes UDEV rules for accessing the serial ports
  • uninstalls modemmanager from the system if installed (preventing the use of the serial ports)
  • add the user to the tty and dialout groups

the script "call" is embedded in the install.sh script :

$ <ARDUINO_IDE>/install.sh

or you can launch it as standalone with :

$ <ARDUINO_IDE>/arduino-linux-setup.sh <username>

@mastrolinux mastrolinux added the in progress Work on this item is in progress label Mar 10, 2017
@artynet artynet force-pushed the arduino-linux-setup branch from a3cc5fb to 30a5395 Compare March 11, 2017 14:54
@facchinm facchinm added this to the Release 1.8.3 milestone Mar 20, 2017
@NicoHood
Copy link
Contributor

You should rather provide a proper debian package for debian/ubuntu users and not install the files directly inside the filesystem. This was never a good idea. #5827

@rkost
Copy link

rkost commented Jun 12, 2017

Hmm. I don't know if it was a good idea to automatically uninstall any packages on the system. This is what dependencies and conflicting packages are for. This does not seem useful to me. Maybe you should print some advice that if modemmanager is installed, the user should take care of it.
But I think the way to go was described by @NicoHood already.

@cmaglie cmaglie modified the milestones: Release 1.8.3, Next Jul 18, 2017
@cmaglie
Copy link
Member

cmaglie commented May 8, 2018

Manually merged, the autorun of the script from install.sh has been disabled

@cmaglie cmaglie closed this May 8, 2018
@NicoHood
Copy link
Contributor

NicoHood commented May 8, 2018

Why was this merged? As I said software should not automate any installation or even uninstall software. A proper distribution package should be used instead. Otherwise people with less knowledge will mess up their system and be unable to undo all the changes. I think it was not a wise idea to follow this "concept".

ArduinoCC itself should think of providing debian packages via PPA, as its the most often used distribution at the moment (debian/ubuntu) for end consumer. ArchLinux already has proper packages.

@facchinm
Copy link
Member

facchinm commented May 9, 2018

@NicoHood this has been merged since it condenses a lot of FAQs into a "simple" bash script that the user MAY launch if needed. The script is not being launched automatically during installation so it doesn't hurt anyone 😄
About DEB/PPA, I'm sorry I have to repeat it again: it's not something we are willing to provide directly. You did an awesome job with the Arch packages, if someone wants to prepare a deb recipe/a PPA we can endorse it but nothing more.

@NicoHood
Copy link
Contributor

NicoHood commented May 9, 2018

Those bash commands have to be put into a readme with instruction details and reasons. Users will just try to run it, possibly break their system, dont know what they did and stop. Just write one good doc, but dont automate this. Its evil. But still your opinion.

@cmaglie cmaglie modified the milestones: Next, Release 1.8.6 May 10, 2018
@sk8nfool
Copy link

Actually there are a number of things wrong with arduino-linux-setup.sh!
It is actually dangerous.

  1. It shouldn't remove ANY package. It should warn that there may be a problem and suggest how to mitigate it.

  2. It very nicely creates a bunch of udev rule files in /tmp but doesn't meet the rule definition - the filename for avrisp.rules is wrong! It is lacking the number at the beginning (should be something like 99-avrisp.rules)

  3. It copies ANY file ending in ".rules" from /tmp to /etc/udev/rules.d. WRONG - it should only copy the files it created. Using "*.rules" is a bit too permissive.

  4. There is no need to reboot the system. Kicking udev (as done excessively in refreshudev()) is sufficient.

Lastly - there is no documentation regarding arduino-linux-setup.sh! Nothing that tells the user whether or not to run the scrip and if so when. Personally I don't think this file should be part of the distribution at all.

@facchinm
Copy link
Member

@sk8nfool you are right in all your points.
Now we only need to understand if leaving the file there (and fixing its shortcomings) is worth the effort or if we'd better remove it entirely.
Poll time 🙂 ?

@sk8nfool
Copy link

sk8nfool commented Oct 12, 2018 via email

@facchinm facchinm modified the milestones: Release 1.8.6, Release 1.8.8 Oct 15, 2018
@artynet artynet deleted the arduino-linux-setup branch February 10, 2020 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in progress Work on this item is in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants