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

Expose /etc/machine-info #3727

Closed

Conversation

janbrummer
Copy link

In order to set the correct (mobile) user agent webkitgtk needs to
know the chassis type. This is done through /etc/machine-info, DMI
and ACPI.
/etc/machine-info is currently not exposed in flatpak and thus the
user will not have an option to overwrite the other detection
mechanisms.

webkitgtk issue: https://bugs.webkit.org/show_bug.cgi?id=149496

In order to set the correct (mobile) user agent webkitgtk needs to
know the chassis type. This is done through /etc/machine-info, DMI
and ACPI.
/etc/machine-info is currently not exposed in flatpak and thus the
user will not have an option to overwrite the other detection
mechanisms.

webkitgtk issue: https://bugs.webkit.org/show_bug.cgi?id=149496
@janbrummer
Copy link
Author

CC @mcatanzaro

@rh-atomic-bot
Copy link

Can one of the admins verify this patch?
I understand the following commands:

  • bot, add author to whitelist
  • bot, test pull request
  • bot, test pull request once

@hadess
Copy link
Contributor

hadess commented Jul 4, 2020

This should probably be a portal instead, as /etc/machine-info is incomplete, and is completed by dmi information, or device-tree or something else, depending on the hardware. By accessing those directly, you're reimplementing hostnamed.

@mcatanzaro
Copy link
Collaborator

This should probably be a portal instead, as /etc/machine-info is incomplete, and is completed by dmi information, or device-tree or something else, depending on the hardware. By accessing those directly, you're reimplementing hostnamed.

A portal would be fine too, whatever gets us as close to hostnamed as possible. We discussed this with @TingPing and he thought exposing /etc/machine-info would be fine regardless, though.

BTW with this patch alone, we still cannot fully match hostnamed's behavior because we don't have access to the ACPI info, but we do have access to DMI inside flatpak, so most common cases will be covered.

@alexlarsson
Copy link
Member

I would prefer a portal for this, because that way we can have a more dynamic extensible system, and additionally we can have dynamic permissions, because you might not always want to leak host details to the app as it can allow fingerprinting the device the app runs on.

@janbrummer
Copy link
Author

Would it be possible to expose this file until the portal has been implemented? Webkit patch has been merged some weeks ago and it would help a lot. We could create a ticket for the portal with the note to remove it later?
Who will take care of this portal?

@mcatanzaro
Copy link
Collaborator

Nah, once flatpak exposes a filesystem path, it has to stay exposed. What we mount in the sandbox is ABI and that's forever.

I don't think a portal would be too hard to write, but it will require a volunteer with time to spare. :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants