From: Tom Yu Date: Fri, 30 Mar 2007 20:53:35 +0000 (+0000) Subject: pull up r19294 from trunk X-Git-Tag: kfw-3.2.0-beta1~26 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=18b1a56acd036e6a4c320c1975651f00fa1888ba;p=krb5.git pull up r19294 from trunk r19294@cathode-dark-space: kpkoch | 2007-03-27 14:42:51 -0400 Target_Version: 1.6.1 Ticket: 5490 Tags: pullup Update documentation. ticket: 5490 git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-6@19352 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/windows/build/bkw-automation.html b/src/windows/build/bkw-automation.html index f018b348b..eb41053c5 100644 --- a/src/windows/build/bkw-automation.html +++ b/src/windows/build/bkw-automation.html @@ -10,218 +10,286 @@ -
- - +
+
The + Kerberos For Windows build is being automated. This description consists of +
+ +

Build steps

+

Building the complete KfW product consists of these steps:

+
    +
  • + Setting up the environment +
  • + Fetching sources from repositories +
  • + Building the sources with nmake +
  • + Setting up the packaging environment +
  • + Building the two installers -- a msi installer and an exe installer +
  • + Building other distribution components +
      +
    • + KfW source distribution +
    • + KfW core binaries +
    • + KfW SDK +
    • + Microsoft redistributable components +
    • + Individual files: release notes, Leash user guide, MSI Deployment Guide. +
    • +
    +
  • +
+

Script structure

+

The build is a perl script controlled by command line switches and an XML + configuration file. The config file is required. Settings in the config file + can be overridden by optional command line switches.

+

The main steps in the script are

+
    +
  • + Setting up the environment +
  • + Fetching the sources from repositories +
  • + Building the sources +
  • + Setting up the packaging environment +
  • + Building the msi with the package nmake +
  • + Building the rest of the components +
  • +
+

The usage message shows the available switches:

+

C:\Projects\KfW>perl bkw.pl /?
+ Usage: bkw.pl (-f --config) config-file [options] NMAKE-options

+

Options are case insensitive.

+

Options:
+ /help /? usage information (what you now see)
+ /srcdir dir   Source directory to use. Should contain
+               + pismere/athena. If cvstag or svntag is null,
+               + the directory should be prepopulated.
+ /cvstag tag   \ For whichever of these tags is specified,
+ /svntag url   / a checkout will be done into srcdir
+ /debug        Do debug make instead of + release make
+ /outdir dir   Directory to be created where build results will go
+ /nomake       Skip make step
+ /nopackage    Skip packaging step
+ /clean        Build clean target
+ /verbose      Debug mode - verbose output
+ /vverbose     very verbose output
+ /config path  Path to config file
+ /logfile path Where to write output. If omitted, ...
+ /srcdir dir   Source directory to use. Should contain +
+              
pismere/athena. + If cvstag or svntag is null, +
+               + the directory should be prepopulated. +
+
/outdir dir   Directory to be created where build results will + go +
+ /repository checkout | co \ What repository action to take. +
+            
update   + | up | Options are to checkout, update or
+             skip          + / take no action [skip]. +
+ /cvstag tag   \ For whichever of these tags is specified, +
+
/svntag url   / the repository action will be done into srcdir +
+ /debug        Do debug make instead of + release make +
+ /nomake       Skip make step +
+ /nopackage    Skip packaging step +
+ /clean        Build clean target +
+ /verbose      Debug mode - verbose output +
+ /config path  Path to config file +
+ /logfile path Where to write output. If omitted, ...
+
Other:
+ NMAKE-options any options you want to pass to NMAKE, which can be:
+ (note: /nologo is always used)
+ [ nmake options follow ]

+

Additional controls, not available from the command line:

+

<CVSROOT name=":kserver:cvs.mit.edu:/cvs/pismere" />
+ <SVNURL name="" />
+ <CopyList><Config><DebugArea value="dbg" />
+                   + <ReleaseArea value="rel" />
+                   <AlwaysTag + value="%bldtype%" />
+                   + <DebugTag value="%debug%" />
+                   + <ReleaseTag value="%release%" />
+                   + <Files><Include path="copyfiles.xml" />

+

The pre-package steps gathers up build results and puts them in + a target area.  "target" is hardwired in the + build script.

+

The post-package step zips up various files and then copies the + zips and other files tosrcdir/public.  + "public" is hardwired in the build script.

+

Config file

+

+ CopyLists

+

+ CopyLists are used in many places.  There is an optional + Configuration section and a required Files section. 

+

The configuration section defines the roots of the from and to paths and can + optionally define path substitutions.  +

+

Internally, the to and from paths are required.  They are forced by the + script rather than being set in the config file.  Comments in the copyfile + xml indicate this.

+

The overall build configuration specifies a debug or release build.  The + debug and release results are put in different places.  File entries can + indicate a variable part of a path with a tag such as %bldtype%.  The + script will substitute %bldtype% with either dbg or rel, depending on the build + type.  The substitution tags are specified with these declarations:

+

+

- + + + + + + + + + + + + + + + + + + + + + + +
- - - - - -
-
-
The Kerberos - For Windows build is being automated. This description consists of -
-
-
-
-
    -
  • - Build steps -
  • - Script structure -
  • - Script step details -
  • - Remaining work / bug list -
  • -
-

Build steps

-

Building the complete KfW product consists of these steps:

-
    -
  • - Setting up the environment [Done except for subversion, logging] -
  • - Fetching sources from repositories [cvs done; subversion being worked on] -
  • - Building the sources with nmake [Done] -
  • - Setting up the packaging environment [Done] -
  • - Building KfW.msi with the packaging nmake [Done] -
  • - Building other distribution components [Not done] -
      -
    • - .exe installer -
    • - KfW source distribution -
    • - KfW core binaries -
    • - KfW SDK -
    • - Microsoft redistributable components -
    • - Individual files: release notes, Leash user guide, MSI Deployment Guide. -
    • -
    -
  • -
-

Script structure

-

The build is a perl script controlled by command line switches and an XML - configuration file. The config file is required. Settings in the config file - can be overridden by optional command line switches.

-

The main steps in the script are

-
    -
  • - Setting up the environment -
  • - Fetching the sources from repositories -
  • - Building the sources -
  • - Setting up the packaging environment -
  • - Building the msi with the package nmake -
  • - Building the rest of the components [tbd] -
  • -
-

The usage message shows the available switches:

-

C:\Projects\KfW>perl bkw.pl /?
- Usage: bkw.pl (-f --config) config-file [options] NMAKE-options

-

Options are case insensitive.

-

Options:
- /help /? usage information (what you now see)
- /srcdir dir   Source directory to use. Should contain
-               - pismere/athena. If cvstag or svntag is null,
-               - the directory should be prepopulated.
- /cvs?ag tag   \ For whichever of these tags is specified,
- /svntag url   / a checkout will be done into srcdir
- /debug        Do debug make instead of - release make
- /outdir dir   Directory to be created where build results will go
- /nomake       Skip make step
- /nopackage    Skip packaging step
- /clean        Build clean target
- /verbose      Debug mode - verbose output
- /vverbose     very verbose output
- /config path  Path to config file
- /logfile path Where to write output. If omitted, ...
- /srcdir dir   Source directory to use. Should contain -
-              
pismere/athena. - If cvstag or svntag is null, -
-               - the directory should be prepopulated. -
-
/outdir dir   Directory to be created where build results will - go -
- /repository checkout | co \ What repository action to take. -
-            
update   - | up | Options are to checkout, update or
-             skip          - / take no action [skip]. -
- /cvstag tag   \ For whichever of these tags is specified, -
-
/svntag url   / the repository action will be done into srcdir -
- /debug Do debug make instead of release make -
- /nomake Skip make step -
- /nopackage Skip packaging step -
- /clean Build clean target -
- /verbose Debug mode - verbose output -
- /config path Path to config file -
- /logfile path Where to write output. If omitted, ...
-
Other:
- NMAKE-options any options you want to pass to NMAKE, which can be:
- (note: /nologo is always used)
- [ nmake options follow ]

-

Additional controls, not available from the command line:

-

<CVSROOT name=":kserver:cvs.mit.edu:/cvs/pismere" />
- <SVNURL name="" />
- <CopyList><Config><DebugArea value="dbg" />
-                   - <ReleaseArea value="rel" />
-                   <AlwaysTag - value="%bldtype%" />
-                   - <DebugTag value="%debug%" />
-                   - <ReleaseTag value="%release%" />
-                   - <Files><Include path="copyfiles.xml" />

-

The CopyList

-

The CopyList is used during the Setting Up The Packaging Environment - step. Build results and files from all over the source tree are copied into a - 'staging' area in a structure the packaging script expects. The staging area is - <src>/pismere/staging.

-

The original copy list on which this is based had duplicate entries for debug - and release build results. This version only names each file once, which could - reduce maintenance.

-

A copylist entry looks like this:

-
<File name="comerr32.dll" from="..\target\bin\i386\%bldtype%\" to="\bin\i386" />
-
-
-

From paths are relative to <src>\pismere\athena and To paths are - relative to <src>\pismere\staging.

-

Debug and release build results go into directories containing either 'dbg' or - 'rel.' DebugArea and ReleaseArea describe these strings. If - an entry in the copy list contains the AlwaysTag string ('%bldtype%'), - the debug or release file will be copied, depending on the build type. If the - copy list entry contains DebugTag ('%debug%'), the file will only be - copied if packaging a debug build. Ditto for ReleaseTag.

-

If we are doing a debug build, the above copylist entry will copy <src>\pismere\athena\..\target\bin\i386\dbg\comerr32.dll - to <src>\pismere\staging\bin\i386\comerr32.dll.

-

There are two other possible attributes in a copylist entry:

-
    -
  • - notrequired -
  • - newname="filename" -
  • -
-

Most copylist entries are required and the script will die if they aren't - present. To ignore missing files, add notrequired.

-

To rename the file, set the newname attribute.

-

Remaining work / bug list

-

This is a work in progress. What's left:

-
    -
  • - Produce the remainder of the distribution components. [Listed - above.] -
  • -
-

Bugs:

-
    -
  • - Propogate leash removal through wix scripts. -
  • - Eliminate need for redundant /debug debug. -
  • -
-
-
-
+
DebugAreaPath value used in debug build.  Must match what the build + script uses.  Typically "dbg."
ReleaseAreaPath value used in release build.  Must match the build + script.  Typically "rel."
AlwaysTagString in file entries which will always be changed to either + DebugArea or ReleaseArea. File is always copied.  Typically "%bldtype%."
DebugTagString in file entries which will only be changed to DebugArea during a debug + build.  File is only copied in a debug build.  Typically "%debug%."
ReleaseTagString in file entries which will only be changed to ReleaseArea during a + release build.  File is only copied in a release build.  Typically + "%release%."
FileStem%filestem% will always be changed to FileStem.  Example:  + "kfw-3-2-0."  This is used in when building or copying the final build + results.
+

+

Example

+

Each segment of the file's path that comes from a different place is in a + different color.

+

+ Release build.  Config file: +

+

+ + + + + + + + + + + + + + + + + + -
<BKW_Config>
<CommandLine>
<Directories>
<src path ="C:\projects\Autobuild" + />
+ +

+

Copylist comments:

+

+ <!-- File from paths are relative to + \pismere\athena --> +
+ <!-- File to paths are relative to \pismere\staging + --> +

+

When the script processes this copylist, it will force the from and to paths as + indicated.

+

This line +

+

<File name="comerr32.dll" from="..\target\bin\i386\%bldtype%\" + to="\bin\i386" />

+

will result in C:\projects\Autobuild\pismere\athena\..\target\bin\i386\rel\comerr32.dll

+

being copied to C:\projects\Autobuild\pismere\staging\bin\i386\comerr32.dll.

+ +

+ Other possible attributes in a copylist entry:

+
    +
  • + notrequired +
  • + newname="filename" +
  • +
+

By default, copylist entries are required and the script will die if they aren't + present. To ignore missing files, add notrequired.

+

To rename the file, set the newname attribute.

+

Lengthy copy lists can be kept in separate files and included with the Include + directive.  Example:

+

<Include path="sdkfiles.xml" />

+

Remaining work / bug list

+

This is a work in progress. What's left:

+

Bugs:

+
    +
  • + Eliminate need for redundant /debug debug. +
  • + Handle checkout into non-existant directory. +
  • +
+

Troubleshooting +

+

svn can't create tunnel:
+
Make sure environment variable SVN_SSH points to a valid + plink.exe.  Path separators must be backslashes and must be doubled.

+