1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300
|
Using CVS
=========
Swish-e is available via cvs from SourceForge. See http://swish-e.org for
links to SourceForge and instructions downloading via cvs.
The buildswishe.pl script can be used to fetch the latest cvs source, along
with latest libxml2 and zlib sources, and build them all.
Otherwise, swish-e uses the familiar:
./configure --prefix=/path/to/install
make
make check
make install
Only 'make install' might require root priviledges, depending on the permissions
of /path/to/install.
Modifications to any of the build files (Makefile.am, configure.in) requires
running the bootstrap script. You will need a full set of developer tools
for these to work (autoconf, automake, libtool).
Building with HTML docs
=======================
The cvs version does not included the HTML documentation. The HTML docs are
built from the swish_website module (also in cvs) using the same templates that
http://swish-e.org uses. Links not pointing to the local documentation are
adjusted in the distribuiton documentation to point to http://swish-e.org.
The tools to build the HTML docs can also be fetched via cvs from SourceForge
(see the swish_website cvs module).
The swish_website module requires several Perl modules, including
Template-Toolkit, Pod::POM and a few others. Once you have swish_website
downloaded and can build the site using the swish_website/bin/build script,
you can then proceed to building Swish-e with:
./configure --with-website=/path/to/swish_website
make
make check
make install
If the program "build-swish-docs" is in your $PATH then you do not need
to specify --with-website above. "build-swish-docs" can be a symlink
to the actual swish_website/bin/build script.
See the swish_website/README for more about the HTML documentation.
Daily Builds
============
The swish-daily.pl script can be used to build swish-e from cvs (or
from tarball) via cron. In a top-level build directory a dated sub-directory is
created and the source is fetched, compiled and installed. For example:
swish-daily.pl \
--topdir=$HOME/swish/swish_daily_build
--tardir=$HOME/swish/swish-daily
Which creates a directory structure like:
$ ls -l swish_daily_build/
latest_swish_build -> swish-e-2005-05-29
swish-e-2005-05-26
swish-e-2005-05-27
swish-e-2005-05-28
swish-e-2005-05-29
See the documentation in the swish-daily.pl script for more details.
Developer Notes:
Release and Tag
===============
There's two parts to making a release. One is building the tarball
and the other is updating the website. (Plus, announce the relase,
of course).
Building the tarball is done on your own machine, and then testing that tarball.
Updating the site requires using the swish-daily.pl script to fetch the tarball,
build it and then update the website. There's a script called Make_Release.sh that
automates this process.
Building the tarball
--------------------
1) Run "cvs -nq update" to make sure your copy is up-to-date.
Watch carefully for merge errors.
2) Edit the pod/CHANGES.pod file to update the date of the release
3) Edit the version in configure.in
4) run ./bootstrap to create new Makefile.in with new version string
5) Make sure you have the swish_website module available and can build
the docs. See above about building the docs.
6) Run make distcheck to make sure it all builds correctly.
$ mkdir temp && cd temp
$ ../swish-e/configure >/dev/null (/dev/null is up to you)
$ make distcheck > /dev/null
That will create a tarball in the current directory.
7) Good idea to upload the tarball created by make distcheck someplace and
then test on a few platforms
8) Check in the updated version Makefiles:
$ cvs ci
9) Tag the release. For example:
$ cvs tag rel-2-4-0
10) Upload to swish-e site -- see "Update Site" below for details before doing this.
Now move on to development. Change version in configure.in (2.5.0 for example),
run ./bootstrap and check in.
Update Site
-----------
Updating the site for a new release means updating the web site, such as the
main page to announce the new release, and to build the web site using the new
release so the on-line documentation is up to date.
This is always a bit more hands-on due to changes in the build system between
releases.
See swish_website/README for more details on building the web site, but
basically the swish_website script (bin/build) needs to know where to find the
source for both the release and the current development builds. This is currently done by
two symlinks "swishsrc" and "develsrc". develsrc points to the daily build directory.
The symlinks go in the swish_website directory:
For example:
develsrc -> /home/bmoseley/swish/swish_daily_build/latest_swish_build/source
The daily builds are created with the swish-daily.pl script. swish-daily.pl fetches the
source via cvs (with daily builds) or via a URL (for releases), unpacks into the "source"
directory and builds swish-e. If all goes well a symlink is created to the
"latest_swish_build".
This same process can be used to build a release. But, instead of fetching from cvs[1]
you fetch a tarball built above and placed in some location to fetch by URL.
The swish_website/Build_Release.sh script does this by running:
#!/bin/sh
DIR="${BASE_DIR:=$HOME/swish}"
if test ! -n "$1"; then
echo "Must specify URL to fetch"
exit 1
fi
TAR_URL="$1"
swish-daily.pl \
--fetchtarurl="$TAR_URL" \
--topdir=$DIR/swish_release_build \
--noremove \
--notimestamp \
--verbose \
--tardir=$DIR/swish-releases || exit 1;
So, run that script and pass a URL, swish-daily.pl will fetch the script, attempt to
build and install swish-e, and then build a tarball and place it in the swish-releases
directory and upate the latest.tar.gz link. That basically makes the tarball available in
the download directory, but it cannot be seen yet until the website is updated.
For that you can run the swish_website/build.sh script, passing -a to tell it to build the
entire site.
Patching a previous version
---------------------------
Say development has started on the next release but a bug is found in the last.
Development has gone on too far to use the development version.
-- Creating a Branch in CVS -
The first thing that is needed is to create a branch of the cvs tree. This
only needs to be done *once*, and there's more than one way to do it: you can
either branch based on a checked out version (e.g. first check out the tagged
version), or the branch can be done on the repository.
So, to just branch the repository:
$ cvs -d :ext:<developer>@cvs.sourceforge.net:/cvsroot/swishe rtag -b -r rel-2-4-0 rel-2-4-0-patches swish-e
which says to create a branch called rel-2-4-0.patches branched off of the
tagged source rel-2-4-0.
[See NOTE below about before following this example]
-- Checkout branch --
Again, two ways to go here. You can convert your existing local source tree
to the branch or simply do a new checkout. I prefer to do a new checkout.
$ cvs -d :ext:<moseley>@cvs.sourceforge.net:/cvsroot/swishe -z3 checkout -r rel-2-4-0-patches -d swish-e-2.4.0.patches swish-e
This specifies the Root again with -d, -z3 is compression, we checkout
rel-2-4-0-patches from the swish-e module, but instead of writing to
the "swish-e" directory use -d to create a directory called
swish-e-2.4.0.patches swish-e.
-- Make chages --
Make changes as normal. Check in as normal:
$ cvs ci
and that will ONLY update this current branch.
-- Merging changes back to main branch --
Changes and fixes that are done on the branch will proably need to be moved
to the main branch.
To merge in changs from another branch into your working copy (the main HEAD
branch - 2.5.x in this example)
(in your 2.5.x working copy)
$ cvs update -j rel-2-4-0-patches
That should update your sources. Watch out for conflicts!
Note that this is a bit tricky, because this will likely change the version
number in configure.in.
Verify version in configure.in (might have been changed) then don't forget to
check the new patches into the HEAD branch.
$ cvs ci -m "Merged patches from 2-4-0-patches"
Now, once merged go to your patches directory (swish-e-2.4.0.patches in this
example) and *tag* it. That will allow merging later updates into the HEAD
branch without re-merging what was just merged.
(in the .patches directory)
$ cvs tag rel-2-4-1
that just tags the rel-2-4-0-patches branch.
Then when 2.4.2 is later created, just the changes from 2.4.1 to 2.4.2 can be
merged:
(in the main branch)
$ cvs update -j rel-2-4-1 -j rel-2-4-0-patches
which says merge from the tag rel-2-4-1 to the end of the branch
rel-2-4-0-patches into the current directory.
At least I think that's how it works.
NOTE: The example for naming the branch may not be best. In this example we
are fixing a bug in 2.4.0 so will likely release a 2.4.1. Development is now
in 2.5.x. So it may be better to create the branch as rel-2-4-patches (instead
of rel-2-4-0-patches) and then all 2.4.x updates will get added there.
Developer Hints
===============
There's a bunch of debugging techniques, but I do this:
$ ./configure --prefix=$HOME/swt --enable-memtrace CFLAGS='-O0 -g'
$ make install
Then I cd to src and create a test config
$ gdb ~/swt/bin/swish-e
run -c c -i test.doc
Changes to source in another window and in gdb "make install" will
build without having to exit.
|