diff options
author | Luca Boccassi <bluca@debian.org> | 2023-11-01 20:39:37 +0100 |
---|---|---|
committer | Luca Boccassi <bluca@debian.org> | 2023-11-03 17:59:58 +0100 |
commit | f0304df6e4595e7b780c2772881aaacfac40c9f5 (patch) | |
tree | 3ca1ed3f65e1a0275469eac7e3c1a4eed864d440 /test/units/testsuite-50.sh | |
parent | strv: add strv_free_many() to be used with CLEANUP_ARRAY() (diff) | |
download | systemd-f0304df6e4595e7b780c2772881aaacfac40c9f5.tar.xz systemd-f0304df6e4595e7b780c2772881aaacfac40c9f5.zip |
core: check that extensions have the hierarchies before overlaying
Before confext was added, hierarchies always existed in extensions. Now
they are optional - i.e., a sysext will not contain /etc/. So mixing a
confext and a sysext fails, as we'll try to create an overlay with /etc/
from the base, the confext and the sysext, but the latter doesn't have
the directory.
After the source images are mounted, check that each hierarchy exists in
each source image before creating the overlay, and drop them if they
don't.
Follow-up for 55ea4ef096543
Diffstat (limited to '')
-rwxr-xr-x | test/units/testsuite-50.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/units/testsuite-50.sh b/test/units/testsuite-50.sh index d12323607d..169aa1b864 100755 --- a/test/units/testsuite-50.sh +++ b/test/units/testsuite-50.sh @@ -397,6 +397,15 @@ mkdir -p /etc/symlink-test/ cp /etc/service-scoped-test.raw /etc/symlink-test/service-scoped-test-v1.raw ln -fs /etc/symlink-test/service-scoped-test-v1.raw /etc/symlink-test/service-scoped-test.raw systemd-run -P --property ExtensionImages=/etc/symlink-test/service-scoped-test.raw --property RootImage="${image}.raw" cat /etc/systemd/system/some_file | grep -q -F "MARKER_CONFEXT_123" +# And again mixing sysext and confext +systemd-run -P \ + --property ExtensionImages=/usr/share/symlink-test/app-nodistro.raw \ + --property ExtensionImages=/etc/symlink-test/service-scoped-test.raw \ + --property RootImage="${image}.raw" cat /etc/systemd/system/some_file | grep -q -F "MARKER_CONFEXT_123" +systemd-run -P \ + --property ExtensionImages=/usr/share/symlink-test/app-nodistro.raw \ + --property ExtensionImages=/etc/symlink-test/service-scoped-test.raw \ + --property RootImage="${image}.raw" cat /usr/lib/systemd/system/some_file | grep -q -F "MARKER=1" cat >/run/systemd/system/testservice-50e.service <<EOF [Service] |