Issue #15185 has been updated by eric sorenson.

Affected Puppet version deleted (3.0.0rc3)

The fix for this was a refactor at 
https://github.com/puppetlabs/puppet/pull/1080

I believe this addresses all the concerns on the bug:
- the fact that ~ expansion wasn't being done at all (original problem 
statement)
- the error introduced in the original patch which caused ~ expansion to happen 
even when run as root (and fail when $HOME was unset)
- the non-portability of the getpwuid() call which caused exceptions on windows
- the modification of the environment $HOME as a byproduct of internal 
processing, which affected later state.

I expect to cut another 3.0.0RC pretty quickly because the one we put out is 
fatally flawed on important platforms due to this bug. It'd be great to have 
additional testing before doing that though, so please, if you're an interested 
party with some time to spare, give the current state of puppetlabs/puppet/3.x 
(as of 3f62908494d6194bf1bba9c2fe5260570a7f7e9c)  a spin.
----------------------------------------
Bug #15185: Settings do not expand ~ in user configuration directory
https://projects.puppetlabs.com/issues/15185#change-70148

Author: Luke Kanies
Status: In Topic Branch Pending Review
Priority: Normal
Assignee: Andrew  Parker
Category: 
Target version: 3.0.0
Affected Puppet version: 
Keywords: 
Branch: https://github.com/puppetlabs/puppet/pull/877


When using ~/.puppet as your personal configuration directory, the '~' does not 
get expanded, which means it never actually works.  The following patch makes 
it work:

    diff --git a/lib/puppet/settings.rb b/lib/puppet/settings.rb
    index 0e48096..a60abe3 100644
    --- a/lib/puppet/settings.rb
    +++ b/lib/puppet/settings.rb
    @@ -63,7 +63,7 @@ class Puppet::Settings
    end
    def self.default_user_config_dir
    -    "~/.puppet"
    +    File.expand_path("~/.puppet")
    end
    def self.default_global_var_dir
    @@ -71,7 +71,7 @@ class Puppet::Settings
    end
    def self.default_user_var_dir
    -    "~/.puppet/var"
    +    File.expand_path("~/.puppet/var")
    end
    def self.default_config_file_name    

I can't quite figure out how to test it, though, because it's set as a constant.


-- 
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