Issue #8403 has been updated by Jeff McCune.

Category set to cloudpack
Status changed from Unreviewed to In Topic Branch Pending Merge
Assignee set to Jeff McCune
Target version set to 0.6.0

# Pending Review #

Topic Branch: `[email protected]:jeffmccune/puppet-cloudpack.git` 
`ticket/master/8403_stop_using_uuidgen`

<pre>
commit 984adca685d22d314d3848f03edcd0c43e060ba9
Author: Jeff McCune <[email protected]>
Date:   Wed Jul 13 15:08:28 2011 -0700

    (#8403) Do not require the uuidgen executable
    
    The uuidgen executable is platform specific.  This change uses the guid
    gem instead, which must be installed now for CloudPack to function.

diff --git a/lib/puppet/cloudpack.rb b/lib/puppet/cloudpack.rb
index ae9a3b7..a47a64c 100644
--- a/lib/puppet/cloudpack.rb
+++ b/lib/puppet/cloudpack.rb
@@ -1,4 +1,5 @@
 require 'rubygems'
+require 'guid'
 require 'fog'
 require 'puppet/network/http_pool'
 
@@ -434,12 +435,8 @@ module Puppet::CloudPack
       login    = options[:login]
       keyfile  = options[:keyfile]
 
-      if not test('f', '/usr/bin/uuidgen')
-        raise "/usr/bin/uuidgen does not exist; please install uuidgen."
-      elsif not test('x', '/usr/bin/uuidgen')
-        raise "/usr/bin/uuidgen is not executable; please change that file's 
permissions."
-      end
-      certname = `/usr/bin/uuidgen`.downcase.chomp
+      # This requires the "guid" gem
+      certname = Guid.new.to_s
 
       opts = {}
       opts[:key_data] = [File.read(keyfile)] if keyfile
</pre>
----------------------------------------
Bug #8403: Cloud Pack should not use uuidgen executable
https://projects.puppetlabs.com/issues/8403

Author: Jeff McCune
Status: In Topic Branch Pending Merge
Priority: Normal
Assignee: Jeff McCune
Category: cloudpack
Target version: 0.6.0
Keywords: 
Branch: 


This is platform specific.

There's a gem out there to calculate UUID's.  Use that.

<pre>
      if not test('f', '/usr/bin/uuidgen')
        raise "/usr/bin/uuidgen does not exist; please install uuidgen."
      elsif not test('x', '/usr/bin/uuidgen')
        raise "/usr/bin/uuidgen is not executable; please change that file's 
permissions."
      end
      certname = `/usr/bin/uuidgen`.downcase.chomp
</pre>



-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to