From 3ac7194b8fc4ac71f4130b341a6126ebf973f399 Mon Sep 17 00:00:00 2001 From: Stefan Seefeld Date: Mon, 16 May 2016 01:00:23 -0400 Subject: [PATCH] Add new toplevel Makefile and set up CI. --- .travis.yml | 64 ++++++ .travis/xmlc | 30 +++ Makefile | 10 + README.adoc => README.md | 6 +- building.md | 117 ++-------- buildtools/xjparse | 2 +- releasetools/docbook-build | 423 ------------------------------------- xsl/Makefile | 2 +- xsl/VERSION | 2 +- xsl/VERSION.xsl | 2 +- 10 files changed, 128 insertions(+), 530 deletions(-) create mode 100644 .travis.yml create mode 100644 .travis/xmlc create mode 100644 Makefile rename README.adoc => README.md (51%) delete mode 100755 releasetools/docbook-build diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..075f9e8b9 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,64 @@ +language: java + +branches: + only: + - master + - devel + - "/^release.*/" + +env: + global: + - secure: o2OZl3EwpJmlNBqknmUjvORfsY3uKqBIx3PGfIdLggpdiouCvoJXqSGstUElkC0cj6EoMblo0mMYMtQkewu9cklg2+gaSLBgJD3zh0VL3ERo7ivC8mohTiJPRBvFVHmgazF9SwYli2VIMmIHdE/fmfQyJGs6hPM1m7d4xDh3prMOSLqJRktZk7gkhaT4nGYTv3eRrRVdS4/ni5KGDQ2w6p3TszOrTekxgNSLpPwRyxQlTNEOrOR0Woc+4rSWdIZAcGM6IjEpJ7QwCHWuCklHpnp9sw9lQuJm7ArcWE/moVGFGWNnwOA57aq0SXgWN4Da90eRELFTvFSWJuBI+/U2B6262zXWU6un3WFniQs+lCtRtD4G/6VkMmY4f15dCAJJkFM+6lA9LWpEo7ZpPCT0XuMS9K5lezGvZmXFV8t90GHmQnvYjL1D7PpuQH73D2p3pTdXTY8lfdNpDIfjSjUwvc7zZTdazvfuCJi/mo+h9SaqReaQygnYWSyQ04k2jTS6AeuNaKquEWEDdPfGcD3uFOR0PW9zAUHtrKy4gaS07Jq8k+a1qhTHj6HPnWThG8u3Mbfaua/LH5UP9AYQjstrqn/Y+LIwrWcQcVKMmizPpig9gO3vQOr8K2GiryZTwS00wzCOYpAMj90WX+8RtNsAdeiZgtsfzcQaMhOvulkOCE0= + - CLASSPATH=/usr/share/java/xalan-j2.jar:/usr/share/java/xercesImpl.jar:/usr/share/java/xml-resolver.jar + +install: +- sudo apt-get update -q +- sudo apt-get install xsltproc +- sudo apt-get install libxml-xpath-perl +- sudo apt-get install libsaxon-java libxml-commons-resolver1.1-java libsaxon-java + libxerces2-java +- sudo apt-get install trang +- sudo apt-get install imagemagick +- sudo apt-get install dblatex +- cp .travis/xmlc ~/.xmlc + +script: +- make +- make check +- make dist + +before_deploy: +- git config --global user.email "builds@travis-ci.com" +- git config --global user.name "Travis CI" +- export GIT_TAG=snapshot/$TRAVIS_BRANCH-$(date -u "+%Y-%m-%d")-$TRAVIS_BUILD_NUMBER +- git tag $GIT_TAG -a -m "Generated tag from TravisCI build $TRAVIS_BUILD_NUMBER" +- git push https://$GITHUBTOKEN@github.com/stefanseefeld/docbook-xsl $GIT_TAG > /dev/null 2>&1 + +deploy: + provider: releases + prerelease: true + api_key: + secure: HxUw4mQagxEYvb/yHOjNykxik8w+GKgezb9qmqYg09LWKDmh+thYy1k9llaXDkkHrgki2suJs5auvczsYLzYtKRIF7CU+9UkqEJWU2910Vr4zv8XmClru/cH9/p0eKdOKZ9JRKsEuNyVriyQcwewCY8vA6VpAZYvvijBI7b/ByX8TXsDIJuJ0013t3SiOvQMBJV4Kp/ss3/p/m8dqAHWbi4/mRrNK084KlX597hfebyZ5tAFl38kPYCFy8l9XELCRaceuNSXailUBZaK1oBiVsyeY/dMBTVyiB3eTKVevye9+yf7M0YRFRaJZaV/MMaPFiD1yG+WBcQECfH/krGxxOvH/x4+zHQDB128imu2nL2OMBGbc5ynVxPlE88QUejb/jbE4OW5qmUTY0iaU5aBVQ2atmPS546oMI9xuBrGjVlMFH5ltEhpA4y9FG/MvImprk3gx/+1al2cq2Gttbsqe7Xhc57q3D5DpoMSJKNVXAbgfY9U9utREFV2y9j/0rcpYUMr8F/Uh+W7cdmTYBwPSgo9z+ktzeQ2IKUHdqzxXaRjyhjpKbiIo7t9M/mKGFPlHPX/7aquitO5Ct4VyFoONLkkzZ6BCad28+sHUgT0mi3ede5OPvllLXiDRiBCoowktfWF0mpBTbCeGzaWhBFVwktvmAqL7WxWvfEgEF/0/Jk= + file: + - dist/docbook-xsl-snapshot.tar.bz2 + - dist/docbook-xsl-snapshot.tar.gz + - dist/docbook-xsl-snapshot.zip + - dist/docbook-xsl-ns-snapshot.tar.bz2 + - dist/docbook-xsl-ns-snapshot.tar.gz + - dist/docbook-xsl-ns-snapshot.zip + - dist/docbook-xsl-doc-snapshot.tar.bz2 + - dist/docbook-xsl-doc-snapshot.tar.gz + - dist/docbook-xsl-doc-snapshot.zip + on: + repo: stefanseefeld/docbook-xsl + branch: devel + +notifications: + email: + on_success: change + on_failure: change + irc: + channels: + - irc://freenode#docbook + on_success: always + on_failure: always diff --git a/.travis/xmlc b/.travis/xmlc new file mode 100644 index 000000000..338b469d1 --- /dev/null +++ b/.travis/xmlc @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..8979a8b83 --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ +export repo_dir ?= $(abspath .) + +all: + $(MAKE) -C xsl release + +check: + $(MAKE) -C xsl check + +dist: + $(MAKE) -C xsl zip-ns TMP=$(repo_dir)/dist diff --git a/README.adoc b/README.md similarity index 51% rename from README.adoc rename to README.md index 9d4d62a52..1f1efe627 100644 --- a/README.adoc +++ b/README.md @@ -1,4 +1,6 @@ -= DocBook XSLT 1.0 Stylesheets +## DocBook XSLT 1.0 Stylesheets + +[![Build Status](https://travis-ci.org/stefanseefeld/docbook-xsl.svg)](https://travis-ci.org/stefanseefeld/docbook-xsl) This repository contains the DocBook XSLT 1.0 Stylesheets, now migrated away from SourceForge. @@ -7,3 +9,5 @@ There are still some rough edges here as the build system and various other things are being ported. Nevertheless, this is now the intended repository of record. + +For build instructions please refer to the [DocBook XSL Release Build Process](building.md). \ No newline at end of file diff --git a/building.md b/building.md index dd94467e4..185a51b0a 100644 --- a/building.md +++ b/building.md @@ -1,115 +1,28 @@ DocBook XSL Release Build Process ================================= -The build process for a snapshot or actual release is created by running the docbook-build shell script like follows: -``` -/opt/buildtree/docbook/releasetools/docbook-build \ - -a ns \ - -b /opt/buildtree/docbook \ - -l /opt/scratch-release \ - -t /opt/scratch-release \ - -p /var/opt/release \ - -v 1.79.1 \ - -x zip-ns \ - -z US/Pacific \ - xsl \ - || rm -f /opt/scratch/docbook-xsl-snapshot.lock -``` +Prerequisites +------------- -Where +TBD -* `-a ns` Specifies that the 'ns' suffix is to be added to the build name of the namespace version. Saved in the `$ADDEDSUFFIX` variable. -* `-b /opt/buildtree/docbook` Specifies the source for the build, the repo directory. Saved in the `$BASEDIR` variable. -* `-l /opt/scratch-release` Location of the generated log file. Saved in the `$LOGDIR` variable. -* `-t /opt/scratch-release` Location of any generated temp files. This is where the "built" version resides before being zipped up. Saved in the `$TMPDIR` variable. -* `-p /var/opt/release` Location of the final zip files. Saved in the `$SITEBASE` variable. -* `-v 1.79.1` The numerical version of this release. Saved in the `$RELEASEVERSION` variable. -* `-x zip-ns` Name of the Makefile target for generating the zip files. Saved in the `$ZIPARG` variable. -* `-z US/Pacific` Specifies the time zone for date stamps. Saved in the `$ZONE` variable. -* `xsl` The name of the distro to build. Saved in the `$DISTROS` variable. +Building +-------- -docbook-build script steps --------------------------- +Run -The `docbook-build` shell script performs the following steps: + `make` -1. cd to the build directory `/opt/buildtree/docbook`. -2. Execute `svn cleanup`. -3. Execute `svn update` to make sure the latest files are in place. -4. Execute `svn info` and extract from the results the SVN version number to be placed in the `REVISION` variable, and copies it the the `REVISION` file. -5. Create a lock file to prevent two build processes from running at the same time. -6. Filter the `VERSION` file to insert the current build version taken from the `-v` option of the `docbook-build` script. -7. Checks to see if a lock file is in place from a previous build. If so, it loops with sleep 1 until a) the -LOCK_TIMEOUT count is reached and exits if so, or b) the lock has cleared and it prints "Done", creates a new -lock file, and continues. -8. Remove the previous log file that captures `STDERR` and `STDOUT`. -9. Removes the existing `VERSION` file in the source, and then does `svn update VERSION` to get the latest. -10. Runs a sed command on the `VERSION` file to replace the old content with the value of `$REVISION` created earlier. -11. Starts the logging of output to the log file. -12. Prints a date timestamp. -13. Build the XSL files using this command. This Makefile must also build the -ns version as well, because no other commands in the script do so. +Testing +------- - ``` - make distrib -C xsl XSLT="$repo_dir/buildtools/xslt -$ENGINE" \ - PDF_MAKER=$PDF_MAKER - ``` -14. echo some descriptive text to a file named header.txt. -15. Make a tar.bz2 file using this command: +Run - ``` - make zip-ns -C xsl ZIPVER=$RELEASEVERSION TMP=$TMP \ - XSLT="$repo_dir/buildtools/xslt -$ENGINE" PDF_MAKER=$PDF_MAKER - ``` - where `$RELEASEVERSION` is the value from the -v command line option. -16. Generate a list of changes to a LatestChanges file using this command: + `make check` - ``` - svn cleanup && svn update && svn log --verbose --limit 200 > LatestChanges - ``` -17. Copy the contents of `header.txt` and `LatestChanges` to a `README.txt` file. -18. Copy the tar.bz2 files to `$SITEBASE` and cd to that directory. -19. Remove the old existing xsl and xsl-ns directories and any log file. -20. For each tar.bz2 file, bunzip it and tar extract into the $TMP directory, creating the `docbook-xsl-1.79.1` -directory there. -21. Run `mkdir xsl` and `mkdir xsl-ns` to initialize these directories. -22. Copy contents of the directories: +Packaging +--------- - ``` - cp -pR docbook-xsl-1.79.1/* xsl - cp -pR docbook-xsl-ns-1.79.1/* xsl-ns - ``` -23. Copy the zip files, `README.txt`, and `LatestChanges` to `$SITEBASE` (`/var/opt/release`) +Run -Uploading a distro ------------------- - -This section describes setting up a distribution on SourceForge. It requires a SourceForge shell account. - -1. Log onto the SourceForge DocBook project and create the new release directories. Go to Files > docbook-xsl and select Add Folder, and name it 1.79.1 for the new release. Do the same for docbook-xsl-ns and docbook-xsl-doc. This creates the new directories for the new release in the location `/home/frs/project/docbook/docbook-xsl/1.79.1` for example. -2. On the build machine, cd to `$SITEBASE` (`/var/opt/release`) where the .zip and tar.bz2 files are located. -3. Use scp to copy the .zip and .tar.bz2 files to the SourceForge account, using a command like this: -`scp docbook-xsl-1.79.1.zip bobstayton,docbook@web.sourceforge.net`: -The files will land in `/home/project-web/docbook`. -4. Log into the shell account on the SourceForge machine with a command like this: -`ssh -t bobstayton,docbook@shell.sourceforge.net create` -5. `cd /home/project-web/docbook/htdocs/release/xsl` -6. rm current (this is a symlink, not an actual directory). -7. Unzip the stylesheet files and doc, creating the docbook-xsl-1.79.1 directory: - - ``` - unzip ../../../docbook-xsl-1.79.1.zip - unzip ../../../docbook-xsl-doc-1.79.1.zip - ``` -8. Run these commands to set up the numbered and current directories: - - ``` - mv docbook-xsl-1.79.1 1.79.1 - chmod -R g+w 1.79.1 - ln -s 1.79.1 current - ``` -9. Repeat steps 5 to 8 replacing xsl with xsl-ns for the namespaced version of the stylesheets. -10. To make the zip files available for download, use commands like this to copy the zip and tar.bz2 files to the directories created in step 1 of this section: - ```cp /home/project-web/docbook/docbook-xsl-1.79.1.zip /home/frs/project/docbook/docbook-xsl-1.79.1``` -Repeat for docbook-xsl-ns and docbook-xsl-doc -11. Edit the `RELEASE-NOTES.txt` file into a short `README` file and post that there using SourceForge upload. -That will cause the `README` to be displayed below the list of files. \ No newline at end of file + `make dist` diff --git a/buildtools/xjparse b/buildtools/xjparse index 9563bbb7a..a27b40075 100755 --- a/buildtools/xjparse +++ b/buildtools/xjparse @@ -9,7 +9,7 @@ MYDIR=`dirname $0` XERCES=`findxerces2` RESOLVER=`findresolver` -if [ ! "$RESOLVER" ] && [[ $CLASSPATH != *xml-commons-resolver* ]]; then +if [ ! "$RESOLVER" ] && [[ $CLASSPATH != *xml*resolver* ]]; then echo "cannot find resolver classes" 1>&2 exit 1 fi diff --git a/releasetools/docbook-build b/releasetools/docbook-build deleted file mode 100755 index 968f665f3..000000000 --- a/releasetools/docbook-build +++ /dev/null @@ -1,423 +0,0 @@ -#!/bin/bash -# vim: number - -# docbook-build - Build script for generating DocBook project snapshots -# $Id$ - -# fail if no CLASSPATH set -if [ -z "$CLASSPATH" ]; then - cat <<- EOF -`basename $0`: error: CLASSPATH not set. Stopping. - -Before invoking `basename $0`, you must set the Java CLASSPATH -environment variable in the environment from which the script -runs, and it must contain absolute pathnames for the following: - - - Saxon or Xalan2 jar file or classes - - Xerces jar file(s) or classes - - Apache XML Commons Resolver jar file or classes - - directory containing CatalogManager.properties file -EOF - exit 1 -fi - -export repo_dir=`dirname $(cd $(dirname $0); pwd)` -# fail if no repo_dir set -if [ -z "$repo_dir" ]; then - cat <<- EOF -`basename $0`: error: repo_dir not set. Stopping. - -Before invoking `basename $0`, you must set the repo_dir -environment variable in the environment from which the script -runs. The value of repo_dir should be the absolute path to the -base of a DocBook Project Subversion working directory that -contains the various DocBook Project modules; that is, such that -the modules can be found in \$repo_dir/xsl, etc. -EOF - exit 1 -fi - -umask 002 -# set up some defaults -SVNCHECK=no -ENGINE=xsltproc -PDF_MAKER=dblatex -TAR=tar -TARFLAGS=P -ZIPTARG=zip -SITEBASE=/var/www -#SITEUSER=`whoami` -#SITEHOST=web.sourceforge.net -RELEASEVERSION=snapshot -if [ -z "$TMP" ]; then - TMP=/tmp -fi -# default timeout waiting for lock file to clear is 1200 seconds (20 mins) -LOCK_TIMEOUT=1200 - -usage="Usage: - - `basename $0` [-a ADDEDSUFFIX] [-b BASEDIR] [-d DOMAIN] - [-e ENGINENAME] [-f FORMATTER] [-l LOGDIR] - [-p PATH] [-r] [-s] [-t TMPDIR] [-u USER] - [-v VERSION] [-x ZIPTARG] [-z ZONE] DISTRO... - -" -opts_admon="Type '`basename $0` -h' for details about options. -" - -help=" -Options: - - -a ADDEDSUFFIX - Specifies a suffix for any additional packages that are built - along with the package for this distro. For example, in the - cause of the docbook-xsl package, we also build docbook-xsl-ns, - using \"-a ns\" - - -b BASEDIR - Specifies the location of the base directory containing the - SVN working directories for modules from the DocBook project - (directory containing 'xsl', 'dsssl', 'slides', etc. subdirs) - Default: value of the repo_dir environment variable, if - set; otherwise, the directory from which the script is run. - - -d DOMAIN - Specifies the remote host (domain) to which the snaphost is - uploaded. Default: 'web.sourceforge.net' - - -e ENGINENAME - Specifies which XSLT engine to use. Default: xsltproc - - -f FORMATTER - Specifies which formatter to use for generating the PDF - version of the release notes for the distribution. - Default: dblatex - - -l LOGDIR - Specifies the directory to which the script redirects its - standard output and standard error. - Default: none -- if not set, stdout and stderr are not - redirected to a log file. - - -p PATH - Specifies the upload path on the remote host. - Default: '/home/groups/d/do/docbook/htdocs/snapshots' - - -r - If specified, read commit message from standard input. - - -s - If specified, do an svn check to see if the workspace is up - to date, and if it is, stop the build. - - -t TMPDIR - Specifies the directory to which the script writes temporary - files. Default: /tmp - - -u USER - Specifies the (Sourceforge) username with which to upload the - snapshot to the target (Sourceforge) website. - Default: Username found in SVN/Root in working directory, if - found; otherwise, local username. - - -v VERSION - Specifies the version name to put on the build. - Default: 'snapshot' - - -x ZIPTARG - Specifies name of the target to use for building compressed - package file. Default: 'zip' - - -z ZONE - Specifies timezone to use for date/time stamps. - Default: none -- if not set, 'date' uses timezone configured - on local machine. - - DISTRO... - Space-separated list of distros to build (e.g. 'xsl dsssl') - -" -while getopts ":a:b:e:f:d:hl:p:rst:u:v:x:z:" opt; do - case $opt in - r ) # parse commit message - while read -r LINE - do - if echo $LINE | grep "^Revision: " >/dev/null; then - REVISION=$(echo $LINE | sed -r 's/^Revision: (.+)$/\1/') - break - fi - if echo $LINE | grep "^Modified: " >/dev/null; then - CHANGEPATH=$(echo $LINE | sed -r 's/^Modified:|Added:|Deleted: (.+)$/\1/') - break - fi - done ;; - a ) ADDEDSUFFIX=$OPTARG ;; - b ) BUILDDIR=$OPTARG ;; - e ) ENGINE=$OPTARG ;; - f ) PDF_MAKER=$OPTARG ;; - l ) LOGDIR=$OPTARG ;; - t ) TMP=$OPTARG ;; - v ) RELEASEVERSION=$OPTARG ;; - u ) SITEUSER=$OPTARG ;; - d ) SITEHOST=$OPTARG ;; - p ) SITEBASE=$OPTARG ;; - s ) SVNCHECK="yes" ;; - x ) ZIPTARG=$OPTARG ;; - z ) TZ=$OPTARG - alias date="TZ=$TZ date" ;; - h ) printf "$usage" - printf "$help" - exit 0 ;; - \? ) printf "$usage" - printf "$opts_admon" - exit 1 ;; - esac -done - -shift $(($OPTIND - 1)) - -if [ -z "$BUILDDIR" ]; then - BUILDDIR=`pwd` -fi -cd $BUILDDIR - -DISTROS="$@" -if [ -z "$DISTROS" ]; then - DISTROS=xsl -fi - -if [ -z "$DISTROS" ]; then - echo - echo "`basename $0`: error: No DISTROS specified. Stopping." - echo - printf "$usage" - printf "$opts_admon" - exit 1; -else - # We may want to use `git describe` here, once we use real tags... - REVISION=$(git rev-parse HEAD) - for DISTRO in $DISTROS; do - printf "Running svn update in gentext and $DISTRO working directories...\n" 1>&2 - if test "$SVNCHECK" = "yes"; then - if test $(cat $DISTRO/REVISION) = $REVISION; then - printf "$DISTRO distro is up to date. Skipping.\n" 1>&2 - break - fi - fi - echo $REVISION > $DISTRO/REVISION - lock_timer=0 - # wait for lock file (if any) to clear - printf "Waiting for lock file to clear..." 1>&2 - while [ -f $TMP/docbook-*-$RELEASEVERSION.lock ]; do - if [ $lock_timer = $LOCK_TIMEOUT ]; then - # time out after reaching $LOCK_TIMEOUT seconds - # default is 1200 seconds (20 minutes) - echo - printf "Timed out after $LOCK_TIMEOUT seconds waiting for lock file to clear.\n" - echo "You probably have a stale $TMP/docbook-$DISTRO-$RELEASEVERSION.lock file that you need to delete." - exit 1 - fi - printf "." 1>&2 - sleep 1 - let lock_timer=$lock_timer+1 - done - printf "Done.\n" 1>&2 - - printf "Doing some initialization..." 1>&2 - # create new lock file - touch $TMP/docbook-$DISTRO-$RELEASEVERSION.lock - # remove old log file, if any - rm -f $LOGDIR/docbook-$DISTRO-$RELEASEVERSION.log.tmp - - DATE=`date +%Y-%m-%d` - TIME=`date '+%H%M'` - ZONE=`date '+%Z'` - - #if [ -f $DISTRO/CVS/Root ]; then - # CVSROOT=`cat $DISTRO/CVS/Root` - # export CVSROOT - # CVSUSER=`sed 's/^:.\+:\([^@]\+\)@.\+$/\1/' $DISTRO/CVS/Root` - # if [ "$CVSUSER" != "anonymous" ]; then - # CVS_RSH=ssh - # export CVS_RSH - # fi - # if [ -z "$OVERRIDE_CVSUSER" ]; then - # # if no value for USER has been specified via -u option, set - # # SITEUSER for ssh uploads to same value as CVSUSER - # SITEUSER=$CVSUSER - # fi - #fi - #rm -f $DISTRO/LatestTag - rm -f $DISTRO/VERSION - git checkout $DISTRO/VERSION - - printf "." 1>&2 - - # replace the current fm:Version value with the snapshot number - cp -p $DISTRO/VERSION $DISTRO/VERSION.tmp - # FIXME: we really should be doing this using a modifiled XSLT identity - # transform, but anyway, this works OK for now... - if test "$SVNCHECK" = "yes"; then - sed "s/Version>.\+$RELEASEVERSION\_$REVISION\ $DISTRO/VERSION - else - # forced builds omit $REVISION suffix - sed "s/Version>.\+$RELEASEVERSION\ $DISTRO/VERSION - fi - rm $DISTRO/VERSION.tmp - - # copy VERSION to VERSION.xsl - cp $DISTRO/VERSION $DISTRO/VERSION.xsl - - printf "Done.\n" 1>&2 - - # start re-directing stout and stderr to log file (if logging enabled) - if [ $LOGDIR ]; then - echo "Logging all further output to $LOGDIR/docbook-$DISTRO-$RELEASEVERSION.log.tmp" - exec 1> $LOGDIR/docbook-$DISTRO-$RELEASEVERSION.log.tmp - exec 2>&1 - fi - - date - echo - # echo selected variables - set | grep "^CHANGE\|REVISION" - echo - - #echo "Running svn update in gentext and $DISTRO working directories..." - #svn cleanup - #svn update gentext || exit 1 - #svn update $DISTRO || exit 1 - #echo -# - echo - date - echo "Building $DISTRO distribution..." - echo - - if test "$SVNCHECK" = "yes"; then - make distrib -C $DISTRO XSLT="$repo_dir/buildtools/xslt -$ENGINE" PDF_MAKER=$PDF_MAKER - else - make release -C $DISTRO XSLT="$repo_dir/buildtools/xslt -$ENGINE" PDF_MAKER=$PDF_MAKER - fi - - cat <<- EOF > HEADER.txt -The snapshot for a particular distribution is re-built automatically each time -a change is checked into the SVN source tree for the distribution. The most -recent build was of the "$DISTRO" distribution, for revision $REVISION, -on $DATE at $TIME $ZONE. - -These snapshots are intended for testing purposes only and otherwise come with -no guarantees. Any of them may in fact be broken at any given time. -EOF - - make $ZIPTARG -C $DISTRO ZIPVER=$RELEASEVERSION TMP=$TMP XSLT="$repo_dir/buildtools/xslt -$ENGINE" PDF_MAKER=$PDF_MAKER || exit 1 - - cat <<- EOF > $TMP/line.tmp - --------------------------------------------------------------------------------- -Latest Changes: --------------------------------------------------------------------------------- - -EOF - git log -n 200 > LatestChanges - - cat HEADER.txt $TMP/line.tmp LatestChanges > README.txt - rm $TMP/line.tmp - - # Uncompress tarball to local mirror directory. - # Previously, we uploaded and untarred it to the remote host - # (sourceforge.net web server), but 100Mb quota limit at - # Sourceforge made that a not-very-efficient use of the - # project disk space - cp $TMP/docbook*-$DISTRO*$RELEASEVERSION.tar.bz2 $SITEBASE - (umask 002; \ - cd $SITEBASE; \ - rm -f docbook-$DISTRO-$RELEASEVERSION.log; \ - rm -rf $DISTRO; \ - rm -rf $DISTRO-$ADDEDSUFFIX; \ - for tarball in docbook-$DISTRO*$RELEASEVERSION.tar.bz2; do \ - cat $tarball | bunzip2 | \ - (cd $TMP; $TAR xf$TARFLAGS -); \ - done; \ - mkdir $DISTRO; \ - cp -pR $TMP/docbook-$DISTRO-$RELEASEVERSION/* $DISTRO; \ - if [ -d $TMP/docbook-$DISTRO-$ADDEDSUFFIX-$RELEASEVERSION ]; then \ - mkdir $DISTRO-$ADDEDSUFFIX; \ - cp -pR $TMP/docbook-$DISTRO-$ADDEDSUFFIX-$RELEASEVERSION/* $DISTRO-$ADDEDSUFFIX; \ - fi; \ - ) - cp \ - $TMP/docbook*-$DISTRO*$RELEASEVERSION.zip \ - README.txt \ - LatestChanges \ - $SITEBASE - - rm -rf $TMP/docbook-$DISTRO*$RELEASEVERSION.tar.bz2 - rm -rf $TMP/docbook-$DISTRO*$RELEASEVERSION.tar.gz - rm -rf $TMP/docbook-$DISTRO*$RELEASEVERSION.zip - rm -rf $TMP/docbook-$DISTRO-$RELEASEVERSION - rm -rf $TMP/docbook-$DISTRO-$ADDEDSUFFIX-$RELEASEVERSION - - rm -f $DISTRO/LatestChanges HEADER.txt README.txt LatestChanges - - date - - # set up the e-mail From and To headers for buildbot message - cat <<- EOF > $TMP/docbook-$DISTRO-$RELEASEVERSION-message.txt -From: docbook buildbot -To: docbook-snapshots@lists.sourceforge.net -EOF - - # Run build-check and determine if it exits without any errors - if $repo_dir/buildtools/build-check $LOGDIR/docbook-$DISTRO-$RELEASEVERSION.log.tmp - then - # build-check completed successfully, so prepare the - # buildbot message accordingly - echo "Subject: $DISTRO snapshot $REVISION now available" >> $TMP/docbook-$DISTRO-$RELEASEVERSION-message.txt - echo >> $TMP/docbook-$DISTRO-$RELEASEVERSION-message.txt - echo "$DISTRO snapshot $REVISION appears to have been built successfully" >> $TMP/docbook-$DISTRO-$RELEASEVERSION-message.txt - echo >> $TMP/docbook-$DISTRO-$RELEASEVERSION-message.txt - # append the commit message for this revision - git show --quiet $REVISION >> $TMP/docbook-$DISTRO-$RELEASEVERSION-message.txt - echo >> $TMP/docbook-$DISTRO-$RELEASEVERSION-message.txt - echo "For further details about the code changes in this revision, see:" >> $TMP/docbook-$DISTRO-$RELEASEVERSION-message.txt - echo "http://docbook.svn.sf.net/docbook/?rev=$REVISION&view=rev" >> $TMP/docbook-$DISTRO-$RELEASEVERSION-message.txt - echo >> $TMP/docbook-$DISTRO-$RELEASEVERSION-message.txt - echo "You can download the snapshot here:" >> $TMP/docbook-$DISTRO-$RELEASEVERSION-message.txt - echo "http://docbook.sf.net/snapshots/" >> $TMP/docbook-$DISTRO-$RELEASEVERSION-message.txt - else - # build-check did not complete successfully, so prepare - # the buildbot message accordingly - echo "Subject: $DISTRO snapshot build is broken at r$REVISION" >> $TMP/docbook-$DISTRO-$RELEASEVERSION-message.txt - echo >> $TMP/docbook-$DISTRO-$RELEASEVERSION-message.txt - echo "The $DISTRO snapshot build appears to be broken at r$REVISION or before." >> $TMP/docbook-$DISTRO-$RELEASEVERSION-message.txt - # run buildcheck again and copy the output to the beginning - # of the buildbot message - $repo_dir/buildtools/build-check $LOGDIR/docbook-$DISTRO-$RELEASEVERSION.log.tmp >> $TMP/docbook-$DISTRO-$RELEASEVERSION-message.txt - echo >> $TMP/docbook-$DISTRO-$RELEASEVERSION-message.txt - # append the commit message for this revision - git show --quiet $REVISION >> $TMP/docbook-$DISTRO-$RELEASEVERSION-message.txt - echo >> $TMP/docbook-$DISTRO-$RELEASEVERSION-message.txt - echo "For further details about the code changes in this revision, see:" >> $TMP/docbook-$DISTRO-$RELEASEVERSION-message.txt - echo >> $TMP/docbook-$DISTRO-$RELEASEVERSION-message.txt - echo "http://docbook.svn.sf.net/docbook/?rev=$REVISION&view=rev" >> $TMP/docbook-$DISTRO-$RELEASEVERSION-message.txt - echo >> $TMP/docbook-$DISTRO-$RELEASEVERSION-message.txt - echo "The complete log file for the r$REVISION build follows." >> $TMP/docbook-$DISTRO-$RELEASEVERSION-message.txt - echo >> $TMP/docbook-$DISTRO-$RELEASEVERSION-message.txt - echo "-----------------------------------------------------------------" >> $TMP/docbook-$DISTRO-$RELEASEVERSION-message.txt - echo >> $TMP/docbook-$DISTRO-$RELEASEVERSION-message.txt - # copy the entire log file to the buildbot message - cat $LOGDIR/docbook-$DISTRO-$RELEASEVERSION.log.tmp >> $TMP/docbook-$DISTRO-$RELEASEVERSION-message.txt - echo >> $TMP/docbook-$DISTRO-$RELEASEVERSION-message.txt - fi - - # send the buildbot message - /usr/sbin/sendmail -f buildbot@sideshowbarker.net docbook-snapshots@lists.sourceforge.net < $TMP/docbook-$DISTRO-$RELEASEVERSION-message.txt - - cp $LOGDIR/docbook-$DISTRO-$RELEASEVERSION.log.tmp $SITEBASE/docbook-$DISTRO-$RELEASEVERSION.log - rm -f $TMP/docbook-$DISTRO-$RELEASEVERSION.lock - - cd - - done -fi diff --git a/xsl/Makefile b/xsl/Makefile index 8cc7ad33e..d33271c68 100644 --- a/xsl/Makefile +++ b/xsl/Makefile @@ -21,7 +21,7 @@ DISTRIB_DEPENDS = doc docsrc install.sh RELEASE-NOTES.txt extensions tests # value of RELEASE_DEPENDS is a space-separated list of any # targets for this distro's "release" target to depend on -RELEASE_DEPENDS = check RELEASE-NOTES.pdf RELEASE-NOTES-PARTIAL.txt +RELEASE_DEPENDS = RELEASE-NOTES.pdf RELEASE-NOTES-PARTIAL.txt # value of RELEASE_CLEAN_TARGETS is any distro-specific targets # that should be run when the release-clean target is called diff --git a/xsl/VERSION b/xsl/VERSION index 2f6331c40..df91c5470 100644 --- a/xsl/VERSION +++ b/xsl/VERSION @@ -26,7 +26,7 @@ XSL Stylesheets - 1.79.1 + snapshot diff --git a/xsl/VERSION.xsl b/xsl/VERSION.xsl index 2f6331c40..df91c5470 100644 --- a/xsl/VERSION.xsl +++ b/xsl/VERSION.xsl @@ -26,7 +26,7 @@ XSL Stylesheets - 1.79.1 + snapshot -- 2.40.0