Changeset 1762

Show
Ignore:
Timestamp:
05/30/05 01:23:36 (4 years ago)
Author:
whmoseley
Message:

Update the README.cvs. Remind me to update it again when we actaully make a
release -- in case things don't go as I think they will...

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/swish-e/README.cvs

    r1756 r1762  
    11Using CVS 
    2 --------- 
     2========= 
    33 
    44Swish-e is available via cvs from SourceForge.  See http://swish-e.org for 
     
    1414  make check 
    1515  make install 
    16    
     16 
    1717Only 'make install' might require root priviledges, depending on the permissions 
    1818of /path/to/install. 
     
    2424 
    2525Building with HTML docs 
    26 ----------------------- 
    27  
    28 The cvs version does not included the HTML documentation. 
    29 The HTML docs are built from the swish_website module (also in cvs) 
    30 using the same templates that http://swish-e.org uses. 
    31 The tools to build the HTML docs can also be fetched via cvs  
    32 from SourceForge (see the swish_website cvs module). 
    33  
    34 The swish_website module requires several Perl modules,  
    35 including Template-Toolkit, Pod::POM and a few others.  
    36 Once you have swish_website downloaded and can build the site 
    37 using the swish_website/bin/build script,  
     26======================= 
     27 
     28The cvs version does not included the HTML documentation.  The HTML docs are 
     29built from the swish_website module (also in cvs) using the same templates that 
     30http://swish-e.org uses.  Links not pointing to the local documentation are 
     31adjusted in the distribuiton documentation to point to http://swish-e.org. 
     32 
     33The tools to build the HTML docs can also be fetched via cvs from SourceForge 
     34(see the swish_website cvs module). 
     35 
     36The swish_website module requires several Perl modules, including 
     37Template-Toolkit, Pod::POM and a few others.  Once you have swish_website 
     38downloaded and can build the site using the swish_website/bin/build script, 
    3839you can then proceed to building Swish-e with: 
    3940 
    40   ./configure --with-website=path/to/swish_website 
     41  ./configure --with-website=/path/to/swish_website 
    4142  make 
    4243  make check 
    4344  make install 
    44    
     45 
     46If the program "build-swish-docs" is in your $PATH then you do not need 
     47to specify --with-website above.  "build-swish-docs" can be a symlink 
     48to the actual swish_website/bin/build script. 
     49 
     50 
    4551See the swish_website/README for more about the HTML documentation. 
    4652 
    4753 
    4854Daily Builds 
    49 ------------ 
     55============ 
    5056 
    5157The swish-daily.pl script can be used to build swish-e from cvs (or 
    52 from tarball) via cron.  See script for details. 
     58from tarball) via cron.  In a top-level build directory a dated sub-directory is 
     59created and the source is fetched, compiled and installed.  For example: 
     60 
     61    swish-daily.pl \ 
     62        --topdir=$HOME/swish/swish_daily_build 
     63        --tardir=$HOME/swish/swish-daily 
     64 
     65Which creates a directory structure like: 
     66 
     67    $ ls -l swish_daily_build/ 
     68    latest_swish_build -> swish-e-2005-05-29 
     69    swish-e-2005-05-26 
     70    swish-e-2005-05-27 
     71    swish-e-2005-05-28 
     72    swish-e-2005-05-29 
     73 
     74See the documentation in the swish-daily.pl script for more details. 
    5375 
    5476 
     
    5779 
    5880Release and Tag 
    59 --------------- 
    60  
    61 1) Run cvs update to make sure have current sources and cvs -nq update to 
    62    make sure there's nothing left to check in 
     81=============== 
     82 
     83There's two parts to making a release.  One is building the tarball 
     84and the other is updating the website.  (Plus, announce the relase, 
     85of course). 
     86 
     87Building the tarball is done on your own machine, and then testing that tarball. 
     88 
     89Updating the site requires using the swish-daily.pl script to fetch the tarball, 
     90build it and then update the website.  There's a script called Make_Release.sh that 
     91automates this process. 
     92 
     93 
     94Building the tarball 
     95-------------------- 
     96 
     971) Run "cvs -nq update" to make sure your copy is up-to-date. 
     98   Watch carefully for merge errors. 
    6399 
    641002) Edit the pod/CHANGES.pod file to update the date of the release 
     
    681044) run ./bootstrap to create new Makefile.in with new version string 
    69105 
    70 5) Make sure you have the swish_website module available from cvs and that 
    71    it will build correctly. 
    72  
    73 6) run make distcheck to make sure it all builds correctly. 
    74  
    75 **** Bill TODO: how are HTML docs made now? does distcheck do it? ****** 
    76  
    77 7) good idea to upload the tarball created by make distcheck someplace and 
     1065) Make sure you have the swish_website module available and can build 
     107   the docs.  See above about building the docs. 
     108 
     1096) Run make distcheck to make sure it all builds correctly. 
     110 
     111    $ mkdir temp && cd temp 
     112    $ ../swish-e/configure >/dev/null  (/dev/null is up to you) 
     113    $ make distcheck > /dev/null 
     114 
     115   That will create a tarball in the current directory. 
     116 
     1177) Good idea to upload the tarball created by make distcheck someplace and 
    78118   then test on a few platforms 
    79119 
     
    841249) Tag the release.  For example: 
    85125 
    86    $ cvs tag rel-2-4-0 
     126    $ cvs tag rel-2-4-0 
    87127 
    8812810) Upload to swish-e site -- see "Update Site" below for details before doing this. 
     
    90130Now move on to development.  Change version in configure.in (2.5.0 for example), 
    91131run ./bootstrap and check in. 
     132 
     133 
     134Update Site 
     135----------- 
     136 
     137Updating the site for a new release means updating the web site, such as the 
     138main page to announce the new release, and to build the web site using the new 
     139release so the on-line documentation is up to date. 
     140 
     141This is always a bit more hands-on due to changes in the build system between 
     142releases. 
     143 
     144See swish_website/README for more details on building the web site, but 
     145basically the swish_website script (bin/build) needs to know where to find the 
     146source for both the release and the current development builds.  This is currently done by 
     147two symlinks "swishsrc" and "develsrc".  develsrc points to the daily build directory: 
     148 
     149 
     150For example: 
     151 
     152    develsrc -> /home/bmoseley/swish/swish_daily_build/latest_swish_build/source 
     153 
     154The daily builds are created with the swish-daily.pl script.  swish-daily.pl fetches the 
     155source via cvs (with daily builds) or via a URL (for releases), unpacks into the "source" 
     156directory and builds swish-e.  If all goes well a symlink is created to the 
     157"latest_swish_build". 
     158 
     159This same process can be used to build a release.  But, instead of fetching from cvs[1] 
     160you fetch a tarball built above and placed in some location to fetch by URL. 
     161 
     162The swish_website/Build_Release.sh script does this by running: 
     163 
     164    #!/bin/sh 
     165 
     166    DIR="${BASE_DIR:=$HOME/swish}" 
     167 
     168    if test ! -n "$1"; then 
     169        echo "Must specify URL to fetch" 
     170        exit 1 
     171    fi 
     172 
     173    TAR_URL="$1" 
     174 
     175    swish-daily.pl \ 
     176        --fetchtarurl="$TAR_URL" \ 
     177        --topdir=$DIR/swish_release_build \ 
     178        --noremove \ 
     179        --notimestamp \ 
     180        --verbose \ 
     181        --tardir=$DIR/swish-releases || exit 1; 
     182 
     183So, run that script and pass a URL, swish-daily.pl will fetch the script, attempt to 
     184build and install swish-e, and then build a tarball and place it in the swish-releases 
     185directory and upate the latest.tar.gz link.  That basically makes the tarball available in 
     186the download directory, but it cannot be seen yet until the website is updated. 
     187 
     188For that you can run the swish_website/build.sh script, passing -a to tell it to build the 
     189entire site. 
     190 
     191 
    92192 
    93193 
     
    183283 
    184284 
    185 ************ Bill TODO *********** 
    186 Update Site 
    187 ----------- 
    188  
    189 These are notes from the README on the swish-e.org site (in the builds directory). 
    190 Some of these notes duplicate comments from above. 
    191  
    192  
    193 To make a release: 
    194  
    195 This uses the swish-daily.pl script.  It still needs updating to 
    196 work better with a "release" (namely the script used here has been modified 
    197 to not remove old tarballs and to not copy the build logs to the Download directory. 
    198  
    199 Need to find time to update the swish-daily script to read params from a soruce file. 
    200  
    201 To create a release: 
    202  
    203 1) update configure.in's version number and run a make distcheck. 
    204      Then cvs ci to update the version in cvs 
    205      And tag the files:  cvs tar rel-2-4-0 
    206  
    207 2) I scp the tarball to swish-e.org's top directory (just a place with web access) 
    208 3) run the build scrip: 
    209  
    210    ./swish-daily.pl -notimestamp -fetchtarurl=http://swish-e.org/swish-e-2.4.0.tar.gz 
    211  
    212 (Be careful about permissions here as it does try and move links around) 
    213  
    214 That will fetch the tarball, unpack into a build directory, and make install into 
    215 an install directory (all this happens in the /data/_a/webdata/SWISH-E/builds directory. 
    216  
    217 The HTML docs are indexed and the symlink at /data/_a/webdata/SWISH-E/current/docs is 
    218 updated to point to this install directory. 
    219  
    220 Then make dist is run and the resulting tarball is copied to 
    221 /data/_a/webdata/SWISH-E/Download 
    222  
    223 The --notimestamp option disables the timestamp option used by configure to add a date to 
    224 the version number. 
    225  
    226 Note that a "lastinstall" file is used to track the last installation directory.  So next 
    227 time a build is created the old installation directory is removed. 
    228  
    229 4) Edit Download/HEADER, index.html, swish-daily/HEADER to reflect the right version 
    230  
    231 5) Announce on list. 
    232  
    233 6) back at cvs, change to a new dev version by editing configure.in, ./bootstrap and 
    234 checkin. 
    235  
    236  
  • trunk/swish-e/swish-daily.pl

    r1650 r1762  
    1010 
    1111# Script to build swish-e from cvs (or LWP request tarball) 
    12 # Normally used for the daily builds of the tarball and the development docs 
     12# Normally used for the daily builds of the tarball 
    1313 
    1414# Default checkout location 
     
    2929        logs            => 1,   # write log files 
    3030        symlink         => 1,   # create symlink 
    31         htmldocs        => 'build_swish_docs',  # tool to build the swish docs 
    3231); 
    3332 
     
    5150       help man options 
    5251       config_options=s 
    53        htmldocs=s 
    5452    / 
    5553) or pod2usage( 
     
    7068    [ \&cvs_checkout, 'Check out from CVS' ],  # can be replaced by a LWP fetch with --fetchtarurl=<url> 
    7169    [ \&configure,    'Run configure' ], 
    72     [ \&builddocs,    'Build HTML docs' ], 
    7370    [ \&make_install, 'Run make install' ], 
    74     # (old docs)[ \&make_docs,    "Run make docs" ], 
    7571    [ \&make_dist,    "Run make dist and move tarball to $config{tardir}"  ], 
    7672    [ \&set_symlink,  "Make symlink $config{symlink} point to $config{day_dir}" ], 
     
    172168} 
    173169 
    174 #====================================================================== 
    175 # This creates the HTML docs in the build directory 
    176  
    177 sub builddocs { 
    178     my $c = shift; 
    179  
    180     my $html_dir = "$c->{builddir}/html"; 
    181  
    182     log_message( "Build HTML docs in directory $html_dir" ); 
    183  
    184     run_command( "$c->{htmldocs} -swishsrc=$c->{srcdir} -poddest=$html_dir" ); 
    185 } 
    186170 
    187171 
     
    290274 
    291275 
    292 #================================================================================= 
    293 # Create HTML docs and index them 
    294  
    295  
    296 sub make_docs { 
    297     my $c = shift; 
    298     my $options = $c->{configure_options} || ''; 
    299  
    300     chdir "$c->{builddir}/html" || die "Failed to chdir $c->{builddir}/html: $!"; 
    301     log_message( "Changed to html build directory: $c->{builddir}/html" ); 
    302  
    303     run_command( "make searchdoc" ) || return; 
    304  
    305     return 1; 
    306 } 
    307276 
    308277#=================================================================================== 
     
    389358    $config->{topdir} ||= getcwd; 
    390359    $config->{topdir} = Cwd::abs_path( $config->{topdir} ); 
    391     die "Failed to set 'topdir': $!\n" unless $config->{topdir}; 
     360    die "Failed to set 'topdir' - perhaps invalid directory: $!\n" unless $config->{topdir}; 
    392361 
    393362 
     
    505474    -dump                   dump configuration and exit.  Good for seeing defaults 
    506475    -ask                    ask what tasks to run 
    507     -htmldocs=<program>     the location of the build script for the HTML docs 
    508476    -tardir=<path>          where to place tarball when finished 
    509477    -tar_keep_days=<int>    number of days to keep old tarballs (default 15 days) 
     
    521489    swish-daily.pl \ 
    522490        -cvsco='cvs -z3 -d:ext:moseley@cvs.sourceforge.net:/cvsroot/swishe' \ 
    523         -htmldocs=$HOME/swish_website/bin/build \ 
    524491        -tardir=tardir 
    525492 
     
    527494=head1 DESCRIPTION 
    528495 
    529 This script is used to generate a daily build of swish-e from cvs (or tarball). 
     496This script fetches the swish-e source, either from cvs or from a URL, builds 
     497swish and creates a tarball.  The script is mostly used for building daily builds, 
     498but is also used when creating a new release of swish-e. 
    530499 
    531500A build directory is created (using the date and a sequence number).  This directory is 
     
    541510tar files will be purged (based on tar_keep_days option). 
    542511 
    543 The html docs are indexed using the newly built swish making them searchable. 
    544  
    545512If all goes well a symlink is created in the topdir pointing to the latest build directory. 
    546513This symlink can be used to link to the latest version of the HTML docs and to the error 
     
    549516Finally, old build directories are removed (based on build_keep_days option). 
    550517 
     518=head2 Building HTML documentation 
     519 
     520The swish-e configure script 
     521 
     522=head2 Examples 
     523 
     524A daily script might use: 
     525 
     526    swish-daily.pl \ 
     527        --topdir=$HOME/swish_daily_build \\ 
     528        --tardir=$HOME/swish-daily 
     529 
     530Which creates a directory structure like: 
     531 
     532    $ ls -l swish_daily_build/ 
     533    latest_swish_build -> swish-e-2005-05-29 
     534    swish-e-2005-05-26 
     535    swish-e-2005-05-27 
     536    swish-e-2005-05-28 
     537    swish-e-2005-05-29 
     538 
     539 
     540When building a release: 
     541 
     542    swish-daily.pl \ 
     543        --fetchtarurl=<some url> 
     544        --topdir=$HOME/swish_release_build \ 
     545        --tardir=$HOME/swish-releases \ 
     546        --noremove \ 
     547        --notimestamp \ 
     548 
     549Use --noremove to avoid purging old builds, and --notimestamp to prevent adding a time 
     550stamp to the version (which is done when creating the daily builds). 
     551 
    551552 
    552553=head1 OPTIONS 
     
    572573Specifies a URL where to fetch the tarball.  This will replace the use of cvs for fetching the source. 
    573574 
    574 =item B<-htmldocs> 
    575  
    576 Lists the "bin/build" program from the "swish_website" cvs module -- used for building the 
    577 html documentation.  This is needed because the html docs are not in cvs. 
    578  
    579 The default is "build_swish_doc", which could be a shell script to bin/build. 
    580  
    581 You could set this to "echo" to disable building docs.  You would also need to set 
    582 config_options to include --disable-docs to say it's ok to build without docs.  But then 
    583 you would end up with a broken distribution file. 
    584575 
    585576=item B<-[no]timestamp> 
     
    618609  55 1 * * * . $HOME/.bashrc && $HOME/swish-daily.pl --tardir=$HOME/swish-daily --topdir=$HOME/swish_daily_build || echo "Check Swish Daily Build" 
    619610 
    620  
    621611=head1 COPYRIGHT 
    622612