Last week, systemd checked in a change to provide read-only access to host’s environmental variables as some developers would benefit from changing their functionality based on those variables.
Official interface update is here:
The logic is read-only mount of host os directories:
/etc/os-release -> /run/host/etc/os-release if it exists
/usr/lib/os-release -> /run/host/usr/lib/os-release
containerd seems to be moving in the same direction: https://github.com/containerd/containerd/issues/4286
Does that make sense for snapd to have that functionality? If so, I would like to contribute by implementing it in snapd. Disclaimer, I am new to open source contrition by I was able to successfully modify and build snapd.
Any recommendations on which would be the proper function that should have mounting code? Which function should ensure unmounting?