diskimage-builder/elements/yum-minimal
Ian Wienand f5dff9c52a Rework yum-minimal locale cleanup
It turns out our manual locale cleanup is causing issues (see
I54490b17a7f8b2f977369044fcc6bb49cc13768e).  Upon further
investigation, I think this is a better approach than manually
deleting repos.

glibc on Fedora obeys the %_install_langs macro for reducing the
installed locales (as mentioned in the comments, F24 has moved to
having different packages, but worry about that later).

So our existing clear-out is really only required for CentOS, whose
glibc does not have any way to indicate to build less locales.
However, %_install_langs is still correct there, as it restricts some
of the translation files and other things installed with the %lang
macro in spec files.

This is complicated by us having to set this at glibc-common install
time, which happens with the "yum" from outside the chroot (i.e. on
trusty).  Since this is too old to have flags to pass this, we need to
fiddle with rpmmacros.

I've tested this with fedora-minimal builds and the locales file is
about 2MiB, which is what it was after the cleanups, and the listed
locales are only those we expect (i.e. it appears to be working).

Change-Id: I528a68beeb7b2ceec25ccbec1900670501608158
2016-05-31 15:14:24 +10:00
..
install.d yum-minimal: do not configure eth0 & eth1 for DHCP automatically 2015-12-22 08:39:04 +11:00
pre-install.d Rework yum-minimal locale cleanup 2016-05-31 15:14:24 +10:00
root.d Rework yum-minimal locale cleanup 2016-05-31 15:14:24 +10:00
element-deps Add a yum-minimal element that just uses yum 2015-04-14 13:39:18 -04:00
package-installs.yaml yum-minimal : install selinux policy packages 2015-12-22 08:45:20 +11:00
pkg-map Add a yum-minimal element that just uses yum 2015-04-14 13:39:18 -04:00
README.rst yum-minimal: do not configure eth0 & eth1 for DHCP automatically 2015-12-22 08:39:04 +11:00

===========
yum-minimal
===========
Base element for creating minimal yum-based images.

This element is incomplete by itself, you'll want to use the centos-minimal
or fedora-minimal elements to get an actual base image.

Use of this element will require 'yum' and 'yum-utils' to be installed on
Ubuntu and Debian. Nothing additional is needed on Fedora or CentOS.

The `DIB_OFFLINE` or more specific `DIB_YUMCHROOT_USE_CACHE`
variables can be set to prefer the use of a pre-cached root filesystem
tarball.

If you wish to have DHCP networking setup for eth0 & eth1 via
/etc/sysconfig/network-config scripts/ifcfg-eth[0|1], set the
environment variable `DIB_YUM_MINIMAL_CREATE_INTERFACES` to `1`.