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 release on flathub.org (flatpak) #3134

Open
Darin755 opened this issue Feb 26, 2024 · 10 comments
Open

Add release on flathub.org (flatpak) #3134

Darin755 opened this issue Feb 26, 2024 · 10 comments

Comments

@Darin755
Copy link

The issues
On Linux, the current install method is precarious at best as it involves downloading a random binary off of the internet. This is bad practice at best and at worst is asking for serious issues. What would be better is if there was a well supported way of installing on Linux.

What is Flatpak?
Flatpak is a universal packaging format on Linux that implements a sandbox that each app runs in. This improves compatibility as well as isolates software in case of bad activity caused by malice or unusual bugs. Flatpak is becoming more and more popular and flathub is the main repo where most of the apps live.

How would one package this on Flathub?
The general guide is here:
https://docs.flathub.org/docs/for-app-authors/submission/

Essentially the game would need to be built in a way that is reproducible and the permissions would need to be figured out. I am very much not a Flatpak expert so apologies if this isn't enough information.

@Zentro
Copy link
Member

Zentro commented Feb 26, 2024

Hello,

I just so happen to also have been working with flatpaks for an unrelated project. I can look into this further, but don't expect a lot from me. @AnotherFoxGuy will have better insight into this than I.

For reference, we have 4 other ways to reliably install RoR:

  1. https://rigs-of-rods.itch.io/rigs-of-rods - Standalone zip
  2. https://snapcraft.io/rigs-of-rods - A snap package maintained by the ogre devs
  3. https://aur.archlinux.org/packages/rigsofrods - The AUR arch repo maintained by AFG
  4. itchio://install/351397 - Through the itch.io app, which may not be ideal for everyone

The website doesn't explicitly mention some of these options, I'll look into revising a part of this.

@ohlidalp
Copy link
Member

ohlidalp commented Mar 1, 2024

@AnotherFoxGuy had some insights into this on Discord, I myself never came to contact with flat packs but the topic did come up several times.

@AnotherFoxGuy
Copy link
Member

I believe the last time I tried to package for flatpak I ran into issues with the sandboxing that flatpak does
I will try it again and see if I can get it running now

@ghost
Copy link

ghost commented Mar 26, 2024

Why not appimage? It's simpler. Latest RoR doesn't work on Arch Linux. Dependency issues... Appimage doesn't have these issues as it contains everything inside it.

@Darin755
Copy link
Author

Most Linux users do not use Appimage. App images have a few problems most of them being updates and security. It would be better to use something that can do actual sandboxing and that has proper updates. It would be better to have a Debian repo if anything. I can setup a Debian container to run it in with minimal effort.

@ghost
Copy link

ghost commented Mar 27, 2024

RoR doesn't get updates very often so updating isn't a problem at all. Flatpak is only option for security but damn I just want something simple that works for everyone. Appimage just works at every Linux distro. Not everyone uses Debian as it simply feels like Windows XP.

@AnotherFoxGuy
Copy link
Member

Why not appimage? It's simpler.

The Linux build on itch.io is just a appimage, the only difference is that is not in a self-extracting zip

@ghost
Copy link

ghost commented Mar 27, 2024

I tried both stable and nightly/unstable versions of RoR. I downloaded these from itch.io and both of them gave me dependency errors. Appimage should contain all the required dependencies inside it.

@Hiradur
Copy link
Contributor

Hiradur commented Oct 3, 2024

@Darin755 Flatpak sandbox permissions are defined by the application developer, i.e. you trust the developer like you do when you download their build.
If you are concerned running a native Linux build, consider defining your own sandbox with firejail. A sandbox also provides increased safety against ill-intended mods (should there be any) etc.

@Hiradur
Copy link
Contributor

Hiradur commented Oct 4, 2024

Here is a pretty restrictive profile for the Rigs of Rods zip release for Firejail. It works for me on Debian 12.

# Firejail profile for Rigs of Rods zip release
noblacklist ~/Games/rigsofrods
noblacklist ~/.rigsofrods

include ~/.config/firejail/openal.inc
include /etc/firejail/disable-common.inc
include /etc/firejail/disable-devel.inc
include /etc/firejail/disable-interpreters.inc
include /etc/firejail/disable-programs.inc
include /etc/firejail/disable-write-mnt.inc
include /etc/firejail/disable-proc.inc

mkdir ~/Games/rigsofrods
whitelist ~/Games/rigsofrods
mkdir ~/.rigsofrods
whitelist ~/.rigsofrods

caps.drop all
dbus-system none
dbus-user none
nodvd
netfilter
nogroups
nonewprivs
noprinters
noroot
notv
nou2f
novideo
protocol unix,inet,inet6
restrict-namespaces
#seccomp        # commented out to avoid hyper-threading mitigations causing potential performance hit
#seccomp.block-secondary
tracelog

disable-mnt
private-bin sh
private-dev
private-tmp

#noexec ${HOME} # uncomment if you have the binary at some other place
noexec /tmp

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

No branches or pull requests

5 participants