diff --git a/dib/ironic-python-agent-ramdisk/post-install.d/99-remove-extra-packages b/dib/ironic-python-agent-ramdisk/post-install.d/99-remove-extra-packages index 5eb94ba..1c16394 100755 --- a/dib/ironic-python-agent-ramdisk/post-install.d/99-remove-extra-packages +++ b/dib/ironic-python-agent-ramdisk/post-install.d/99-remove-extra-packages @@ -34,3 +34,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/* diff --git a/releasenotes/notes/clean-var-tmp-with-dib-builds-cd31a2cf70a7f935.yaml b/releasenotes/notes/clean-var-tmp-with-dib-builds-cd31a2cf70a7f935.yaml new file mode 100644 index 0000000..baa4c6e --- /dev/null +++ b/releasenotes/notes/clean-var-tmp-with-dib-builds-cd31a2cf70a7f935.yaml @@ -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.