[Puppet-dev] [PATCH/puppet 1/1] (#2728) Add diff output for changes made by Augeas provider

2011-05-31 Thread Michael Knox
From: Michael Knox Utilising Augeas's SAVE_NEWFILE mode (similar to augtool -n) to determine the changes that will be made be made by Augeas. Output a unified diff to info handle non-default root, and multiple files correctly Adding tests for Augeas diff functionality Add test for non-default :

Re: [Puppet-dev] [PATCH/puppet 1/1] (#2728) Add diff output for changes made by Augeas provider

2011-04-13 Thread Michael Knox
I've redone this to incorporate Daniel and Dominic's comments. It should also provide some performance improvement's with the Augeas type as Augeas is only run once now instead of twice per use. Cheers On 21/03/11 10:40 PM, Dominic Cleal wrote: On 21/03/11 04:00, Michael Knox wrote: On 21/03

Re: [Puppet-dev] [PATCH/puppet 1/1] (#2728) Add diff output for changes made by Augeas provider

2011-03-21 Thread Dominic Cleal
On 21/03/11 04:00, Michael Knox wrote: > On 21/03/11 2:22 PM, Daniel Pittman wrote: >> On Sun, Mar 20, 2011 at 15:31, Michael >> Knox wrote: >>> On 21/03/11 5:56 AM, Daniel Pittman wrote: >>> Am I correct in understanding that we are writing a temporary copy >>> for the >>> diff, then rewriting th

Re: [Puppet-dev] [PATCH/puppet 1/1] (#2728) Add diff output for changes made by Augeas provider

2011-03-20 Thread Daniel Pittman
On Sun, Mar 20, 2011 at 21:00, Michael Knox wrote: > On 21/03/11 2:22 PM, Daniel Pittman wrote: >> On Sun, Mar 20, 2011 at 15:31, Michael Knox >>  wrote: >>> On 21/03/11 5:56 AM, Daniel Pittman wrote: […] > Not in the Augeas's 4 save modes, noop, newfile, backup & overwrite. I have > a half writt

Re: [Puppet-dev] [PATCH/puppet 1/1] (#2728) Add diff output for changes made by Augeas provider

2011-03-20 Thread Michael Knox
On 21/03/11 2:22 PM, Daniel Pittman wrote: On Sun, Mar 20, 2011 at 15:31, Michael Knox wrote: On 21/03/11 5:56 AM, Daniel Pittman wrote: Am I correct in understanding that we are writing a temporary copy for the diff, then rewriting the change to the real file separately? Yes If so, could we

Re: [Puppet-dev] [PATCH/puppet 1/1] (#2728) Add diff output for changes made by Augeas provider

2011-03-20 Thread Daniel Pittman
On Sun, Mar 20, 2011 at 15:31, Michael Knox wrote: > On 21/03/11 5:56 AM, Daniel Pittman wrote: > > Hey. I love the basic change, but have a few semantic questions that I hope > you can answer more quickly than I could by reading the augeas source. > > Is augeus creating these temporary files in a

Re: [Puppet-dev] [PATCH/puppet 1/1] (#2728) Add diff output for changes made by Augeas provider

2011-03-20 Thread Michael Knox
On 21/03/11 5:56 AM, Daniel Pittman wrote: Hey. I love the basic change, but have a few semantic questions that I hope you can answer more quickly than I could by reading the augeas source. Is augeus creating these temporary files in a way that is safe against symlink attacks and similar se

Re: [Puppet-dev] [PATCH/puppet 1/1] (#2728) Add diff output for changes made by Augeas provider

2011-03-20 Thread Daniel Pittman
Hey. I love the basic change, but have a few semantic questions that I hope you can answer more quickly than I could by reading the augeas source. Is augeus creating these temporary files in a way that is safe against symlink attacks and similar security issues? Am I correct in understanding that

[Puppet-dev] [PATCH/puppet 1/1] (#2728) Add diff output for changes made by Augeas provider

2011-03-18 Thread Michael Knox
From: Michael Knox Utilising Augeas's SAVE_NEWFILE mode (similar to augtool -n) to determine the changes that will be made be made by Augeas. Output a unified diff to info Signed-off-by: Mike Knox --- lib/puppet/provider/augeas/augeas.rb | 12 ++-- 1 files changed, 10 insertions(+),