Conversation
|
Thanks for this - haven't had a chance to go through it all yet but at a glance it looks high quality. I think we're ok if the flatpak is podman only. @tulilirockz mentioned a while back that podman-remote might be the way forward for flatpak, not sure exactly what her intention was for that approach though. I don't have any real working knowledge of flatpaks nor flathubs publishing requirements. |
I think, (but I'm not sure) the idea is to ship podman with the app in the flatpak, and expose the host podman socket to flatpak. Then podman inside the flatpak can use podman remote to connect to the socket. |
|
Also it might be a good idea to wait for #515 before dealing with flatpak. I think |
|
Food for thought: both docker and podman have HTTP APIs that can be used instead of their cli programs:
It's possible to generate a typescript client for those APIs and use it directly instead of relying on external CLIs: docker run -it --rm -v "$PWD:/local" \
openapitools/openapi-generator-cli generate \
-i https://docs.docker.com/reference/api/engine/version/v1.52.yaml \
-g typescript-node \
-o /local/docker-clientThus avoiding the need to package docker and podman altogether. The docker client will probably work for both docker and podman, as podman API is supposed to be compatible, but this needs testing (I haven't tried it yet). |
TY for having a look Auri - this sets off a chain haha as we want to do a full refactor (and rework the UI) of the config page first. I was waiting for Lev/Tibix to do the first sub-page but I should probably just give it a go. |
That seemes a lot more work than just exposing the unix socket, and I don't know if it's worth it. p.s. I can't really speak for whether any changes should be made to the flatpak packaging as I have no idea how it work. |
|
Hey @ea7ababe - are any of these files are automatically generated/updated? |
They aren't updated automatically though, someone would need to periodically run those rules, and commit their output into the repository - I didn't include the generation step into the CI pipeline. |
|
The metainfo file was written manually, but if you worry about keeping it in sync with the release notes on the github page, then I imagine there would need to be a NEWS file, from which both would be generated. |
Thanks - I'm wondering if we can move it into the CI pipeline/general build process (for local builds) and not have them committed? |
* Removed the locally generated flatpak dependency manifests; * added a docker buildx bake recipe to generate them and the flatpak bundle; * changed the CI config to use that recipe instead of building the flatpak directly.
Hey, sorry for the delay. Can you look at the commit above? I've removed the generated files, and added a Locally one would use it like this: docker buildx create \
--name winboat-ctx \
--buildkitd-flags --allow-insecure-entitlement=security.insecure \
--driver docker-container --use
docker buildx bake flatpakAnd in CI just tick the "With flatpak" box, it uses the same process, essentially. I've had to add the |
|
Oh cool - I'll try it when I get time, hopefully this weekend. I was half expecting it to rely on the org.flatpak.Builder flatpak - but I'm a complete newbie when it comes to this side of things. |
Have you had time to try it yet? |
not yet - sorry this slipped! been focusing on the things we're aiming to get in for 0.9.1 - I think Tibix/Levev are planning to look at this after that next release goes out (but I could be wrong). I'll try and get a look in soon I promise! |
|
When I run I get Not sure how comfortable I feel about that message on dev machine, maybe in a VM or something I'd not care so much... |
I initially tried to make it work using
So far, I don't really have any good ideas on how to design a build system, that doesn't use those privileges. Both docker and flatpak-builder want to create an isolated build environment to ensure some level of determinism in the build process, but flatpak-builder can't do it inside of docker without those special privileges. One idea that comes to mind is to build a custom flatpak for building the app, that includes |
|
Hmm, ok. I really wish I knew more about this stuff myself - sorry I'm so new to building flatpaks! I think this needs to be updated for latest main, given Tibix has moved the build system to bun? |
Well, the bad news is that flatpak-node-generator doesn't suport |
|
Oof, I've just realized, that flatpak doesn't even have a bun extension yet. I modified |
|
Actually, sorry, maybe I got confused yesterday. Do I understand correctly, that winboat switched to bun only at build time for its package manager, and not runtime? I'm trying to find anything on bun support in electron itself, and it seems vanilla electron is currently for node only. Would it be too much of a maintenance burden to support both bun and node for building? Currently, bun can convert bun.lock into yarn.lock, which then can be picked up by yarn or npm. This can be done automatically at build time, without checking the other lock files in. |
|
I'm not sure - that's a question for @TibixDev |
flatpak/directory:Makefile- has rules to regeneratego-sources.json,modules.txtandjs-sources.jsonapp.winboat.Winboat.metainfo.xml- flatpak metadataapp.winboat.Winboat.yml- flatpak manifestgo-sources.json- guest server dependenciesjs-sources.json- main app dependenciesmodules.txt- guest server modules file for go vendorexecFile*calls to be flatpak-aware, they now useflatpak-spawnwhen inside flatpak to call external programs (docker/podman and xfreerdp aren't shipped with the bundle).This isn't really Flathub-ready because of the use of
flatpak-spawn(although, some apps that use it do get accepted, so I dunno), but it would be convenient to at least provide flatpak bundles from this github repository, as the current installation options do not work on, e.g. GNU Guix (appimages don't work there, not without hacks anyway).