Ravenbrook / Projects / Perforce Defect Tracking Integration / Version 1.5 Product Sources / Design

Perforce Defect Tracking Integration Project


Build automation design

Gareth Rees, Ravenbrook Limited, 2001-07-13

1. Introduction

This document describes the design of the automated build support for the P4DTI.

The purpose of this document is to make it possible for people to maintain and adapt the build system. The build system is designed to help people make P4DTI releases of high quality at a low cost.

The readership of this document is the product developers.

This document is not confidential.

2. Design overview

2.1. History

The automated build system replaces a completely manual build system (see for example [GDR 2001-10-17a]) that became unwieldy as more build targets were added and as the complexity of the build process increased. The change that really required automatic support for the build process was the fix for job000331. This meant that manuals and other documents had to be processed before becoming part of the release, which meant that the products could no longer be built directly from the version sources in the Perforce repository.

2.2. Products

The release build procedure [GDR 2000-10-17b] produces the products in the following table:

Table 1. Build products.

This table lists the P4DTI build products. The "target" column gives the build target which generates the products. The "product" column gives the filename (relative to //info.ravenbrook.com/project/p4dti/release/RELEASE/).
Target Product Notes See
bugzilla p4dti-bugzilla-RELEASE.tar.gz Bugzilla integration (gzipped tar archive: any supported Unix platform). 3.1
p4dti-RELEASE-1.i386.rpm Bugzilla integration (RPM package: RedHat Linux only). 3.2
teamtrack p4dti-teamtrack-RELEASE.zip TeamTrack integration (ZIP archive). 3.3
p4dti-teamtrack-RELEASE.exe TeamTrack integration (self-extracting archive). 3.4
kit p4dti-kit-RELEASE.tar.gz Integration kit (gzipped tar archive). 3.5
p4dti-kit-RELEASE.zip Integration kit (ZIP archive). 3.6
manuals readme.txt Installation instructions. 3.7
release-notes.txt Supported platforms, fixed defects, other release notes.
ag/... Copy of Administrator's Guide.
ug/... Copy of User's Guide.
ig/... Copy of Integrator's Guide
aag/... Copy of Advanced Administrator's Guide.

2.3. Running the build tool

Make sure your version sources are up to date by completing and submitting any work in progress and syncing //info.ravenbrook.com/project/p4dti/version/VERSION/.... Then go to the tool/ subdirectory and run:

python build.py OPTIONS

where the options are as follows:

-r, --release The release you want to build (for example, "1.2.3"). You must supply this option.
-c, --changelevel The changelevel from which you want to build the release (for example, "12345"). If you don't supply this option, the build script will use the current changelevel given by p4 counter change.
-t, --target The target you want to build; see the "Target" column in table 1. Specify multiple -t options if you want to build multiple targets.

For example, to build the Bugzilla integration and the online manuals for release 1.1.2 from the version 1.1 sources at changelevel 13579, run the command:

python build.py -r 1.1.2 -c 13579 -t bugzilla -t manuals

3. Product contents

3.1. Bugzilla tarball

The Bugzilla tarball must unpack into a directory called p4dti-bugzilla-RELEASE. It contains:

  1. readme.txt, release-notes.txt and licence.txt.

  2. The replicator sources: code/replicator/*.py. The configuration file config.py must be edited so that it specifies dt_name = "Bugzilla" rather than dt_name = "TeamTrack".

  3. The Administrator's Guide, the User's Guide, and the Advanced Administrator's Guide, with URLs converted appropriately (meaning that they refer to each other with relative links but refer to other files with links starting http://www.ravenbrook.com/).

  4. The Bugzilla start/stop script: packaging/linux/startup-script.

  5. A patch for Bugzilla 2.10 called bugzilla-2.10-patch, generated by

    ( BEFORE=`p4 where //info.ravenbrook.com/project/p4dti/import/2000-05-09/bugzilla-2.10/bugzilla-2.10 | cut -d ' ' -f 3`
      AFTER=`p4 where //info.ravenbrook.com/project/p4dti/version/VERSION/code/bugzilla-2.10 | cut -d ' ' -f 3`
      cd $AFTER &&
      diff -r -u $BEFORE . )
    
  6. A patch for Bugzilla 2.12 called bugzilla-2.12-patch, generated by

    ( BEFORE=`p4 where //info.ravenbrook.com/project/p4dti/import/2001-04-27/bugzilla-2.12/bugzilla-2_12 | cut -d ' ' -f 3`
      AFTER=`p4 where //info.ravenbrook.com/project/p4dti/version/VERSION/code/bugzilla-2.12 | cut -d ' ' -f 3`
      cd $AFTER &&
      diff -r -u $BEFORE . )
    
  7. A patch for Bugzilla 2.14 called bugzilla-2.14-patch, generated by

    ( BEFORE=`p4 where //info.ravenbrook.com/project/p4dti/import/2001-08-29/bugzilla-2.14/bugzilla-2.14 | cut -d ' ' -f 3`
      AFTER=`p4 where //info.ravenbrook.com/project/p4dti/version/VERSION/code/bugzilla-2.14 | cut -d ' ' -f 3`
      cd $AFTER &&
      diff -r -u $BEFORE . )
    
  8. A patch for Bugzilla 2.14.1 called bugzilla-2.14.1-patch, generated by

    ( BEFORE=`p4 where //info.ravenbrook.com/project/p4dti/import/2002-01-05/bugzilla-2.14.1/bugzilla-2.14.1 | cut -d ' ' -f 3`
      AFTER=`p4 where //info.ravenbrook.com/project/p4dti/version/VERSION/code/bugzilla-2.14.1 | cut -d ' ' -f 3`
      cd $AFTER &&
      diff -r -u $BEFORE . )
    
  9. A patch for Bugzilla 2.14.2 called bugzilla-2.14.2-patch, generated by

    ( BEFORE=`p4 where //info.ravenbrook.com/project/p4dti/import/2002-06-07/bugzilla-2.14.2/bugzilla-2.14.2 | cut -d ' ' -f 3`
      AFTER=`p4 where //info.ravenbrook.com/project/p4dti/version/VERSION/code/bugzilla-2.14.2 | cut -d ' ' -f 3`
      cd $AFTER &&
      diff -r -u $BEFORE . )
    
  10. A patch for Bugzilla 2.14.3 called bugzilla-2.14.3-patch, generated by

    ( BEFORE=`p4 where //info.ravenbrook.com/project/p4dti/import/2002-07-28/bugzilla-2.14.3/bugzilla-2.14.3 | cut -d ' ' -f 3`
      AFTER=`p4 where //info.ravenbrook.com/project/p4dti/version/VERSION/code/bugzilla-2.14.3 | cut -d ' ' -f 3`
      cd $AFTER &&
      diff -r -u $BEFORE . )
    
  11. A patch for Bugzilla 2.14.4 called bugzilla-2.14.4-patch, generated by

    ( BEFORE=`p4 where //info.ravenbrook.com/project/p4dti/import/2002-09-30/bugzilla-2.14.4/bugzilla-2.14.4 | cut -d ' ' -f 3`
      AFTER=`p4 where //info.ravenbrook.com/project/p4dti/version/VERSION/code/bugzilla-2.14.4 | cut -d ' ' -f 3`
      cd $AFTER &&
      diff -r -u $BEFORE . )
    
  12. A patch for Bugzilla 2.16 called bugzilla-2.16-patch, generated by

    ( BEFORE=`p4 where //info.ravenbrook.com/project/p4dti/import/2002-07-28/bugzilla-2.16/bugzilla-2.16 | cut -d ' ' -f 3`
      AFTER=`p4 where //info.ravenbrook.com/project/p4dti/version/VERSION/code/bugzilla-2.16 | cut -d ' ' -f 3`
      cd $AFTER &&
      diff -r -u $BEFORE . )
    
  13. A patch for Bugzilla 2.16.1 called bugzilla-2.16.1-patch, generated by

    ( BEFORE=`p4 where //info.ravenbrook.com/project/p4dti/import/2002-09-30/bugzilla-2.16.1/bugzilla-2.16.1 | cut -d ' ' -f 3`
      AFTER=`p4 where //info.ravenbrook.com/project/p4dti/version/VERSION/code/bugzilla-2.16.1 | cut -d ' ' -f 3`
      cd $AFTER &&
      diff -r -u $BEFORE . )
    

3.2. Bugzilla RPM

The Bugzilla RPM is described in detail in [FJMD 2001-02-13].

It must be built from the Bugzilla tarball (section 3.1 using the commands

echo "%_topdir $HOME/rpm" > $HOME/.rpmmacros
mkdir -p $HOME/rpm/{BUILD,SRPMS,RPMS/i386,SOURCES}
cp release/RELEASE/p4dti-bugzilla-RELEASE.tar.gz $HOME/rpm/SOURCES
rpm --define "packager YOUR-EMAIL" -ba version/VERSION/packaging/linux/p4dti.spec
cp $HOME/rpm/RPMS/i386/p4dti-RELEASE-1.i386.rpm release/RELEASE

3.3. TeamTrack ZIP archive

The TeamTrack ZIP archive must unpack into a directory called p4dti-RELEASE. It contains:

  1. readme.txt, release-notes.txt and licence.txt.

  2. The replicator sources: code/replicator/*.py.

  3. The TeamTrack 4.5 interface: code/replicator/teamtrack45.pyd, built using Microsoft Visual C++.

  4. The TeamTrack 5.0 interface: code/replicator/teamtrack50.pyd, built using Microsoft Visual C++.

  5. The Windows Registry key file: code/replicator/p4dti.reg.

  6. The Administrator's Guide, the User's Guide, and the Advanced Administrator's Guide, with URLs converted appropriately (meaning that they refer to each other with relative links but refer to other files with links starting http://www.ravenbrook.com/).

  7. The event message file for Windows event logging: code/replicator/eventlog.dll, built using the Microsoft message compiler and Microsoft Visual C++. See [GDR 2001-09-12].

3.4. TeamTrack self-extracting archive

The TeamTrack self-extracting archive must unpack by default into the directory called C:\Program Files\p4dti-teamtrack-RELEASE. It contains the same contents as the TeamTrack ZIP archive (section 3.3).

3.5. Integration kit tarball

The Integration kit tarball must unpack into a directory called p4dti-kit-RELEASE. It must contain all files in the version sources, with URLs converted appropriately in XHTML documents (meaning that they refer to other documents in the integration kit with relative links but refer to documents not in the kit with links starting http://www.ravenbrook.com/). Non-binary files should have Unix-style line endings (LF).

3.6. Integration kit ZIP archive

Same as the integration kit tarball (section 3.5), different archiver, with Windows-style line endings (CR, LF).

3.7. Online copies of the manuals

The URLs in the Administrator's Guide, the Integrator's Guide, the User's Guide, and the Advanced Administrator's Guide must be converted appropriately (meaning that they refer to each other with relative links but refer to other files with links starting http://www.ravenbrook.com/).

A. References

[FJMD 2001-02-13] "Building rpms for p4dti"; Francis Davey; Ravenbrook Limited; 2001-02-13.
[GDR 2000-10-17a] "Release Build Procedure (Version 1.0)"; Gareth Rees; Ravenbrook Limited; 2000-10-17.
[GDR 2000-10-17b] "Release Build Procedure"; Gareth Rees; Ravenbrook Limited; 2000-10-17.
[GDR 2001-09-12] "Using the Windows event log"; Gareth Rees; Ravenbrook Limited; 2001-09-12.

B. Document History

2001-07-13 GDR Created.
2001-07-18 GDR The TeamTrack integration unpacks into a directory called P4DTI-RELEASE, as it says in the readme. Include p4dti.reg in TeamTrack integration. Corrected name of RPM.
2001-09-03 NB Added Bugzilla 2.14.
2001-09-12 GDR TeamTrack releases contain an event message file.
2001-09-26 GDR Noted need to edit config.py when building Bugzilla integration (see job000360).
2001-11-14 GDR Noted the inclusion of the Advanced Administrator's Guide.
2002-01-31 NB Added Bugzilla 2.14.1.
2002-07-19 NB Added notes about line endings for kit archives.

This document is copyright © 2001 Perforce Software, Inc. All rights reserved.

Redistribution and use of this document in any form, with or without modification, is permitted provided that redistributions of this document retain the above copyright notice, this condition and the following disclaimer.

This document is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright holders and contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this document, even if advised of the possibility of such damage.

$Id: //info.ravenbrook.com/project/p4dti/version/1.5/design/build/index.html#4 $

Ravenbrook / Projects / Perforce Defect Tracking Integration / Version 1.5 Product Sources / Design