Merge pull request #2 from haus/1.9.3

1.9.3
Maint: Fix console color on Windows 1.9.3

Previously, puppet on windows was not colorizing console output on ruby
1.9.3. It appears the 1.9.3 native library was missing:

  ruby/lib/ruby/gems/1.9.1/gems/win32console-1.3.2-x86-mingw32/lib/1.9/Console_ext.so
Merge pull request #3 from joshcooper/193-fix-color

Maint: Fix console color on Windows 1.9.3
Add deep_merge (version 1.0.0) gem to base ruby

The new Hiera deep merge feature depends on the deep_merge library being
available. This commit addresses that on windows by adding the deep_merge gem
to the ruby we ship for windows.
Merge pull request #4 from haus/add_deep_merge

Add deep_merge (version 1.0.0) gem to base ruby
(#16080) Protect against misconfigured services

Previously, the Win32::Service.services method would raise an exception if any
service was misconfigured. On Windows 2012 in VMware fusion, the tsusbhub
(driver) service is installed by default, so this bug is always triggered
though the same issue could occur in other Windows OS's.

The issue occurs when a service, e.g. tsusbhub, has a Description entry in the
registry of the form:

    @[path]dllname,-strID

where strID is the localized description identifier, but the resource with
that identifier is absent from the dll.

This commit updates the `services` method to rescue exceptions related to
`get_config2_info`.

The commit adds a optional parameter to `get_config2_info` so that the caller
can decide whether the handles should be closed. This way if we fail to
retrieve the description, for whatever reason, we can still attempt to lookup
failure actions.

Patch applied using:

   git apply --ignore-whitespace --verbose \
     --directory=c:/work/puppet-win32-ruby/ruby/lib/ruby/gems/1.9.1/gems/win32-service-0.7.2-x86-mingw32 \
     16080-handle-missing-description.patch
Merge pull request #6 from joshcooper/ticket/1.9.3/16080-handle-missing-description

(#16080) Protect against misconfigured services
(#21264) Update rgen to 0.6.5
Merge pull request #7 from haus/ticket/1.9.3/21264_update_rgen

(#21264) Update rgen to 0.6.5
Update ruby 1.9.3 to p448

This commit updates the ruby on the 1.9.3 branch to patch level 448, which
addresses CVE-2013-4073.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Re-apply Fixup-generated-batch-files-to-not-support-Windows-9.patch to correct hashbangs
Merge pull request #9 from MosesMendoza/maint/1.9.3/update_to_p448

Update ruby 1.9.3 to p448
(#21285) Bump to win32-dir v0.4.3

Previously, running facter on a non-en_US system would fail when calling

    File.join(Dir::COMMON_APPDATA, '...')

because the COMMON_APPDATA constant was UTF-16LE encoded, which File.join
does not accept.

This commit updates the win32-dir gem, which encodes the CSIDL constants
using the default_external encoding.

This commit introduces a new dependency on ffi, which is licensed as LGPLv3.
The ffi gem is also only supported on ruby 1.9 and up.
Merge pull request #10 from joshcooper/ticket/1.9.3/21285-ascii_compatible

(#21285) Bump to win32-dir v0.4.3
Patch rubygems for CVE-2013-4287
Merge pull request #11 from shrug/bug/1.9.3/pe-1475

Patch rubygems for CVE-2013-4287
(#22493) Unable to start puppet agent on non-English Windows

This fixes the inability to install the MSI by patching win32-dir to
allow the default encoding of the machine to be used when no encoding
is determined. Ruby when querying the system SHGetFileInfo returns an
ascii 8bit string and this forces it to use whatever the system encoding
default is set to. This allows puppet to install the agent and run properly.

This does not fix the use of non-en_us ASCII characters in the manifests.

Paired-with: Josh Cooper <josh@puppetlabs.com>
Merge branch 'issues/1.9.3/22493-fix-agent-non-english' into 1.9.3

* issues/1.9.3/22493-fix-agent-non-english:
  (#22493) Unable to start puppet agent on non-English Windows
Patch rubygems for CVE-2013-4363
Merge pull request #15 from shrug/bug/1.9.3/pe-1950

Patch rubygems for CVE-2013-4363