Ravenbrook / Projects / Perforce Defect Tracking Integration / Version 1.1 Product Sources / Procedures

Perforce Defect Tracking Integration Project


Perforce Defect Tracking Integration Release Build Procedure

Gareth Rees, Ravenbrook Limited, 2000-10-17

1. Introduction

This is the procedure for building a release of the Perforce Defect Tracking Integration from the version sources.

The readership of this document is anyone developing the integration.

This document is not confidential.

All pathnames here are relative to "//info.ravenbrook.com/project/p4dti/".

If you're using cygwin to run the p4 commands, remember to

alias p4='p4 -d "`cygpath -w \"$PWD\"`"'

or put this in your .bashrc.

This procedure is expensive. Do not start it until you are sure that the product is ready for release. Always smoke-test the product before you start to build a release.

2. Procedure

2.1. Setting up for release

2.1.1. Choose a release name of the form "VERSION.N" (for example, 0.3.0). VERSION is the number of the version you're releasing. N is the first unused release number (starting at zero). Look in the index of releases (release/index.html) for existing release numbers for your version.

2.1.2. Determine the changelevel at which you're going to make the release. This should be the current changelevel; use p4 counter change to get it.

2.1.3. Ensure that the "version/VERSION/readme.txt" file an up-to-date description of the release you intend to build and contains the correct release name.

Ensure that the "version/VERSION/release-notes.txt" file has the correct release name and a summary of changes and new features for this release.

The summary of changes and new features should be based on the list of jobs fixed to "closed" between the last release and this one. The issue CGI script can produce this list if you visit the following URL:

http://info.ravenbrook.com/project/p4dti/issue/?action=fixed_at_changelevel&version=VERSION&changelevel=CHANGELEVEL

(Here CHANGELEVEL is the changelevel you determined at step 2.1.2.)

2.1.4. Ensure that the RPM spec file at "version/VERSION/packaging/linux/p4dti.spec" has an up-to-date description of the software and the correct release number as its "Version" field. Re-use text from the "readme.txt" file if possible.

Make sure to check in the readme.txt, release-notes.txt and p4dti.spec before you continue.

2.1.5. Sync the version sources to the changelevel you determined in step 2.1.4. Sync the version sources to a clean area of the disk, to be sure that there are no extraneous files around.

p4 sync version/VERSION/...#none
rm -rf version/VERSION
p4 sync version/VERSION/...@CHANGELEVEL

2.1.6. Branch the readme.txt and release-notes.txt files from the version sources to the "release/RELEASE" directory. Submit them to Perforce with a description like "Branching readme and release-notes for release RELEASE.".

p4 integrate version/VERSION/readme.txt release/RELEASE/readme.txt
p4 integrate version/VERSION/release-notes.txt release/RELEASE/release-notes.txt p4 submit

2.2. Making the Integration Kit

2.2.1. Create a tar archive of the version sources.

cp -pr version/VERSION p4dti-kit-RELEASE
tar cf - p4dti-kit-RELEASE | gzip -c > release/RELEASE/p4dti-kit-RELEASE.tar.gz
rm -rf p4dti-kit-RELEASE

2.2.2. Create a ZIP archive of the version sources, following these steps:

  1. Make a copy of the version directory called p4dti-kit-RELEASE inside an otherwise empty directory.
  2. Create a WinZip archive called release/RELEASE/p4dti-kit-RELEASE.zip.
  3. Navigate the WinZip "add" dialog so that you're looking at the p4dti-kit-RELEASE directory and press "Add with wildcards". This should produce a ZIP archive which will unpack to a single directory called p4dti-kit-RELEASE containing a copy of the version sources.
  4. Delete the copy.

2.2.3. Add the tar and ZIP archives to Perforce, and submit with a description like "Adding the Integration Kit for release RELEASE.".

2.3. Making the TeamTrack release

2.3.1. To build the TeamTrack modules: Run Microsoft Visual C++ 6.0. Select File → Open Workspace. Select version/VERSION/code/p4dti.dsw. Check that all four projects ("teamtrack45", "teamtrack50", "tsapi45" and "tsapi50") are using the "Win32 Release" configurations (right click on the project; select Set As Active Project; click on the Build menu; select Set Active Configuration; select Win32 Release). Make "teamtrack45" the active project (right click on the project; click on the Build menu; select Set As Active Project). Click on the Build menu; select Rebuild all. Now do the same for "teamtrack50".

2.3.2. Delete files and directories that shouldn't be included in the product (this is the only way I know of to make sure that WinZip won't include empty directories in the archive):

p4 sync version/VERSION/manual/ig/...#none
p4 sync version/VERSION/manual/mg/...#none
rm -rf version/VERSION/manual/{ig,mg}

2.3.3. Launch WinZip and create a new archive called "p4dti-teamtrack-RELEASE.zip" in the directory "release/RELEASE". Add the files listed below. Be sure _not_ to store full paths in WinZip (an option in the "Add" dialog).

Add the manuals with partial path names, by selecting

then turn on the "Include subfolders" option, then select "Add with wildcards". Make sure *not* to include these files:

2.3.4. Make a self-extracting archive called "p4dti-teamtrack-RELEASE.exe" from "p4dti-teamtrack-0.3.0.zip" (in the same directory), by selcting Actions -> Make .EXE File. Specify the default "unzip to" folder as "C:\Program Files\P4DTI".

2.3.5. Add the self-extracting archive to Perforce. Submit with a description like "Adding the TeamTrack integration for release RELEASE.".

p4 add release/RELEASE/p4dti-teamtrack-RELEASE.exe
p4 submit

2.4. Making the Bugzilla release

2.4.1. Making the Unix tarball

Create a tarball containing the replicator Python code and the manuals.

mkdir p4dti-bugzilla-RELEASE
cp version/VERSION/readme.txt p4dti-bugzilla-RELEASE
cp version/VERSION/release-notes.txt p4dti-bugzilla-RELEASE
cp version/VERSION/license.txt p4dti-bugzilla-RELEASE
cp version/VERSION/code/replicator/*.py p4dti-bugzilla-RELEASE
cp -r version/VERSION/manual/ag p4dti-bugzilla-RELEASE
cp -r version/VERSION/manual/ug p4dti-bugzilla-RELEASE
cp -r version/VERSION/packaging/linux/startup-script p4dti-bugzilla-RELEASE
( cd version/VERSION/code/bugzilla-2.10 && diff -r -u ../../../../import/2000-05-09/bugzilla-2.10/bugzilla-2.10 . ) > p4dti-bugzilla-RELEASE/bugzilla-2.10-patch
( cd version/VERSION/code/bugzilla-2.12 && diff -r -u ../../../../import/2001-04-27/bugzilla-2.12/bugzilla-2_12 . ) > p4dti-bugzilla-RELEASE/bugzilla-2.12-patch
tar cf - p4dti-bugzilla-RELEASE | gzip -c > release/RELEASE/p4dti-bugzilla-RELEASE.tar.gz
rm -r p4dti-bugzilla-RELEASE

Add the tarball to Perforce. Submit with a description like "Adding the Bugzilla integration tarball for release RELEASE.".

p4 add release/RELEASE/p4dti-bugzilla-RELEASE.tar.gz
p4 submit

2.4.2. Making the Linux RPM

Create an RPM containing the distribution.

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

Add the RPM to Perforce. Submit with a description like "Adding the Bugzilla integration RPM for release RELEASE.".

p4 add release/RELEASE/p4dti-RELEASE-1.i386.rpm
p4 submit

2.5. Making the manuals

2.5.1. Branch the Administrator's Guide, User's Guide, and Integrator's Guide to the release.

p4 sync version/VERSION/manual/...@CHANGELEVEL
p4 integ version/VERSION/manual/ag/... release/RELEASE/ag/...
p4 integ version/VERSION/manual/ug/... release/RELEASE/ug/...
p4 integ version/VERSION/manual/ig/... release/RELEASE/ig/...

2.5.2. Submit with a description like "Adding the manuals for release RELEASE.".

p4 submit

2.6. Registering the release

2.6.1. Edit the index of releases (release/index.html) and add the release to the table, in a manner consistent with previous releases.

2.6.2. Edit the index of versions (version/index.html) and add the release to the list of releases for VERSION, in a manner consistent with previous releases.

2.6.3. Edit the //info.ravenbrook.com/infosys/cgi/issue.cgi script to add the release changelevel to the releases table, so that the correct set of known and fixed issues can be derived.

2.6.4. Submit these changes with the comment "Made release RELEASE."

2.6.5. Inform the project manager by e-mail.

A. References

[GDR 2000-10-16] "Re: P4DTI release build and installation" (e-mail message); Gareth Rees; Ravenbrook Limited; 2000-10-16.
[GDR 2000-10-17b] "Build report for release 0.3.1"; Gareth Rees; Ravenbrook Limited; 2000-10-17.
[RB 2000-10-13] "P4DTI release build and installation" (e-mail message); Richard Brooksby; Ravenbrook Limited; 2000-10-13.
[RB 2000-11-17] "Using Perforce labels for releases" (e-mail message); Richard Brooksby; Ravenbrook Limited; 2000-11-17.

B. Document History

2000-10-17 RB Created based on e-mail procedure [RB 2000-10-13].
2000-10-17 GDR Added corrections from [GDR 2000-10-16] and [GDR 2000-10-17b].
2000-10-19 RB Added steps for handing the readme.txt. Changed bullets to numbers in the procedure. Corrected the order of the "label" and "sync" steps.
2000-11-17 RB Discontinued use of Perforce labels in favour of changelists. See [RB 2000-11-17].
2000-12-01 RB Updated references to the "SAG" to "AG" since it's now called the Administrator's Guide.
2000-12-05 GDR Reorganized into sections and added Bugzilla section. Updated for version 0.4: use release configuration for teamtrack.dll; don't include debugging or AppleWorks files. Explained how to get the lists of known defects, changes and new features. Listed the files that one would expect to have on submit so you can check that you've done everything.
2000-12-07 GDR Added reference to known_issues.py script.
2000-12-08 GDR Added more detail about Microsoft Visual C++. Added instruction to check in readme.txt before continuing.
2000-12-12 RB Converted from plain text to HTML.
2000-12-13 RB Updated reference to known_issues.py to refer to the tool for the specific version. Fixing "mailto" URLs in history.
2000-12-15 RB Changed install directory for Bugzilla from "p4dti" to "p4dti-bugzilla-RELEASE" to bring into line with Unix convention.
2001-02-13 GDR Include readme.txt in product sources. Don't check in the zip file (people download it needlessly).
2001-02-14 RB Added copying of startup script to tarball so that it can be installed by the Linux RPM. Added RPM creation procedure.
2001-02-15 RB Removed the Manager's Guide and the Integrator's Guide from the normal distribution. The Manager's Guide is empty, and the Integrator's Guide should only come with the integration kit.
2001-02-19 GDR The instructions for bulding the lists of known and fixed issues use the new known_issues.py command line format.
2001-02-21 GDR Added instructions to branch the manuals into release/RELEASE/....
2001-02-22 GDR Added instructions for handling the release-notes.txt file.
2001-02-23 GDR Include p4dti.reg in TeamTrack release.
2001-02-27 GDR Delete IG and MG directories so they don't appear in the zip archive.
2001-03-02 RB Transferred copyright to Perforce under their license. Added steps for copying the license.txt file to the distribution.
2001-03-06 GDR No longer put known issues in the release notes.
2001-03-20 GDR Put the changelevel in the issue CGI script so known issue reports can be made.
2001-03-26 RB Moved Linux RPM files from tool/rpm to packaging/linux.
2001-03-27 RB Added Integration Kit build instructions.
2001-03-29 RB Added Integrator's Guide to the set of manuals included in the release directory.
2001-04-10 RB Corrected procedure to submit at different stages, because the different integrations are built on different machines under different Perforce clients. Broke out manual branching into its own section. Moved editing of issue.cgi script to the same point as registering the release in the other indexes. Added precondition that the code must be smoke-tested.
2001-04-11 RB Added warning about known_issues.py script generating wrong results between version branches.
2001-05-04 GDR Use the issue CGI script to get a list of issues newly fixed in the release.
2001-05-24 NB Updated for Bugzilla 2.12.
2001-07-03 GDR Now we have to build two TeamTrack modules.

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/branch/2001-05-17/teamtrack-5/procedure/release-build/index.html#3 $

Ravenbrook / Projects / Perforce Defect Tracking Integration / Version 1.1 Product Sources / Procedures