arduino-create-agent icon indicating copy to clipboard operation
arduino-create-agent copied to clipboard

Better Linux re-packaging compatibility

Open tinywrkb opened this issue 5 years ago • 3 comments
trafficstars

There are a few issues that prevent re-packaging and distributing Arduino Create Agent through repositories instead of the current binary installer.

There are blocking issues that prevent re-packaging:

  • No tarball release.
    The binary installer, even with the --mode unattended still tries to run Arduino_Create_Bridge after the installation and it does not respect --prefix.
  • Executable and config in the same folder limitation.
    The app should look for the config at $XDG_CONFIG_HOME/arduino-create/ with $HOME/.config/arduino-create/ as a fallback if $XDG_CONFIG_HOME is unset or empty. See XDG Base Directory Specification

Would be nice to have:

  • Instead of $HOME/.arduino-create/ use $XDG_DATA_HOME/arduino-create/ with $HOME/.local/share/arduino-create/ as a fallback if $XDG_DATA_HOME is unset or empty.
  • In case that config.ini does not exist in the config folder, create a default config file.
  • A single app for both Chrome and Firefox. The current Linux installers are actually the same for both Chrome and Firefox, I don't know if this is intentional.

For my own needs, and as a POC, I packaged the Create Agent as a Flatpak here. Notice the ugly workaround in the startup script, copying the executable to the config folder.

tinywrkb avatar May 14 '20 18:05 tinywrkb

Hello! Thanks for the interest in the project! At the moment we are in the middle of a lift & shift process regarding the CI/CD pipeline to generate the installers. We will for sure consider the POC you made in the near future.

umbynos avatar Nov 06 '20 11:11 umbynos

@umbynos, thank you for your reply. I hope that you won't only make it easy for package maintainers to re-package the app but also consider distribution via Flathub as a Flatpak app.

tinywrkb avatar Nov 07 '20 23:11 tinywrkb

Any news about this?

Can we at least get a binary tarball release? The installer needs access to /proc/self/exe and due to the security implications of having such access, it's not available during the Flatpak installation/apply_extra step as Flatpak is running as the root user.
I'm seeing a failed readlink(/proc/self/exe) and the installer.
I can go around this issue by installing to the user Flatpak installation and not system-wide but that's not a proper solution.

Also, please consider officially distribute this app via Flathub.

Note that I'm not that sure about certificate handling. I guess maybe bind-mount ~/.pki/nss from the host, package certutil, and add support in the app for adding certificate via certutil.
I should also add that IIRC correctly Firefox already support the XDG dirs specification for the certs DB while Chrome/Chromium doesn't.

tinywrkb avatar Apr 08 '21 19:04 tinywrkb