puppet does not correctly handle unusually encoded filenames in a file resource

Bug #1310569 reported by Hadmut Danisch
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
puppet (Ubuntu)
Confirmed
High
Unassigned

Bug Description

Hi,

puppet fails to install file ressources from puppet:///... for some files with the error message

Error: Could not set 'file' on ensure: invalid byte sequence in US-ASCII
Error: Could not set 'file' on ensure: invalid byte sequence in US-ASCII
Wrapped exception:
invalid byte sequence in US-ASCII
Error: /Stage[main]/Hadmut::Application::X11_common/File[/usr/local/share/fonts/FreeFonts/Momоt___.ttf]/ensure: change from absent to file failed: Could not set 'file' on ensure: invalid byte sequence in US-ASCII

because it does not open files in :binary mode.

Just to have this bug known to ubuntu, I already have opened an upstream bug report more than a month ago, which unfortunately did not get any response yet:

https://tickets.puppetlabs.com/browse/PUP-1890

regards

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: puppet (not installed)
ProcVersionSignature: Ubuntu 3.13.0-24.46-generic 3.13.9
Uname: Linux 3.13.0-24-generic x86_64
NonfreeKernelModules: zfs zunicode zavl zcommon znvpair
ApportVersion: 2.14.1-0ubuntu3
Architecture: amd64
CurrentDesktop: XFCE
Date: Mon Apr 21 13:04:25 2014
SourcePackage: puppet
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Hadmut Danisch (hadmut) wrote :
Revision history for this message
Robie Basak (racb) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

I was unable to link the upstream bug to this one. Please can you comment here when there's some resolution on the debugging proceeding in the upstream bug?

It sounds to me that not being able to ensure a binary file exists is a significant regression, and if the fix is a simple patch then we can apply it to the stable release.

Changed in puppet (Ubuntu):
importance: Undecided → High
Revision history for this message
Hadmut Danisch (hadmut) wrote :

First news from the upstream bug:

It seams as if the problem was not the file contents, but the file name, the second 'o' allegedly was a cyrillic o...

*damned trap*

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in puppet (Ubuntu):
status: New → Confirmed
Revision history for this message
Robie Basak (racb) wrote : Re: puppet does not correctly handle Unicode filenames in a file resource

Correction. From the upstream bug, is it Unicode that is actually fine, but non-UTF8 (and thus non-Unicode) paths that are the problem?

summary: - Error: Could not set 'file' on ensure: invalid byte sequence in US-ASCII
+ puppet does not correctly handle Unicode filenames in a file resource
summary: - puppet does not correctly handle Unicode filenames in a file resource
+ puppet does not correctly handle unusually encoded filenames in a file
+ resource
Revision history for this message
Ben Hagen (c.ben.hagen) wrote :

Not sure what you mean by "unusually encoded" but the following line will trigger the bug:

mkdir -p /tmp/src; touch /tmp/ö.txt; puppet apply --exec 'file { "/tmp/dst":ensure => directory, recurse => true, source => "/tmp/src" }'

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.