Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Display useful message when Linux post-install script has insufficient permissions#893

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
facchinm merged 1 commit intoarduino:mainfromper1234:post-install-message
Jun 10, 2024
Merged

Display useful message when Linux post-install script has insufficient permissions#893

facchinm merged 1 commit intoarduino:mainfromper1234:post-install-message
Jun 10, 2024

Conversation

@per1234
Copy link
Contributor

The Arduino Boards Manager automatically executes thepost_install.sh script during installation of the platform on a Linux machine:

https://arduino.github.io/arduino-cli/dev/platform-specification/#post-install-script

This platform's post-install script is intended to create audev rules file that gives write permissions for the USB devices of the platform's boards. These permissions are required in order to upload to the boards.

The creation of the udev rules file requires superuser privileges, which are typically not available in the context of the post-install script's execution by the Arduino development software. The script contains code tocheck whether the necessary privileges are available. If not, it prints a message andskips the udev rules file creation.

Previously the message printed when the udev rules file creation was not possible was "Please run as root":

Downloading packagesarduino:mbed_nano@4.1.3Installing platform arduino:mbed_nano@4.1.3Configuring platform.Please run as rootPlatform arduino:mbed_nano@4.1.3 installed

That "Please run as root" message was completely meaningless to the user when printed during the Boards Manager installation. Worse, it might cause them
to think they must run the Arduino development software as root user, which is a bad idea and also wouldn't result in
the udev rules file being created since the installation of the platform to the user's account was already completed.

The script is here updated to provide a meaningful explanation of the potential problem as well as the specific command the user can run from the terminal to execute the script as superuser:

Downloading packagesarduino:mbed_nano@4.1.3Installing platform arduino:mbed_nano@4.1.3Configuring platform.You might need to configure write permissions for uploading.Run the following command from the terminal:sudo "/home/per/.arduino15/packages/arduino/hardware/mbed_nano/4.1.3/post_install.sh"Platform arduino:mbed_nano@4.1.3 installed

This is a propagation of a change originally implemented in thearduino/ArduinoCore-renesas repo:arduino/ArduinoCore-renesas#334

facchinm reacted with heart emoji
…t permissionsThe Arduino Boards Manager automatically executes the `post_install.sh` script during installation of the platform on aLinux machine.This platform's post-install script is intended to create a udev rules file that gives write permissions for the USBdevices of the platform's boards. These permissions are required in order to upload to the boards.The creation of the udev rules file requires superuser privileges, which are typically not available in the context ofthe post-install script's execution. The script contains code to check whether the necessary privileges are available.If not, it prints a message and skips the udev rules file creation.Previously the message printed when the udev rules file creation was not possible was "Please run as root". This messagewas completely meaningless to the user when printed during the Boards Manager installation. Worse, it might cause themto think they must run the Arduino development software as root user, which is a bad idea and also wouldn't result inthe udev rules file being created since the installation of the platform to the user's account was already completed.The message is hereby updated to provide a meaningful explanation of the potential problem as well as the specificcommand the user can run from the terminal to execute the script as superuser.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@per1234@facchinm

[8]ページ先頭

©2009-2025 Movatter.jp