| | 9 | |
|---|
| | 10 | Overview |
|---|
| | 11 | -------- |
|---|
| | 12 | |
|---|
| | 13 | The website generation has a few dependencies. There are scripts to generate |
|---|
| | 14 | the various parts. |
|---|
| | 15 | |
|---|
| | 16 | - swish-e current release source |
|---|
| | 17 | Used to build the swish-e docs. |
|---|
| | 18 | |
|---|
| | 19 | - swish-e cvs checkout |
|---|
| | 20 | Used to build the nightly build, and the docs from that. |
|---|
| | 21 | |
|---|
| | 22 | - archive (hypermail) |
|---|
| | 23 | currently, procmail feeds new posts to hypermail to |
|---|
| | 24 | add new posts to the archive. The posts are also archived |
|---|
| | 25 | in the "mbox" directory by month in mbox format. |
|---|
| | 26 | |
|---|
| | 27 | - archive index |
|---|
| | 28 | When the archive is updated a flag is set and then cron |
|---|
| | 29 | can re-index the hypermail archive. |
|---|
| | 30 | |
|---|
| | 31 | - swish-daily |
|---|
| | 32 | This is where daily tarballs are placed. The website |
|---|
| | 33 | creates an index page from the list of files |
|---|
| | 34 | |
|---|
| | 35 | - swish-release |
|---|
| | 36 | Similar to the swish-daily directory, but for releases |
|---|
| | 37 | |
|---|
| | 38 | |
|---|
| | 39 | |
|---|
| | 40 | Directory Structure |
|---|
| | 41 | ------------------- |
|---|
| | 42 | |
|---|
| | 43 | /<top level dir> |
|---|
| | 44 | |
|---|
| | 45 | swish_daily_build/ - where the daily builds are created |
|---|
| | 46 | swish-daily/ - daily tarballs |
|---|
| | 47 | |
|---|
| | 48 | swish_release_build/ - where the release is build (for the docs) |
|---|
| | 49 | distribution/ - releases (tarballs, .exe, old stuff) |
|---|
| | 50 | old/ - this is needed. |
|---|
| | 51 | |
|---|
| | 52 | mbox/ - mailbox archives by month |
|---|
| | 53 | archive/ - hypermail archive |
|---|
| | 54 | |
|---|
| | 55 | indexes/ - indexes for the archive and website |
|---|
| | 56 | |
|---|
| | 57 | swish_website/ - source for building the site (more below) |
|---|
| | 58 | |
|---|
| | 59 | pubilc_html - bulk of generated website. |
|---|
| | 60 | |
|---|
| | 61 | |
|---|
| | 62 | Apache's DocumentRoot is pubilc_html, and swish-daily and distribution |
|---|
| | 63 | are Aliased. See httpd.conf. |
|---|
| | 64 | |
|---|
| | 65 | |
|---|
| | 66 | Notes on building the HTML docs |
|---|
| | 67 | ------------------------------- |
|---|
| | 68 | |
|---|
| | 69 | There's somewhat of a circular dependency. Before the website can be |
|---|
| | 70 | built the swish-daily needs to be generated. This makes the pod docs |
|---|
| | 71 | available for generating the documentation. |
|---|
| | 72 | |
|---|
| | 73 | But, to build a daily tarball that include the HTML docs the website code |
|---|
| | 74 | needs to be installed. |
|---|
| | 75 | |
|---|
| | 76 | The swish-e configure script looks for the program "build-swish-docs" in the |
|---|
| | 77 | path. This is typically a symlink to the swish_website/bin/build program. |
|---|
| | 78 | This program is used to build the HTML documentation that is placed in the tarball |
|---|
| | 79 | generated by the swish-daily.pl program. |
|---|
| | 80 | |
|---|
| | 81 | |
|---|
| | 82 | |
|---|
| | 83 | Creating the above directories |
|---|
| | 84 | ------------------------------ |
|---|
| | 85 | |
|---|
| | 86 | The following examples use $ROOT as the top-level directory above. |
|---|
| | 87 | This might be /opt/swish, for example. |
|---|
| | 88 | |
|---|
| | 89 | |
|---|
| | 90 | swish_website |
|---|
| | 91 | ------------- |
|---|
| | 92 | The website isn't generated yet, but the code is needed before |
|---|
| | 93 | building the daily tarballs. |
|---|
| | 94 | |
|---|
| | 95 | cvn co http://svn.swish-e.org/swish_website/ $ROOT/swish_website |
|---|
| | 96 | ln -s $ROOT/swish_website/bin/build /usr/local/bin/build-swish-docs |
|---|
| | 97 | |
|---|
| | 98 | The actual site will be built later. |
|---|
| | 99 | |
|---|
| | 100 | |
|---|
| | 101 | |
|---|
| | 102 | |
|---|
| | 103 | swish-daily_build / swish-daily |
|---|
| | 104 | ------------------------------- |
|---|
| | 105 | |
|---|
| | 106 | Use the swish-daily.pl script to create the daily builds. |
|---|
| | 107 | The script uses the cwd for the default "topdir" if not specified, |
|---|
| | 108 | and also has the command to check out from trunk by default. |
|---|
| | 109 | |
|---|
| | 110 | But, it's probably more explicit to pass in the build directory |
|---|
| | 111 | by specifying "topdir". |
|---|
| | 112 | |
|---|
| | 113 | $ROOT/swish_website/bin/swish-daily.pl \ |
|---|
| | 114 | --topdir=$ROOT/swish_daily_build \ |
|---|
| | 115 | --tardir=$ROOT/swish-daily \ |
|---|
| | 116 | || echo "Problem building swish-daily" |
|---|
| | 117 | |
|---|
| | 118 | |
|---|
| | 119 | The script will exit non-zero if there's a problem and any errors |
|---|
| | 120 | should be in the log files. This should be run nightly. |
|---|
| | 121 | |
|---|
| | 122 | swish_daily_build will be created if doesn't exist, |
|---|
| | 123 | but the tardir directory must exist. |
|---|
| | 124 | |
|---|
| | 125 | mkdir $ROOT/swish-daily |
|---|
| | 126 | |
|---|
| | 127 | |
|---|
| | 128 | This does a fresh checkout. Obviously, doing a svn update would |
|---|
| | 129 | be much faster, but better to test a fresh checkout. |
|---|
| | 130 | |
|---|
| | 131 | After all that there's also a script Make_Daily.sh |
|---|
| | 132 | that does the above. |
|---|
| | 133 | |
|---|
| | 134 | |
|---|
| | 135 | |
|---|
| | 136 | swish_release_build / distribution |
|---|
| | 137 | ---------------------------------- |
|---|
| | 138 | |
|---|
| | 139 | This is only run when a new release is created. |
|---|
| | 140 | But the current release source needs to be available |
|---|
| | 141 | so the documentation can be generated on the website. |
|---|
| | 142 | |
|---|
| | 143 | This is similar to the above, but the source is not fetched |
|---|
| | 144 | via svn, rather from the current release tarball. |
|---|
| | 145 | Also, assuming the tarball is already in the releases directory |
|---|
| | 146 | there's no need to write it to the tardir. |
|---|
| | 147 | |
|---|
| | 148 | |
|---|
| | 149 | $ROOT/swish_website/bin/swish-daily.pl \ |
|---|
| | 150 | --fetchtarurl=http://swish-e.org/distribution/latest.tar.gz \ |
|---|
| | 151 | --topdir=$ROOT/swish_release_build \ |
|---|
| | 152 | --notimestamp \ |
|---|
| | 153 | --noremove \ |
|---|
| | 154 | --tardir=$ROOT/distribution \ |
|---|
| | 155 | || echo "Problem building release" |
|---|
| | 156 | |
|---|
| | 157 | There's also a Make_Release.sh script. Review it before use. |
|---|
| | 158 | |
|---|
| | 159 | running --help will show available options. |
|---|
| | 160 | |
|---|
| | 161 | |
|---|
| | 162 | Note that this can be used to generate an actual release (by fetching |
|---|
| | 163 | from svn instead), but it's better to generate the release separately |
|---|
| | 164 | and test it. In that case REMOVE the --tardir option above. |
|---|
| | 165 | |
|---|
| | 166 | |
|---|
| | 167 | |
|---|
| | 168 | |
|---|
| | 169 | mbox / archive |
|---|
| | 170 | -------------- |
|---|
| | 171 | |
|---|
| | 172 | Copy the existing mbox directory from where ever they currently are |
|---|
| | 173 | located. |
|---|
| | 174 | |
|---|
| | 175 | Generate the hypermail archive. This needs to be done from the hypermail |
|---|
| | 176 | directory since that's where the templates are located. |
|---|
| | 177 | |
|---|
| | 178 | This step is only needed to create the initial archive. The archive |
|---|
| | 179 | is added to as new messages arrive (e.g. via procmail). |
|---|
| | 180 | |
|---|
| | 181 | cd $ROOT/swish_website/hypermail |
|---|
| | 182 | gzip -dc $ROOT/mbox/*.gz \ |
|---|
| | 183 | | hypermail \ |
|---|
| | 184 | -i \ |
|---|
| | 185 | -c hypermailrc \ |
|---|
| | 186 | -d $ROOT/archive.new \ |
|---|
| | 187 | && mv $ROOT/archive.new $ROOT/archive |
|---|
| | 188 | |
|---|
| | 189 | |
|---|
| | 190 | Note, would really be good dynamically display the archive |
|---|
| | 191 | so that the headers and footers can be shared. |
|---|
| | 192 | |
|---|
| | 193 | |
|---|
| | 194 | indexes |
|---|
| | 195 | ------- |
|---|
| | 196 | |
|---|
| | 197 | This directory contains two indexes. One for the archive and |
|---|
| | 198 | another for the website. |
|---|
| | 199 | |
|---|
| | 200 | The web site is not created yet, so it cannot be indexed. |
|---|
| | 201 | |
|---|
| | 202 | mkdir $ROOT/indexes |
|---|
| | 203 | |
|---|
| | 204 | $ROOT/swish_website/bin/index_hypermail.pl $ROOT/archive \ |
|---|
| | 205 | | swish-e \ |
|---|
| | 206 | -S prog \ |
|---|
| | 207 | -i stdin \ |
|---|
| | 208 | -c $ROOT/swish_website/etc/archive.conf \ |
|---|
| | 209 | -f $ROOT/indexes/archive.swish-e \ |
|---|
| | 210 | -v0 |
|---|
| | 211 | |
|---|
| | 212 | This should be a cron task. Normally set a flag when |
|---|
| | 213 | the archive is updated (new message arrives). |
|---|
| | 214 | |
|---|
| | 215 | |
|---|
| | 216 | public_html |
|---|
| | 217 | ----------- |
|---|
| | 218 | Now the website can be created. The bin/build script is used |
|---|
| | 219 | to generate the website. The script will detect when files |
|---|
| | 220 | need to be generated, or passing --all will tell it to generate |
|---|
| | 221 | the complete site. |
|---|
| | 222 | |
|---|
| | 223 | There are a lot of options, and running build --help will list them. |
|---|
| | 224 | The same build script is used when building from cvs to generate the |
|---|
| | 225 | html docs for the tarball. |
|---|
| | 226 | |
|---|
| | 227 | The site must be told where to find all the directories created above. |
|---|
| | 228 | It determines where the source files are relative to the location of the |
|---|
| | 229 | script, but must be told everything else: |
|---|
| | 230 | |
|---|
| | 231 | |
|---|
| | 232 | $ROOT/swish_website/bin/build \ |
|---|
| | 233 | --dest=$ROOT/public_html \ |
|---|
| | 234 | --archive=$ROOT/indexes \ |
|---|
| | 235 | --swishsrc=$ROOT/swish_release_build/latest_swish_build/source \ |
|---|
| | 236 | --develsrc=$ROOT/swish_daily_build/latest_swish_build/source \ |
|---|
| | 237 | --download=$ROOT/distribution \ |
|---|
| | 238 | --daily=$ROOT/swish-daily \ |
|---|
| | 239 | --all |
|---|
| | 240 | |
|---|
| | 241 | |
|---|
| | 242 | Luckily, there's a build script that does all that, and also indexes |
|---|
| | 243 | the site. |
|---|
| | 244 | |
|---|
| | 245 | |
|---|
| | 246 | indexes -- part 2 |
|---|
| | 247 | ----------------- |
|---|
| | 248 | |
|---|
| | 249 | Once the site is it's time to build the index of the web site. |
|---|
| | 250 | |
|---|
| | 251 | |
|---|
| | 252 | |
|---|
| | 253 | |
|---|
| | 254 | |
|---|
| | 255 | |
|---|
| | 256 | |
|---|
| | 257 | |
|---|
| | 258 | |
|---|
| | 259 | |
|---|
| | 260 | |
|---|
| | 261 | |
|---|
| | 262 | |
|---|
| | 263 | |
|---|
| | 264 | |
|---|
| | 265 | |
|---|