Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
packer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
packer
Commits
7d33d39d
Commit
7d33d39d
authored
Nov 18, 2013
by
Ross Smith II
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip gzip compression if compression_level=0
parent
66a256fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
5 deletions
+16
-5
CHANGELOG.md
CHANGELOG.md
+1
-0
post-processor/vagrant/util.go
post-processor/vagrant/util.go
+15
-5
No files found.
CHANGELOG.md
View file @
7d33d39d
...
...
@@ -11,6 +11,7 @@ FEATURES:
IMPROVEMENTS:
*
Vagrant post-processor skips gzip compression when compression_level=0
*
builder/amazon/all: Can now specify a list of multiple security group
IDs to apply. [GH-499]
*
builder/amazon/all: AWS API requests are now retried when a temporary
...
...
post-processor/vagrant/util.go
View file @
7d33d39d
...
...
@@ -2,6 +2,7 @@ package vagrant
import
(
"archive/tar"
"compress/flate"
"compress/gzip"
"encoding/json"
"fmt"
...
...
@@ -52,13 +53,22 @@ func DirToBox(dst, dir string, ui packer.Ui, level int) error {
}
defer
dstF
.
Close
()
gzipWriter
,
err
:=
gzip
.
NewWriterLevel
(
dstF
,
level
)
if
err
!=
nil
{
return
err
var
tarOrGzipWriter
io
.
Writer
if
level
!=
flate
.
NoCompression
{
log
.
Printf
(
"Compressing with gzip compression level %v"
,
level
)
gzipWriter
,
err
:=
gzip
.
NewWriterLevel
(
dstF
,
level
)
if
err
!=
nil
{
return
err
}
defer
gzipWriter
.
Close
()
tarOrGzipWriter
=
gzipWriter
}
else
{
log
.
Printf
(
"Skipping gzip compression"
)
tarOrGzipWriter
=
dstF
}
defer
gzipWriter
.
Close
()
tarWriter
:=
tar
.
NewWriter
(
g
zipWriter
)
tarWriter
:=
tar
.
NewWriter
(
tarOrG
zipWriter
)
defer
tarWriter
.
Close
()
// This is the walk func that tars each of the files in the dir
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment