Very interesting discovery about flatpak
- Login o registrati per inviare commenti
I was playing around with flatpak tonight, trying to get it to allow me to install libre-licensed apps from the kdeapps repository, but at the same time get it to NOT allow me to install any of the proprietary-licensed apps from the flathub repository.
After adding the kdeapps repository, I found a couple of gpg keys in /var/lib/flatpak/repo/
"flathub.trustedkeys.gpg" and "kdeapps.trustedkeys.gpg"
I changed the name of the flathub gpg key:
$ sudo mv flathub.trustedkeys.gpg flathub.trustedkeys.gpg.old
And now, flatpak no longer installs anything from the flathub repository (including all of its proprietary-licensed apps), but it does install libre-licensed KDE apps from the kdeapps repo (although it does throw up a few error messages as it is unhappy about not being able to access the flathub repo - the error messages can be disregarded with no ill result).
flatpak DOES still show the proprietary-licensed packages as "available" in flathub if I search for them by name, but it will not install them. For example:
$ flatpak search skype
yields results for Skype, Franz, and Discord, all from the flathub repo. However, they won't install:
$ flatpak install Skype
yields
"F: An error was encountered searching remote 'flathub' for Skype': Unable to load summary from remote flathub: GPG signatures found, but none are in trusted keyring
error: No remote refs found similar to 'Skype'"
So, it's still not a perfect solution, as it does still advertise proprietary stuff if you search for it. However, it appears to me from my very quick look into it that the flatpak system can be manipulated in a variety of ways and still be functional.
I like this possibility, because KDE packages their "latest", "nightly" versions of apps as flatpaks, but the versions that the distros get are many, many versions behind, and some of the apps (like Okular) have special features in the newer versions that I need/want to use.
Just thought I would share, as I found this intriguing.
if worst comes to worst, you could have a libre flatpak repo
> if worst comes to worst, you could have a libre flatpak repo
Yes, I think you could quite easily. It could raise some interesting possibilities for running bleeding edge packages on a more conservative, libre base, like Trisquel.
On 01/02/2020 09:59 PM, name at domain wrote:
>> if worst comes to worst, you could have a libre flatpak repo
>
> Yes, I think you could quite easily. It could raise some interesting
> possibilities for running bleeding edge packages on a more conservative,
> libre base, like Trisquel.
This is why I do not disparage Flatpak and instead advocate for it
fiercely above Snappy.
Outside of Guix, Flatpak is the future.
--
Caleb Herbert
KE0VVT
816-892-9669
https://bluehome.net/csh
> This is why I do not disparage Flatpak and instead advocate for it
fiercely above Snappy.
> Outside of Guix, Flatpak is the future.
It would be nice if groups like KDE would standardize around Guix, but they do not. I do not see much of any benefit to Snap, but then again I've never even looked at it that I can recall.
There are things I definitely do not like about flatpak, including the huge package sizes that it insists on downloading. It's a tremendous waste of disk space and bandwidth if you were to use more than a handful of packages. But if you could potentially run it as an entirely libre experience somehow, it might make it worthwhile for those packages that you can't otherwise do without.
andyprough,
Does "flatpak remote-delete flathub" accomplish anything useful? Perhaps it might remove the remaining things from search results, etc.
> Does "flatpak remote-delete flathub" accomplish anything useful? Perhaps it might remove the remaining things from search results, etc.
Hi jxself, No, that command doesn't seem to improve the behavior. If I run "flatpak remote-delete flathub", and then "flatpak update", the results of "flatpak search skype" still show results for Skype, Franz, and Discord. Skype still cannot be installed, same error message.
The one change that this command made was I cannot install apps from the kdeapps repo now - your command resulted in deleting the runtime "org.kde.Platform.x86_64/5.12", which was apparently provided from flathub. Probably an earlier version of the runtime was still on my system prior to me changing the flathub gpg key.
So, my earlier comment needs updating as follows: libre kdeapps can be installed IF you already have the kde platform runtime installed from flathub prior to changing the flathub gpg key. At that point, you can change the flathub gpg key, and libre kdeapps can be installed without the ability to install proprietary apps from flathub.
This brings up another problem, in that the kde platform runtime will occasionally have to be updated, meaning that occasionally you would have to bring flathub back online in order to update the runtime, and then take it back offline again. So I think my attempt at a "solution" to this problem is really no solution at all. Also, I am reading that the Gnome runtime is provided through flathub, so attempts to install libre Gnome apps without flathub would run into the same problem.
I'm putting a note here so I can find it easily in the future --
In order to reverse the behavior and momentarily allow access to flathub after doing a "flatpak remote-delete flathub", the following command works:
$ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
After that, once your KDE runtime is installed or updated, you can remove flathub by the "flatpak remote-delete flathub" command. If you use these pair of commands to add and remove the flathub repo, there's no reason to make any changes to the flathub gpg key.
Update - my note above is wrong - the only way I am finding to be able to install kdeapps without the ability to install flathub apps is by leaving the flathub repo in place and changing the flathub gpg key. Any time you invoke "flatpak remote-delete flathub", the command only works if you agree to remove the runtimes that flathub provided, including the KDE Platform runtime. If you leave the flathub repo in place but change flathub's gpg key after installing the KDE platform runtime, then you get the more desirable result of being able to install kdeapps without being able to install proprietary apps from flathub.
- Login o registrati per inviare commenti