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

Publish releases on Snap or Flatpak #103

Open
Jacalz opened this issue Dec 28, 2018 · 27 comments
Open

Publish releases on Snap or Flatpak #103

Jacalz opened this issue Dec 28, 2018 · 27 comments
Labels
enhancement New feature or request help wanted Extra attention is needed packaging

Comments

@Jacalz
Copy link

Jacalz commented Dec 28, 2018

It would be wonderful if you could set this up as a snap or a flatpak application. It would help with making it easier to test and use on different distributions on Linux. Really great looking project btw 👍

@kivutar kivutar added enhancement New feature or request help wanted Extra attention is needed labels Dec 28, 2018
@kivutar
Copy link
Member

kivutar commented Jan 1, 2019

I've merged 2 PRs that should help with linux packaging in general, allowing to set important paths.

@RobLoach
Copy link
Member

RobLoach commented Jan 1, 2019

For Flatpak, I've worked on org.libretro.RetroArch. Could use that as a frame of reference.

@ShubhamKJha
Copy link

ShubhamKJha commented Jan 1, 2020

Hi! Can I take up this issue.

@kivutar
Copy link
Member

kivutar commented Jan 21, 2020

Yes

@predr
Copy link
Contributor

predr commented Jan 21, 2020

@kivutar I have a working snap but I run into an issue with $HOME path. Snaps rewrite $HOME internally to separate and restrict environment (confinement good because roms). Problem is path to settings always resolves to /home/user/.ludo no matter what $HOME is set to and that is not accessible to ludo from snap. So I need to change path resolving to respect $HOME env.

@RobLoach Is this a problem for flatpak also?

@RobLoach
Copy link
Member

That's by-design for both flatpak and snap. It tries to protect the home directory by pseudo-sandboxing the environments. For Flatpak, we added --filesystem=host to the flatpak definition file, for snapcraft, I think you use - home plug?

See https://github.com/libretro/retroarch-snap for some inspiration.

Strange that while the environment setting is overwriten, it's still forced to /home/user/.ludo. Do you have any idea why that is? snap/flatpak do a pretty good job overwriting those, so I'm rather surprised.

@predr
Copy link
Contributor

predr commented Jan 21, 2020

It's because usr.HomeDir pulls from /etc/passwd and completely ignores $HOME. os.UserHomeDir() might be a solution, or just using os.Getenv('HOME') and if empty fallback to usr.HomeDir for other systems. Working on it.

Snap is working and runs roms manually but unable to load/save anything in .ludo because of $HOME issue.

@kivutar
Copy link
Member

kivutar commented Feb 7, 2020

OK I've merged your PR

@predr
Copy link
Contributor

predr commented Feb 7, 2020

Nice. I'm waiting on snapcrafters to grant auto-connections for ludo snap (joystick and reading access for usb drives and $HOME/.ludo). Snap is made from Ludo's latest Github release so I'm also waiting for next release. I can change it to build from source but if I do that it will build with different core versions #108. After that I'll share it for people to test.

@predr
Copy link
Contributor

predr commented Feb 21, 2020

Cleared on snapcraft side, waiting for 0.10.5 release. Please test snap and report issues.

@kivutar
Copy link
Member

kivutar commented Feb 26, 2020

I made a new release @predr

@predr
Copy link
Contributor

predr commented Feb 27, 2020

@kivutar v0.11.0 snap is released. Works great except for new snap related issues with paths in settings.toml, now visible. Fixable in snap, no changes to ludo code needed.

@pdureau
Copy link

pdureau commented Feb 27, 2020

That's great snap-side. What about Flatpak?

@predr
Copy link
Contributor

predr commented Feb 28, 2020

Fixed remaining issues, next step is changing snap visibility from unlisted to public. Before I do that @kivutar do you want snap ownership transferred to your name?

Edit: Switched to public because there is high demand for games right now. Let me know if you want ownership when you can.

@pdureau
Copy link

pdureau commented Aug 11, 2020

Hi all,
I have initiated a flatpak manifest file which works well so far: https://github.com/pdureau/flatpak-manifests

I will use it as my main ludo instance next days. What would be the next steps?

@kivutar
Copy link
Member

kivutar commented Sep 5, 2020

Cool, so we have both snap and flatpack working if I understand well?

@predr
Copy link
Contributor

predr commented Sep 5, 2020

Snap is done. https://snapcraft.io/ludo

Flatpak still needs to be put in store. https://flathub.org/apps/search/ludo
@RobLoach can help with that.

@pdureau
Copy link

pdureau commented Sep 6, 2020

Hello,

I am using my flatpak package for a few weeks and it seems to work well. However, he can't be submitted to Flathub yet because it miss some requirements:.

I will fix soon the easy ones:

  • Manifests should therefore refer to tarballs or git tags and not the tip of a branch.
  • Flathub always builds in the flatpak branchname "stable"
  • Unnecessary files should be added to cleanup, in order to ensure smaller package sizes.
  • Applications must provide appstream data
  • Applications must provide application icons in at least 64×64px and 128×128px sizes. > I am providing only a 128x128px SVG
  • If an application hardcodes a path in $HOME and you don’t grant home access you can use --persist.

However, one looks problematic:

  • "Accessing the network is not allowed during the build process, to download extra files, everything that an app requires must be included within the manifest." > Ludo download some stuff during the building.

Source: https://github.com/flathub/flathub/wiki/App-Requirements

@kivutar
Copy link
Member

kivutar commented Sep 8, 2020

Thanks a lot guys for taking care of this.

@pdureau What about using the binary releases here? They are tarballs https://github.com/libretro/ludo/releases and already include all the files. Or flathub really insists on building from source?

@RobLoach
Copy link
Member

RobLoach commented Sep 8, 2020

Nice work, all! Looks like a solid manifest. Is there a way to use the manifest without having to publish to flathub? Their workflow is pretty strict, and could hold us back on release cycles.

@pdureau
Copy link

pdureau commented Sep 8, 2020

@kivutar : I will check what is possible with binary releases.

@RobLoach : I already use the manifest locally publishing the flatpak in my local repo. As a first step, ludo code base may need to add the desktop & appdata files to its codebase.

@kivutar
Copy link
Member

kivutar commented Sep 16, 2020

As a first step, ludo code base may need to add the desktop & appdata files to its codebase.

I'm OK to merge a PR that adds this

@kivutar
Copy link
Member

kivutar commented Jun 8, 2021

Hi @pdureau
Are you still interested in sending your flatpak to flathub?

@pdureau
Copy link

pdureau commented Jul 6, 2021

Hi @kivutar
Sure I am. I hope I will less busy late summer to work on it.

@kivutar
Copy link
Member

kivutar commented Aug 16, 2021

I added support for XDG, I hope it can help.

@johnnyq
Copy link

johnnyq commented Jan 10, 2022

@pdureau Flatpak support would be fantastic!

@dhitchcock
Copy link

was hoping to try this on my steam deck, need that flatpak!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed packaging
Projects
None yet
Development

No branches or pull requests

8 participants