AppImageKit icon indicating copy to clipboard operation
AppImageKit copied to clipboard

RFE: common interface to expose host's os-release to container-like runtimes

Open bluca opened this issue 5 years ago • 1 comments

The following was the start of a discussion regarding the possibility of establishing a common interface for exposing the host's os-release via ~container runtimes:

We find ourselves in a situation where application running containerized (specifically as portable services, although this issue is general) need to either find information about the host, or alter their behaviour depending on the host's flavour. At the same time, applications also need to find information about the guest's OS, so simply bind mounting /etc/os-release from the host is not enough. We need both.

Reference: https://lists.freedesktop.org/archives/systemd-devel/2020-April/044378.html

The desired goal is to establish a common interface to provide this information, so that applications can rely on it without having to infer what runtime manager they are spawned by.

There are many ways to implement this, the discussion for the nspawn/portabled cases gravitated toward using prefixed environment variables - the advantage being that it's the most convenient way for applications, since they can trivially have both sets of information at the same time (eg: source /etc/os-release and then VERSION_ID is the runtime's version, service_host_VERSION_ID is the host's version).

RFC patches for nspawn/portabled/flatpak:

https://github.com/systemd/systemd/pull/15891 https://github.com/flatpak/flatpak/pull/3640

Thoughts?

bluca avatar May 27 '20 14:05 bluca

Hi @bluca, Just have your application read and parse /etc/os-release?

Remember that an AppImage is just a self-mounting disk image that executes whatever someone has put inside. There is no sandboxing involved.

In case the user chooses to run AppImages in a sandbox like Firejail, you'd need to ask the sandbox project for this type of change.

Hence, I think this is outside the scope of the AppImage project. Do you agree?

probonopd avatar May 30 '20 08:05 probonopd