Skip to content
This repository has been archived by the owner on Mar 22, 2022. It is now read-only.

Error when using extension in flatpak'd vscodium #6

Open
Iolaum opened this issue Oct 13, 2020 · 4 comments
Open

Error when using extension in flatpak'd vscodium #6

Iolaum opened this issue Oct 13, 2020 · 4 comments

Comments

@Iolaum
Copy link

Iolaum commented Oct 13, 2020

When I am opening a new VSCodium session that also opens a .spec file I am getting the following error in a popup messsage:

rpmlint cannot be launched: Error: spawn rpmlint ENOENT

Not sure what to do to further debug this.

@GitMensch
Copy link

I guess you don't have rpmlint installed and available from the terminal within vscode, do you?
If not then you may want to disable rpmspec.lint in the settings.

@LaurentTreguier as rpmlint is not available in every system (for example on non-rpm OS which may still open .spec files) I suggest to switch the default for this setting to false and adding a hint about this in the README (#4). What do you think?

@Iolaum
Copy link
Author

Iolaum commented Oct 18, 2020

I am using VSCodium from a fedora workstation 32. However I am not sure how the sandboxing fully works.

rpmlint is installed on my system and if I open a terminal from within VSCodium I can see it:

$ which rpmlint 
/usr/bin/rpmlint

Additionally I have made some changes to VSCodium options in order to have commands accessible within the sandboxed terminal:

The problem was that the terminal inside the VSCodium flatpak could not access some "executables/commands" outside of the sandboxed flatpak. While researching a solution I found those resources:

  • Some interesting comments have been posted here
  • The relevant documentation is here
  • The flatpak-spawn command appears to be at the heart of it all.

The fix that worked was:

$ pwd
/home/$USER/.var/app/com.vscodium.codium/config/VSCodium/User
$ cat settings.json 
{
    "terminal.integrated.shell.linux": "flatpak-spawn",
    "terminal.integrated.shellArgs.linux": [
        "--host",
        "/bin/bash"
    ]
}

Unfortunately, I am not sure how this all ties together with the rpmlint error when opening spec files.

@GitMensch
Copy link

@Iolaum thanks for the explanation and work-around. It looks like something like that can never be handled in this extension so i suggest to close this issue and to either create a note about that in the Wiki or in the README.

@Iolaum
Copy link
Author

Iolaum commented Oct 21, 2020

Given that this extension is for rpm spec files and the Fedora ecosystem is slowly moving towards flatpaks it may be good to see if this can be resolved in the future. In the meantime documenting is certainly a good idea.

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

No branches or pull requests

2 participants