I was able to build Ruby 2.1.7 on XP using mingw32, along with the gems 
listed in %ProgramFiles%\Puppet 
Labs\Puppet\sys\ruby\lib\ruby\gems\1.9.0\gems
However, as I am illiterate on Ruby, I'm not sure I dealt properly with the 
dependencies. Simply replacing %ProgramFiles%\Puppet Labs\Puppet\sys\ruby 
with the new built does not work:

C:\>puppet --version
C:/Arquivos de programas/Puppet 
Labs/Puppet/sys/ruby/lib/ruby/gems/2.1.0/gems/win32-security-0.3.2/lib/win32/security.rb:61:in
 
`block in elevated_security?': ParÔmetro incorreto. - GetTokenInformation 
(SystemCallError)
        from C:/Arquivos de programas/Puppet 
Labs/Puppet/sys/ruby/lib/ruby/gems/2.1.0/gems/win32-security-0.3.2/lib/win32/security.rb:41:in
 
`initialize'
        from C:/Arquivos de programas/Puppet 
Labs/Puppet/sys/ruby/lib/ruby/gems/2.1.0/gems/win32-security-0.3.2/lib/win32/security.rb:41:in
 
`new'
        from C:/Arquivos de programas/Puppet 
Labs/Puppet/sys/ruby/lib/ruby/gems/2.1.0/gems/win32-security-0.3.2/lib/win32/security.rb:41:in
 
`elevated_security?'
        from C:/Arquivos de programas/Puppet 
Labs/Puppet/facter/lib/facter/util/windows_root.rb:5:in `root?'
        from C:/Arquivos de programas/Puppet 
Labs/Puppet/facter/lib/facter/util/config.rb:41:in 
`setup_default_ext_facts_dirs'
        from C:/Arquivos de programas/Puppet 
Labs/Puppet/facter/lib/facter/util/config.rb:69:in `<module:Config>'
        from C:/Arquivos de programas/Puppet 
Labs/Puppet/facter/lib/facter/util/config.rb:5:in `<top (required)>'
        from C:/Arquivos de programas/Puppet 
Labs/Puppet/sys/ruby/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in 
`require'
        from C:/Arquivos de programas/Puppet 
Labs/Puppet/sys/ruby/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in 
`require'
        from C:/Arquivos de programas/Puppet 
Labs/Puppet/facter/lib/facter/util/resolution.rb:2:in `<top (required)>'
        from C:/Arquivos de programas/Puppet 
Labs/Puppet/sys/ruby/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in 
`require'
        from C:/Arquivos de programas/Puppet 
Labs/Puppet/sys/ruby/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in 
`require'
        from C:/Arquivos de programas/Puppet 
Labs/Puppet/facter/lib/facter/util/fact.rb:2:in `<top (required)>'
        from C:/Arquivos de programas/Puppet 
Labs/Puppet/sys/ruby/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in 
`require'
        from C:/Arquivos de programas/Puppet 
Labs/Puppet/sys/ruby/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in 
`require'
        from C:/Arquivos de programas/Puppet 
Labs/Puppet/facter/lib/facter.rb:35:in `<module:Facter>'
        from C:/Arquivos de programas/Puppet 
Labs/Puppet/facter/lib/facter.rb:30:in `<top (required)>'
        from C:/Arquivos de programas/Puppet 
Labs/Puppet/sys/ruby/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in 
`require'
        from C:/Arquivos de programas/Puppet 
Labs/Puppet/sys/ruby/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in 
`require'
        from C:/Arquivos de programas/Puppet 
Labs/Puppet/puppet/lib/puppet.rb:6:in `<top (required)>'
        from C:/Arquivos de programas/Puppet 
Labs/Puppet/sys/ruby/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in 
`require'
        from C:/Arquivos de programas/Puppet 
Labs/Puppet/sys/ruby/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in 
`require'
        from C:/Arquivos de programas/Puppet 
Labs/Puppet/puppet/lib/puppet/util/command_line.rb:12:in `<top (required)>'
        from C:/Arquivos de programas/Puppet 
Labs/Puppet/sys/ruby/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in 
`require'
        from C:/Arquivos de programas/Puppet 
Labs/Puppet/sys/ruby/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in 
`require'
        from C:/Arquivos de programas/Puppet 
Labs/Puppet/puppet/bin/puppet:7:in `<main>'

Em segunda-feira, 11 de janeiro de 2016 09:30:46 UTC-2, Tiago Delboni 
escreveu:
>
> Hi Josh, thanks for the enlightenment! 
> Any chances I can easily upgrade 3.8.x 's Ruby to fix this issue without 
> breaking current manifests and behaviour?
>
> Em sexta-feira, 8 de janeiro de 2016 15:24:27 UTC-2, Josh Cooper escreveu:
>>
>>
>>
>> On Fri, Jan 8, 2016 at 8:20 AM, Tiago Delboni <del...@gmail.com> wrote:
>>
>>> With parser=future it doesn't complain about the escape sequence, but 
>>> keeps creating the package every run. :(
>>>
>>> Copying the accented character to the manifest does not work (tried many 
>>> ways).
>>>
>>>
>>> Em sexta-feira, 8 de janeiro de 2016 13:38:25 UTC-2, Henrik Lindberg 
>>> escreveu:
>>>
>>>> On 2016-08-01 14:23, Tiago Delboni wrote: 
>>>> > Hi! 
>>>> > 
>>>> > On Windows 7 we have Puppet 4.2.x and, in order to deal with accented 
>>>> > characters commonly found in registry key DisplayName, we use unicode 
>>>> > escape sequences in our manifests such as "\u00FA". 
>>>> > 
>>>> > However, on Windows XP,  we couldn't install Puppet 4.2.x so we use 
>>>> > 3.8.x instead. When running the same manifest with escape sequences, 
>>>> > Puppet complains: "Unrecognised escape sequence '\u' in file ...". 
>>>> > 
>>>> Have you tried using 3.8.x with parser=future turned on? That would 
>>>> give 
>>>> you support for \u the same way as in puppet 4.x. 
>>>>
>>>> > Puppet 3.8.x documentation states that it "treats strings as 
>>>> sequences 
>>>> > of bytes. It does not recognize encodings or translate between them, 
>>>> and 
>>>> > non-printing characters are preserved." 
>>>> > 
>>>> Yes, when you get the waring for \u, it means there will be a literal 
>>>> backslash and a literal u in the resulting string. (That is with the 
>>>> regular parser since it (as it says) does not support the \u escape for 
>>>> unicode chars). 
>>>>
>>>> > So, how can I deal with software that have accented characters in 
>>>> their 
>>>> > DisplayName? Assuming that registry's encoding is the same on WXP and 
>>>> > W7, I could probably make it work by using Puppet 4.2.x on Windows 
>>>> XP, 
>>>> > but I just don't know how to install it successfully. 
>>>> > 
>>>>
>>>> Use puppet 3.8.x (latest) as noted above. The other approach (ugly, and 
>>>> horrible work around) is to simply copy/paste the actual character into 
>>>> the source file, but that is not guaranteed to work for all characters. 
>>>>
>>>> Hope that helps 
>>>> - henrik 
>>>>
>>>> > -- 
>>>> > You received this message because you are subscribed to the Google 
>>>> > Groups "Puppet Users" group. 
>>>> > To unsubscribe from this group and stop receiving emails from it, 
>>>> send 
>>>> > an email to puppet-users...@googlegroups.com 
>>>> > <mailto:puppet-users+unsubscr...@googlegroups.com>. 
>>>> > To view this discussion on the web visit 
>>>> > 
>>>> https://groups.google.com/d/msgid/puppet-users/12713369-5970-4a43-804a-ca57a400afd0%40googlegroups.com
>>>>  
>>>> > <
>>>> https://groups.google.com/d/msgid/puppet-users/12713369-5970-4a43-804a-ca57a400afd0%40googlegroups..com?utm_medium=email&utm_source=footer>.
>>>>  
>>>>
>>>> > For more options, visit https://groups.google.com/d/optout. 
>>>>
>>>>
>>>> -- 
>>>>
>>>> Visit my Blog "Puppet on the Edge" 
>>>> http://puppet-on-the-edge.blogspot.se/ 
>>>>
>>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Puppet Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to puppet-users...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/puppet-users/6084ba68-3ac0-458a-ab7c-292d11663e6b%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/puppet-users/6084ba68-3ac0-458a-ab7c-292d11663e6b%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> Puppet 3.8.x ships with ruby 1.9.3 (32-bit) and 2.0.0 (64-bit), both of 
>> which use ANSI versions of Win32 registry APIs (and not the wide/unicode 
>> versions). Puppet uses those methods to scan the registry looking for 
>> installed applications, and is likely the cause for the problem you're 
>> seeing. See 
>> https://tickets.puppetlabs.com/browse/PUP-2937?focusedCommentId=87973&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-87973
>>  
>> for more information.
>>
>> Puppet 4.x ships with ruby 2.1.x, which switched to using wide versions 
>> of the registry APIs, so I think that's why it's working in that case.
>>
>> Josh
>>
>> -- 
>> Josh Cooper
>> Developer, Puppet Labs
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/65e4c251-4e53-4bdf-852b-2e71d89119bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to