Permalink
Switch branches/tags
Commits on Apr 19, 2012
  1. Merge pull request #682 from zaphod42/bug/master/enc-variables-not-ov…

    pcarlisle committed Apr 19, 2012
    …erridden-by-node
    
    Bug/master/enc variables not overridden by node
  2. Merge branch 'maint/master/fix_provider_specs_for_windows'

    joshcooper committed Apr 19, 2012
    * maint/master/fix_provider_specs_for_windows:
      (maint) Get provider specs working on windows
  3. (maint) Get provider specs working on windows

    Jeff Weiss authored and joshcooper committed Apr 19, 2012
    Define helper to provider an existing command for windows because "echo"
    is a shell interpreted command, not a proper executable.
    
    As a side note, a helper method was the only way this actually functions
    because of the evaluation context of the confine scenarios hash. Let,
    before(:each), and instance variable all fail.
  4. Merge remote-tracking branch 'daniel-pittman/maint/master/add-array-d…

    Jeff Weiss
    Jeff Weiss committed Apr 19, 2012
    …rop-to-1.8.5'
    
    * daniel-pittman/maint/master/add-array-drop-to-1.8.5:
      Implement Array#drop for Ruby 1.8.5
  5. Merge remote-tracking branch 'joshcooper/maint/master/regexp-escape-c…

    Jeff Weiss
    Jeff Weiss committed Apr 19, 2012
    …ommand'
    
    * joshcooper/maint/master/regexp-escape-command:
      Maint: Escape command in regexp
  6. Maint: Escape command in regexp

    joshcooper committed Apr 19, 2012
    On 64-bit Windows, the directory for 32-bit applications contains
    parentheses: C:/Program Files (x86). The test was using this in a regexp
    comparison and failing because the parentheses are metacharcters that
    need to be escaped.
    
    This failure was introduced when the `fails_on_windows` exclude filter
    was removed (as `Puppet::Util.which` now works on Windows).
  7. Implement Array#drop for Ruby 1.8.5

    Daniel Pittman
    Daniel Pittman committed Apr 19, 2012
    This is a great convenience method, and people keep wanting to use it, so we
    may as well have a cheap, portable implementation to keep it working.
    
    Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
  8. Merge branch 'maint/master/pending-windows'

    joshcooper committed Apr 19, 2012
    * maint/master/pending-windows:
      (Maint) Mark failing tests as pending on Windows
  9. Merge pull request #679 from jeffweiss/ticket/master/13898_fail_face_…

    slippycheeze committed Apr 19, 2012
    …on_option_clash
    
    (#13898) Fail Face when option collides w/ setting
  10. (Maint) Mark failing tests as pending on Windows

    joshcooper committed Apr 19, 2012
    A previous commit removed the fails_on_windows tag but did not add the
    conditional pending block. Additional changes were made to faces
    documentation that do not work on Windows.
    
    This commit just adds a conditional pending block as was done in a
    previous commit, e.g. for the mount type.
  11. Merge branch 'maint/master/ruby-1.9.3-support' of git://github.com/da…

    joshcooper committed Apr 19, 2012
    …niel-pittman/puppet
    
    * 'maint/master/ruby-1.9.3-support' of git://github.com/daniel-pittman/puppet:
      Use conditional pending to block out "fails_on_windows" tests.
      Manually load Win32{API,OLE} for Ruby 1.9.
      Use a platform temporary file instead of a Unix one.
      Use platform path separator in tests.
      Make the base service provider spec work on Windows.
      Accept paths with `~` for `generate` on Windows.
      Make a path absolute on Windows as well as Unix.
      Store Rails logs on physical disk when testing.
      Recover better when `maxgroups` is not implemented.
      Forcibly remove temporary files in tests.
      Fix Rails schema setup on Windows.
      Make `binwrite` emulation work on Windows.
      Use Win32 API atomic replace in `replace_file`
    
    Conflicts:
    	lib/puppet/util/execution.rb
    
    Resolved whitespace conflict
  12. (#13284) Fix missing env vars during provider command execution

    Daniel Pittman
    Daniel Pittman committed Apr 19, 2012
    Manual merge and commit of pull request #606, which allows additional static
    environment variables to be added to commands in a provider.  This allows us
    to support the MacPorts provider which fails in an odd way if HOME is not
    available to it.
    
    Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
  13. Merge pull request #616 from jeffweiss/ticket/master/13435_csrs_signe…

    slippycheeze committed Apr 19, 2012
    …d_with_sha1
    
    (#13435) Change default signing digest algorithm
Commits on Apr 18, 2012
  1. Evaluate node classes either in top or node scope

    zaphod42 committed Apr 18, 2012
    Classes that are tied to a node should be preferred to be evaluated in
    the node scope, but if we don't have one then they should be in the top
    scope
  2. Use conditional pending to block out "fails_on_windows" tests.

    Daniel Pittman
    Daniel Pittman committed Apr 18, 2012
    A whole bunch of tests scattered through the system fail on Windows, around
    features that are not supported on that platform.  (They are things that only
    the master does, which an agent-only platform doesn't need to support.)
    
    These were tagged `fails_on_windows` to allow filtering them from rspec runs,
    which is great, but doesn't actually communicate nearly as much useful
    information as it would if we used the "conditionally pending" facilities that
    rspec has supported since 2.3.
    
    That gives us two key things: one, it works automatically based on our
    knowledge of the platform, which means you can't forget to turn off failing
    tests.
    
    Two, it means that if the test starts unexpectedly passing we also get a
    failure, since we should respond to "works when it shouldn't" as seriously as
    "fails when it shouldn't".
    
    Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
  3. Manually load Win32{API,OLE} for Ruby 1.9.

    Daniel Pittman
    Daniel Pittman committed Apr 9, 2012
    In Ruby 1.8.7 on Windows the Win32API and Win32OLE objects were automatically
    loaded; in Ruby 1.9 there is a general move to get rid of them, and presumably
    one step along the path is that they no longer automatically load.
    
    Explicitly loading them along with other gems we depend on helps solve that
    problem for us automatically.
    
    Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
  4. Use a platform temporary file instead of a Unix one.

    Daniel Pittman
    Daniel Pittman committed Apr 6, 2012
    The log test used a Unix path, which didn't work on Windows.
    
    Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
  5. Use platform path separator in tests.

    Daniel Pittman
    Daniel Pittman committed Apr 6, 2012
    When we test path modification, we should use the platform path separator.
    Makes the test pass on Windows.
    
    Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
  6. Make the base service provider spec work on Windows.

    Daniel Pittman
    Daniel Pittman committed Apr 6, 2012
    The base service provider pushes the status command into an array, and Windows
    has a little heartburn about that vs quoting.  While it isn't clear who is
    right, it is easy to just use an array when creating the test service and have
    things work.
    
    Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
  7. Accept paths with `~` for `generate` on Windows.

    Daniel Pittman
    Daniel Pittman committed Apr 6, 2012
    The `generate` function has a fairly strict definition of what is and isn't
    legal as a command name, in an effort to keep it reasonably sanitary.
    
    On Windows this included `.`, `-`, and any alpha-numeric characters, but not
    the `~` character.  This blew up when faced with an "8.3" generated path -
    something that we legitimately should accept since it can reduce problems
    around spaces in path names.
    
    This changes generate to accept that, and adds a specific test to verify that
    it continues to work as expected.
    
    Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
  8. Make a path absolute on Windows as well as Unix.

    Daniel Pittman
    Daniel Pittman committed Apr 6, 2012
    When this test was changed the path became relative on Windows, because it
    doesn't have a drive letter.  This fixes that with `make_absolute`.
    
    Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
  9. Store Rails logs on physical disk when testing.

    Daniel Pittman
    Daniel Pittman committed Apr 6, 2012
    On Unix, we stored the Rails log from our StoreConfigs scratch database in
    `/dev/null`, which is reasonable enough - we don't generally care for them,
    and that works.
    
    On Windows this is harder because their NUL device is magic, and it is hard to
    configure the Rails logs to actually go there.  The system loves to interpret
    it as a random file relative to the current directory and do the wrong thing
    in various test scenarios.
    
    Ultimately, it doesn't matter if we write the logs to physical disk, and we
    already had a scratch directory for the physical database - so we can throw
    the logs there too.
    
    Just another reason to use a tmpfs to back /tmp, I guess.
    
    Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
  10. Recover better when `maxgroups` is not implemented.

    Daniel Pittman
    Daniel Pittman committed Apr 5, 2012
    Puppet tries to bump up the maximum number of supplementary groups for the
    process, which works only on Unix-like platform, in C-like implementations of
    Ruby.
    
    Previously there was a blacklist of platforms where this didn't work, which
    means that as new platforms come along we failed in new and exciting ways.
    
    Instead we can just rescue any failure from invoking the method and carry on,
    which works for any failure mode including "not implemented" nicely.
    
    Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
  11. Forcibly remove temporary files in tests.

    Daniel Pittman
    Daniel Pittman committed Apr 4, 2012
    We have some test helpers, and they allow us to create scratch files and
    directories that will be politely destroyed at the end of the run.
    
    We also have some tests that result in permissions on files being changed; we
    still want those destroyed, and turning on "force" mode for the delete
    operation gives us what we need with no real cost - we have plenty of other
    safety factors in place.
    
    Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
  12. Fix Rails schema setup on Windows.

    Daniel Pittman
    Daniel Pittman committed Apr 4, 2012
    There were several problems with the StoreConfig Rails schema building code on
    Windows, starting with the use of `/dev/null` to discard migration output.
    
    Unfortunately, this was hard to debug - it broke tests silently because of the
    hacking on $stdout, and didn't report anything about failures.
    
    Now, instead of discarding the output we capture it in memory, and report any
    exception we encounter along with the complete textual output at the time of
    failure.
    
    This improves the ability to debug errors in this code, along with making it
    work transparently on any platform.
    
    Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
  13. Make `binwrite` emulation work on Windows.

    Daniel Pittman
    Daniel Pittman committed Mar 31, 2012
    So, it turns out that Ruby on Windows is pretty damn awesome, and that to
    successfully sysopen a file, then use it as an IO, you need to write this:
    
        IO.new(IO::sysopen(filename, mode), mode) {|io| ... }
    
    ...yes, indeed, you need to repeat the mode, and pass the sysopen mode - which
    is completely incompatible with the normal open.  It works when you pass a
    file descriptor from sysopen, though, and gets Ruby convinced to use it right.
    
    Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
  14. Use Win32 API atomic replace in `replace_file`

    Daniel Pittman
    Daniel Pittman committed Mar 31, 2012
    The changes to enable Windows support in `replace_file` were not actually
    complete, and it didn't work when the file didn't exist - because of
    limitations of the emulation done on our side, rather than anything else.
    
    Windows has a bunch of quirks, and Ruby doesn't actually abstract over the
    underlying platform a great deal.  We can use the Windows API ReplaceFile, and
    MoveFileEx, to achieve the desired behaviour though.
    
    This adds even more conditional code inside the `replace_file` method to
    handle multiple platforms - but it really isn't very clean.  Better to get
    this working now, then refactor, though.
    
    Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
  15. Removed topscope being overridden by node

    zaphod42 committed Apr 18, 2012
    This seems to have been an unsuccessful attempt at merging top and node
    scope.
  16. (#13898) Fail Face when option collides w/ setting

    Jeff Weiss
    Jeff Weiss committed Apr 18, 2012
    Remove commented out options.
  17. (#13898) Fail Face when option collides w/ setting

    Jeff Weiss
    Jeff Weiss committed Apr 18, 2012
    Change Puppet::Interface::Option to prohibit options on Faces that have
    the same name as an existing Puppet setting.
    Move functionality of Puppet::Util::Setting::StringSetting.setbycli to
    Puppet::Util::Settings and deprecate usage of StringSetting.setbycli
    because StringSetting provides metadata for the definition of setting,
    whereas Setting contains both the value and the origin of the value,
    whether :cli, :memory, :application_defaults, etc.
    Change ca application and certificate Face to properly handle all
    permutations of --dns_alt_names (Puppet setting) and --dns-alt-names
    (Face option).
    Remove "documentation only" options of :modulepath and :environment from
    module Face.
    
    Prior to this commit, Faces could declare options that collided with
    existing Puppet settings, which has caused unexpected behavior for the
    Face.  This commit explicitly prohibits the Face from declaring an
    option which is already a Puppet setting.  This is a potentially
    breaking change for externally developed Faces.
Commits on Apr 16, 2012
  1. Fixed problems caused by 2.7.x merge

    zaphod42 committed Apr 16, 2012
    Several things had changed on master that caused the automatic merge to
    not catch problems.
  2. Re-apply "Merge remote-tracking branch 'upstream/2.7.x'"

    zaphod42 committed Apr 16, 2012
    This reverts commit 6d399e0.
  3. Revert "Merge remote-tracking branch 'upstream/2.7.x'"

    zaphod42 committed Apr 16, 2012
    This reverts commit 7a43081, reversing
    changes made to 32172d5.
  4. Merge remote-tracking branch 'upstream/2.7.x'

    zaphod42 committed Apr 16, 2012
    * upstream/2.7.x: (22 commits)
      Removed duplication of compiling a catalog
      Cleaner test for create_resources doing nothing
      Fixing problem caused by activerecord
      Put back require 'puppet' in Puppet::Util
      (#13299) Fix error message when agent is disabled
      Update puppet.spec for rpm packaging
      Fixed old log test to match new autoflush behavior
      Make sure the log file writable
      Default autoflushing of log files to true
      Created test that shows enc warning problem
      (Maint) Fix order-dependent test failure
      (Maint) Don't assume eventlog gem is installed on Windows
      options[:ca_location] is a string not a symbol. Safer to pull Puppet::SSL::Host.ca_location since it is already set correctly.
      (#13204) Don't ignore missing PATH.augnew files
      (#13640) Only agents should use next_agent_run
      Increased test coverage of scoping rules
      Use more descriptive terms for the differing scopes
      Make new scoping look through inherited scopes
      Add tests for mixed inheritence/inclusion
      Remove dynamic option for lookupvar
      ...
    
    Conflicts:
    	lib/puppet/defaults.rb
    	lib/puppet/parser/scope.rb
    	spec/unit/parser/functions/create_resources_spec.rb
    	spec/unit/parser/scope_spec.rb
    	spec/unit/resource/type_spec.rb
    	test/util/log.rb
  5. Merge remote-tracking branch 'zaphod42/bug/2.7.x/8174-incorrect-warni…

    Jeff Weiss
    Jeff Weiss committed Apr 16, 2012
    …ng-about-deprecated-scoping' into 2.7.x
    
    * zaphod42/bug/2.7.x/8174-incorrect-warning-about-deprecated-scoping:
      Removed duplication of compiling a catalog
      Cleaner test for create_resources doing nothing
      Fixing problem caused by activerecord