Adding a Baselibs Component: Difference between revisions
Line 54: | Line 54: | ||
=== Merging the new package into the tree === | === Merging the new package into the tree === | ||
Go back to your new Baselibs tree: | |||
$ cd /discover/swdev/mathomp4/Baselibs/NewBaselibs | $ cd /discover/swdev/mathomp4/Baselibs/NewBaselibs |
Latest revision as of 10:57, 11 January 2013
Process of Adding A New Component to Baselibs
This example document will detail the process that was used importing CDO 1.5.9 into GMAO Baselibs.
Test adding the package by building it
Before you add a new component, it's recommended that you actually try and build the current Baselibs with the new component. That is, check out the current tag, untar the new code, and work with GNUmakefile to correctly setup how it'
Set up the new tag
In this case, we were adding CDO 1.5.9 to GMAO-Baselibs-3_3_1. So, the "internal" tag we went to was 3_3_2. In a temporary directory (say, NewBaselibs) you checkout Baselibs and tag relative so you know where you started from. You also make sure the tag you're making doesn't exist:
$ cd /discover/swdev/mathomp4/Baselibs/NewBaselibs $ bcvs co -kk Baselibs $ cd Baselibs/src $ bcvs tag -r GMAO-Baselibs-3_3_1 Internal-3_3_2-before-CDO-1_5_9 $ bcvs tag -d Internal-3_3_2
Unpack the new library
First, move to a directory that can contain your "new import",
$ cd /discover/swdev/mathomp4/Baselibs/NewImports
untar the package (from https://code.zmaw.de/projects/list_files/cdo),
$ tar xzf cdo-1.5.9.tar.gz
and move into the new directory directory:
$ cd cdo-1.5.9/
Import the new package
First, do a dry-run import of the package (note the -nq):
$ bcvs -nq import -kk -m 'MAT: import CDO 1.5.9 retrieved 2013-JAN-09 from https://code.zmaw.de/projects/list_files/cdo' Baselibs/src/cdo ZMAW release-1_5_9
If everything looks okay, then actually import the package:
$ bcvs import -kk -m 'MAT: import CDO 1.5.9 retrieved 2013-JAN-09 from https://code.zmaw.de/projects/list_files/cdo' Baselibs/src/cdo ZMAW release-1_5_9 N Baselibs/src/cdo/cdo.spec.in N Baselibs/src/cdo/NEWS N Baselibs/src/cdo/configure N Baselibs/src/cdo/acinclude.m4 ...snip... N Baselibs/src/cdo/contrib/Makefile.am cvs import: Importing /cvsroot/baselibs/Baselibs/src/cdo/contrib/python N Baselibs/src/cdo/contrib/python/cdo.py No conflicts created by this import
Merging the new package into the tree
Go back to your new Baselibs tree:
$ cd /discover/swdev/mathomp4/Baselibs/NewBaselibs $ bcvs -q checkout -kk Baselibs/src/cdo
Tagging your new release
To make your new tag, first do a relative tag at the src/ level:
$ cd Baselibs/src $ bcvs tag -r GMAO-Baselibs-3_3_1 Internal-3_3_2
Then, for safety's sake, untag the new library and retag the against the new vendor release tag:
$ cd cdo/ $ bcvs tag -d Internal-3_3_2 $ bcvs tag -r release-1_5_9 Internal-3_3_2
Next, edit the usual metafiles (Changelog, CONTENTS, and VERSION) as well as any needed make system changes and commit those on the HEAD. Then, push your new tag on those files:
$ bcvs tag -F Internal-3_3_2 ChangeLog CONTENTS VERSION GNUmakefile
Verify new tag
The final step is to checkout the new tag and build the Baselibs per usual. My first step is to usually do a cvscmp against the old tag to make sure everything looks sane. I then like to do a diff -r between the updated library and the stock package that was downloaded from the web. Hopefully, all is well.
If everything works, you can then delete your "before" tag and if all really works, rename the Internal tag with an official GMAO-Baselibs tag.