Files
snapd/sandbox
Nick Rosbrook 95f1e3c414 sandbox/cgroup: change scope unit pattern to snap.<pkg>.<app>-<uuid>.scope
The current naming pattern for transient scope units does not yield a
natural way to create systemd drop-in configurations that apply to all
instances of a snap, regardless of the UUID. For example, systemd
drop-in configurations for a unit named foo-bar-baz.scope could be made
by placing .conf snippets in any of the following directories:

 /etc/systemd/user/foo-bar-baz.scope.d/
 /etc/systemd/user/foo-bar-.scope.d/
 /etc/systemd/user/foo-.scope.d/

In other words, successively truncating the unit name after '-' yields
valid drop-in directory names. This feature is specifc to '-', and in
particular does not work with '.'.

It is desirable to have the ability to write drop-in configurations that
apply, for example, to all instances of firefox. To allow this
functionality, modify the pattern used for transient scope units to
snap.<pkg>.<app>-<uuid>.scope (i.e. separate the app name and UUID by a '-').

Both the old and the new patterns are supported in an attempt to make
a smooth transition.

Signed-off-by: Nick Rosbrook <nick.rosbrook@canonical.com>
2023-06-13 22:17:56 +02:00
..