[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Savannah-hackers-public] what's the matter with the bzr server?

From: Glenn Morris
Subject: Re: [Savannah-hackers-public] what's the matter with the bzr server?
Date: Mon, 17 Jun 2013 21:48:38 -0400
User-agent: Gnus (, GNU Emacs (

Karl Berry wrote:

>     PS Karl, should I write down somewhere what I think I understand about
>     how this is set up on Savannah? 
> Yes please. For now, can you just post it here as an email message and
> I will endeavor to save it for later updating?

Some blurb:

* Bzr Information for Users

** How to enable commit notifications for your bzr project

You can choose to receive an email from Savannah each time a commit is
made to a branch in your bzr project. To turn this on, add the
"post_commit_to" option to your branch's bazaar.conf file. You can use
`bzr config' to do this. For example:

bzr config address@hidden \
  -d bzr+ssh://address@hidden/PROJNAME/trunk

Repeat this for each branch for which you want commit emails.
To turn emails off again, use `bzr config --remove ...' for each branch.

This feature use the `bzr-email' plugin,

You can configure various options about the commit emails, e.g. change
the subject, add extra mail headers, etc. See the plugin's
documentation for more details.

If you have the bzr-email plugin installed locally on your client
machine, then when you commit to Savannah your local machine may also
try to send a commit email. If your machine is not configured to send
external mail, this will just fail. In any case, you may prefer to
either remove the plugin from your local machine, or disable it for
your Savannah branches. You can do this either by editing branch.conf
in your local branches, to override the server setting (untested; not
sure this works), or by adding an entry to ~/.bazaar/locations.conf:

  post_commit_to = ""

You have to use locations.conf rather than bazaar.conf because the
latter has a lower priority than branch.conf.

* Bzr Information for Savannah Admins

There are two forms of access:
  anonymous via bzr://
  authenticated via bzr+ssh://

** Anonymous Access

Launched via xinetd. Config file is /etc/xinetd.d/bzr-hpss.
If you change this file, for the changes to be noticed you must run
  /etc/init.d/xinetd reload 

This launches a "bzr serve" process on demand.
It sets the HOME directory to /var/lib/bzr and the log file to
bzr-anon.log. Runs as user nobody, so the log must be world-writable
(bzr will error if the log is not writable).

It calls bzr via the wrapper /usr/local/bin/bzr-timeout, which kills
bzr after 5 hrs. This was added to remove stale/stuck bzr processes (?).

bzr-timeout might not be necessary now. Sine bzr 2.5, bzr serve has
an internal 300 second timeout for idle connections. This can be
controlled with the --client-timeout argument to bzr serve.

** Authenticated Access

Uses bzr+ssh:// protocol. The /usr/local/bin/sv_membersh script acts
as the login shell for Savannah users. It sets the HOME directory to
/var/lib/bzr and the log file to bzr.log. Runs as the relevant user.

** Bzr Package Installation

Bzr was installed from source on top of (?) the standard Debian package.
For this reason, the package is marked "hold".

** Commit Notifications

*** Old method (before 2013/6): bzr-hookless-email

Runs hourly via cron, using /etc/cron.hourly/bzr_commit_mail_notification
script. Users Must ask Savannah admins to enable/disable it for each branch.
Breaks with bzr 2.6:

Fix from
only partially works.  Breaks again on every merge commit:

*** New method (since 2013/6): bzr-email plugin

Runs on commit.  Projects can enable it themselves by using `bzr
config' to set post_commit_to option for a branch.

Installed on Savannah from Debian stable, then manually patched to
bring it up to the latest version (the version from testing did not
want to install). Then a few Savannah-specific tweaks were applied.
These are mostly cosmetic. For this reason, the package is marked as
on hold.

** Log rotation

Bzr logs to /var/lib/bzr, bzr-anon.log for anonymous connections and
bzr.log for authenticated connections. Logs are rotated using
logrotate, which runs from /etc/cron.daily. The relevant config file
is /etc/logrotate.d/bzr . Note that log files must be writable by
users, else bzr will error. Set BZR_LOG to /dev/null to disable logging.

** Timeouts

People sometimes have issues with bzr timeouts. There are two:

i) A Savannah specific one for anonymous connections. Implemented via
/usr/local/bin/bzr-timeout, this _unconditionally_ kills bzr processes
after 5hrs.

ii) An internal bzr smart server timeout. This is present since bzr
2.5, and kills connections from clients that are _idle_ for more than
a specified time. The default is 5mins, Savannah increases this to 1hr
(via bzr serve's --client-timeout option in /etc/xinetd.d/bzr-hpss and

** Loggerhead

The web-based browser for bzr repositories.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]