Commit 6fda71a
committed
base_image: add SELinux relabeling for Fedora virt-builder images
Fedora guest images created on Debian hosts fail to boot because the filesystem
lacks proper SELinux contexts. All binaries fail with exit code 127 (command not
found) as SELinux blocks execution of files with unlabeled_t context.
Add --selinux-relabel flag to virt-builder invocations when building Fedora
images. This flag applies correct SELinux contexts during image creation, before
first boot, ensuring all files have proper contexts when Fedora starts.
The flag is conditionally added only for Fedora guests using Jinja2 conditionals
in the task's argv parameter. This allows Fedora guests to boot successfully when
provisioned from non-SELinux hosts.
Generated-by: Claude AI
Signed-off-by: Daniel Gomez <[email protected]>1 parent 88f94e7 commit 6fda71a
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| 72 | + | |
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
| |||
0 commit comments