bzr serve should log somewhere other than ~/.bzr.log
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Medium
|
Alexander Belchenko |
Bug Description
bzr serve tries to write to ~/.bzr.log, but this is not appropriate when run from inetd, and a bit questionable under other circumstances.
This may be slightly complicated to fix if we open the file before parsing the arguments...
=======
Hello,
i tried the following to get bzr running as daemon under xinetd:
localhost:
service bzr
{
server_args = serve --inet --directory=
nice = 10
disable = no
socket_type = stream
protocol = tcp
wait = no
user = bzruser
server = /usr/local/bin/bzr
port = 22618
}
localhost:
Shutting down xinetd: done
localhost:
Starting INET services. (xinetd) done
localhost:
Apr 12 17:30:32 austria073 xinetd[22967]: Reading included configuration
file: /etc/xinetd.d/bzr [file=/
localhost:/ # cd ~bzruser/
localhost:
total 8
-rw-r--r-- 1 bzruser users 51 Apr 12 16:57 README.txt
-rw-r--r-- 1 bzruser users 25 Apr 12 17:01 logme
localhost:
unknown:
.bash_history
.bazaar/
.bzr.log
logme
And now, i try to talk to the bzr daemon:
localhost:
bzr: ERROR: Generic bzr smart protocol error: unexpected smart server
error: ("failed to open trace file: [Errno 13] Permission denied:
'/root/.bzr.log'",)
localhost:
bzruser@
bzr: ERROR: Generic bzr smart protocol error: unexpected smart server
error: ("failed to open trace file: [Errno 13] Permission denied:
'/root/.bzr.log'",)
What?s up?!?!
This file exists - but is not available to "bzruser", also even if i
make it readable to "bzruser" the same error occurs :-(
Any idea?
Everything runs fine with a dedicated server ...
Changed in bzr: | |
importance: | Undecided → Low |
status: | Unconfirmed → Confirmed |
description: | updated |
Changed in bzr: | |
status: | Confirmed → Fix Released |
I've just run into the same bug. The workaround was to add the following line to the bzr service description in /etc/xinet.d/bzr:
env = HOME=/srv/bzr