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

Create a snap package (the hidden files or folder access of ~/.steam/ can now be solved!) #123

Open
heidiwenger opened this issue Sep 20, 2022 · 8 comments

Comments

@heidiwenger
Copy link

On Ubuntu, there is no .deb package and putting up flatpak support takes terminal commands and too much effort for a new comer to Linux (and Ubuntu is the main destination).

Referring to this partly solved issue (a flatpak was created but snap had a hurdle) #3

The technic that provides the same thing (to access those needed files / folders) as in the flatpack package is: https://snapcraft.io/docs/personal-files-interface

"The personal-files interface provides access to the specified files in the user’s home. This interface gives privileged access to the user’s data.

Auto-connect: no
Super-privileged: yes "

@heidiwenger heidiwenger changed the title Create a snap package (the hidden files or folder accees of ~/.steam/ can now be solved!) Create a snap package (the hidden files or folder access of ~/.steam/ can now be solved!) Sep 20, 2022
@DavidoTek
Copy link
Owner

putting up flatpak support takes terminal commands and too much effort for a new comer to Linux (and Ubuntu is the main destination).

Yeah, it's probably easier to connect the personal files interface than installing Flatpak, even though you probably should do that as many apps are available as Flatpak.

ProtonUp-Qt could detect if it is running as Snap and if the personal files interface is connected. If that is not the case it can show the user a message like You are running the Snap version. You either need to connect the Personal Files Interface [or use the Flatpak version]. Please open a Terminal and enter snap connect blahblah.

I will take a look at creating a Snap package, if anyone wants to contribute a snapcraft.yaml in the meantime, feel free to do so.

@heidiwenger
Copy link
Author

putting up flatpak support takes terminal commands and too much effort for a new comer to Linux (and Ubuntu is the main destination).

Yeah, it's probably easier to connect the personal files interface than installing Flatpak, even though you probably should do that as many apps are available as Flatpak.

ProtonUp-Qt could detect if it is running as Snap and if the personal files interface is connected. If that is not the case it can show the user a message like You are running the Snap version. You either need to connect the Personal Files Interface [or use the Flatpak version]. Please open a Terminal and enter snap connect blahblah.

I will take a look at creating a Snap package, if anyone wants to contribute a snapcraft.yaml in the meantime, feel free to do so.

Amazing stuff. All kinds of aid for this can be gotten from https://forum.snapcraft.io/t/protonup-qt-to-easily-install-proton-ge-for-steam/26492/2 additionally.

@vrement
Copy link

vrement commented Nov 23, 2023

Came for the same. There's no snap package. Is there any progress for one yet?

@sonic2kk
Copy link
Contributor

sonic2kk commented Nov 23, 2023

As far as I know, this has not been picked up. I didn't see anything in the commit history or any PRs directly related to this. I'm also not intimately familiar with Snap packaging (or really, any application packaging) so I'm not sure what needs to be done to implement this.

Probably a good place to start would be creating a snapcraft.yaml file, which is likely some kind of manifest file detailing an application's dependencies and permissions. I'm unsure of how to structure the dependencies, or of the overall format of the file, but a good reference might be the Flatpak JSON manifest. This should give an idea of what types of permissions ProtonUp-Qt needs (such as access to devices for controller support) as well as which files/folders it needs access to, and what kind of read/write permissions it needs (for example, it needs create permissions for ~/stl, and read-only permissions for a bunch of Lutris folders).

Creating the snapcraft.yaml would likely involve translating much of the information from the Flatpak manifest over into the structure used by Snapcraft manifest, but as for what is involved or how to do that, I am not sure.

@DavidoTek
Copy link
Owner

I think following steps need to be takes to create a Snap package:

  • Create a snapcraft.yaml as sonic2kk already pointed out
    • Putting that in a separate repo is probably cleaner, I'm not sure if it's possible to only trigger builds on new releases (tags)
  • Request classic confinement from Canonical: I don't think we can access the mandatory files without that. The alternative would be for users to manually grant permissions to all folders, I don't think that is viable.
  • Create a better CI/CD pipeline: Ideally, a new release should not only build an AppImage, but also create a PR to the Flatpak (and later Snap) repo that contains 1) the link to latest release 2) updated Python dependencies based on requirements.txt. That would keep the needed maintenance low.

Maintaining the Snap would require following:

  • Push commits to the main branch of the Snap repo (that will automatically trigger new builds)
  • Maybe rebuilding if there are any security patches available
  • Testing the builds and pushing them from edge to beta/stable.

I haven't planned to do that at the moment, but I'm happy to receive PRs or if anyone would like to maintain a snap package.

@vrement
Copy link

vrement commented Nov 27, 2023

Alright, well i hope someone would pick this up then. I'll check back later :)

@vrement
Copy link

vrement commented Mar 21, 2024

It has gone about 4 months now and i remembered this one. If there is anything to report i'd love to hear! I think ProtonUP is one of crucial tools for gamers. Would be great if it was available easily on Ubuntu as the LTS comes already nexth month.

@sonic2kk
Copy link
Contributor

sonic2kk commented Mar 21, 2024

To my knowledge, no one has offered to create a Snap. At least they haven't posted about it here or made any PRs for a Snapcraft yaml or any CI/CD changes.

I don't use Snaps on my system (I believe you can set them up for Arch, but I have not done so) and I think its best to leave this kind of task to someone who uses and knows how to maintain Snaps.

I believe DavidoTek's comment above on what is involved still applies. I think if someone came forward to help maintain a Snap package they would've left some comments or questions here :-)

To this end, if you know anyone interested, be sure to spread the word.

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