Revert "Remove 'zeroing out empty space' section"

This actually led to the filesystems being bigger.
The most recent Fedora Rawhide images were ~900MB instead of ~300MB.

Clearly, we need this to make it smaller.

This reverts commit d4d8bffb2c.

Signed-off-by: Neal Gompa <ngompa@fedoraproject.org>
This commit is contained in:
Neal Gompa 2021-07-15 04:03:44 -04:00
parent d4d8bffb2c
commit ad8e04aacb
1 changed files with 6 additions and 0 deletions

View File

@ -121,6 +121,12 @@ releasever=$(rpm --eval '%{fedora}')
basearch=$(uname -i)
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
echo "Zeroing out empty space."
# This forces the filesystem to reclaim space from deleted files
dd bs=1M if=/dev/zero of=/var/tmp/zeros || :
rm -f /var/tmp/zeros
echo "(Don't worry -- that out-of-space error was expected.)"
# When we build the image a networking config file gets left behind.
# Let's clean it up.
echo "Cleanup leftover networking configuration"