debian-forge/stages
Christian Kellner fd5efd0d29 stages/ostree: fix SELinux labels after deployment
Deploying an OSTree commit leads to creation of hardlinks from
the repository to the check out. These will have the correct
SELinux labels, since the files in the repository will have the
correct SELinux labels[1]. But new files are generated in '/etc'
of the new deployment, due to the 3-way configuration merge[2].
Also a new kernel, initramfs and the corresponding Bootloader
Specification entries are created in the global '/boot' dir.

In theory, ostree will set the correct SELinux labels by loading
the SELinux config from the deployment and then setting the
correct security contexts via ostree_sepolicy_setfscreatecon().
But it does so conditionally on is_selinux_enabled(2)[3], which
in our container is FALSE Therefore we have to do the same dance
as ostree does, at least for now, and manually re-label the
affected paths.

[1] Assuming they had the correct label when the commit was made
[2] https://ostree.readthedocs.io/en/latest/manual/deployment/
[3] via ostree_sepolicy_setfscreatecon in ostree-sepolicy.c
    line 640 of commit 2c1658538f8fde5813e95e7408d65662a489be91
2020-04-15 15:39:45 +02:00
..
org.osbuild.chrony Add STAGE_DESC, STAGE_INFO, and STAGE_OPTS to stages 2019-11-13 21:47:03 +01:00
org.osbuild.debug-shell Add STAGE_DESC, STAGE_INFO, and STAGE_OPTS to stages 2019-11-13 21:47:03 +01:00
org.osbuild.error stages/error: fix json for stage options 2020-01-28 13:10:14 +01:00
org.osbuild.firewall Add STAGE_DESC, STAGE_INFO, and STAGE_OPTS to stages 2019-11-13 21:47:03 +01:00
org.osbuild.fix-bls stages/fix-bls: support for different prefix 2020-01-19 23:01:36 +01:00
org.osbuild.fstab Add STAGE_DESC, STAGE_INFO, and STAGE_OPTS to stages 2019-11-13 21:47:03 +01:00
org.osbuild.groups Add STAGE_DESC, STAGE_INFO, and STAGE_OPTS to stages 2019-11-13 21:47:03 +01:00
org.osbuild.grub2 stages/grub2: default to disabling legacy support 2020-04-14 23:47:08 +02:00
org.osbuild.hostname Add STAGE_DESC, STAGE_INFO, and STAGE_OPTS to stages 2019-11-13 21:47:03 +01:00
org.osbuild.kernel-cmdline stages/kopts: new stage to set the kernel cmdline 2020-01-13 20:05:10 +01:00
org.osbuild.keymap Add STAGE_DESC, STAGE_INFO, and STAGE_OPTS to stages 2019-11-13 21:47:03 +01:00
org.osbuild.locale Add STAGE_DESC, STAGE_INFO, and STAGE_OPTS to stages 2019-11-13 21:47:03 +01:00
org.osbuild.noop Add STAGE_DESC, STAGE_INFO, and STAGE_OPTS to stages 2019-11-13 21:47:03 +01:00
org.osbuild.ostree stages/ostree: fix SELinux labels after deployment 2020-04-15 15:39:45 +02:00
org.osbuild.rpm stages/rpm: be a bit more verbose to give some progress indication 2020-02-06 19:01:12 +01:00
org.osbuild.rpm-ostree stages: add new org.osbuild.rpm-ostree stage 2020-04-15 15:39:45 +02:00
org.osbuild.script Add STAGE_DESC, STAGE_INFO, and STAGE_OPTS to stages 2019-11-13 21:47:03 +01:00
org.osbuild.selinux Add STAGE_DESC, STAGE_INFO, and STAGE_OPTS to stages 2019-11-13 21:47:03 +01:00
org.osbuild.systemd stages/systemd: add default_target 2019-11-27 22:22:13 +01:00
org.osbuild.test Add STAGE_DESC, STAGE_INFO, and STAGE_OPTS to stages 2019-11-13 21:47:03 +01:00
org.osbuild.timezone Add STAGE_DESC, STAGE_INFO, and STAGE_OPTS to stages 2019-11-13 21:47:03 +01:00
org.osbuild.users Add STAGE_DESC, STAGE_INFO, and STAGE_OPTS to stages 2019-11-13 21:47:03 +01:00
org.osbuild.yum Add STAGE_DESC, STAGE_INFO, and STAGE_OPTS to stages 2019-11-13 21:47:03 +01:00
org.osbuild.zipl stage/zipl: new stage to configure zipl 2020-01-13 20:05:10 +01:00
osbuild stages/assemblers: symlink the osbulid python library 2019-07-25 21:28:23 +02:00