mirror of
https://github.com/flatcar/scripts.git
synced 2026-01-25 02:11:38 +01:00
build_library/build_image_util.sh: move image modification before trim
The trim should be the last action before the image is finalized, otherwise it may not result in the minimal size.
This commit is contained in:
parent
d75c199726
commit
7de89044c7
@ -686,6 +686,11 @@ EOF
|
||||
"${BUILD_DIR}/${image_kconfig}"
|
||||
fi
|
||||
|
||||
# Build the selinux policy
|
||||
if pkg_use_enabled coreos-base/coreos selinux; then
|
||||
sudo chroot "${root_fs_dir}" bash -c "cd /usr/share/selinux/mcs && semodule -s mcs -i *.pp"
|
||||
fi
|
||||
|
||||
write_contents "${root_fs_dir}" "${BUILD_DIR}/${image_contents}"
|
||||
|
||||
# Zero all fs free space to make it more compressible so auto-update
|
||||
@ -695,11 +700,6 @@ EOF
|
||||
sudo fstrim "${root_fs_dir}/usr" || true
|
||||
fi
|
||||
|
||||
# Build the selinux policy
|
||||
if pkg_use_enabled coreos-base/coreos selinux; then
|
||||
sudo chroot "${root_fs_dir}" bash -c "cd /usr/share/selinux/mcs && semodule -s mcs -i *.pp"
|
||||
fi
|
||||
|
||||
# Make the filesystem un-mountable as read-write and setup verity.
|
||||
if [[ ${disable_read_write} -eq ${FLAGS_TRUE} ]]; then
|
||||
# Unmount /usr partition
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user