packer-cn/builder/amazon/chroot
Brandon Turner b2258dc4e9
Fix chroot builder to work with chef-solo
According to be5adb92b5, the UploadDir
method supports two ways of copying depending on whether a trailing
slash is used:
    src = "dir"  -> dest/dir
    src = "dir/" -> dest

On BSD-based systems (such as OSX, FreeBSD, etc.) the `cp -R` command
handles these two cases automatically.  However, Linux treats "src/" and
"src" the same.

To support the trailing slash syntax portably, we can use:
    src = "dir"   -> dest/dir
    src = "dir/." -> dest

This works on BSD and Linux.  It is better than using wildcards as it
grabs hidden files as well.

This fixes #1196 that prevents the chef-solo provisioner from working
with the chroot builder.
2014-05-27 19:02:29 -05:00
..
builder.go builder/amazon/chroot: mount in device-specific places 2013-12-21 09:16:09 -08:00
builder_test.go builder/amazon/*: warnings 2013-11-02 22:56:54 -05:00
cleanup.go builder/amazon/chroot: new multistep API 2013-08-31 12:58:55 -07:00
command.go builder/amazon/chroot: CommandWrapper 2013-09-30 09:33:57 -07:00
communicator.go Fix chroot builder to work with chef-solo 2014-05-27 19:02:29 -05:00
communicator_test.go builder/amazon/chroot: provision within the chroot 2013-07-30 16:07:50 -07:00
copy_files.go builder/amazon/chroot: CommandWrapper 2013-09-30 09:33:57 -07:00
copy_files_test.go builder/amazon/chroot: get tests psasing on Windows 2014-04-26 12:31:55 -07:00
device.go builder/amazon/chroot: don't choose partition mount point if taken 2013-11-19 12:50:33 -08:00
lockfile.go builder/amazon/chroot: fix compilaton on Windows 2013-07-30 21:50:59 -07:00
lockfile_unix.go builder/amazon/chroot: remove unused import 2013-12-06 18:32:21 -08:00
step_attach_volume.go builder/amazon/all: get rid of unnecessary field 2013-12-12 21:38:48 -08:00
step_attach_volume_test.go builder/amazon/chroot: switch func type to interface 2013-07-30 17:56:42 -07:00
step_chroot_provision.go builder/amazon/chroot: CommandWrapper 2013-09-30 09:33:57 -07:00
step_copy_files.go builder/amazon/chroot: 2013-10-17 22:50:02 +00:00
step_copy_files_test.go builder/amazon/chroot: switch func type to interface 2013-07-30 17:56:42 -07:00
step_create_volume.go builder/amazon/all: get rid of unnecessary field 2013-12-12 21:38:48 -08:00
step_early_cleanup.go builder/amazon/chroot: new multistep API 2013-08-31 12:58:55 -07:00
step_early_unflock.go builder/amazon/chroot: new multistep API 2013-08-31 12:58:55 -07:00
step_flock.go builder/amazon/chroot: block when obtaining lock [GH-689] 2013-12-06 18:28:48 -08:00
step_flock_test.go builder/amazon/chroot: let go of flock earlier for parallelism 2013-07-30 22:25:33 -07:00
step_instance_info.go builder/amazon/chroot: new multistep API 2013-08-31 12:58:55 -07:00
step_mount_device.go builder/amazon/chroot: CommandWrapper 2013-09-30 09:33:57 -07:00
step_mount_device_test.go builder/amazon/chroot: switch func type to interface 2013-07-30 17:56:42 -07:00
step_mount_extra.go builder/amazon/chroot: CommandWrapper 2013-09-30 09:33:57 -07:00
step_mount_extra_test.go builder/amazon/chroot: switch func type to interface 2013-07-30 17:56:42 -07:00
step_prepare_device.go builder/amazon/chroot: new multistep API 2013-08-31 12:58:55 -07:00
step_register_ami.go builder/amazon/all: get rid of unnecessary field 2013-12-12 21:38:48 -08:00
step_snapshot.go builder/amazon/all: get rid of unnecessary field 2013-12-12 21:38:48 -08:00
step_source_ami_info.go builder/amazon/chroot: new multistep API 2013-08-31 12:58:55 -07:00