Bazaar Deployment

The aim of this page is to document how the GNOME Bazaar infrastructure may look, in as much detail as possible. For simplicity, the machine that hosts the repositories will be referred to as door.

Conversion

The Subversion conversion will be done using bzr-svn, and at the time of writing, bzr was at version 1.8, and bzr-svn was 0.4.13. The final conversion will be done using bzr-svn 0.5 and the latest stable bzr release.

The latest stable bazaar repository format (with wide availability) will be used.

svn-archive won't be converted.

gnomemm will need to be split into seperate modules. Surgery will be required due to the previous restructuring the module has undergone.

Other modules that may need specific attention are:

  • seahorse-plugins
  • banshee

Ideally use of svn:externals would be removed, but external svn revisions would be merged in to our Bazaar repositories in a way that would allow maintainers to merge new upstream versions into their repositories, using Bazaar subtrees.

The conversion will be tested extensively.

  • Can we visit each revision / full text?
  • Do the tips of each branch match the tips of each branch in svn?
  • What happens in the "svn mv /branches/foo /trunk" case?

Project branches

Initially the project branches will be read only. They will be imported using bzr-svn into the /bzr/gnome directory, where each module will have its own directory. For example, gedit would be at '/bzr/gnome/gedit'. Each module will have its own shared repository in that directory. bzr-svn will create a branch for trunk and all subversion branches. Subversion tags will be mapped to Bazaar tags.

A truncated example is shown here for gedit.

/bzr/gnome/gedit <- shared repository
/bzr/gnome/gedit/trunk <- the main branch
/bzr/gnome/gedit/branches/gnome-2-20
/bzr/gnome/gedit/branches/gnome-2-22
... (and many other branches)

All the branches in the /bzr/gnome area will be owned by the user bzrgnome. This is the user that runs the imports.

The conversion will run continuously. There will be a user called "bzrgnome" on door that is subscribed to the gnome commit email list. The import script (mirror.py) will read the emails from ~/Maildir/new and parses them to detect the gnome module. Once the emails have been processed, they will be moved to ~/Maildir/cur and will eventually be deleted. The script will be run with nohup.

When a project fully switches over, this will just be turned off and the branches will be made read/write.

User branches

Any user with a valid GNOME SSH account will be able to push branches to door to a location under /bzr. While it is possible for the user to call the branch anything, it is suggested that the users use their login id as the directory under /bzr where they put their own branches.

FIXME: Can we somehow move this helper script server side with a plugin on the server? http://svn.gnome.org/svn/vcs-mirror/trunk/contrib/bzr-gnome-setup.py

The directory /bzr will have group rights to allow members of the gnome group to create directories. All the users that log in with SSH keys will be members of the gnome group, and so can create their branches there.

FIXME: Automatic branch stacking, ala launchpad?

Repository Access

The server bazaar process will only support the new streaming API, VFS writes will be disallowed. SFTP access will not be allowed.

If the git serving capabilites of bazaar are mature enough, git:// and git+ssh:// access will be permitted.

Bazaar will be configured in append-only mode so that history cannot be removed or corrupted.

Initially branch removal will be disabled.

Hooks

pre-commit

  • Ensure MAINTAINERS file is valid, and that PO files are valid. This check will only be done on the tip revision of an incoming bundle.

post-commit

  • E-mail to svn-commits-list.
  • E-mail to progress (for pot files)
  • E-mail to cia.vc
  • E-mail to library.gnome.org?

FIXME: Which revisions do these things care about? All revisions?

Websites

*.gnome.org, etc

The gnomeweb update cronjob will be modified to perform lightweight bzr checkouts instead of svn checkouts.

damned lies

The damned lies application already supports Bazaar and will be configured to use Bazaar instead of Subversion.

source.gnome.org

See lp:~thumper/loggerhead/gnome-loggerhead. For browsing and searching GNOME projects online, a GNOME themed loggerhead will be used. This branch will be deployed on the server at '/srv/gnome-loggerhead'.

Loggerhead will be started with the following command line:

  ./serve-branches --user-dirs --trunk-dir=gnome /bzr

from the '/srv/gnome-loggerhead' directory.

The '--user-dirs' tells loggerhead to use '~user' in the urls, and the '--trunk-dir=gnome' tells loggerhead to use directories in the gnome directory as primary module names.

Apache will be used as a front end to loggerhead. Static pages will be used for the projects and user lists. The projects page will be categorised along the lines of Bugzilla - Desktop, Platform, Web/Infrastructure, Bindings, Misc. The files will be at /srv/bzr.gnome.org.

The Apache configuration will be based on the playground configuration:

NameVirtualHost a.b.c.d:80

<VirtualHost a.b.c.d:80>
  ServerName bzr-playground.gnome.org
  ServerAlias bzr-gnome.canonical.com
  CustomLog /var/log/apache2/bzr-playground.gnome.org.access-log combined
  ErrorLog  /var/log/apache2/bzr-playground.gnome.org.error-log

  ProxyRequests off
  ProxyTimeout  20
  <Proxy *>
    Order deny,allow
    Allow from localhost a.b.c.d
  </Proxy>


  <Directory /srv/bzr.gnome.org/>
    Options Indexes FollowSymLinks MultiViews +Includes
    XBitHack on
    AllowOverride None
    Order allow,deny
    allow from all
  </Directory>

  RewriteEngine On

  # .bzr access for /~foo goes to /srv/bzr/foo
  RewriteRule ^/~(.*)/.bzr(|/.*)$ /srv/bzr/$1/.bzr$2 [L]
  # .bzr access for /gnome/foo goes to /srv/bzr/gnome/foo
  RewriteRule ^/gnome/(.*)/.bzr(|/.*)$ /srv/bzr/gnome/$1/.bzr$2 [L]
  # .bzr access for /foo also goes to /srv/bzr/gnome/foo
  RewriteRule ^/(.*)/.bzr(|/.*)$ /srv/bzr/gnome/$1/.bzr$2 [L]

  # Static pages.
  # I think if we moved the document root to be /srv/bzr.gnome.org,
  # and move the robots.txt there, we could simplify some of the following rules.
  RewriteRule ^/robots.txt$ /srv/bzr/robots.txt [L]
  RewriteRule ^/$ /srv/bzr.gnome.org/index.html [L]
  RewriteRule ^/users.html$ /srv/bzr.gnome.org/users.html [L]
  RewriteRule ^/fixed/(.*)$ /srv/bzr.gnome.org/fixed/$1 [L]

  # Redirect any older "gnome" roots to the same without the gnome.
  RewriteRule ^/gnome/(.*)$ /$1 [R]

  # Damned lies is special.
  RewriteRule ^/admin/damned-lies(|/.*)$       /srv/damnlies/$1 [L]

  # Loggerhead proxies.
  RewriteRule ^/(.*)$ http://localhost:8080/$1 [L,P]

</VirtualHost>

Development and Release Tools

Bazaar gnome plugin

This plugin allows shorthand branch names such as gnome:project/branch.

JHBuild

SVN support will be enhanced so tags and branches can be recorded properly. Modulesets will be cleaned up for all svn.gnome.org hosted projects (currently some projects overload the module="" and revision="" attributes and this will stop easy switch over).

A branch of jhbuild will be maintained with the new host information entered, at release this can be merged into trunk.

Documentation

The follow documentation will be updated with Bazaar instructions:

http://live.gnome.org/Subversion seems to duplicate, and will be folded into the a single guide.

Some of the generic information on http://live.gnome.org/SubversionFAQ would be relevant in the main guide. A new FAQ at /Bazaar/FAQ would also be needed.

We will have notes on using the following Bazaar plugins, contributing back upstream where relevant:

  • bzrtools
  • shelf
  • bisect
  • grep
  • interactive commit
  • loom
  • search

JohnCarr/Bazaar/Infrastructure (last edited 2009-01-05 17:16:00 by JohnCarr)