/
snap.yaml
39 lines (39 loc) · 1.51 KB
/
snap.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: test-snapd-layout
version: 1.0
summary: Sample illustrating very basic layout support
apps:
sh:
command: bin/sh
layout:
# Layouts can be used to inject configuration files and directories.
/etc/demo:
bind: $SNAP_COMMON/etc/demo
/etc/demo.conf:
bind-file: $SNAP_COMMON/etc/demo.conf
/etc/demo.cfg:
symlink: $SNAP_COMMON/etc/demo.conf
# Layouts can be used to remap $SNAP paths to work around hard-coded locations.
/usr/share/demo:
bind: $SNAP/usr/share/demo
# Layouts can be used to remap $SNAP_DATA to work around hard-coded locations
/var/lib/demo:
bind: $SNAP_DATA/var/lib/demo
/var/cache/demo:
bind: $SNAP_DATA/var/cache/demo
# Layouts can help with applications designed for /opt
/opt/demo:
bind: $SNAP/opt/demo
# Layouts can poke holes and preserve DAC permissions while doing so
# notably /var/spool/rsyslog is owned by syslog:adm and has mode 700
/var/spool/rsyslog/demo:
bind: $SNAP_DATA/var/spool/rsyslog/demo
# Layout can refer to non-existing source path.
/bin/very/weird/place:
bind: $SNAP/bin/very/weird/place
# Layout can safely construct a path underneath a mimic established by
# another layout item. Here a writable mimic of /bin is established and both
# of the layout items using it can write to deeply nested entires therein
# (not directly under the tmpfs mount point). This takes advantage of the
# improved tmpfs detection and tracking logic in snap-update-ns.
/bin/very/weird/space:
bind: $SNAP/bin/very/weird/space