Remove /var/tmp/* from images

In some cases, things such as dracut regenerating the
initramfs file, may leave some artifacts in /var/tmp/ from
the ramdisk build. These are not needed and can be discarded.

Change-Id: Ibd2a61a7e42adfea868679c52c7a786d9aab1b36
(cherry picked from commit cb5efad201)
This commit is contained in:
Julia Kreger 2023-01-03 08:53:54 -08:00 committed by Jay Faulkner
parent 9126ce0236
commit 693ba68aa4
2 changed files with 11 additions and 0 deletions

View File

@ -29,3 +29,7 @@ case "$DISTRO_NAME" in
rpm --rebuilddb
;;
esac
# NOTE(TheJulia): remove any excess temporary files from /var/tmp
# In particular, dracut may leave some items we don't need/want.
rm -r -f /var/tmp/*

View File

@ -0,0 +1,7 @@
---
fixes:
- |
Fixes excess files being housed in /var/tmp inside of a ramdisk image
which may, in some cases, result in a much larger ramdisk than expected.
Files and folders in /var/tmp within a ramdisk are now removed prior to
the ramdisk being packaged as part of a DIB based image build.