sudo and bzr: workflow for managing config files

Erik Bågfors zindar at gmail.com
Tue Mar 25 11:09:42 GMT 2008


On Tue, Mar 25, 2008 at 6:56 AM, Brian Shacklett
<bshacklett at digital-traffic.net> wrote:
> I've just started using Bazaar to manage config files on my linux box.
>  One thing that bothers me, though, is that all of my commits show up as
>  root at domain.tld. Now, this isn't a huge issue at this point because I'm
>  the only admin on the server. If I ever go to use this in full
>  production, though, it would have to be solved.
>
>  Now, I know why it's happening. As with most systems, all of my config
>  files in /etc are owned by root:root. This means that a sudo is needed
>  to make changes. Unfortunately, that also makes bzr think that root is
>  the one that's doing the commit. The only solution I can think of is to
>  change ownership of all config files to an admin group, but I have
>  /serious/ hesitations doing something like that. Who knows what
>  developers have made assumptions (rightfully so) about the ownership of
>  all of those files.
>
>  Anyway, is there anyone else out there that's using bzr for versioning
>  config files? How did you get around this?


I see four options

1) chown the .bzr directory, as that's the only thing that bzr should
need write access to, then run as the normal user (I haven't tested
this, but it should work)
2) set BZREMAIL or BZR_EMAIL or whatever it's named, as root
3) change /root/.bazaar/bazaar.conf to have the right username...
4) Change sudo to now change $HOME.  It shouldn't do that really...

/Erik



More information about the bazaar mailing list