Sylvia Moss
25971b3b5c
Add pwd to gogetter ChecksumFromFile ( #9129 )
2020-05-11 11:14:50 +02:00
Megan Marsh
65b64d04d0
remove docs about windows symlinks which are now inaccurage
2020-03-26 15:51:51 -07:00
Wilken Rivera
7b705545d9
docs: Various doc clean-ups to fix code block formatting and syntax highlighting ( #8868 )
2020-03-12 15:05:08 +01:00
Megan Marsh
00dfb79c88
Merge pull request #7627 from hashicorp/inplace_isos
...
Inplace isos
2020-02-11 11:19:10 -08:00
Adrien Delorme
08f394604c
Update iso_config.go
...
use defaultGetterClient instead of getter.DefaultClient
2020-02-11 12:07:06 +01:00
Adrien Delorme
cc3d941853
iso checksumming: use checksum or checksum url if set to handle all cases
...
fix #8322
2020-02-10 17:54:11 +01:00
Adrien Delorme
a8e717ae09
ISOConfig.Prepare: fix ChecksumFromFile usage
2020-02-06 17:51:15 +01:00
Chris Cunningham
e94ed9a683
update the note about Windows symlinks
...
GH-7534 and GH-7545 disabled the use of symlinks for copying local ISOs,
per:
https://github.com/hashicorp/packer/blob/master/common/step_download.go#L106
Update the documentation to match, as without reading the source it is
implied that this should work.
2020-02-06 17:38:57 +01:00
Adrien Delorme
a19214afeb
Allow to use isos in place
2020-02-06 17:07:58 +01:00
Lars Lehtonen
731e0332cf
common: collect dropped error
2019-10-23 13:02:08 -07:00
Adrien Delorme
4cb7c30987
Merge remote-tracking branch 'origin/master' into scrape_doc_to_builder_struct_config
2019-08-21 16:44:23 +02:00
Megan Marsh
d6d4eb2087
fix some tests and some config behavior to prevent null dereference errors and incorrect precedence between iso checksum and iso checksum url
2019-06-28 15:29:39 -07:00
Megan Marsh
998ef4053f
parse checksum file so that we can use the checksums inside in the vmware-esxi builder stepuploadiso
2019-06-28 14:35:43 -07:00
Adrien Delorme
dbfadc0eea
generate struct markdown from common/iso_config.go
2019-06-12 16:02:49 +02:00
Adrien Delorme
20a152d4aa
add comments to common/iso_config.go from docs
2019-06-12 16:02:02 +02:00
Adrien Delorme
9f82b75e57
Use the hashicorp/go-getter to download files
...
* removed packer.Cache and references since packer.Cache is never used except in the download step. The download step now uses the new func packer.CachePath(targetPath) for this, the behavior is the same.
* removed download code from packer that was reimplemented into the go-getter library: progress bar, http download restart, checksuming from file, skip already downloaded files, symlinking, make a download cancellable by context.
* on windows if packer is running without symlinking rights and we are getting a local file, the file will be copied instead to avoid errors.
* added unit tests for step_download that are now CI tested on windows, mac & linux.
* files are now downloaded under cache dir `sha1(filename + "?checksum=" + checksum) + file_extension`
* since the output dir is based on the source url and the checksum, when the checksum fails, the file is auto deleted.
* a download file is protected and locked by a file lock,
* updated docs
* updated go modules and vendors
2019-03-13 12:11:58 +01:00
Megan Marsh
2a9f49a5c6
make sure we don't try to load an iso into memory because of a user mistake
2019-02-13 16:21:55 -08:00
Adrien Delorme
6b3844a64f
Revert "allow to use ISO images in-place v.s. copying them"
2018-08-20 10:48:06 +02:00
Adrien Delorme
17f2949e36
remove stuttering; ISOConfig.InplaceISO -> Inplace
2018-08-15 15:51:25 +02:00
Adrien Delorme
82e480a285
allow to use ISO images inplace v.s. copying them
2018-08-15 14:37:38 +02:00
Megan Marsh
5ef8b55559
need log import
2018-07-23 10:34:05 -07:00
Megan Marsh
a2f5fbadf6
don't fail if you can't find abs or relative path.
2018-07-23 09:54:25 -07:00
Megan Marsh
0df33cd032
fix relative pathing versus iso checksum dir to work even if user has provided a relative path for the iso_url which is relative to the directory where Packer is run.
2018-07-13 09:21:04 -07:00
Megan Marsh
d0f0da6626
allow absolute paths to isos in checksum files
2018-07-13 09:14:59 -07:00
Ali Rizvi-Santiago
c17f827e1d
Split up DownloadableURL() into it's individual components: SupportedURL(), DownloadableURL(), and ValidatedURL(). Updated all instances of DownloadableURL() to point to ValidatedURL(). Reverted the tests that are based on un-supported protocols.
2018-01-16 13:37:32 -06:00
Pavel Boldin
853b04420c
iso_config: allow for subdirs in hash sum files
...
Allow hash sum files and ISOs to be in different directories as
Ubuntu does.
Signed-off-by: Pavel Boldin <boldin.pavel@gmail.com>
2017-11-13 09:28:43 +02:00
Rickard von Essen
97498f80be
core: iso_checksum_url should strip query param
...
When iso_urls contains query parameters these should be stripped when
searching the content of iso_checksum_url for a maching checksum.
Closes #5176
2017-07-27 07:21:39 +02:00
Matthew Hooker
81522dced0
move packer to hashicorp
2017-04-04 13:39:01 -07:00
Mikhail Zholobov
57d07f227a
Add "iso_target_extension" option for all local *-iso builders
...
This option allows to set the extension of the ISO file after download.
Defaults to "iso". It makes sense for building Mac OS X guests, where the
bootable image is actually a DMG, not an ISO.
In particular, it is important for "parallels-iso" builder to set the right extension.
2016-12-17 12:50:30 +02:00
Taliesin Sisson
e5510873bb
Added file with correct line endings
...
When dealing with windows the file url format is file:///c:/
On windows a lot of git clients will convert LF to CRLF. This would be a problem where file contents are compared exactly
2016-12-12 22:44:51 +00:00
Matthew Hooker
54651e0005
fix parseCheckSumFile panic
...
resolves #3516
2016-10-14 00:56:05 -07:00
Vasiliy Tolstov
82c63bd723
iso_checksum: fix parsing with absent newline
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
2016-07-03 12:06:31 +03:00
Rickard von Essen
abb2d92c7e
Removed ftp/ftps schemas since they don't work.
2016-02-09 13:02:42 +01:00
Rickard von Essen
bbade5d8ae
Added "iso_checksum_url" and keep the functionality of "iso_checksum"
...
Added support for file shema in "iso_checksum_url".
Added some unit tests and updated the docs accordingly.
2016-02-08 19:35:50 +01:00
Vasiliy Tolstov
00fcc3dfdc
allow to specify checksum via url
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
2016-02-08 19:35:50 +01:00
Mark Peek
cdcffecc2d
Refactor builder ISO options
...
The ISO builders (parallels, qemu, virtualbox, and vmware) had too
much common code which needed to be maintained separately. This change
moves that code to a common ISO configuration.
2015-10-20 16:27:47 -07:00