| 1 |
/* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| 2 |
#pragma once |
| 3 |
|
| 4 |
#include "shared-forward.h" |
| 5 |
|
| 6 |
/* Given an image name (for logging purposes), a set of os-release values from the host and a key-value pair |
| 7 |
* vector of extension-release variables, check that the distro and (system extension level or distro |
| 8 |
* version) match and return 1, and 0 otherwise. */ |
| 9 |
int extension_release_validate( |
| 10 |
const char *name, |
| 11 |
const char *host_os_release_id, |
| 12 |
const char *host_os_release_id_like, |
| 13 |
const char *host_os_release_version_id, |
| 14 |
const char *host_os_extension_release_level, |
| 15 |
const char *host_extension_scope, |
| 16 |
char **extension_release, |
| 17 |
ImageClass image_class); |
| 18 |
|
| 19 |
/* Parse hierarchy variables and if not set, return "/usr /opt" for sysext and "/etc" for confext */ |
| 20 |
int parse_env_extension_hierarchies(char ***ret_hierarchies, const char *hierarchy_env); |
| 21 |
|
| 22 |
/* Insist that extension images do not overwrite the underlying OS release file (it's fine if they place one |
| 23 |
* in /etc/os-release, i.e. where things don't matter, as they aren't merged.) */ |
| 24 |
int extension_has_forbidden_content(const char *root); |