Skip to content
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

[Feature request] Make application as Flatpak package #83

Closed
kacperpaczos opened this issue Aug 5, 2018 · 4 comments
Closed

[Feature request] Make application as Flatpak package #83

kacperpaczos opened this issue Aug 5, 2018 · 4 comments
Labels
packaging wontfix Nothing can be done to fix the issue

Comments

@kacperpaczos
Copy link

In my opinion this app should be relase as flatpak package on flathub.

@TheTumultuousUnicornOfDarkness
Copy link
Owner

I don't know. There is a main problem with CPU-X: it requires root privileges to work properly:

  • libcpuid reads /dev/cpu/N/msr
  • dmidecode reads /sys/firmware/dmi/tables/smbios_entry_point or /dev/mem
    So, if you run CPU-X as regular user, some informations will not be retrievable.

I don't think Flatpak allow to use root privileges. I'm reluctant to make a package that cannot show all informations to user.

I don't find any example that run a Flatpak package as root.

@TheTumultuousUnicornOfDarkness
Copy link
Owner

After some tests, CPU-X Flatpak package can not work as intended due to the sandbox.

List of issues

Issue1: poor eyes

No smooth text, why?
CPU-X Flatpak

Issue 2: no pkexec

Privilege escalation is complicated, because CPU-X can not communicate with Polkit agent.
A possible workaround is to give CPU-X Flatpak more privileges:

flatpak --user override org.cpux.CPU-X --talk-name=org.freedesktop.Flatpak

Then, it allows to use a command like that from CPU-X:

flatpak-spawn --host pkexec --disable-internal-agent /run/host/complicated/path/to/sandbox/through/host/filesystem/cpu-x-daemon

Hooray? No.

Issue 3: no socket sharing with host

The CPU-X daemon listen for requests on /run/cpu-x.sock socket, but /run (and a lot of other paths) are blacklisted inside sandbox, so the core can not communicate with daemon.

Final words

Wireshark (a GTK application with privilege separation, like CPU-X) meets similar problems with the Flatpak sandbox, whereas they have more manpower than CPU-X (see flathub/org.wireshark.Wireshark#4).

As this is not feasible (or unnecessarily too complicated), I prefer to close this issue.
If someone is interested, my manifest file is available as a Gist.

@TheTumultuousUnicornOfDarkness TheTumultuousUnicornOfDarkness added the wontfix Nothing can be done to fix the issue label May 24, 2020
@TheTumultuousUnicornOfDarkness TheTumultuousUnicornOfDarkness changed the title [FR] Make application as flatpak package and release on flathub. [Feature request] Make application as flatpak package and release on flathub. May 24, 2020
@TheTumultuousUnicornOfDarkness TheTumultuousUnicornOfDarkness changed the title [Feature request] Make application as flatpak package and release on flathub. [Feature request] Make application as Flatpak package May 24, 2020
@Evernow
Copy link

Evernow commented Sep 19, 2020

No reason for this to be released as a flatpak, it's in every major repository and even available as an appimage.

@TheTumultuousUnicornOfDarkness
Copy link
Owner

Good news everyone. It looks like the community is really interested to have a Flatpak, so it is finally happening: https://flathub.org/fr/apps/io.github.thetumultuousunicornofdarkness.cpu-x
Be able to start the daemon from the Flatpak was not easy, so it why I abandoned this task in the past, sorry.

No reason for this to be released as a flatpak, it's in every major repository and even available as an appimage.

To be honest, I am personally not interested by AppImage/Flatpak/Snap. But I can understand that some people prefer this way to install software on their system rather than relying on repositories with older versions.
Flatpak seems to be a good way of providing software that can be installed on all GNU/Linux distributions (even if the sandbox has a few restrictions).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packaging wontfix Nothing can be done to fix the issue
Projects
None yet
Development

No branches or pull requests

3 participants