From cd6e154bd1afefa8a7c506d39e918258d8f874ae Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 7 Jul 2013 09:17:27 -0700 Subject: [PATCH] builder/virtualbox: style nitpicks and CHANGELOG --- CHANGELOG.md | 2 ++ builder/virtualbox/step_download_guest_additions.go | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c04bc7642..532395e4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ FEATURES: * "file" uploader will upload files and directories from the machine running Packer to the remote machine. +* VirtualBox guest additions URL and checksum can now be specified, allowing + the VirtualBox builder to have the ability to be used completely offline. IMPROVEMENTS: diff --git a/builder/virtualbox/step_download_guest_additions.go b/builder/virtualbox/step_download_guest_additions.go index 3965df779..9e304e968 100644 --- a/builder/virtualbox/step_download_guest_additions.go +++ b/builder/virtualbox/step_download_guest_additions.go @@ -142,17 +142,17 @@ func (s *stepDownloadGuestAdditions) downloadAdditionsSHA256(state map[string]in // First things first, we get the list of checksums for the files available // for this version. checksumsUrl := fmt.Sprintf("http://download.virtualbox.org/virtualbox/%s/SHA256SUMS", additionsVersion) - checksumsFile, err := ioutil.TempFile("", "packer") + checksumsFile, err := ioutil.TempFile("", "packer") if err != nil { state["error"] = fmt.Errorf( "Failed creating temporary file to store guest addition checksums: %s", err) return "", multistep.ActionHalt } + defer os.Remove(checksumsFile.Name()) checksumsFile.Close() - defer os.Remove(checksumsFile.Name()) downloadConfig := &common.DownloadConfig{ Url: checksumsUrl,