-
Notifications
You must be signed in to change notification settings - Fork 46
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
Flatpak for SyncthingTray #261
Comments
I'll review your repo and in general I'd also be willing to take ownership. Why exactly do you need to change the app ID? I don't care about the ID but it would probably make sense to upstream that change first. @sten0 When I remember correctly, you cared about the AppStream metadata when packaging this for Debian. So would it be ok for you if we'd change it? (Maybe it makes most sense to make it a configurable build parameter at this point.)
That would be required because maintaining the Flatpak would exceed the amount of effort I want to put into the project - I rather focus on development. |
Has the change of the ID something to do with the website URL? I only set it up recently (after seeing the app ID). So that's why the app ID is not in line with that. |
Hi Martchus, The app ID located in
There are some examples on flatpak's page shows what should the appID looks like. So according to the page the prefered ID should be either The app ID is used in flathub.org it self, so I'm not sure whether upstream should change it. May be we can try to publish without change first, and see if flathub team is OK with it? |
No, it's not. It only related to |
Ok, I guess I'll just keep the app ID defined in my upstream AppStream meta-data file for now as-is. I can add build system variables so you can avoid all the manual moves/replacements¹ and just specify a build parameter like I had a look at https://github.com/qgymib/io.github.Martchus.syncthingtray/blob/new-pr/io.github.Martchus.syncthingtray.yml. It seems like you're bundling Syncthing itself as well. That makes sense. I'd like to note that you could get rid of the manual build step and build Syncthing as library when building Syncthing Tray. Just add It seems a bit problematic that you have to install Perl modules and Boost manually. So it isn't possible to just pull in some package? I guess the Perl modules don't really matter but Boost you would need to keep up-to-date manually. I see that you also build libplasma manually. I highly doubt that this is useful. Prove me wrong but I think the Plasmoid needs to be build against the system-provided Plasma version and the system-provided ¹
|
I use standalone Syncthing because build bundled Syncthing shows error about something like
Unlike aur or snap or docker, flatpak's build process seems no way to use something like
OK I will remove it. |
By the way, I asked on the Plasma channel and got the following responses:
So for now this is as useful as I suspected (not useful at all). Maybe that'll change in the future but I doubt it'll change anytime soon (especially for plasmoids using native code). |
Update: The syncthing is now bundled as library. Due to the restriction that flatpak-builder forbid download anything during build stage, the bundled syncthing must build in vendor mod, so the CMakeLists.txt has to be patched, see 0001_force_vendor_build_bound_syncthing.patch, the patch will be applied automatically during build progress. It seems no need to change upstream syncthingtray's CMakeLists.txt because event syncthing does not use vendor in their repo, they only use vendor in their release .tar.gz. Checkout org.martchus.syncthingtray.yml to see the updated build script. The remaining task is to try to remove Perl.
I guess it still possible to use pre-installed perl, just need a little bit research and magic. |
Update: After some testing, there are two problem that bundle syncthing library with SyncthingTray in flatpak:
Both problems not exists if build syncthing as standard executable, so I guess we should keep them separated. For problem one I will do more test to see if it only exists in flatpak or is a common issue (Some other may have already report like #252 ). For problem two there is a strange behavior that SyncthingTray can capture this warning on very first startup (The one that shows a dialog to do the first configuration). After that SyncthingTray no long capture this warning and just leave it on the web page. There seems no configuration to suppress this warning so each time syncthing startup it will show once. |
That's strange but probably more likely a config issue and not a general issue with the builtin Syncthing library. (In #252 is was also just a config issue.)
I also remember seeing this independently from Flatpak. I guess it makes sense to disable this feature for the Syncthing library because setting a low niceness for the whole process doesn't make much sense. Maybe it would be nice if the Syncthing library could set this for just the Go threads. For now it might not be the worst to just use an external executable. I had a look at https://github.com/flathub/flathub/blob/d133b382e7cc98f6c90f9b192663ddb141b13cad/patches/0001_force_vendor_build_bound_syncthing.patch and made this configurable via The ID can now also be overridden using |
Hi @Martchus, To follow requirements, in file
Should change to something like (See example here):
Chould you please help to confirm what develop id you want to use? Also this change might be suitable to apply to upstream SyncthingTray. |
|
OK let's summarize the issues currently have:
1. Autostart not working This caused by flatpak's sandboxing. The workaround is to manually create symbolic link to the startup file. The actual solution is to use portal API org.freedesktop.portal.Background to do auto start/stop control. This require upstream SyncthingTray to implementation it. 2. SyncthingTray stuck on setup wizard, or show "Unable to establish connection to Syncthing" on setup wizard Remove
1. Welcome dialog shows incomplete fonts (also exist in syncthingtray-qt6 from AUR) System: archlinux with KDE, x11 However the release tarbar is fine. 2. When bundle syncthing as library, SyncthingTray always show "Disconnected from Syncthing" (also exist in official release) To reproduce:
3. Strange left-click behavior on ubuntu 24.04 When left-click on the tray, the widget shows (may be disappear quickly), and the right-click menu shows. On more left-click, only the menu shows, the widget no longer popup again. For the flatpak package, it is now ready to publish to flathub.org. Please help to review the repo again to see if anything should be changed. The comments in this branch will always be squash, for future maintainability. If everything is OK, I will send PR to flathub.org team and ask to add write access for both of us. There may be more modifications in the future, according to their review comments. |
I think the Flatpak repo looks good. I like that you document the autostart problem and workaround explicitly. I only have the nitpick that the human-readable/display name of the project is actually "Syncthing Tray" (with a space between the words). You may also use that name for the heading and link (instead of using all-lowercase Note that Maybe for now it is good if it lives under your organization as I probably won't be able to contribute much anyway. I'm also not sure what the convention is but if it would live under my GitHub profile I'd prefer to prefix it with If the Flatpak has been published it would make sense to mention it on the README and possibly also on https://martchus.github.io/syncthingtray/#downloads-section. |
I have to apologize for that😱, I use Syncthing Tray for quite some time and just realize that. Fixed in README.
Sorry I didn't explain this well. A flatpak's repo actually live under flathub organization. Here is the work flow:
If everything looks good with you, I will send the PR after your final confirm. |
No need to apologize and thanks for your work. The explanations make sense so feel free to submit. |
I'll link it later on the website. I'll also fix the bug tracker URL and might streamline the description with the website. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
The Flatpak is available now so this issue can be closed. |
Relevant components
syncthingctl
)libsyncthing
)Hi Martchus,
Thank your for amazing work. Since #33 I see no further plans for flatpak, so I just pack it which should works:
https://github.com/qgymib/io.github.Martchus.syncthingtray/tree/new-pr
To follow flatpak's Requirements & Conventions a little modifications were made:
org.martchus.syncthingtray
toio.github.Martchus.syncthingtray
This package should be ready (or with some little optimize, e.g. remove build dependency) to publish to flathub. Since flathub prefer app’s developers to publish the software, would you like to take the repo's ownership? And of course I also can help to publish and maintain the flatpak distribution if you want.
The text was updated successfully, but these errors were encountered: