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

Add org.freedesktop.Sdk.Extension #839

Draft
wants to merge 1 commit into
base: beta
Choose a base branch
from

Conversation

teohhanhui
Copy link

This should make Sdk extensions available.

@flathubbot
Copy link
Contributor

Started test build 68491

@flathubbot
Copy link
Contributor

Build 68491 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/66326/com.valvesoftware.Steam.flatpakref

@flathubbot
Copy link
Contributor

Started test build 68495

@teohhanhui teohhanhui changed the title Use org.freedesktop.Sdk as runtime Add org.freedesktop.Sdk.Extension Nov 26, 2021
@flathubbot
Copy link
Contributor

Build 68495 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/66331/com.valvesoftware.Steam.flatpakref

@flathubbot
Copy link
Contributor

Started test build 68496

@flathubbot
Copy link
Contributor

Build 68496 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/66332/com.valvesoftware.Steam.flatpakref

@nanonyme
Copy link
Collaborator

What's broken that this tries to fix?

@teohhanhui
Copy link
Author

teohhanhui commented Nov 26, 2021

What's broken that this tries to fix?

See #838

But I've been unsuccessful in getting this to work thus far... 😞

This should make Sdk extensions available.
@flathubbot
Copy link
Contributor

Started test build 68592

@flathubbot
Copy link
Contributor

Build 68592 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/66427/com.valvesoftware.Steam.flatpakref

@teohhanhui
Copy link
Author

This causes the installed org.freedesktop.Sdk.Extension.* runtimes to be mounted under /app/lib/sdk. I guess that'd have to do? It doesn't seem like it can be /usr/lib/sdk since /usr is only reserved for runtimes, according to flatpak docs.

@nanonyme
Copy link
Collaborator

Did you try adding it to add-extensions?

@nanonyme
Copy link
Collaborator

Not that it necessarily works. It might have runtime deps not in Platform.

@teohhanhui
Copy link
Author

teohhanhui commented Nov 27, 2021

Did you try adding it to add-extensions?

Yeah, that's the first thing I did. It's unnecessary, since inherit-extensions does the same thing without duplicating the config here.

Not that it necessarily works. It might have runtime deps not in Platform.

export PATH="$PATH:/app/lib/sdk/dotnet5/lib"

works for me. (dotnet binary is in lib lol)

@gasinvein
Copy link
Member

If this has to be manually added to PATH anyway, why not just run Steam via flatpak run --runtime=org.freedesktop.Sdk com.valvesoftware.Steam and have the SDK extension mounted at the usual place?

@teohhanhui
Copy link
Author

teohhanhui commented Nov 27, 2021

If this has to be manually added to PATH anyway, why not just run Steam via flatpak run --runtime=org.freedesktop.Sdk com.valvesoftware.Steam and have the SDK extension mounted at the usual place?

That's of course the very first thing I've tried. It does not work at all.

It breaks Steam because for some reason the i386 compat runtime doesn't work properly with that.

@teohhanhui
Copy link
Author

> flatpak run --runtime=org.freedesktop.Sdk com.valvesoftware.Steam 
INFO:root:https://github.com/flathub/com.valvesoftware.Steam/wiki
INFO:root:Will set XDG dirs prefix to /home/teohhanhui/.var/app/com.valvesoftware.Steam
INFO:root:Overriding TZ to Asia/Kuala_Lumpur
steam.sh[2]: Running Steam on org.freedesktop.platform 21.08.5 64-bit
steam.sh[2]: STEAM_RUNTIME is enabled automatically
setup.sh[76]: Steam runtime environment up-to-date!
steam.sh[2]: Error: You are missing the following 32-bit libraries, and Steam may not run:
libc.so.6

@gasinvein
Copy link
Member

gasinvein commented Nov 27, 2021

for some reason the i386 compat runtime doesn't work properly with that.

Do you have org.freedesktop.Sdk.Compat.i386//21.08 installed and up to date?

@teohhanhui
Copy link
Author

teohhanhui commented Nov 27, 2021

Do you have org.freedesktop.Sdk.Compat.i386//21.08 installed and up to date?

Yes, Running without the --runtime flag works.

I think this is because the add-extensions calls actually add extension points to the app's runtime (overlay filesystem?). So changing the runtime means those extension points are not there, i.e. they're not in org.freedesktop.Sdk runtime.

@gasinvein
Copy link
Member

Running with --runtime=org.freedesktop.Sdk does work here. Can you please show what flatpaks you have installed (e.g. flatpak list --columns=ref)?

I think this is because the add-extensions calls actually add extension points to the app's runtime

No, add-extensions always adds app extension regardless of what runtime is in use.

@teohhanhui
Copy link
Author

> flatpak list --columns=ref
Ref
com.discordapp.Discord/x86_64/stable
com.github.akiraux.akira/x86_64/beta
com.github.jeromerobert.pdfarranger/x86_64/stable
com.github.maoschanz.drawing/x86_64/stable
com.github.qarmin.szyszka/x86_64/stable
com.github.weclaw1.ImageRoll/x86_64/stable
com.google.Chrome/x86_64/beta
com.skype.Client/x86_64/stable
com.spotify.Client/x86_64/stable
com.transmissionbt.Transmission/x86_64/stable
com.valvesoftware.Steam/x86_64/stable
com.valvesoftware.Steam/x86_64/test
com.visualstudio.code/x86_64/stable
io.github.celluloid_player.Celluloid/x86_64/stable
io.github.mpobaschnig.Vaults/x86_64/stable
io.mpv.Mpv/x86_64/stable
org.audacityteam.Audacity/x86_64/stable
org.audacityteam.Audacity.Codecs/x86_64/stable
org.bunkus.mkvtoolnix-gui/x86_64/stable
org.darktable.Darktable/x86_64/stable
org.fcitx.Fcitx5/x86_64/stable
org.fcitx.Fcitx5.Addon.ChineseAddons/x86_64/stable
org.flatpak.Builder/x86_64/stable
org.freedesktop.Platform/x86_64/20.08
org.freedesktop.Platform/x86_64/21.08
org.freedesktop.Platform.Compat.i386/x86_64/21.08
org.freedesktop.Platform.GL.default/x86_64/20.08
org.freedesktop.Platform.GL.default/x86_64/21.08
org.freedesktop.Platform.GL.default/x86_64/21.08beta
org.freedesktop.Platform.GL32.default/x86_64/21.08
org.freedesktop.Platform.ffmpeg-full/x86_64/20.08
org.freedesktop.Platform.ffmpeg-full/x86_64/21.08
org.freedesktop.Platform.openh264/x86_64/2.0
org.freedesktop.Platform.openh264/x86_64/2.0beta
org.freedesktop.Sdk/x86_64/20.08
org.freedesktop.Sdk/x86_64/21.08
org.freedesktop.Sdk.Extension.dotnet/x86_64/20.08
org.freedesktop.Sdk.Extension.dotnet5/x86_64/21.08
org.freedesktop.Sdk.Extension.golang/x86_64/21.08
org.freedesktop.Sdk.Extension.llvm12/x86_64/21.08
org.freedesktop.Sdk.Extension.node14/x86_64/21.08
org.freedesktop.Sdk.Extension.openjdk/x86_64/21.08
org.freedesktop.Sdk.Extension.rust-stable/x86_64/21.08
org.gimp.GIMP/x86_64/beta
org.gnome.Boxes/x86_64/stable
org.gnome.Boxes.Extension.OsinfoDb/x86_64/stable
org.gnome.Calculator/x86_64/stable
org.gnome.Characters/x86_64/stable
org.gnome.Cheese/x86_64/stable
org.gnome.Evince/x86_64/stable
org.gnome.Extensions/x86_64/stable
org.gnome.FileRoller/x86_64/stable
org.gnome.NautilusDevel/x86_64/master
org.gnome.Platform/x86_64/3.38
org.gnome.Platform/x86_64/40
org.gnome.Platform/x86_64/41
org.gnome.Platform/x86_64/master
org.gnome.Sdk/x86_64/40
org.gnome.Sdk/x86_64/41
org.gnome.TextEditor.Devel/x86_64/master
org.gnome.Weather/x86_64/stable
org.gnome.eog/x86_64/stable
org.gnome.font-viewer/x86_64/stable
org.gnome.gedit/x86_64/stable
org.gnome.gitlab.YaLTeR.Identity/x86_64/stable
org.gtk.Gtk3theme.Adwaita-dark/x86_64/3.22
org.inkscape.Inkscape/x86_64/stable
org.kde.KStyle.Adwaita/x86_64/5.15
org.kde.Platform/x86_64/5.15
org.kde.PlatformTheme.QGnomePlatform/x86_64/5.15
org.kde.PlatformTheme.QtSNI/x86_64/5.15
org.kde.WaylandDecoration.QGnomePlatform-decoration/x86_64/5.15
org.libreoffice.LibreOffice/x86_64/stable
org.libvips.vipsdisp/x86_64/stable
org.mozilla.firefox/x86_64/beta
org.openttd.OpenTTD/x86_64/beta
org.pulseaudio.pavucontrol/x86_64/stable
org.telegram.desktop/x86_64/stable
org.telegram.desktop.webview/x86_64/stable
rest.insomnia.Insomnia/x86_64/stable

@gasinvein
Copy link
Member

So you actually don't have org.freedesktop.Sdk.Compat.i386//21.08 installed. Try installing it and running Steam with --runtime=org.freedesktop.Sdk after that.

@teohhanhui
Copy link
Author

Uhh... Sorry, I've misread your comment. I thought it was the usual org.freedesktop.Platform.Compat.i386//21.08

@teohhanhui
Copy link
Author

Thanks. That works. Now if only there's flatpak override --runtime 😞

@teohhanhui
Copy link
Author

What do you think about switching the runtime to org.freedesktop.Sdk? I'd imagine that using mods is a fairly typical use case. This would make it so much easier.

The user would then just have to set the game's launch options to e.g.:

PATH="$PATH:/usr/lib/sdk/dotnet5/bin" %command%

Or we could also support FLATPAK_ENABLE_SDK_EXT like many flatpak'ed IDEs do:

https://github.com/flathub/ide-flatpak-wrapper/blob/919677ff0a9bc7f49eda6163ead97171df360c42/vscode.sh#L48

@gasinvein
Copy link
Member

Now if only there's flatpak override --runtime

You can override the flatpak .desktop file by copying it to ~/.local/share/applications/ and editing the Exec= line.

@teohhanhui
Copy link
Author

You can override the flatpak .desktop file by copying it to ~/.local/share/applications/ and editing the Exec= line.

Yeah, I know, but it's tedious. Haha... Every time that desktop file changes, I'd have to keep an eye on it.

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

Successfully merging this pull request may close these issues.

4 participants