<feed xmlns='http://www.w3.org/2005/Atom'>
<title>puppet.git/lib/puppet/feature, branch master</title>
<subtitle>Puppet repo</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/'/>
<entry>
<title>(#8662) Break circular feature dependency</title>
<updated>2011-08-22T21:35:31+00:00</updated>
<author>
<name>Josh Cooper</name>
<email>josh@puppetlabs.com</email>
</author>
<published>2011-08-18T17:30:29+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=ccdd043ab309ca382dc949612d7efe3562adf5c5'/>
<id>ccdd043ab309ca382dc949612d7efe3562adf5c5</id>
<content type='text'>
The root feature was being evaluated prior to the microsoft_windows
feature being defined. On Windows, this had the side-effect of calling
Process.uid prior to the win32 sys/admin gem being loaded. And the
default ruby implementation of Process.uid always returns 0, which
caused Puppet.features.root? to always return true.

This commit reorders the syslog, posix, microsoft_windows, and root
features due to dependencies among them. This ensures the
microsoft_windows feature is defined prior to evaluating the root
feature.

As a result of this commit, the SUIDManager now calls the win32
sys/admin version of the Process.uid method, which returns the RID
component of the user's SID. As this is not 0, Puppet.features.root?
will now always return false on Windows. A future commit will fix
this, so that Puppet.feature.root? only returns true when running as
the Windows-equivalent of root.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The root feature was being evaluated prior to the microsoft_windows
feature being defined. On Windows, this had the side-effect of calling
Process.uid prior to the win32 sys/admin gem being loaded. And the
default ruby implementation of Process.uid always returns 0, which
caused Puppet.features.root? to always return true.

This commit reorders the syslog, posix, microsoft_windows, and root
features due to dependencies among them. This ensures the
microsoft_windows feature is defined prior to evaluating the root
feature.

As a result of this commit, the SUIDManager now calls the win32
sys/admin version of the Process.uid method, which returns the RID
component of the user's SID. As this is not 0, Puppet.features.root?
will now always return false on Windows. A future commit will fix
this, so that Puppet.feature.root? only returns true when running as
the Windows-equivalent of root.
</pre>
</div>
</content>
</entry>
<entry>
<title>(#8408/8409) Add a Windows ADSI helper module</title>
<updated>2011-08-19T20:52:59+00:00</updated>
<author>
<name>Nick Lewis</name>
<email>nick@puppetlabs.com</email>
</author>
<published>2011-08-09T20:04:10+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=f19a0ea8c12c06bb01ddfe53e47e3a02ae87bdbb'/>
<id>f19a0ea8c12c06bb01ddfe53e47e3a02ae87bdbb</id>
<content type='text'>
This module (Puppet::Util::ADSI) provides access to Active Directory Services
Interfaces, using win32ole. The base module has methods for generating resource
URIs and connecting to ADSI.

It also provides classes Puppet::Util::ADSI::User and Puppet::Util::ADSI::Group
for managing Active Directory users and groups, along with their properties and
group memberships. This will be used to implement the Windows ADSI user and
group providers.

Based on work by: Joel Rosario &lt;joel.r@.internal.directi.com&gt;
Based on work by: Cameron Thomas &lt;cameron@puppetlabs.com&gt;
Reviewed-By: Matt Robinson &lt;matt@puppetlabs.com&gt;
(cherry picked from commit b5fd95336e71ad428109cddf6cd2f33bdd31e025)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This module (Puppet::Util::ADSI) provides access to Active Directory Services
Interfaces, using win32ole. The base module has methods for generating resource
URIs and connecting to ADSI.

It also provides classes Puppet::Util::ADSI::User and Puppet::Util::ADSI::Group
for managing Active Directory users and groups, along with their properties and
group memberships. This will be used to implement the Windows ADSI user and
group providers.

Based on work by: Joel Rosario &lt;joel.r@.internal.directi.com&gt;
Based on work by: Cameron Thomas &lt;cameron@puppetlabs.com&gt;
Reviewed-By: Matt Robinson &lt;matt@puppetlabs.com&gt;
(cherry picked from commit b5fd95336e71ad428109cddf6cd2f33bdd31e025)
</pre>
</div>
</content>
</entry>
<entry>
<title>Add basic service provider for Windows</title>
<updated>2011-08-19T20:52:56+00:00</updated>
<author>
<name>Cameron Thomas</name>
<email>cameron@puppetlabs.com</email>
</author>
<published>2011-07-22T22:09:13+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=3be4d79d288f43f0476f0fa8666936c184d2ca35'/>
<id>3be4d79d288f43f0476f0fa8666936c184d2ca35</id>
<content type='text'>
This provider allows us to query the system state through "puppet
resource", and manage the ensure, and enabled properties of services on
Windows.

This also adds support for a new enabled value of 'manual' on Windows
only.  With this we support the three major start types for services on
Windows, with the following mapping of enabled to start type:

  true   =&gt; Automatic
  false  =&gt; Disabled
  manual =&gt; Manual (Demand)

We use the win32-service gem to provide access to the Windows APIs for
our operations.  This does add a new gem requirement for running Puppet
on Windows, but we were already requiring some gems from the same suite
that win32-service is a part of.

When referring to a service, the simple service name must be used,
instead of the display name.  For example, "snmptrap", instead of
"SNMP Trap".

All system services are reported in 'puppet resource service',
including those started prior to run level 3 (system, device drivers,
etc.).  These services should probably not be managed, without careful
thought and planning.

This currently does not support being able to move a service from
{enabled =&gt; false, ensure =&gt; stopped} to {enabled =&gt; true, ensure =&gt;
running} (or enabled =&gt; manual) in a single Puppet run, since Puppet
currently always tries to sync ensure before any other property.
Because of this, the puppet run will fail every time, and the service
must first be managed as {ensure =&gt; stopped, enabled =&gt; true} (or
enabled =&gt; manual), before it can be managed as running and automatic
start or manual start.

Reviewed by: Jacob Helwig &lt;jacob@puppetlabs.com&gt;
(cherry picked from commit 82476e8be41b62ce1767ab6854a72b481b917380)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This provider allows us to query the system state through "puppet
resource", and manage the ensure, and enabled properties of services on
Windows.

This also adds support for a new enabled value of 'manual' on Windows
only.  With this we support the three major start types for services on
Windows, with the following mapping of enabled to start type:

  true   =&gt; Automatic
  false  =&gt; Disabled
  manual =&gt; Manual (Demand)

We use the win32-service gem to provide access to the Windows APIs for
our operations.  This does add a new gem requirement for running Puppet
on Windows, but we were already requiring some gems from the same suite
that win32-service is a part of.

When referring to a service, the simple service name must be used,
instead of the display name.  For example, "snmptrap", instead of
"SNMP Trap".

All system services are reported in 'puppet resource service',
including those started prior to run level 3 (system, device drivers,
etc.).  These services should probably not be managed, without careful
thought and planning.

This currently does not support being able to move a service from
{enabled =&gt; false, ensure =&gt; stopped} to {enabled =&gt; true, ensure =&gt;
running} (or enabled =&gt; manual) in a single Puppet run, since Puppet
currently always tries to sync ensure before any other property.
Because of this, the puppet run will fail every time, and the service
must first be managed as {ensure =&gt; stopped, enabled =&gt; true} (or
enabled =&gt; manual), before it can be managed as running and automatic
start or manual start.

Reviewed by: Jacob Helwig &lt;jacob@puppetlabs.com&gt;
(cherry picked from commit 82476e8be41b62ce1767ab6854a72b481b917380)
</pre>
</div>
</content>
</entry>
<entry>
<title>(#7581) Provide more detailed error message when missing gems on Windows</title>
<updated>2011-08-19T20:48:28+00:00</updated>
<author>
<name>Jacob Helwig</name>
<email>jacob@puppetlabs.com</email>
</author>
<published>2011-06-27T20:33:31+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=7467a08368b09e8e36c40b5013e3774c76123b85'/>
<id>7467a08368b09e8e36c40b5013e3774c76123b85</id>
<content type='text'>
Running Puppet on Windows requires the sys-admin, win32-process &amp;
win32-dir gems.  If any of these gems were missing, Puppet would fail
with the message "Cannot determine basic system flavour".

When trying to determine if we are on Windows, we now warn with the
message "Cannot run on Microsoft Windows without the sys-admin,
win32-process &amp; win32-dir gems: #{err}", where err is the normal ruby
load error message stating which gem could not be loaded.

We also only warn if the POSIX feature is not present.

Signed-off-by: James Turnbull &lt;james@puppetlabs.com&gt;
Signed-off-by: Jacob Helwig &lt;jacob@puppetlabs.com&gt;
Reviewed-by: Cameron Thomas &lt;cameron@puppetlabs.com&gt;
(cherry picked from commit faf8a5c05f50d98835a1db05b96146618f485a04)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Running Puppet on Windows requires the sys-admin, win32-process &amp;
win32-dir gems.  If any of these gems were missing, Puppet would fail
with the message "Cannot determine basic system flavour".

When trying to determine if we are on Windows, we now warn with the
message "Cannot run on Microsoft Windows without the sys-admin,
win32-process &amp; win32-dir gems: #{err}", where err is the normal ruby
load error message stating which gem could not be loaded.

We also only warn if the POSIX feature is not present.

Signed-off-by: James Turnbull &lt;james@puppetlabs.com&gt;
Signed-off-by: Jacob Helwig &lt;jacob@puppetlabs.com&gt;
Reviewed-by: Cameron Thomas &lt;cameron@puppetlabs.com&gt;
(cherry picked from commit faf8a5c05f50d98835a1db05b96146618f485a04)
</pre>
</div>
</content>
</entry>
<entry>
<title>maint: remove inaccurate copyright and license statements.</title>
<updated>2011-08-18T18:27:41+00:00</updated>
<author>
<name>Daniel Pittman</name>
<email>daniel@puppetlabs.com</email>
</author>
<published>2011-08-18T18:27:41+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=fd7332be5ca8ba78ff24a455fddad1713be779b5'/>
<id>fd7332be5ca8ba78ff24a455fddad1713be779b5</id>
<content type='text'>
For a while Luke, and other authors, injected a created tag, copyright
statement, and "All rights reserved" into every new file they added to the
Puppet project.

This isn't really true, and we have a global license covering the code, so
we have now stripped out all those old tags.

Signed-off-by: Daniel Pittman &lt;daniel@puppetlabs.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For a while Luke, and other authors, injected a created tag, copyright
statement, and "All rights reserved" into every new file they added to the
Puppet project.

This isn't really true, and we have a global license covering the code, so
we have now stripped out all those old tags.

Signed-off-by: Daniel Pittman &lt;daniel@puppetlabs.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Ssh transport for network device management</title>
<updated>2011-04-08T08:19:53+00:00</updated>
<author>
<name>Brice Figureau</name>
<email>brice-puppet@daysofwonder.com</email>
</author>
<published>2011-01-03T18:50:20+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=6560da52674dfce10a622b633a9ed511f75b0a89'/>
<id>6560da52674dfce10a622b633a9ed511f75b0a89</id>
<content type='text'>
It is an adapatation of net-ssh-telnet, so that net-ssh conforms to
a saner interface for consumer.

Signed-off-by: Brice Figureau &lt;brice-puppet@daysofwonder.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is an adapatation of net-ssh-telnet, so that net-ssh conforms to
a saner interface for consumer.

Signed-off-by: Brice Figureau &lt;brice-puppet@daysofwonder.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix #4726 Update puppet rrdtool metric code to support modern rrd ruby bindings</title>
<updated>2010-09-28T22:36:24+00:00</updated>
<author>
<name>Jesse Wolfe</name>
<email>jes5199@gmail.com</email>
</author>
<published>2010-09-24T23:51:20+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=d057b90bba4ffe7174e9af789835d5528e8a200d'/>
<id>d057b90bba4ffe7174e9af789835d5528e8a200d</id>
<content type='text'>
The rrd project has been shipping ruby bindings since 1.3.0, and the old
rrdtool ruby library is no longer being maintained.

This patch is based upon Davor Ocelic's submitted code, with the
addition that I've added conditionals so it can still call the old
rrdtool library if a modern rrd is not installed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The rrd project has been shipping ruby bindings since 1.3.0, and the old
rrdtool ruby library is no longer being maintained.

This patch is based upon Davor Ocelic's submitted code, with the
addition that I've added conditionals so it can still call the old
rrdtool library if a modern rrd is not installed.
</pre>
</div>
</content>
</entry>
<entry>
<title>(#4763) Don't call a method that was removed in Rails 3 activerecord</title>
<updated>2010-09-23T04:37:50+00:00</updated>
<author>
<name>Matt Robinson</name>
<email>matt@puppetlabs.com</email>
</author>
<published>2010-09-22T22:27:54+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=6468f4ede9d96b8d83f107a8533a4ad6eb88c954'/>
<id>6468f4ede9d96b8d83f107a8533a4ad6eb88c954</id>
<content type='text'>
Calling this method caused storeconfigs not to run.

ActiveRecord::Base.allow_concurrency was deprecated in Rails 2.2.  We
support activerecord 2.1 and higher, so we still need to call this
method for 2.1.  I factored out the code that determines our
activerecord version to a method in util so that the code was easier to
read and test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Calling this method caused storeconfigs not to run.

ActiveRecord::Base.allow_concurrency was deprecated in Rails 2.2.  We
support activerecord 2.1 and higher, so we still need to call this
method for 2.1.  I factored out the code that determines our
activerecord version to a method in util so that the code was easier to
read and test.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed #4763 - Hardcoded ActiveRecord version</title>
<updated>2010-09-23T04:37:50+00:00</updated>
<author>
<name>James Turnbull</name>
<email>james@lovedthanlost.net</email>
</author>
<published>2010-09-14T10:10:25+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=79d5fde2246cc20b0ace7ed3f273a5352931f6eb'/>
<id>79d5fde2246cc20b0ace7ed3f273a5352931f6eb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Code smell: Two space indentation</title>
<updated>2010-07-10T01:12:17+00:00</updated>
<author>
<name>Markus Roberts</name>
<email>Markus@reality.com</email>
</author>
<published>2010-07-10T01:12:17+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=3180b9d9b2c844dade1d361326600f7001ec66dd'/>
<id>3180b9d9b2c844dade1d361326600f7001ec66dd</id>
<content type='text'>
Replaced 106806 occurances of ^( +)(.*$) with

The ruby community almost universally (i.e. everyone but Luke, Markus, and the other eleven people
who learned ruby in the 1900s) uses two-space indentation.

3 Examples:

    The code:
        end

        # Tell getopt which arguments are valid
        def test_get_getopt_args
            element = Setting.new :name =&gt; "foo", :desc =&gt; "anything", :settings =&gt; Puppet::Util::Settings.new
            assert_equal([["--foo", GetoptLong::REQUIRED_ARGUMENT]], element.getopt_args, "Did not produce appropriate getopt args")

    becomes:
        end

        # Tell getopt which arguments are valid
        def test_get_getopt_args
          element = Setting.new :name =&gt; "foo", :desc =&gt; "anything", :settings =&gt; Puppet::Util::Settings.new
          assert_equal([["--foo", GetoptLong::REQUIRED_ARGUMENT]], element.getopt_args, "Did not produce appropriate getopt args")

    The code:
            assert_equal(str, val)

            assert_instance_of(Float, result)

        end

        # Now test it with a passed object
    becomes:
          assert_equal(str, val)

          assert_instance_of(Float, result)

        end

        # Now test it with a passed object
    The code:
        end

        assert_nothing_raised do
            klass[:Yay] = "boo"
            klass["Cool"] = :yayness
        end

    becomes:
        end

        assert_nothing_raised do
          klass[:Yay] = "boo"
          klass["Cool"] = :yayness
        end
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replaced 106806 occurances of ^( +)(.*$) with

The ruby community almost universally (i.e. everyone but Luke, Markus, and the other eleven people
who learned ruby in the 1900s) uses two-space indentation.

3 Examples:

    The code:
        end

        # Tell getopt which arguments are valid
        def test_get_getopt_args
            element = Setting.new :name =&gt; "foo", :desc =&gt; "anything", :settings =&gt; Puppet::Util::Settings.new
            assert_equal([["--foo", GetoptLong::REQUIRED_ARGUMENT]], element.getopt_args, "Did not produce appropriate getopt args")

    becomes:
        end

        # Tell getopt which arguments are valid
        def test_get_getopt_args
          element = Setting.new :name =&gt; "foo", :desc =&gt; "anything", :settings =&gt; Puppet::Util::Settings.new
          assert_equal([["--foo", GetoptLong::REQUIRED_ARGUMENT]], element.getopt_args, "Did not produce appropriate getopt args")

    The code:
            assert_equal(str, val)

            assert_instance_of(Float, result)

        end

        # Now test it with a passed object
    becomes:
          assert_equal(str, val)

          assert_instance_of(Float, result)

        end

        # Now test it with a passed object
    The code:
        end

        assert_nothing_raised do
            klass[:Yay] = "boo"
            klass["Cool"] = :yayness
        end

    becomes:
        end

        assert_nothing_raised do
          klass[:Yay] = "boo"
          klass["Cool"] = :yayness
        end
</pre>
</div>
</content>
</entry>
</feed>
