Bazaar

Bazaar

 




Wiki Tools

  • Login
  • Create Profile
  • Find Page
  • Recent Changes
  • Page History
  • Attachments

This page describes how to prepare the Bazaar Installer for the Mac OS X operating system.

Prerequisites

  • Mac OS X 10.5 (Leopard)
  • PackageMaker (User Guide)

  • Disk Utility
  • bdist_mpkg setuptools module (for Leopard support, you should use trunk)

Building single packages

1. PyCrypto

Version tested: 2.0.1

2. Paramiko

Version tested: 1.7.4

3. Bazaar

Version tested: 1.16.1

You also need Pyrex in order to compile some code to make Bazaar faster. (This is only a build dependency.)

4. Build process

NOTE: all setup.py files should be patched to import the setup function from setuptools instead of distutils.core.

Every package should be built the same way (issue the command in the root of the source trees):

python setup.py bdist_mpkg

This will generate a .mpkg file in the dist subdirectory of the source tree. This file is actually a directory that contains some metadata, and further package files (.pkg). You should copy those packages out of the .mpkg structure (you can either use the Terminal for that, or just control-click the .mpkg file in Finder, and select Show Package Contents). The package files are located in the Contents/Packages subdirectory.

PackageMaker project preferences

Distribution

  • Title: Bazaar VERSION (e.g. Bazaar 1.16.1)

  • User Sees: Easy and Custom Install

  • Install Destination: System volume

  • Description: Friendly distributed version control system

PyCrypto package

Choice

  • Choice Name: PyCrypto VERSION (py2.5-macosx10.5)

  • Identifier: pycrypto

  • Initial State: Selected, Enabled

  • Destination: (empty)

  • Tooltip: (empty)

  • Description: Crypto library for Python. Bazaar depends on it, so deselect this option only if you have it already installed on your machine.

Package

  • Install Package: (full path to the generated and extracted .pkg file)

  • Destination: /Library/Python/2.5/site-packages

  • Package Identifier: (generated automatically)

  • Package Version: VERSION

  • Restart Action: None

  • Require admin authentication: yes

On the Contents tab click on the Apply Recommendations button.

Paramiko package

Choice

  • Choice Name: Paramiko VERSION (py2.5-macosx10.5)

  • Identifier: paramiko

  • Initial state: Selected, Enabled

  • Destination: (empty)

  • Tooltip: (emtpy)

  • Description: SSH library for Python. It's recommended for Bazaar (it provides the ability to use Bazaar over the SSH and SFTP protocols).

Package

  • Install Package: (full path to the generated and extracted .pkg file)

  • Destination: /Library/Python/2.5/site-packages

  • Package Identifier: (generated automatically)

  • Package Version: VERSION

  • Restart Action: None

  • Require admin authentication: yes

On the Contents tab click on the Apply Recommendations button.

QBzr package

Choice

  • Choice Name: QBzr VERSION (py2.5-macosx10.5)

  • Identifier: qbzr

  • Initial state: Selected, Enabled

  • Destination: (empty)

  • Tooltip: (emtpy)

  • Description: A simple Qt cross-platform frontend for some Bazaar commands. You need the PyQt4 bindings for Mac in order to use these extra commands. PyQt4 is available from http://www.riverbankcomputing.co.uk/pyqt/

Package

  • Install Package: (full path to the generated and extracted .pkg file)

  • Destination: /Library/Python/2.5/site-packages

  • Package Identifier: (generated automatically)

  • Package Version: VERSION

  • Restart Action: None

  • Require admin authentication: yes

On the Contents tab click on the Apply Recommendations button.

BzrTools package

Choice

  • Choice Name: BzrTools plugin VERSION (py2.5-macosx10.5)

  • Identifier: bzrtools

  • Initial state: Selected, Enabled

  • Destination: (empty)

  • Tooltip: (emtpy)

  • Description: BzrTools is plugin providing a collection of utilities for Bazaar.

Package

  • Install Package: (full path to the generated and extracted .pkg file)

  • Destination: /Library/Python/2.5/site-packages

  • Package Identifier: (generated automatically)

  • Package Version: VERSION

  • Restart Action: None

  • Require admin authentication: yes

On the Contents tab click on the Apply Recommendations button.

Bazaar executable package

(Comes from the bzr-scripts-VERSION-py2.5-macosx10.5.pkg package.)

Choice

  • Choice Name: Bazaar executable VERSION (py2.5-macosx10.5)

  • Identifier: bzrexec

  • Initial state: Selected, Enabled, Hidden

  • Destination: (empty)

  • Tooltip: (emtpy)

  • Description: The Bazaar executable. It will be installed in your default path, so you just can call 'bzr' in the Terminal.

Package

  • Install Package: (full path to the generated and extracted .pkg file)

  • Destination: /usr/local/bin

  • Package Identifier: (generated automatically)

  • Package Version: VERSION

  • Restart Action: None

  • Require admin authentication: yes

On the Contents tab click on the Apply Recommendations button.

Bazaar library package

(Comes from the bzr-platlib-VERSION-py2.5-macosx10.5.pkg package.)

Choice

  • Choice Name: Bazaar library VERSION (py2.5-macosx10.5)

  • Identifier: bzrlib

  • Initial state: Selected, Enabled, Hidden

  • Destination: (empty)

  • Tooltip: (emtpy)

  • Description: The core Bazaar library. You need this in order to use Bazaar's functionality.

Package

  • Install Package: (full path to the generated and extracted .pkg file)

  • Destination: /Library/Python/2.5/site-packages

  • Package Identifier: (generated automatically)

  • Package Version: VERSION

  • Restart Action: None

  • Require admin authentication: yes

On the Contents tab click on the Apply Recommendations button.

Other plugin packages should have the same settings applied as BzrTools or QBzr.

After package setup

Click on Build and Run to test the installer. You shouldn't get any warnings during the build. Click through the installer, and run the Bazaar test suite from Terminal:

$ /usr/local/bin/bzr selftest

Running the test suite this way is really slow. The recommended command is (which is just slightly faster):

$ /usr/local/bin/bzr selftest --no-plugins --parallel=subprocess

You need lp:subunit, and lp:testtools to be able to run it (subunit depends on check, which you can install from MacPorts for example).

Build script

There is a script to ease the build of the 10.4 installer components. The branch can be found here: http://verterok.com.ar/code/bundle-10.4

David Strauss's notes from building 1.16

  • Files of types .mpkg and .pkg cannot contain spaces in the their names.
  • Require no logout, restart, or shutdown for any package.
  • Require the easy installer (for now).
  • Use trunk for Looms.
  • Use the branch of Extmerge with a bundled setup.py file.
  • Set install destinations. (TODO: explicitly list here)