chef export -a
truncates binary files when running from windows
#110
Labels
Aspect: Stability
Consistent results.
Triage: Confirmed
Indicates and issue has been confirmed as described.
Triage: Needs Information
Indicates an issue needs more information in order to work on it.
Type: Bug
Does not work as expected.
Version:
Tested with Chef Workstation 0.18.3 and 20.7.81
Environment:
Tested on Windows Server 2016 and 2012R2 with
Scenario:
For reasons... We're trying to distribute a
.exe
binary file as part of one of our cookbooks. When we run:This
.exe
binary goes from 400Kb to 4Kb once you've unpacked the .tgz archive that was created.This does not happen with all large files. I've only been able to reproduce it with
.exe
binaries. I haven't found other binary file types to test. It also happens if I ZIP those binaries. However, a large file of 0's zipped or unzipped will compress just fine, so it's only with binaries.This also only happens on windows so far. I haven't tested on Linux, but CW 20.7.81 on my mac does not truncate the same binaries that windows 2012R2 and 2016 RTM do.
Steps to Reproduce:
On a fresh Windows Server 2016 RTM or 2012R2 system:
chef install Policyfile.rb
chef export -a Policyfile.rb ..\
to export the policy to your cookbooks folderExpected Result:
File sizes should match the original size (chef.exe = ~2,406KB and chrome.exe = ~1,757KB, and the app that originally started this - LGPO.exe is about 410KB)
Actual Result:
File sizes were truncated:
chef.exe = ~3KB
chrome.exe = ~1KB
LGPO.exe = ~5KB
The text was updated successfully, but these errors were encountered: