toolbox-vscode icon indicating copy to clipboard operation
toolbox-vscode copied to clipboard

Package this as an rpm

Open chriskilding opened this issue 4 years ago • 3 comments
trafficstars

I've just been trying this out on Silverblue 34. Happily enough it works, which means VS Code is actually viable in the Toolbox workflow :)

Would you be able to package it into an rpm and distribute it? That way we'd only need to do rpm-ostree install <thing> to get it. This would be an easier sell to people thinking of moving to Silverblue.

chriskilding avatar Aug 24 '21 14:08 chriskilding

The tricky thing about packaging it as an RPM is that to make this work code.sh needs to be in the user's path, inside the toolbox. So it would need to be something like:

rpm-ostree install code.sh
<reboot>
ln -s /run/host/usr/lib/toolbox-vscode/code.sh ~/.local/bin/code

would work, but that takes some of the easy-sell out of it :-). There has been some discussion of creating a system for adding extra commands from the host into toolboxes (https://github.com/containers/toolbox/issues/145); if we had that, then fitting into that could make things automatic.

I suppose something lke toolbox-vscode init [--homedir|F35] to create symlinks into ~/.local/bin/ or /usr/bin in the specified toolbox would remove some potential for user error.

Will have to think about this .. just having a git repository for me personally, but doesn't come across as ready-for-prime time :-)

owtaylor avatar Nov 05 '21 16:11 owtaylor

Wrap up that script in a cURL command, and now you have a one-line install: curl https://cooldomain.here | bash

reesericci avatar Apr 10 '22 04:04 reesericci

The tricky thing about packaging it as an RPM is that to make this work code.sh needs to be in the user's path, inside the toolbox. So it would need to be something like:

rpm-ostree install code.sh
<reboot>
ln -s /run/host/usr/lib/toolbox-vscode/code.sh ~/.local/bin/code

Could we just inject something like this into the toolbox's /etc/profile.d?

if [ -r /run/.toolboxenv -a -x /run/host/usr/lib/toolbox-vscode/code.sh ]; then
  alias code=/run/host/usr/lib/toolbox-vscode/code.sh
fi

sgallagher avatar Jun 12 '23 20:06 sgallagher