Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Aug 2012 16:53:47 GMT
From:      Christopher McCoy <syseng@wayfair.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/171188: puppet shell_config example no longer works due to puppet bug #15080
Message-ID:  <201208301653.q7UGrlI3067639@red.freebsd.org>
Resent-Message-ID: <201208301700.q7UH0JkA002646@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         171188
>Category:       ports
>Synopsis:       puppet shell_config example no longer works due to puppet bug #15080
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 30 17:00:19 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Christopher McCoy
>Release:        9.0-RELEASE
>Organization:
Wayfair LLC
>Environment:
FreeBSD packages.wayfair.com 9.0-RELEASE FreeBSD 9.0-RELEASE #4: Fri Feb 17 12:57:26 EST 2012     root@packages.wayfair.com:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
sysutils/puppet 2.7.19

Puppet provides an example which makes modifying /etc/sysctl.conf /etc/rc.conf and a few other key values files much easier.

This example is here: http://projects.puppetlabs.com/projects/1/wiki/Puppet_Free_Bsd

This no longer works in certain cases due to this bug:
http://projects.puppetlabs.com/issues/15080

I've essentially just made this patch more freebsd/portstree friendly.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

--- lib/puppet/provider/exec.rb.orig    2012-08-21 17:41:17.000000000 -0400
+++ lib/puppet/provider/exec.rb 2012-08-30 12:31:32.000000000 -0400
@@ -66,11 +66,9 @@
   end

   def extractexe(command)
-    if command.is_a? Array
-      command.first
-    elsif match = /^"([^"]+)"|^'([^']+)'/.match(command)
-      # extract whichever of the two sides matched the content.
-      match[1] or match[2]
+    # easy case: command was quoted
+    if command =~ /^"([^"]+)"/
+      $1
     else
       command.split(/ /)[0]
     end


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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208301653.q7UGrlI3067639>