[Ovirt-devel] [PATCH] some cleanup of ovirt-host kickstart to make images smaller

Jim Meyering jim at meyering.net
Thu Mar 20 08:35:41 UTC 2008


"Perry N. Myers" <pmyers at redhat.com> wrote:
> This patch adds --excludedocs to the kickstart for the x86_64 and i386
> ovirt host kickstarts.  For the most part we're removing docs manually
> right now anyhow, but this may catch some other things.
>
> Also cleaned up the section that removes docs and localization.
> Recreate the cracklib dicts (frees up about 8MB) and remove unneeded
> kernel modules.  Most of this stuff will just end up in the
> whitelist/blacklist module, but the cracklib stuff is a different
> issue.  They can't be removed, they need to be recreated.  This will
> probably need to continue to happen in %post.
>
> The end result of this cleanup is that the image boots and it is 58MB
> compressed/162MB uncompressed (filesystem is 450MB total)
...
Nice decrease.

> diff --git a/ovirt-host-creator/common-post.ks b/ovirt-host-creator/common-post.ks
> index 8c9f090..308aaac 100644
> --- a/ovirt-host-creator/common-post.ks
> +++ b/ovirt-host-creator/common-post.ks
...
> -find /usr/share/i18n/locales -type f ! -iname en_US -exec rm -f {} \;
...
> +find /usr/share/i18n/locales -type f ! -name en_us -exec $RM {} \;

Won't the new find command remove the entire /usr/share/i18n/locales
hierarchy?  Maybe that's ok in practice, if we're sure to work
in the C locale (in which case, don't bother with find, and just
use rm -rf /usr/share/i18n/locales).  Otherwise, on at least the
rawhide, FC6 and RHEL4.6 systems I checked, the directory is named
/usr/share/i18n/locales/en_US.

BTW, since they're always "-type f", there's no need to change the
rm -f to "rm -rf".




More information about the ovirt-devel mailing list