ports/184005: Puppet 3.3.1 freebsd package provider patch is incredibly noisy under ruby 1.9

Tristan Smith tsmith at palantir.com
Fri Nov 15 18:30:03 UTC 2013


>Number:         184005
>Category:       ports
>Synopsis:       Puppet 3.3.1 freebsd package provider patch is incredibly noisy under ruby 1.9
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 15 18:30:02 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Tristan Smith
>Release:        9.1
>Organization:
>Environment:
FreeBSD main.foo.vm 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec  4 09:23:10 UTC 2012     root at farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
Under Puppet 3.3.1 with ruby 1.9.3, the package provider patches provided in freebsd ports appear to clash with puppet's best practices. When attempting to realize package resources, it gouts forth the line

/usr/local/lib/ruby/site_ruby/1.9/puppet/provider/package/freebsd.rb:84: warning: class variable access from toplevel

, one for every line in the INDEX.bz2, every time it parses the index. I ended up with 30000 lines of output.


>How-To-Repeat:
install puppet 3.3.1 with ruby 1.9.x.

puppet apply -e 'package{ "shells/bash": ensure => installed}'
>Fix:
Based on http://projects.puppetlabs.com/issues/8974

I patched the @@variable definitions that were apparently causing the problem:

/usr/local/lib/ruby/site_ruby/1.9/puppet/provider/package/freebsd.rb


18,19c18,19
<   @@lock = Mutex.new
<   @@ports_index = nil
---
>   class_variable_set(:@@lock , Mutex.new )
>   class_variable_set(:@@ports_index , nil )


and blessed silence ensued. 

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list