This provides an alternate mode for the amazon-chroot builder which uses
a blank volume to build the image. It adds StepPreMountCommands to
permit partitioning and format commands to be executed before mounting
the new volume.
This commit moves the Amazon builders of Packer away from the Hashicorp
fork of the goamz library to the official AWS SDK for Go, in order that
third party plugins may depend on the more complete official library
more easily.
mount /dev/xvdf /mnt/point
while for an HVM image that is attached to /dev/sdf, its mount command is
mount /dev/xvdf1 /mnt/point
so this code enabled that
/cc @mwhooker - I changed the interface up a bit to return an error,
since things should return errors in Go (the ui.Error bit was kind of
ghetto because it had no way to bubble that error up except through the
UI).
Using this, I made it so that the communicator uses both a
CommandWrapper and ShellCommand with chroot so that the chroot commannd
is also wrapped (it wasn't before).
I think the functionality of all this is the same but I'd love if you
could look it over and make sure.