(#16451) Fedora's and Archlinux usr move the location of systemctl has changed #1157

Closed
wants to merge 106 commits into
from
@aboe76

This is a fix for Bug #16451, It wil test if /bin/systemctl exists otherwise check if /usr/bin/systemctl exists
to provide systemd service functionality.

@ahpook ahpook commented on an outdated diff Oct 5, 2012
lib/puppet/provider/service/systemd.rb
@@ -1,11 +1,17 @@
# Manage systemd services using /bin/systemctl
Puppet::Type.type(:service).provide :systemd, :parent => :base do
- desc "Manages `systemd` services using `/bin/systemctl`."
-
- commands :systemctl => "/bin/systemctl"
+ desc "Manages `systemd` services using `/bin/systemctl` or `/usr/bin/systemctl."
@ahpook
ahpook added a line comment Oct 5, 2012

you're missing a closing backtick at the end of /usr/bin/systemctl here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@ahpook ahpook commented on an outdated diff Oct 5, 2012
lib/puppet/provider/service/systemd.rb
- #defaultfor :osfamily => [:redhat, :suse]
+ #defaultfor :osfamily => [:redhat, :suse, :archlinux]
@ahpook
ahpook added a line comment Oct 5, 2012

this is commented out so i'm not sure why it's here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@aboe76 aboe76 Update lib/puppet/provider/service/systemd.rb
fixed missing backtick in description
bda9ded
@aboe76

fixed the missing backtick, the defaultfor is commented out when the distro will switch completely to systemd, so it will become it's default. as of Now, redhat(fedora) suse(opensuse) and archlinux are in a transistion to systemd.
But systemd will become default on those distributions sometime in the future.

@kuerzn

This commit was necessary to get systemd working for me on Archlinux

@simonsd

You can also symlink /usr/bin/systemctl to /bin/systemctl as a temporary workaround.
Easily doable with a file resource in puppet and make the service require it.

Besides that the osfamily fact returns 'Linux' on my archlinux box, running:

  • archlinux latest as of 2012.10.27
  • puppet 2.7.19
  • facter 1.6.12
  • ruby 1.9.3p286
@aboe76
@aboe76 aboe76 Update lib/puppet/provider/service/systemd.rb
osfamily returns Linux on Archlinux so changed to 
operatingsystem fact which returns Archlinux
352c0cb
@aboe76

Made an update to facter to fix Osfamily on Archlinux
puppetlabs/facter#352

@stschulte stschulte commented on the diff Feb 9, 2013
lib/puppet/provider/service/systemd.rb
@@ -1,11 +1,18 @@
# Manage systemd services using /bin/systemctl
Puppet::Type.type(:service).provide :systemd, :parent => :base do
- desc "Manages `systemd` services using `/bin/systemctl`."
-
- commands :systemctl => "/bin/systemctl"
+ desc "Manages `systemd` services using `/bin/systemctl` or `/usr/bin/systemctl`."
+
+ if File.exists?("/bin/systemctl")
+ commands :systemctl => "/bin/systemctl"
+ else
+ if File.exists?("/usr/bin/systemctl")
@stschulte
Puppet member
stschulte added a line comment Feb 9, 2013

By reading your code I suppose if neither /bin/systemctl nor /usr/bin/systemctl are present on your system, the provider will have no confine and will be treated as suitable on systems that do not have systemd available at all.

@aboe76
aboe76 added a line comment Feb 9, 2013
@stschulte
Puppet member
stschulte added a line comment Feb 10, 2013

Before your change puppet treated the provider unsuitable if /bin/systemctl has been absent (the command method creates a confine for that provider, telling puppet that the command has to exist for the provider to work). Now you wrap that in an if clause but if neither /bin/systemctl nor /usr/bin/systemctl exist the new code does not declare any confine. So puppet can happily pick the provider for service resources on systems that don't have systemd installed.

Maybe you can change that to something like

systemctl_binary = File.executable?('/usr/bin/systemctl') ? '/usr/bin/systemctl' : '/bin/systemctl'
commands :systemctl => systemctl_binary

so you will always declare a confine. If /usr/bin/systemctl is present use this command otherwise /bin/systemctl. If that one is also absent, puppet will treat the provider as unsuitable

@aboe76
aboe76 added a line comment Feb 10, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Peter Hamilton and others added some commits Sep 27, 2012
Peter Hamilton Fixed unhandled --ignoreschedules in puppet kick e53c48d
@guillaumerose guillaumerose Use method execute instead of transport.command 5572398
@adregner adregner (#17713) make upstart_version an instance variable
This fixes the bug in some later versions of ruby which causes warnings
to be thrown when this class variable gets set from an instance of the
class.
6491148
@guillaumerose guillaumerose Fix spaces cd05184
@guillaumerose guillaumerose Explicit use of the device given the block 3ee899f
@guillaumerose guillaumerose Extract connection and disconnection behaviours b582e9d
@guillaumerose guillaumerose Remove unused verbose parameter, add debug in the transport 5c0218c
@guillaumerose guillaumerose Disable debug log in the transport 502043e
@reidmv reidmv Fix empty hash console rendering bug
Previously, if a face action returned an empty hash Puppet would print
out an error something like the following:

    err: undefined method `+' for nil:NilClass
    err: Try 'puppet help stack build' for usage

The cause of the error was a method in network/formats.rb that did not
account for the possibilty of an empty hash. This commit resolves the
issue by adding logic to account for the empty hash scenario, rendering
an empty hash as an empty string.
62fd91b
@joshcooper joshcooper (#18440) Don't make class methods private
Previously, the launchd service provider `enabled?` instance method was
calling the `launchd_overrides` private class method, which is not
allowed. This issue wasn't noticed, because the spec test was overly
stubbing the provider.

This commit makes the class methods public to avoid these sorts of
problems in the future.
cef29e4
@jeffmccune jeffmccune Revert "Merge branch 'stschulte-ticket/master/11675_implement_expiry_…
…retrieve'"

This reverts commit ef7e01a0ae238969b29c97c263a1d37be3f05d5d, reversing
changes made to fe573ff61ffd0f04150a8aff20b126285d26b18e.

I'm reverting this commit because the spec tests are not passing on Ruby
1.8.7.  The following error is being raised in CI http://goo.gl/ruC4e

Failures:

  1) Puppet::Type::User::ProviderUseradd#addcmd should return an array with full command
     Failure/Error: provider.addcmd.must == ['/usr/sbin/useradd', '-G', 'somegroup', '-e', '2012-08-18', '-o', '-m', '-r', 'myuser']
       expected: ["/usr/sbin/useradd", "-G", "somegroup", "-e", "2012-08-18", "-o", "-m", "-r", "myuser"]
            got: ["/usr/sbin/useradd", "-e", "2012-08-18", "-G", "somegroup", "-o", "-m", "-r", "myuser"] (using ==)
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-expectations-2.9.1/lib/rspec/expectations/fail_with.rb:33:in `fail_with'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-expectations-2.9.1/lib/rspec/matchers/operator_matcher.rb:47:in `fail_with_message'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-expectations-2.9.1/lib/rspec/matchers/operator_matcher.rb:69:in `__delegate_operator'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-expectations-2.9.1/lib/rspec/matchers/operator_matcher.rb:59:in `eval_match'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-expectations-2.9.1/lib/rspec/matchers/operator_matcher.rb:28:in `=='
     # /mnt/workspace/Puppet Specs (master)/gemset/@noFeatures/ruby/ruby-1.8.7/rvm/#rvm/spec/unit/provider/user/useradd_spec.rb:234
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example.rb:80:in `instance_eval'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example.rb:80:in `run'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example.rb:173:in `with_around_hooks'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example.rb:77:in `run'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example_group.rb:355:in `run_examples'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example_group.rb:351:in `map'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example_group.rb:351:in `run_examples'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example_group.rb:337:in `run'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example_group.rb:338:in `run'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example_group.rb:338:in `map'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example_group.rb:338:in `run'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/command_line.rb:28:in `run'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/command_line.rb:28:in `map'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/command_line.rb:28:in `run'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/reporter.rb:34:in `report'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/command_line.rb:25:in `run'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/runner.rb:69:in `run'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/runner.rb:10:in `autorun'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/bin/rspec:19

  2) Puppet::Type::User::ProviderUseradd#addcmd should pass -e " " on solaris if the expiry has to be removed
     Failure/Error: provider.addcmd.must == ['/usr/sbin/useradd', '-G', 'somegroup', '-e', ' ', '-o', '-m', '-r', 'myuser']
       expected: ["/usr/sbin/useradd", "-G", "somegroup", "-e", " ", "-o", "-m", "-r", "myuser"]
            got: ["/usr/sbin/useradd", "-e", " ", "-G", "somegroup", "-o", "-m", "-r", "myuser"] (using ==)
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-expectations-2.9.1/lib/rspec/expectations/fail_with.rb:33:in `fail_with'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-expectations-2.9.1/lib/rspec/matchers/operator_matcher.rb:47:in `fail_with_message'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-expectations-2.9.1/lib/rspec/matchers/operator_matcher.rb:69:in `__delegate_operator'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-expectations-2.9.1/lib/rspec/matchers/operator_matcher.rb:59:in `eval_match'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-expectations-2.9.1/lib/rspec/matchers/operator_matcher.rb:28:in `=='
     # /mnt/workspace/Puppet Specs (master)/gemset/@noFeatures/ruby/ruby-1.8.7/rvm/#rvm/spec/unit/provider/user/useradd_spec.rb:247
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example.rb:80:in `instance_eval'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example.rb:80:in `run'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example.rb:173:in `with_around_hooks'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example.rb:77:in `run'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example_group.rb:355:in `run_examples'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example_group.rb:351:in `map'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example_group.rb:351:in `run_examples'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example_group.rb:337:in `run'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example_group.rb:338:in `run'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example_group.rb:338:in `map'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example_group.rb:338:in `run'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/command_line.rb:28:in `run'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/command_line.rb:28:in `map'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/command_line.rb:28:in `run'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/reporter.rb:34:in `report'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/command_line.rb:25:in `run'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/runner.rb:69:in `run'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/runner.rb:10:in `autorun'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/bin/rspec:19

  3) Puppet::Type::User::ProviderUseradd#addcmd should pass -e "" on other systems if the expiry has to be removed
     Failure/Error: provider.addcmd.must == ['/usr/sbin/useradd', '-G', 'somegroup', '-e', '', '-o', '-m', '-r', 'myuser']
       expected: ["/usr/sbin/useradd", "-G", "somegroup", "-e", "", "-o", "-m", "-r", "myuser"]
            got: ["/usr/sbin/useradd", "-e", "", "-G", "somegroup", "-o", "-m", "-r", "myuser"] (using ==)
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-expectations-2.9.1/lib/rspec/expectations/fail_with.rb:33:in `fail_with'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-expectations-2.9.1/lib/rspec/matchers/operator_matcher.rb:47:in `fail_with_message'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-expectations-2.9.1/lib/rspec/matchers/operator_matcher.rb:69:in `__delegate_operator'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-expectations-2.9.1/lib/rspec/matchers/operator_matcher.rb:59:in `eval_match'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-expectations-2.9.1/lib/rspec/matchers/operator_matcher.rb:28:in `=='
     # /mnt/workspace/Puppet Specs (master)/gemset/@noFeatures/ruby/ruby-1.8.7/rvm/#rvm/spec/unit/provider/user/useradd_spec.rb:255
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example.rb:80:in `instance_eval'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example.rb:80:in `run'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example.rb:173:in `with_around_hooks'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example.rb:77:in `run'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example_group.rb:355:in `run_examples'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example_group.rb:351:in `map'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example_group.rb:351:in `run_examples'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example_group.rb:337:in `run'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example_group.rb:338:in `run'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example_group.rb:338:in `map'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example_group.rb:338:in `run'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/command_line.rb:28:in `run'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/command_line.rb:28:in `map'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/command_line.rb:28:in `run'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/reporter.rb:34:in `report'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/command_line.rb:25:in `run'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/runner.rb:69:in `run'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/runner.rb:10:in `autorun'
     # /home/jenkins/.rvm/gems/ruby-1.8.7-p358@noFeatures/bin/rspec:19
419924b
@joshcooper joshcooper Maint: Remove dead ca_md setting
The `ca_md` setting was added in commit bb4b5a54 in Aug 2005, but was
never used in that commit or any subsequent commit.

The setting itself is also confusing, because we create digital
signatures on both the agent (when signing the CSR) and the CA (when
signing the x509 cert).

It's also confusing because both encryption and hash algorithms need to
be specified when creating a digital signature, e.g.
sha256WithRSAEncryption. But the existence of the `ca_md` property might
encourage patches to allow the hash algorithm to be configured, but not
the encryption algorithm.

Long term, we'd like to eliminate hard coding of cryptographic
parameters, as it makes it difficult to upgrade while maintaining
compatibility across different versions of master and agents.
bbab426
@jeffmccune jeffmccune Revert "Merge branch 'stschulte-ticket/master/fixup_expiry'"
This reverts commit ba6de834e4ef68926386fb6ccdcb657cf9ebe5a4, reversing
changes made to 0f1de9a3926842fd3a4167e5fecf81f5fefe80b7.

Reverted due to [build failure](http://goo.gl/9DQYF)
d2e3b89
@stschulte stschulte Revert "Revert "Merge branch 'stschulte-ticket/master/11675_implement…
…_expiry_retrieve'""

This reverts commit 3f96ecdc6dec2bb724cb60a36970f6199757e42a.

The original commit series around issue 11675 have been reverted because
they caused test failures and the policy is to revert such commits.

Restore the commit series to be able to fix the failing tests.
79250f4
@stschulte stschulte (#11675) Fix test failures in ruby 1.8.7
The spec tests for the Puppet::Type.addcmd method failed on ruby 1.8.7.

The addcmd method builds a commandline to execute `useradd` with
appropiate command line arguments. To build the commandline
`add_properties` gets called which in turn calls
`Puppet::Type.validproperties`. The order in which properties are returned
can be considered undefinied so the whole `useradd` commandline can include
arguments in random order. While the randomness does not make a difference for
the useradd executable it causes spec failures on some systems.

Sort the properties when building the useradd commandline. This way the
result is consistent across all ruby versions and easier to test.
1141716
@ryanuber ryanuber Work-around for RH Bugzilla 681540 (defattr overrides in-line attr) b6fc660
@joshcooper joshcooper Maint: Deprecate dynamicfacts setting
The dynamicfacts setting was used to avoid recompiling catalogs when
only transient related facts were modified, e.g. free memory. According
to Luke, this optimization was removed when "we disabled staleness
checking for catalogs, which was early in the 0.24 release cycle", see
ticket #569.

This commit deprecates the setting rather than removing it, because it
the setting was actually used at one time, unlike `ca_md`.
59462b1
@zaphod42 zaphod42 (#18468) Clarify message in defaults for debian
The comment that tried to explain the START property did not clearly
align with the message generated by the installation:

  Setting up puppet (3.1.0-0.1rc1puppetlabs1) ...
  Starting puppet agent
  puppet not configured to start, please edit /etc/default/puppet to
  enable
  .

This changes the comment in the file to include the word "Enable" so
that a user can more confidently match it up to the "enable" word that
shows up in the message. It also explains the effect of the different
values.
75d507e
@joshcooper joshcooper Maint: Add ronn dependency for building man pages
Add missing dependency so that the `rake gen_manpages` task works.
29c411c
@joshcooper joshcooper Maint: Update man pages
Updated the man pages via the `rake gen_manpages` task.
13200c6
@zaphod42 zaphod42 (#18636) Change to friendlier way of specifying suitability
The previous way of setting the suitability of a token was very hard to
grasp for my feeble mind. It also caused RDoc to have problems parsing
the code unless developers were always aware that they had to enclose
the method definitions in stopdoc/startdoc.

This changes it to provide a proc that determines suitability rather
than trying to change the class after the fact. There may be a small
performance hit because it is now two method calls, but I think this is
much more maintainable.
02048a2
@zaphod42 zaphod42 (#18636) Remove reference to non-existant token
There is no CLASSNAME token. By trying to create the acceptable? method
for it the code actually created the acceptable? method on nil.
5b25dac
@jjulien jjulien Fixed rpsec issue for useradd on Red Hat 6838618
@jjulien jjulien (#18662) Rewrote test case to stub out check_manage_home to account f…
…or RedHat systems
457192c
@jjulien jjulien (#18662) cleaned up #check_manage_home and #create test cases 82d6a0b
@joshcooper joshcooper Revert "Maint: Add ronn dependency for building man pages"
This reverts commit 758d3a5b5e610e6bb668bae432acb400baf939fe.

Bundle install installs all gems, including those in the development
group. But the ronn gem requires the devkit on Windows. Since we are
planning on moving the man page generation as a packaging step, I'm
reverting this.
ddde720
@pcarlisle pcarlisle (#18026) Don't warn on failed stats for selinux context
We try to stat files to determine the default selinux context. This may happen
before the file exists. A warning was recently added, and it seems to just be
confusing and noisy, so this removes it.
1666f4f
@omcnet omcnet Fix portage-provider so that packages with keywords can be installed
This patch removes the --stable restriction from the portage provider,
which made the installation of packages with keyword-restrictions impossible.
By superimposing this restriction the provider broke in many installations
and thus rendered puppet unusable for systems that relied on packages with
keyword-restrictions. This applies for example to all packages provided by
overlays.
This fix puts the administrator back into the responsibility to decide which
packages he/she wants to install.
3e0a63b
Jared Curtis (#15980) The pip provider doesn't work correctly on redhat based systems
Centos/RHEL/Fedora all use pip-python instead of pip
91d1b94
Jared Curtis (#15980) Test to verify that pip-python is used on Redhat systems 07f624b
Jared Curtis (#15980) Tests to confirm functionality of the cmd function 4b5c6ea
Jared Curtis (#15980) wrapping tests so that they're tested on both 'RedHat' and 'Not
Redhat' sytems
7588fa3
@pdxmph pdxmph Clarify the messages provided by the Debian puppet agent and master i…
…nit scripts.
4fbdbed
@jasperla jasperla (#16752) Add support for pkg.conf on openbsd
Previously only local file sources were supported for openbsd
packages. Pkg.conf is a mechanism that openbsd uses to download
packages from HTTP sources as well. This patch adds checking for
the presence of 'installpath' lines in pkg.conf and, if one
are found and if the last character of an installpath line is a
::File::SEPARATOR (aka `/` character on openbsd) then it will
become the value of the environment variable PKG_PATH previous to
pkgadd invocation, which tells pkgadd to use the URL.
43714a0
mruzicka (#14872) PMT respect environment's module path
This is a second version of a patch which fixes the
Puppet::ModuleTool#set_option_defaults method such that it respects
the specified environment (if any) when determining the default
value for the --target-dir (the modules install directory) option.
The patch overhauls the entire method in the process to make it more
readable, and it also updates relevant unit tests and adds a pair
of new acceptance tests (which in contrast to the original patch
version don't depend on augeas).

Reviewed by: Patrick Carlisle <patrick@puppetlabs.com>
c34bad0
@joshcooper joshcooper (#16752) Add tests for reading installpath from /etc/pkg.conf
This commit adds tests for reading installpath from /etc/pkg.conf in the
case that a 'source' has not be specified for the package.
84c289a
@joshcooper joshcooper (#16752) Better installpath validation
Previously, if pkg.conf contained an invalid installpath, then the
openbsd package provider would accept it and set it as the package
source. For example, `installpath`, `installpath=`,
`installpath=/path`.

This commit adds better input validation, so that we only set the
package source if the regexp matches, otherwise we raise.
8ee13dc
@haus haus (#17777) Update debian build-depends to only use ruby1.8
Previously puppet had a build-depends of ruby, which means that on wheezy and
quantal, the default ruby of ruby1.9 was used to build puppet. Unfortunately,
this means that the shebangs for bin/puppet refer to bin/ruby1.9.1 instead of
ruby1.8. Puppet 2.7.x is installed in the ruby 1.8 specific libdir for ruby, so
ruby1.9.1 has no way of loading puppet in this case. This commit updates the
build-depends to correctly use ruby1.8 only, so bin/puppet gets the correct
ruby which can load the correct libraries.
Note: in mergeups from 2.7.x, this
needs to be undone. The build-depends of ruby is correct for puppet 3 and
later.
247483a
@joshcooper joshcooper (#16752) Added additional tests and allow key=value
This commit adds tests to improve regexp detection. It also modifies the
regexp to accept `installpath=path`, as openbsd does not require spaces
around the equals sign.
379ec34
@hlindberg hlindberg (#18458) Make Ruby DSL manifests always reload.
Ideally it should be possible to cache Ruby DSL manifests and reload on
demand when a change is detected. Other issues prevent this at the
moment.

This change adds the ability to watch a file with an "always stale"
option. This ensure that the cached environment will be recomputed the
next time an agent checks in.

The "always stale" option is used at the two locations where a Ruby DSL
is parsed (for the site manifest, and when loading types).
f02c2c5
@hlindberg hlindberg (#18739) Make calling functions from Ruby DSL work.
The implementation called a function such as "include" on the scope,
when it should have used "function_include". It also did not pass
arguments in an array as expected by the scope.
1fe9159
@omcnet omcnet Add tests for gentoo provider c0c7382
@alexharv074 alexharv074 (#17295) use SHA1 to sign CSRs when SHA256 is not available.
Without this patch applied puppet fails to create a CSR
with the following message -

    Error: Could not request certificate: uninitialized constant OpenSSL::Digest::SHA256

This patch adds a class Puppet::SSL::CertificateSigner that
takes care of signing certificates in CSR creation and via
the CA.  This class assumes a default hash algorithm of
SHA256 and if not available falls back to SHA1.  For the
sake of FIPS 140-2 compliance it does not try MD5 or any
earlier hash algorithms.
0840276
@jeffmccune jeffmccune (docs) Add COMMITTERS.md to guide committers
Without this patch the information a committer needs to possess in order
to merge contributions is spread all over the place.  The information is
also out of date.

This patch addresses the problem by consolidating the information into a
single place in the root of the project repository itself.
COMMITTERS.md should replace the following documents:

 * http://projects.puppetlabs.com/projects/puppet/wiki/Engineering_Process_Minimal_HOWTO
 * http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Design_Guidelines
 * http://projects.puppetlabs.com/projects/puppet/wiki/Internal_Development_Process
 * http://projects.puppetlabs.com/projects/puppet/wiki/Engineering_done_done

[ci skip]
96556c1
@joshcooper joshcooper (#16752) Refactor spec test
Previously, the spec test replicated logic for how pkgadd is invoked,
and did so inconsistently  -- whenever the resource's source ends in a
slash, the get_version method gets called which invokes `pkginfo -I
bash`, and the corresponding expectation was only sometimes set.

This commit moves to two types of install expectations to helper
methods, converts the test to use `let` blocks, and sets the parameters
on the resource directly, instead of needing to define a `package`
method. It also adds a test to ensure the source parameter is updated.
41b75fa
@jeffmccune jeffmccune (maint) Add dependency information for yard and redcarpet
Without this patch `bundle exec yard server --reload` doesn't work.
This is a problem because people who are developing Puppet need to be
able to access the API documentation easily and the yard server is one
such way.  This patch addresses the problem by adding a dependency on
yard and redcarpet for the development group only.  This will prevent
the yard and redcarpet gem from sucking in a large number of
dependencies when running in a CI environment because these environments
are expected to omit development only dependencies when bootstrapping
using `bundle install --path vendor --without development`
26e8bfd
@joshcooper joshcooper (#18755) Consider prerelease gems in the search path
Previously, if puppet 3.0.2 and 3.1.0.rc1 gems were installed using
rubygems version 1.8 or greater, then puppet's autoloader would load
code from both gems, giving precedence to the older gem.

Puppet's settings code was loading the `Puppet::Type::Group` class from
the 3.0.2 gem, but trying to call the `#exists?` method that was added
in 3.1.0rc1, resulting in the "undefined method 'exists?' for nil"
error.

The root cause was due to `Gem::Specification.latest_specs` ignoring
prerelease gems, by default, so it would report that the latest spec was
3.0.2. Yet, executing `require 'puppet'` would activate the prerelease
gem, 3.1.0.rc1, causing its lib dir to be appended to $LOAD_PATH.

And since Puppet's autoloader combines the rubygems directories and
$LOAD_PATH (roughly in that order), version 3.0.2 would take precedence.

Note this issue is specific to rubygems 1.8 and up, since when using
previous versions, puppet calls the deprecated method
`Gem.latest_load_paths`, which alread considers prerelease gems when
determining the latest installed gem.

This commit simply modifies the call to `Gem::Specification.latest_spec`
to consider prerelease gems when determining the latest installed
version.
56d0e14
@hlindberg hlindberg (#18458) Add test that "always stale" mode is supported for LoadedFile.
This checks that the always stale mode for LoadedFile works.
Later, this test (and the implementaton) may be removed as it is the
intent to also be able to only do on demand reparsing of Ruby DSL.
cf8c488
@hlindberg hlindberg (#18458) Fix comment typos and removes unwanted required file.
This fixes typos in comments and instead of just copying the same text
in two location, there is now an updated explanation for what needs to
be checked later in the typeloader case. The two locations "compiler"
and "type_loader" now cross reference each other in the comments.

An unused require was also removed.
36c32f7
@hlindberg hlindberg (#18458) Refactor "always-stale" LoadedFile into separate class.
This refactors the always-stale functionality in LoadedFile by creating
a derived class LoadedFileAlwaysStale and changing the initialization
signature back to the original.

The branch point in type_collection now picks the always-stale class if
passed true. 

The loadedfile_spec is consequently changed back, a separate test added
for LoadedFileAlwaysStale, and example cases added to
type_collection_spec (to check if it picks the regular or the always
stale implementation based on the passed flag).
312bfb7
@hlindberg hlindberg (yardoc) Fix yardoc comments and others after always-stale refactoring
Some yardoc and regular comments did not reflect the change after the
refactoring. 

Also corrects non intentional removal of empty line (debugging cruft).
373ae17
@zaphod42 zaphod42 (#18636) Create only one always acceptable Proc
The previous code would create a new Proc that returned true for every
instance of Token. This commit changes it so that only one is created.
Although there are a finite number of long lived tokens, extracting the
Proc out to a constant provides a name for it, which improves
readability, and reduces the number of objects in memory.
c4d5bc3
@glarizza glarizza (#16271) Implement restart action for launchd
Previously, the launchd service provider did not accommodate a restart
action. If a resource attempted the refresh the service, Puppet triggered
an alert but did not actually restart the service. This commit adds a
restart method that calls the stop and then start action on the service
(since launchd doesn't actually have a restart action). Puppet.debug
messages are also raised for debugging purposes.
07837cf
@zaphod42 zaphod42 (#18636) Extract named constants for contextual acceptability
The various context checks used to be written inline. This caused a
small amount of duplication and provided no name for when the block
would determine that the token was acceptable. This extracts them all
into constants and places them inside an inner module in order to keep
track of them all. In addition the list of tokens that used to be
constructed for every invocation of several of the blocks are extracted
out and only created once during setup.
8c4383c
@jeffmccune jeffmccune (maint) Whitespace only cleanup of launchd provider
Just removing some trailing whitespace and ugly blank lines.
bb8b181
@hlindberg hlindberg (#18458) Remove unnecessary test in always stale spec.
Test example now removed in favor of a comment pointing to contrasting
test for LoadedFile.
c7e1a95
@pcarlisle pcarlisle Revert "Merge pull request #1419 from hlindberg/18458-Reload-Ruby-DSL"
This reverts commit 7d0b22ac6df8e1742044831b7e805c09eeacbe8c, reversing
changes made to 59f4327869d0858ac631277fe98c603941facf3e.
873cb62
@pcarlisle pcarlisle Revert "(yardoc) Refactor status for Puppet DSL; from @since to @stat…
…us."

This reverts commit 1c26453c7447a9771253e8342c08a67a05750071.
c023184
@pcarlisle pcarlisle Revert "(yardoc) Correct @since information in the Ruby DSL files."
This reverts commit 61bdb05968e3c5efc14fd710da24bc7f963dcc52.
a572b7f
@pcarlisle pcarlisle Revert "(#17845) Add @since 3.0.x EXPERIMENTAL to Puppet::DSL (transi…
…tive)."

This reverts commit 2c8fc1ecef9a9f58bfe7075db712e2921e8025fa.
007bc4a
@pcarlisle pcarlisle Revert "(yardoc) Fix Ruby DSL yardoc."
This reverts commit 8703898e714ac4fa4f7abbd13d8295bcf1df682e.
5732ffa
@pcarlisle pcarlisle Revert "Don't remove validate_arguments from backtraces"
This reverts commit 368587acfc7a66fc7f95327ab53064e1c89541c5.
1e21d23
@pcarlisle pcarlisle Revert "Merge branch 'new-ruby-dsl-by-mlen'"
This reverts commit 751efa9174adfe1bc0a5707855e6ba16ff2aed43, reversing
changes made to 023cffdbb9b30945fbf4dcaded4f63428ce54ea7.

Conflicts:
	lib/puppet/dsl/context.rb
	spec/unit/dsl/context_spec.rb
da21d69
@hlindberg hlindberg (#18876) Add deprecation warning for use of ruby dsl.
This adds a deprecation warning for parsing of ruby based manifests.
Tests are updated to check that the deprecation warning is issued for
ruby manifest, but not otherwise.
57d63c7
@haus haus Add extlookup2hiera manpages to redhat and debian packages
Now that a manpage exists for extlookup2hiera, it needs to be part of the
redhat and debian packaging so it can be laid down correctly for those
packages. This commit adds the manpage to the puppet package on redhat and the
puppet-common package on debian.
7b41505
@stschulte stschulte Revert "Revert "Merge branch 'stschulte-ticket/master/fixup_expiry'""
This reverts commit 1ddcb5e511e131645cfa89305784f66427374287.

Conflicts:
    spec/unit/provider/user/useradd_spec.rb

The original commit "Merge branch
'stschulte-ticket/master/fixup_expiry'" was reverted because it caused
failures on ruby 1.8 because Date.next_day and Date.prev_day are not
public in ruby 1.8 (will the methods are publicly available in ruby 1.9)

Revert the revert and reinstall the original commit to be able to fix
the issues.
dac1a7a
@stschulte stschulte Fix user expiry failures on ruby 1.8
Date.next_day is private on ruby 1.8 while it is public on ruby 1.9

Convert the expiry to a date in a different way that works both on ruby
1.8.7 and ruby 1.9
6a9b7e0
@stschulte stschulte Fix user expiry on Solaris
The useradd provider can manage the expiry of a user account. To remove
an expiry you can use `usermod -e '' alice` and on Solaris the man page
states that providing `' '` would cause usermod to remove the expiry.
This happens to be not true at least on Solaris 10 so treat Linux and
Solaris the same.

However setting the expiry date to a real date is different on Solaris.
While Linux only accepts the date in the format YYYY-MM-DD, Solaris
accepts multiple different formats but %Y-%m-%d is not one of them. So
use the format %m/%d%/%Y when on Solaris which is also used in the useradd
manpage (and did work on test box)
ace6e2f
@haus haus Update PUPPETVERSION to 3.1.0-rc2 b2e8db4
@mrwacky42 mrwacky42 Update lib/puppet/application/agent.rb
Fix docs to refer to actual option.
f7cf1f9
@joshcooper joshcooper (#11276) Checksum files in binary mode
Previously, the puppet module tool would checksum a file in text mode. On
Windows, this would cause the module tool to report that a module had
local changes due to it computing the wrong MD5 checksum (due to File.read
translating '\r\n' to '\n').

This commit changes it to read the file in binary mode instead. This has
no effect on non-Windows platforms.
69d2798
@joshcooper joshcooper (#11276) Expand Dir.pwd
On Windows, Dir.pwd returns a path with backslashes, which confuses the
relative path from, since it doesn't know that 'C:/' and 'C:\' are the
same.

This commit simply expands Dir.pwd which results in forward slashes.
c9e33ff
@pcarlisle pcarlisle Make envpuppet run under sh 642994a
@dalen dalen (#18942) Add XOR operator
Adds support for the xor boolean operator.
120fcef
@jeffmccune jeffmccune Revert "Merge branch 'dalen-xor_operator' closes #1436"
This reverts commit 285bc8c85b5e667d7293e640547aac3bbde75c15, reversing
changes made to 47771e2892182fe78c34c55c5d433f16d6bb34d1.

This patch is being reverted due to the following concerns raised on the
pull request comment stream:

XOR is also done with the same precedence as OR - this is has some
effects:

    true or false xor true == false
    false xor true or false == true

Was this intentional? I think this is going to make people confused, as
opposed to setting the precedence of XOR to be lower (or higher) than OR
to have a clear order of evaluation.

Also, "Hate to be picky, but this is not 100% backwards compatible. If
someone used a bare word xor in their manifests this would now not work,
if someone has written an xor function it is now not callable. If I
remember correctly using keyword as name is not supported for every
construct."
6f12795
@dalen dalen (#18950) Add modulo operator
The modulo arithmetic operator.
7af3f61
@joshcooper joshcooper (#1424) Make Struct::Passwd more platform agnostic
The nameservice_spec was failing with `ArgumentError: struct size
differs` on Windows, because the initialize method for Struct::Passwd
takes different sets of arguments depending on flags set when ruby was
compiled, e.g. HAVE_ST_PW_GECOS, HAVE_ST_PW_CHANGE, etc.

This commit modifies the test to create a Struct::Passwd object using
the 4 mandatory fields: name, password, uid, gid. Since the other
optional fields weren't used in the test, this seems like the safest
approach.

This commit also excludes the test that relies on Struct::Group, because
that class only exists if HAVE_GETGRENT is defined at compile time. This
commit skips the test when run on windows.
645080c
@domcleal domcleal (#17522) Only print load errors to debug with non-specific context
Fixes a variable assignment that landed in the wrong branch during a conflict
merge (a4451fb1).  Commit a8575f41 fixed a spec failure but the original code
wasn't restored.

This restores the original functionality in #14136 where a non-specific
context (i.e. /files/etc) would be optimised (only load lenses for files under
/etc) but since it was vague, would only log load errors to debug.  Instead,
load errors were reported as warnings for non-specific contexts.

Load errors will continue to be reported as warnings for supplied contexts if
they're specific.
cf55ec2
@domcleal domcleal (#18187) Clear *root* environment when clearing caches
When changing settings or initializing Puppet via TestHelper, the
Puppet::Node::Environment.clear method is called to delete the cached
environment objects, as they may reference cached module paths based on old
values of settings.

The *root* environment is a special case, as it acts as the current environment
when no other environment has been created and set yet.  It can still have a
module path based on current settings, so it too should be cleared along with
other cached environments.

Failure to reinitialize *root* causes failures when initializing Puppet via the
TestHelper.  The Puppet::MetaType::Manager class uses the current environment
in calls to Puppet::Util::Autoload, which starts as the default *root*
enviroment.  The type loader is called a few times during TestHelper
initialization and so if the module path is then changed (which triggers a
.clear call), the *root* environment will contain paths based on old settings,
so types won't load.

Loading types based on the environment is new in 8173a6e6 (2.7.19).  3.x is
unaffected as caching of module paths doesn't begin until
app_defaults_initialized? changes to true.
4165613
@stahnma stahnma Incorporate Red Hat's NetworkManager fix into upstream
Red Hat/Fedora have been carrying a patch to restart puppet if
resolv.conf or other networking configuration settings are updated via
Network Manager.  We should be doing this as well, as it's a good idea.

The patch and problem are described in the following bugs:
https://projects.puppetlabs.com/issues/2776
https://bugzilla.redhat.com/532085

Note this only applies to rpms, and only to builds for EL/Fedora. This
patch/fix won't be applied/installed on any debian varient, sles, mac
etc.

Signed-off-by: Michael Stahnke <stahnma@puppetlabs.com>
3003b15
@stahnma stahnma Fixup to NetworkManager dispatcher to be compatible with systemd
The previous patch from Red Hat was only compatible with sysV init
systems. This patch modifies the script to enable systemd calls when
appropriate.

Signed-off-by: Michael Stahnke <stahnma@puppetlabs.com>
9cdd710
@joshcooper joshcooper (#11276) Load default root certs on Windows
On Windows calling OpenSSL::X509::Store#set_default_paths does nothing. As
a result, puppet is unable to make authenticated SSL connections to
well-known SSL servers, like forge.puppetlabs.com.

This commit adds a RootCerts class that loads the root certs from the
Windows system cert store, and monkey patches the
OpenSSL::X509::Store#set_default_paths to behave as expected on Windows.

Note the actual semantics for set_default_paths are slightly different,
in that on *nix, it sets the paths that openssl will look for trusted root
certs, whereas this patch loads them into the X509::Store object on
Windows. But the net effect is the same, we're specifying the set of root
certs that we trust when authenticating SSL servers.

This commit monkey patches openssl, because there isn't a central way to
create SSL contexts in ruby. Specifically, open-uri hides the process of
setting up the SSL context, so the caller doesn't have to "worry" about
it. In doing so, it calls set_default_paths expecting that is all that is
needed. But it makes it next to impossible for the caller to add other
root certs.

Specifically, the module tool uses open-uri to download tar.gz content,
but that said the issue is not specific to the module tool.

This commit also adds an SSL acceptance test.
0481bee
@haus haus Update PUPPETVERSION to 3.1.0 e3fe065
@pcarlisle pcarlisle (#17474) Make it possible to return `false` from a terminus
This manifested as an inability to retrieve the value `false` from hiera using
data bindings. The find method on Puppet::Indirection interpreted this as no
value being returned.
687b4b9
@pcarlisle pcarlisle Clarify example in comment for lookup_external_data_for
The comment implied that we would lookup external data for a required
argument, which is not true.
6dfe22c
@pvande pvande Updating module tool acceptance tests with new expectations. dc93946
@mat128 mat128 Fixed URI encoding problem with requirement string
When passing a requirement string with an unescaped URI character,
such as '>= 1.0.3' to puppet module install, an error would be raised.
Added URI escape to make_http_request to ensure all URIs are properly
escaped.
5ccafa2
@mat128 mat128 Fix encoding problem with test file cde5b02
@richardc richardc fix a documentation comment for find_template
The search order is absolute path, $templatedir, search in modules.
cdc4818
@guillaumerose guillaumerose Add the debug parameter in device.conf fe6e4f1
@joshcooper joshcooper Fix module tool acceptance test
This test was failing due to a change on the forge server when rendering
the description for a module.

This commit changes the test to expect UNKNOWN for the description.
21f68f6
@adrienthebo adrienthebo Revert "Merge branch 'pull-1339' into 3.1.x"
This reverts commit 7bd6a908a82b0502558564d32a7fa604cee3c5a3, reversing
changes made to 480379d1f61d88e732bd10d6773845a788351ed3.

This commit seems to be the cause of acceptance test failures so I'm
backing this out until we get that cleared up.
67e13a2
@adrienthebo adrienthebo (maint) Update network_device spec to check for nil
Commit fe95a39 added a default value of false for instantiation of
network transport types. I omitted that value and defaulted to nil since
they're equivalent but didn't update the tests. This commits checks for
nil instead of false.
c34c304
@jeffmccune jeffmccune (main) Add puppet-acceptance/ to .gitignore 18f27c2
@ripienaar ripienaar (#14544) Make puppet apply --write-catalog-summary produce resources …
…and classes state files

MCollective requires a classes.txt and resources.txt to function.  The
agent application writes this by default but the apply application has
no way to write these files.

With the increased popularity of running puppet masterless opting
instead to only run puppet apply on every node this is becoming a
problem for mcollective users who wish to run this mode of puppet
configuration management

This commits adds a new flag to the apply application -
--write-catalog-summary - which enables the creation of these 2 files
leaving it off by default to avoid apply from stepping on the toes of an
agent unless the user specifically request this behavior
7e1377e
@jeffmccune jeffmccune (maint) Cleanup whitespace errors
No change in behavior, just cleaning up some white space errors found
with git diff --check.
d9e1967
@jeffmccune jeffmccune Revert "Merge branch 'jeffmccune-yard_gemfile'"
This reverts commit 09f097e73917b43336c9dd55dc90474e495f32c4, reversing
changes made to 8f105246bc75c7cb7c77a4e2a14cb5ae211ea055.

This is being reverted because the yard gem cannot be installed properly
on Windows.

Talking to @joshcooper, we're going to revert this now and figure out a
better way to handle dependencies like this that have issues on some
platforms.  Hopefully there's a way to satisfy a dependency on all
platforms by default and exclude only those we know to be problematic.
9c2eae5
@joshcooper joshcooper (#18978) Fix stray commas
I experimented with some changes and forgot to undo them completely before
submitting PR 1439. This commit removes the stray commas that caused
CertOpenSystemStore to be an array instead of an Win32API object.
202c54d
@richardc richardc tweak the nagios grammar.ry so it reflects the parser
The grammar.ry didn't match the parser.rb; what was in parser.rb was

    module_eval <<'.,.,', 'grammar.ry', 42
        def _reduce_10( val, _values, result )
    result = {val[0] => val[1]}
        result
    end
    .,.,

Which couldn't have come from that grammar.ry which specified:

    var: PARAM VALUE icomment returns { result = {val[0],val[1]} }
83b559e
@richardc richardc (#19148) don't embed a Racc parser in naginator
Naginator embeds a parser engine which clashes with the one the DSL is
using.  This leads to noisy runs like this:

    $ puppet apply -e 'nagios_host {"foo":}'
    racc/parser.rb:27: warning: already initialized constant Racc_Runtime_Version
    racc/parser.rb:28: warning: already initialized constant Racc_Runtime_Revision
    racc/parser.rb:30: warning: already initialized constant Racc_Runtime_Core_Version_R
    racc/parser.rb:31: warning: already initialized constant Racc_Runtime_Core_Revision_R
    racc/parser.rb:35: warning: already initialized constant Racc_Runtime_Core_Revision_C
    racc/parser.rb:39: warning: already initialized constant Racc_Main_Parsing_Routine
    racc/parser.rb:40: warning: already initialized constant Racc_YY_Parse_Method
    racc/parser.rb:41: warning: already initialized constant Racc_Runtime_Core_Version
    racc/parser.rb:42: warning: already initialized constant Racc_Runtime_Core_Revision
    racc/parser.rb:43: warning: already initialized constant Racc_Runtime_Type
    Finished catalog run in 0.08 seconds

The fix is simply to not embed the parser engine, and use the same one as the puppet DSL.
464bf81
@aboe76

I will close this one, and refactor and make a new pull request.

@aboe76 aboe76 closed this Feb 10, 2013
@aboe76 aboe76 deleted the unknown repository branch Feb 10, 2013
@aboe76

New pull request #1468

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment