puppetlabs/puppet_for_the_win — pull request #2 by jeffmccune (2012-02-07 00:38:19+00:00)
Title: (#12066) Add puppet and facter to build tasks

This patch moves the build tasks back into the separate repository of
puppet_for_the_win [1]. This is based on the feedback from the pull
request for this logic at [2].

All of the comments in the original pull request should be addressed.
Specifically, the behavior of this patch is as follows:

1: Stage the runtime ruby requirements into stagedir/ by downloading a
ZIP file archive and unpacking it. This gets us Ruby and any other
requirements we have to run Puppet and Facter.

2: Clone the puppet and facter repositories. This clone defaults to
the master open source git:// URI's and can be overriden using the
`rake windows:clone` task.

3: Checkout the exact version of the code we're packaging. This
defaults to Puppet 2.7.9 and Facter 1.6.4 unless the rake
windows:checkout task is used to checkout a specific reference.

4: The combination of 2 and 3 can be used to package any arbitrary
version of Puppet and Facter from any repository and branch
combination.

5: The `rake windows:stage` will unpack the Zip file from #1, copy the
checked out working directories from #2 and #3 and copy the contents of
`conf/windows/stage/*` into the stage directory. The only static
resources being copied so far in this patch are the contents of a "bin"
directory to provide the puppet and facter batch files. These batch
files both rely on an `environment.bat` file to setup the PATH and
RUBYLIB appropriately.

6: The `rake windows:build` task will build the package at
`pkg/puppet.msi`

Once the package is built and installed onto a windows system, the only
thing that needs to happen for Puppet and Facter to be functional are to
set the PATH accordingly:

SET PATH=C:\puppetlabs\bin;%PATH%

Subsequent patches will allow the package to be installed at alternate
locations. The default configuration directory for Puppet is used and
no puppet.conf is provided by this patch.

[1] http://github.com/puppetlabs/puppet_for_the_win
[2] https://github.com/puppetlabs/puppet/pull/428