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

Provide a Flatpak as software package for Linux systems #1572

Closed
Ayush1325 opened this issue Aug 1, 2021 · 20 comments
Closed

Provide a Flatpak as software package for Linux systems #1572

Ayush1325 opened this issue Aug 1, 2021 · 20 comments

Comments

@Ayush1325
Copy link
Contributor

Flatpak like snaps are containerized software packages that are simple to create and install. It also works on all major Linux
systems without modification.

The one major area where flatpak and snap differ is that snap needs to create a symlink in root filesystem which is not possible in immutable OS like Fedora Silverblue or MicroOS. See here for more information. This pretty much renders usage of snaps impossible. Also, the Fedora package is also currently at 0.12.2 version in Fedora 34, which is about 10 months old at this point. So I think a Flatpak version would be a good idea.

I have a basic version of the manifest file here which works for the most part but has a few problems with git submodules in this project (so syntax highlighting not working yet).

If having a flatpak version is acceptable to everyone, then I can create a Draft pull request and iron out the problems with submodules?

Also, I am not an expert on flatpak. This is my first attempt at creating a flatpak so it would be great if there was someone already familiar with it and can catch mistakes and problems which might not be obvious to me.

@doamatto
Copy link
Contributor

doamatto commented Aug 1, 2021

Imo, a Flatpak version isn't necessary per-say. It's already a one bin solution that has your main binaries pre-built in the releases (x64), with it being a simple one command to build (bar installing things like MSVC, g++, make, et al).

In other words, I don't know if a Flatpak would really be used, but I wouldn't be opposed to it, either. Kind of a could take it or leave it opinion. That, and its possible sandboxing could cause issues, not to mention having to use flatpak run org.getzola.zola [command] for everything (afaik).

@Ayush1325
Copy link
Contributor Author

Well, in my current flatpak build, all commands seem to be working in the blog.
The only thing that doesn't work is syntax highlighting since flatpak-builder was having some problem with downloading git submodules.

The reason I prefer flatpak is because I am using Fedora silverblue as my daily driver. I started off with using Zola inside a toolbox (they are just fancy containers if u haven't used silverblue). Anyway, as I said, the snap isn't an option in silverblue and the version in Fedora repo is old. So I thought if there was a snap, we can have a flatpak too.

As for the flatpak run thing, I'm kinda used to at this point, so don't really find it problematic, I mostly just create alias when required, but yeah, that's why I thought creating an issue might be better to see if a flatpak version is helpful.

I won't mind maintaing the flatpak version.

@Keats
Copy link
Collaborator

Keats commented Aug 2, 2021

Can it be maintained outside of the repo? I already forget to update the snap file half of the time and would prefer not putting more "things to do" in the repo.

Re: submodules
you don't need them to build Zola, the compiled assets are already stored in git

@Ayush1325
Copy link
Contributor Author

Can it be maintained outside of the repo? I already forget to update the snap file half of the time and would prefer not putting more "things to do" in the repo.

Yup, Currently, the flatpack file directly downloads and builds from the git. So there is no need to have them in the same repository.

you don't need them to build Zola, the compiled assets are already stored in git

Huh, that solves the submodules issue then.

@Ayush1325
Copy link
Contributor Author

Here is my initial attempt at creating the flatpak.
All the commands seem to work fine.

@Keats
Copy link
Collaborator

Keats commented Aug 24, 2021

So the path to resolve this issue is to add the installation method to the docs right?

@Ayush1325
Copy link
Contributor Author

Ayush1325 commented Aug 24, 2021

Well, I haven't merged to flathub yet since I didn't get any response but I can open the pull request if there are no objections. However, it does seem that there is some friction about CLI apps in the flatpak community so I'm not sure about the usefulness of a flatpak right now, to be honest. But the flatpak definitely works fine without any modification to the main zola code, so there is not any reason to be opposed to it either.
Also flathub does not list CLI applications in the main store, so it will only be available through flatpak CLI.

@Newbytee
Copy link
Contributor

I would like to see this packaged on Flathub. Will you submit a pull request there?

@Ayush1325
Copy link
Contributor Author

I would like to see this packaged on Flathub. Will you submit a pull request there?

Ok, I will submit a pull request after updating the flatpak to the latest Zola version.

@RokeJulianLockhart
Copy link

@Ayush1325, please notify us when you have. I want to monitor the pull-request.

@Newbytee
Copy link
Contributor

Ok, I will submit a pull request after updating the flatpak to the latest Zola version.

Sounds good. if you don't mind, I could co-maintain it with you (just mention that you want them to invite me when you make the PR to Flathub).

This was referenced Jun 15, 2022
@Newbytee
Copy link
Contributor

@Ayush1325, please notify us when you have. I want to monitor the pull-request.

See flathub/flathub#3273

@Ayush1325
Copy link
Contributor Author

@Newbytee it seems that providing at least 1 screenshot is necessary. So any idea for the screenshot? Maybe the zola website?

@Newbytee
Copy link
Contributor

Newbytee commented Jun 15, 2022

@Newbytee it seems that providing at least 1 screenshot is necessary. So any idea for the screenshot? Maybe the zola website?

I think you just add this property to flathub.json: https://github.com/flathub/org.flathub.flatpak-external-data-checker/blob/master/flathub.json#L4

@Ayush1325
Copy link
Contributor Author

@Newbytee The flatpak build is succeeding now

@Ayush1325
Copy link
Contributor Author

The flathub repository for zola is live now: https://github.com/flathub/org.getzola.zola

@Ayush1325
Copy link
Contributor Author

Zola is now availabe in flathub stable
Screenshot from 2022-06-21 19-09-57

@Keats
Copy link
Collaborator

Keats commented Jun 21, 2022

Sweet, does that mean that the PR can be closed?

@Ayush1325
Copy link
Contributor Author

I think so. Should I update the docs to include the flatpak install and usage as well?

@Keats
Copy link
Collaborator

Keats commented Jun 21, 2022

Yep that would be great!

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

5 participants