Using etckeeper – protection and other questions

Following the suggestion made Putting /etc under source control I have installed ETCKEEPER.

It seems pretty good but I have some questions.

  • Is the any way off putting the command you do into the change message. So if I run apt-get install widget I would like the first line of the commit message to be something like install widget rather than a less helpful committing changes in /etc after apt run

  • I want to be able to do enquiries on the bzr repository from an ordinary user. But I am prevented by the protection on .bzr directory. Are there any gotchas in changeing this to a+r

    drwx—— 6 root root 4096 Aug 30 13:00 .bzr

  • Are there any gotchas in removing files (such as /etc/shadow/ from etckeeper control

Answer

If you look at the full bzr log rather than the shortlog, you’ll see that committing changes in /etc after apt run is followed by a list of the packages that changed. At least, that’s the behavior on my Ubuntu laptop and server. For the vast majority of cases, I suspect that’s more useful than a “sudo apt-get upgrade” commit message.

The reason you’re prevented from accessing the bzr log as an ordinary user is that the bzr repo has full access to the shadow repository. Probably the biggest gotcha to stopping this is that if you remove a file from the bzr repo, it will still be available in older revisions. There’s probably some voodoo you can use along the lines of svndumpfilter | svnadmin --import but for bzr, but I haven’t tried it.

One alternative you might try is sudo su. Or perhaps you can make a new user and group, put the user in that group, give the group access to .bzr, and su to that user for operations of bzr interest.

Attribution
Source : Link , Question Author : justintime , Answer Author : jldugger

Leave a Comment