[clug] Subversion for sysadmin tasks

Steve Granger steveg at magellan-technology.com
Mon Jul 31 07:46:27 GMT 2006


Hi,

thanks for the reply. I've been playing around with things a bit more
and have come up with a script to take care of all the adds and removals

for i in `svn status | grep \! | awk {'print $2'}`
  do svn delete $i;
done

for i in `svn status | grep \? | awk {'print $2'}`
  do svn add $i;
done

so I can then commit the changes.

The whole permissions/ownership issue makes your way look a lot easier!! :)
Anyone know of a program that could track permissions/ownership details
of a directory recursively? Martin suggested doing it with a makefile?
could you explain this further?

--
Steve

Robert Edwards wrote:
> 
> I looked into doing this as well. I am not sure that subversion is the
> right way to do it for /etc, main issues I identified are:
>  - ownership of files (when you extract from the repository, they all
>     belong to you, but not all files in /etc are owned by root)
>  - preserving permissions on the files
>  - all those .svn directories lying around (and some of them are quite
>     large).
> 
> Still, I haven't come up with a better way yet (so I don't use anything
> at all... )
> 
> Cheers,
> 
> Bob Edwards.
> 
> Steve Granger wrote:
>> Hi,
>>
>> I'm looking to get an idea of some of the best practices that people
>> follow for using subversion (or CVS... or even RCS) for assisting
>> systems maintenance. I'm looking to maintain files in /etc to start off
>> with.
>>
>> My main problem is with still allowing package management tools to
>> manage files in /etc, with the working copy being the actually files
>> which doesn't seem like the best situation with all or the .svn
>> directories hanging around. Also in the scenario where a bunch  of files
>> are removed from /etc it seems painful to have to remove each single one
>> by one. Yes it's easy with a script to extract the list from svn status
>> output, I was just wondering it there was a more subversion way to do
>> it, like svn add * just ignores files which already exist in the
>> repository.
>>
>> I'm not overly familiar with version control systems that I've created a
>> repository
>>
>> svnadmin create /var/svn
>>
>> on my machine seashore and imported /etc
>>
>> svn import /etc file:///var/svn/seashore/etc
>>
>> to try things out.
>>
>> Eventually I envisage putting this on another machine to have it as a
>> type of secondary backup.
> 



More information about the linux mailing list