GSI-OpenSSH/CVS Procedures

From Globus

Contents

General principles

Any time you create a tag, document it. Never release without creating a CVS tag first.

Read The CVS Book and/or The CVS Manual.

Setting up a CVS workspace

The following steps will setup a CVS workspace for the procedures documented on this page and the GPT Procedures page.

 export CVSROOT=":ext:cvs.globus.org:/home/globdev/CVS/globus-packages"
 cvs checkout gssapi-openssh
 cd gssapi-openssh/
 mv openssh trunk
 cp -r trunk gpt-branch
 cvs update -rGPT-branch gpt-branch
 cp -r trunk vendor-branch
 cvs update -rOPENSSH_PORTABLE_DIST vendor-branch

Updating to a new OpenSSH distribution

  1. Set $CVSROOT to ':ext:cvs.globus.org:/home/globdev/CVS/globus-packages'.
  2. Setup your CVS workspace as described above.
  3. Download and untar the new distribution.
  4. If it doesn't contain a .cvsignore file, then copy the .cvsignore from cvs to the distribution directory.
  5. Then, from the top-level directory of the distribution, run
    cvs import -m "Import of OpenSSH 4.6p1" gssapi-openssh/openssh OPENSSH_PORTABLE_DIST OPENSSH_4_6P1

    This command imports the current working directory to the vendor branch (named OPENSSH_PORTABLE_DIST) and assigns it a tag (OPENSSH_4_6P1, in this example). Please name the tag according to the version number of the distribution and add a description of the tag below. The import command will display a message about running an additional cvs command to "help the merge" which you should ignore at this point. (We'll merge to the trunk later.)

  6. If Simon has released a new patch already, create a branch for it and check it in to cvs.
    cd <cvs workspace directory>/gssapi-openssh
    cvs update vendor-branch
    cp -r vendor-branch simon-branch
    cd simon-branch
    cvs tag -b OPENSSH_4_6P1_SIMON_20070312
    cvs update -r OPENSSH_4_6P1_SIMON_20070312
    patch < ~/openssh-4.6p1-gsskex-20070312.patch
    cvs add ChangeLog.gssapi kexgssc.c kexgsss.c
    cvs commit -m "http://www.sxw.org.uk/computing/patches/openssh-4.6p1-gsskex-20070312.patch committed to OPENSSH_4_6P1_SIMON_20070312 branch"
  7. If PSC has released a new HPN patch, then check that in too. It will make merging much easier later.
    cd ..
    cp -r simon-branch simon-branch-hpn
    cd simon-branch-hpn
    cvs tag -b OPENSSH_4_6P1_SIMON_20070312_HPN12v16
    cvs update -r OPENSSH_4_6P1_SIMON_20070312_HPN12v16
    patch < ~/openssh-4.6p1-hpn12v16.diff
    cvs add HPN12-README
    cvs commit -m "http://www.psc.edu/networking/projects/hpn-ssh/openssh-4.6p1-hpn12v16.diff.gz committed to OPENSSH_4_6P1_SIMON_20070312_HPN12v16 branch"
  8. Now we're ready to merge to the trunk. Checkout a trunk workspace with
    cvs checkout openssh
    mv openssh trunk
    cd trunk

    or if you already have a workspace you want to use, make sure it's up-to-date and doesn't contain any uncommitted modifications.

  9. Merge the changes between the previous vendor release and this release into your trunk workspace. For example:
    cvs update -kk -jOPENSSH_4_5P1_SIMON_20061220_HPN12V14 -jOPENSSH_4_6P1_SIMON_20070312_HPN12v16

    The first -j argument gives the previous version and the second -j argument gives the new version. The -kk argument tells CVS to ignore CVS/RCS keywords in the source files. If new patches from Simon and PSC aren't available, you can merge just the OpenSSH changes:

    cvs update -kk -jOPENSSH_4_5P1 -jOPENSSH_4_6P1
  10. Next, resolve any conflicts in the workspace, then build and test the result.
    make -f Makefile.in distprep
    ./configure --prefix=$HOME/gsi-openssh --with-globus-flavor=gcc32dbg --with-pam
    make install

    Some useful tests are:

    ./ssh -vvv -p 2222 localhost
    ./ssh -o 'GssapiKeyExchange no' -vvv -p 2222 localhost
    ./ssh -o 'GssapiAuthentication no' -o 'GssapiKeyExchange no' -vvv -p 2222 localhost
    ./ssh -vvv tg-login.ncsa.teragrid.org
    ./ssh -o 'GssapiKeyExchange no' -vvv tg-login.ncsa.teragrid.org
  11. Once you have all the conflicts resolved and you're confident the new version is working, checkin the changes. For example:
    cvs commit -m "merged OpenSSH 3.5p1 to trunk"
  12. Add an entry for the new vendor branch tags on the tags page if you haven't already.

Releasing a new GSI/GSSAPI patch to OpenSSH

  1. Update version.h in the CVS trunk with the release name of the form NCSA_GSSAPI_date.
  2. The GSI/GSSAPI OpenSSH is created from the CVS trunk. Before making a release, tag the current state of the trunk. Run the following command in an up-to-date trunk workspace:
    cvs tag OPENSSH_3_5P1_GSSAPI_20021018

    with a tag name of the form OPENSSH_version_GSSAPI_date and update this page with a description of the new tag.

  3. To make the patch, you can use this script. It assumes the latest openssh distribution is untarred in your home directory (for example, ~/openssh-3.5p1). It takes two arguments: the openssh version and the corresponding vendor branch tag. For example,
    ./make_gssapi_patch 3.5p1 OPENSSH_3_5P1

    will create openssh-3.5p1-gsi.patch in the current working directory. You should review the script before running it for the first time to make sure the assumptions it makes are OK for your system.

  4. To put the patch on the ftp site, scp it to ftp.globus.org:/disks/ftp.globus.org/pub/gsissh/patch, changing the name to openssh-version-date.patch and update/create the openssh-version.patch symbolic link to point to it.

Merging from trunk to GPT branch

${NEWBASE} refers to the new trunk tag (example: OPENSSH_4_6P1_GSSAPI_20070328) that you are merging to the GPT branch to create a new GPT package.

 export NEWBASE=OPENSSH_4_6P1_GSSAPI_20070328

Setup your CVS workspace as described above and change to the gpt-branch directory. Make sure your workspace is up-to-date with all local changes committed:

 cvs update
 cvs commit

Tag the repository before the merge.

 cvs tag ${NEWBASE}_GPT-premerge

Merge the changes from your original base merge point to your new base merge point.

 cvs update -kk -jOPENSSH_GSI_GPT_BASE -j${NEWBASE}

Add any new files to the branch. Run:

 cvs diff -rOPENSSH_GSI_GPT_BASE -r${NEWBASE} > /dev/null

For each "tag OPENSSH_GSI_GPT_BASE is not in file", run:

 cvs update -jHEAD <filename>

Retrieve a list of any conflicts that were discovered as a result of the merge.

 cvs -n update 2>/dev/null | grep ^C

Resolve all of the conflicts in each of the listed files, keeping notes as you go.

Add an entry to GSI-OpenSSH/CVS_Tags#GPT-branch detailing your merge action, along with noting conflicts that occurred and any interesting changes you had to make to resolve them.

Move OPENSSH_GSI_GPT_BASE.

 cvs tag -F -r ${NEWBASE} OPENSSH_GSI_GPT_BASE

Commit all of the files in your working directory to the repository and tag the working directory as merged.

 cvs commit -m "merged ${NEWBASE} to GPT-branch"
 cvs tag ${NEWBASE}_GPT-merged

Try a test build/install.

 ./make_gpt_dist
 gpt-build -force -verbose gsi_openssh-*.tar.gz gcc32dbg

See GSI-OpenSSH/GPT_Procedures for the next step: releasing GPT packages.

Personal tools
Execution Projects
Information projects
Distribution Projects
Documentation Projects
Deprecated