]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/shared/dissect-image.c
extension-release: search for other files if expected name not found
authorLuca Boccassi <luca.boccassi@microsoft.com>
Thu, 22 Jul 2021 19:41:34 +0000 (20:41 +0100)
committerLuca Boccassi <luca.boccassi@microsoft.com>
Tue, 17 Aug 2021 12:04:44 +0000 (13:04 +0100)
commit9a4b883be234d3bfae7b3b38db490b67b36c09a2
tree5d04fa563b44e85ddd0d58099b386f9788b9245e
parent5ce46344fdbc7be78f4724d8afe87b864cf27ce1
extension-release: search for other files if expected name not found

In some cases image names are unpredictable - some orchestrators/deployment
tools like to mangle names to suit their internal formats. In these cases,
the requirement that the extension-release file matches exactly the image
name where it's contained cannot work.

Allow falling back to loading the first regular file which name starts with
'extension-release' located in /usr/lib/extension-release.d/ and tagged with
a user.extension-release.strict extended attribute with a true value, if the
one with the expected name cannot be found.
src/basic/os-util.c
src/shared/dissect-image.c
test/test-functions
test/units/testsuite-29.sh
test/units/testsuite-50.sh