Bringing Portfolio Performance to Flathub

Hey guys

I’m working on bringing PortfolioPerformance on Flathub for easier maintain and install on Linux based OSes.

I used Flatpak Manifest - Icons fehlen as a starting point.

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.

  1. 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.

  2. What is the correct bug tracker?
    Issues · buchen/portfolio · GitHub or https://sonarcloud.io/project/issues?id=name.abuchen.portfolio%3Aportfolio-app&resolved=false&types=BUG

  3. As developer name: Andreas Buchen fine?
    It has to be a person or a “company”.

  4. Does PP use OpenGL?

  5. Does PP use any kind of DBUS service?

  6. Is there a place to send translations? (optional)

  7. Is there an upstream email address? (optional)

  8. Is there a place to send donations? (optinal)

In case anybody want to test this out, here is a little explanation of how to build and use for now

git clone https://github.com/deisi/flathub.git
cd flathub
git checkout origin/portfolio
sudo apt install flatpak-builder flatpak
flatpak install org.freedesktop.Sdk.Extension.openjdk11//20.08
flatpak install org.gnome.Platform//3.38
flatpak install org.gnome.Sdk//3.38
flatpak-builder --repo=repo --force-clean build-dir org.portfolio.PortfolioPerformance.json
flatpak --user remote-add --no-gpg-verify tutorial-repo repo
flatpak --user install tutorial-repo org.portfolio.PortfolioPerformance

wait some seconds and start PortfolioPerformance from your launcher. Or do

flatpak run org.portfolio.PortfolioPerformance 

What is the advantage of flatpak over the normal Linux version at https://github.com/buchen/portfolio/releases/download/0.50.4/PortfolioPerformance-0.50.4-linux.gtk.x86_64.tar.gz?
I just checked, I would have to install flatpak first.

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.

Ah and I also fixed No icon in the dock on Ubuntu 20.04 using GNOME · Issue #1738 · portfolio-performance/portfolio · GitHub along the road as there is now a propper .desktop file.

Deselecting the automatic updates in PP would then be ineffective?

Is it already tested under XFCE?

Good point.

Doesn’t the flatpak version pull from the same page in the background?

OK, but that hasn’t been an unsolvable problem so far.

I fear you are probably right :wink:

Thank you for your effort, I will think about trying this out.

I expecting that one :slight_smile: 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.

Just overall the user experience of https://github.com/buchen/portfolio/releases/download/0.50.4/PortfolioPerformance-0.50.4-linux.gtk.x86_64.tar.gz is not good.

no clue

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.

me neither :rofl:

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
  • Create a PR on the flathub repository
  • merge the PR on the flathub repositiry

Lets see how fare github hooks get us here.

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 :wink:

I know, but the there is ansible and cron to not steal my free time. I will make it work either way :wink:

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:

I pushed it to flathub now Created initial manifest for Portfolio-Performance by deisi · Pull Request #2117 · flathub/flathub · GitHub

Lets see what they say.

An test build is now available within the flathub respoitory thus you can install with:

flatpak install --user https://dl.flathub.org/build-repo/38093/info.portfolio_performance.PortfolioPerformance.flatpakref

Testing is highly appreciated.

I’m being asked if anyone from upstream is interested in co-maintainig this app?

PortfolioPerformance is now available of flathub GitHub - flathub/info.portfolio_performance.PortfolioPerformance

It should take about 3h from now until everybody can start installing. :partying_face:

2 Likes

Thanks for pushing this forward! Just installed and it worked great!

:+1:

@deisi I don’t use Linux, but still, awesome!

Henceforth @deisi shall be addressed as a real programmer bada** :sunglasses: #achievementunlocked

Hi,

first of all thanks for providing pp on flathub. Unfortunately, it does not run after install on my system (pop!_os 21.04).

following error entries are given when run on cli:

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?

hmmm, would you mind making an issue on github? Issues · flathub/info.portfolio_performance.PortfolioPerformance · GitHub

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.