diskimage-builder/elements/redhat-common
Ian Wienand e42066d685 Cleanup yum downloading
Using "yum --downloadonly" breaks the abstraction of
"install-packages" because it downloads to the yum cache.  It also
acts funny if the package is already there.

Add an argument to "-d" which is the directory to download to.  dnf
has "download" built in, and for the old case use yumdownloader which
acts about the same.  Ensure it is installed, since it comes in
yum-utils.

Also a slight cleanup of the getopt parsing so it's easier to have the
required argument for -d

Thus we can remove most of the stuff in 15-remove-grub.  The check for
centos6 and it's lack of grub2 is clarified.  All the stuff about
having to remove the package, purging the cache etc so yum gets the
right thing is no longer relevant.  The long section of commented out
code at the end is also removed for clarity.

I tested this with an F21, F22 & centos (6) build

Change-Id: Id1e430e7d050a0b99ac449e2ea435e06cda1c4e6
2015-07-20 09:08:06 +10:00
..
bin Merge "Mount with -o nouuid for XFS base images" 2015-05-04 00:42:21 +00:00
finalise.d redhat-common: rename 01-clean-old-kernels.sh to drop .sh extension 2015-05-20 16:17:53 +02:00
pre-install.d Cleanup yum downloading 2015-07-20 09:08:06 +10:00
element-deps Use package-installs in more elements 2014-09-08 15:16:14 -04:00
package-installs.yaml Migrate to new package-installs 2014-12-01 21:32:13 -08:00
README.rst Create docs site containing element READMEs 2015-02-10 11:45:35 -08:00

redhat-common

Image installation steps common to RHEL and Fedora.

Overrides:

  • To use a non-default URL for downloading base cloud images, use the environment variable DIB_CLOUD_IMAGES
  • To download a non-default release of cloud images, use the environment variable DIB_RELEASE
  • Alternatively, set DIB_LOCAL_IMAGE to the local path of a qcow2 cloud image. This is useful in that you can use a customized or previously built cloud image from diskimage-builder as input. The cloud image does not have to have been built by diskimage-builder. It should be a full disk image, not just a filesystem image.