I have a working prototype here. I would love someone else test it, as I have only done very shallow testing. Anyhow, there are a few things I would like to have some answers on, before I submit the PR to Flathub.
Is the name org.portfolio.PortfolioPerformance okay?
The structure has to be what it is, but it could also be org.buchen.PortfolioPerformance or if it is supposed to stay under my control it could also be org.deisi.PortfolioPerformance hinting towards a build that is maintained by me. I’m fine with either or but I would like to make this part of the official build and thus I prefer org.portfolio.PortfolioPerformance scheme.
On Ubuntu you have to do that because canonical pushes snaps. On fedora it the other way around. In general flatpak is considered more open than snap. I think best would be both, but I use flatpak as much as I can. So I picked up on that.
The reasons why I like it are:
Automatic updates
Gui based package manger (gnome-software)
Sandbox
No downloading of executable from some random webpage
I don’t have to think about where to put the dang binary and how to launch it, as it now launches as any other properly installed programm
Also its gonna be more and more snap or flatpak in the future. The train is rolling in that direction love it or hate it.
I expecting that one but see it from a user not a developer perspective. I don’t have to tell my friend/mom: “google PP and download the first hit you have” but rather can tell her: Install it from the software manager you have anyway and you use for the last 50 apps already. I think the phishing problems here are more then well known. The weakest point in that chain is not the PC, but the human easily fooled into harming him/her self. This here wont save the world, but one step at a time.
I didn’t know it exists, but from what I know build in updates couldn’t solve updating issues throught the last 10-20 years or so. I think they will not in the future either.
I don’t know much about Flatpak, but isn’t the name meant to be based on an Internet domain name to ensure uniqueness, like in Java packages? In that case, usurping a foreign domain name such as portfolio.org obviously isn’t OK. The Java packages use abuchen.name, and of course there is portfolio-performance.info.
However I read up on this now and you are right, but there are more contains. The ID must also not contain a - but can use _ as alternative.
info.portfolio_performance.PerfolioPerformance should thus be okay. Also the domain should be owned by the developer. Maybe @AndreasB could tell me what domains he owns. For some reason, info. looks strange to me but in the end I don’t care.
I changed the ID to info.portfolio_performance.PortfolioPerformance now. if nobody opposes this until tomorrow evening, I will submit the PR to flathub. From there on one will have to see how to integrate the info.portfolio_performance.PortfolioPerformance.json into to CI pipeline of PP.
Every-time there is a new version of PP one has to do the following:
Change the download location of the archive in the .json file
Change the sha512 file of the archive in the .json file
Change the path to the new archive in the build-commands of the jsonfile
Just a friendly hint, if you’re not be able to integrate this into the GitHub CI pipeline it’s up to the repository owner at the Flatpak repository to keep it up to date
So I read about a possible CI pipeline and I think I have the tools I need. From what I think everything can be automated with github actions. I basically need to use these things:
flatpak run info.portfolio_performance.PortfolioPerformance
(process:2): Gtk-WARNING **: 20:15:50.284: Locale not supported by C library.
Using the fallback ‘C’ locale.
Gtk-Message: 20:15:50.285: Failed to load module “appmenu-gtk-module”
Gtk-Message: 20:15:50.325: Failed to load module “canberra-gtk-module”
Gtk-Message: 20:15:50.326: Failed to load module “canberra-gtk-module”
(process:22): Gtk-WARNING **: 20:15:50.543: Locale not supported by C library.
Using the fallback ‘C’ locale.
Gtk-Message: 20:15:50.544: Failed to load module “appmenu-gtk-module”
Gtk-Message: 20:15:50.579: Failed to load module “canberra-gtk-module”
Gtk-Message: 20:15:50.580: Failed to load module “canberra-gtk-module”
(java:22): Gdk-WARNING **: 20:15:50.778: The program ‘java’ received an X Window System error.
This probably reflects a bug in the program.
The error was ‘BadAccess (attempt to access private resource denied)’.
(Details: serial 219 error_code 10 request_code 130 (MIT-SHM) minor_code 1)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the GDK_SYNCHRONIZE environment
variable to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
error screen is attached. I think there are two gtk modules missing. but shouldn’t flatpak include these?
I have currently no clue why this is happening for you, but I might try to find out. My guess is that we have a dependency missing that I dont know about.
I just installed it on a pop_os 21.04 vm and it just worked. Could you try removing and reinstalling it and see if that helps. It seems there is something specific about your setup causing this isse and not directly related to the package itself. @TETE
The *-gtk_module errors are normal and show up in my vm as well. The BadAccess error of course not.