Skip to content
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

Package this as an rpm #9

Open
chriskilding opened this issue Aug 24, 2021 · 3 comments
Open

Package this as an rpm #9

chriskilding opened this issue Aug 24, 2021 · 3 comments

Comments

@chriskilding
Copy link

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 chriskilding changed the title Package and distribute an rpm Package this as an rpm Aug 24, 2021
@owtaylor
Copy link
Owner

owtaylor commented Nov 5, 2021

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 (containers/toolbox#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 :-)

@reesericci
Copy link

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

@sgallagher
Copy link

sgallagher commented Jun 12, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants