Issue #9983 has been updated by Lance A.
I'm witnessing corrupt files on Windows when specifying puppet:/// URLs for
source and running puppet locally (puppet apply site.pp --modulepath
<some_path>)
Example:
# Make a local copy of the installation package
file { "c:\\temp\\packages\\product-1.0.0.msi":
source => "puppet:///mymodule/packages/product-1.0.0.msi",
ensure => present,
}
I've tried this for multiple files and the the results are the same. The source
file is multiple megabytes in size, yet the resulting destination file is a
fraction of that (40-100+KB), and it doesn't appear at first glance to be a
case of simple truncation.
Environment:
Windows Server 2008 RC2
Puppet 2.7.9
----------------------------------------
Bug #9983: Files should be opened in binary mode
https://projects.puppetlabs.com/issues/9983
Author: Josh Cooper
Status: Closed
Priority: Normal
Assignee: Josh Cooper
Category: windows
Target version: 2.7.8
Affected Puppet version: 2.7.6
Keywords:
Branch: https://github.com/puppetlabs/puppet/pull/192/commits
Windows has a concept of text and binary file modes, where text mode
automatically converts \r\n. This is not an issue when files are opened, read,
etc within the context of a single Windows machine. But it is an issue if say a
binary file is restored from a Unix file bucket, as the Windows agent will
substitute each occurrence of '\n' to '\r\n', and in doing so corrupt the file.
We should always open files in binary mode, which is a no-op on Unix.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.