2007-04-04 00:48:01 +02:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Shorewall Release Processing -- (C) 2003,2004,2005 -- Tom Eastep (teastep@shorewall.net)
|
|
|
|
# -- (C) 2005,2006 -- Cristian Rodriguez (webmaster@shorewall.net)
|
|
|
|
# Version : $Id$
|
|
|
|
#
|
2007-09-08 18:09:51 +02:00
|
|
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
2007-04-04 00:48:01 +02:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of Version 2 of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
2007-09-08 18:09:51 +02:00
|
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2007-04-04 00:48:01 +02:00
|
|
|
#
|
|
|
|
# I install this script in /usr/local/bin/makeshorewall.
|
|
|
|
#
|
|
|
|
# Usage:
|
|
|
|
#
|
2007-11-25 01:18:50 +01:00
|
|
|
# makeshorewall [ -trhxclpsS ] <version> [ <previous version> ]
|
2007-04-04 00:48:01 +02:00
|
|
|
#
|
|
|
|
# -t Build tarball
|
|
|
|
# -r Build RPM
|
2007-11-25 01:18:50 +01:00
|
|
|
# -c Build Common
|
|
|
|
# -l Build Lite
|
2008-12-10 19:21:32 +01:00
|
|
|
# -L Build 6 Lite
|
|
|
|
# -6 Build 6
|
2007-11-25 01:18:50 +01:00
|
|
|
# -p Build Perl
|
|
|
|
# -s Build Shell
|
2007-04-04 00:48:01 +02:00
|
|
|
# -h Build HTML documentation
|
|
|
|
# -x Build XML documentation
|
2007-11-25 01:18:50 +01:00
|
|
|
# -S Sign with GPG
|
2007-04-04 00:48:01 +02:00
|
|
|
#
|
|
|
|
# If no options are given, all options are assumed.
|
|
|
|
#
|
2007-12-12 00:45:31 +01:00
|
|
|
# If <previous version> is given, patch files reflecting the differences
|
|
|
|
# between that version and the current version ( <version> ) are generated
|
2007-04-04 00:48:01 +02:00
|
|
|
# generated. The directory ./shorewall-<previous version> must exist and
|
|
|
|
# contain the version against which the patch is generated.
|
|
|
|
################################################################################
|
|
|
|
# C O N F I G U R A T I O N
|
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# XSL Stylesheet to use for XML->HTML conversion
|
|
|
|
#
|
|
|
|
STYLESHEET=/usr/share/xml/docbook/stylesheet/nwalsh/current/xhtml/docbook.xsl
|
|
|
|
#
|
|
|
|
# Directory where the build log will be placed. The log has the name
|
|
|
|
# shorewall_build_<version>.log
|
|
|
|
#
|
|
|
|
LOGDIR=$PWD
|
|
|
|
#
|
|
|
|
# Your RPM build directory
|
|
|
|
#
|
|
|
|
RPMDIR=~/rpm/
|
|
|
|
#
|
2008-01-07 20:03:53 +01:00
|
|
|
# Directory where you want the release to be built -- must be fully-qualified
|
2007-04-04 00:48:01 +02:00
|
|
|
#
|
|
|
|
DIR=$PWD
|
|
|
|
#
|
|
|
|
# location and options for GnuPG
|
|
|
|
#
|
|
|
|
GPG="/usr/bin/gpg -ab --batch --comment 'To verify this, you can download our public key at https://lists.shorewall.net/shorewall.gpg.key'"
|
|
|
|
#
|
|
|
|
# SVN Repository
|
|
|
|
#
|
|
|
|
SVN=https://shorewall.svn.sourceforge.net/svnroot/shorewall
|
|
|
|
################################################################################
|
|
|
|
# V A R I A B L E S
|
|
|
|
################################################################################
|
|
|
|
VERSION=
|
2007-11-25 17:25:00 +01:00
|
|
|
BASEVERSION=
|
2007-04-04 00:48:01 +02:00
|
|
|
OLDVERSION=
|
|
|
|
SHOREWALLDIR=
|
|
|
|
SHOREWALLLITEDIR=
|
2007-04-04 01:16:13 +02:00
|
|
|
SHELLDIR=
|
2007-04-04 00:48:01 +02:00
|
|
|
SOURCEDIR=
|
|
|
|
SVNBRANCH=
|
|
|
|
LITESVNBRANCH=
|
2007-04-04 01:16:13 +02:00
|
|
|
SHELLBRANCH=
|
2007-04-04 00:48:01 +02:00
|
|
|
XMLPROJ=
|
|
|
|
RPMNAME=
|
|
|
|
LITERPMNAME=
|
|
|
|
TARBALL=
|
|
|
|
LITETARBALL=
|
|
|
|
LOGFILE=
|
|
|
|
HTMLDIR=
|
|
|
|
BUILDTARBALL=
|
|
|
|
BUILDRPM=
|
|
|
|
BUILDXML=
|
|
|
|
BUILDHTML=
|
|
|
|
SAMPLESTAG=
|
|
|
|
SIGN=
|
|
|
|
MANPAGETAG=
|
2008-12-14 19:08:56 +01:00
|
|
|
MANPAGE6TAG=
|
2007-04-04 00:48:01 +02:00
|
|
|
LITEMANPAGETAG=
|
2008-12-14 19:08:56 +01:00
|
|
|
LITE6MANPAGETAG=
|
2007-04-04 00:48:01 +02:00
|
|
|
PERLDIR=
|
2007-04-04 01:16:13 +02:00
|
|
|
SHELLDIR=
|
2007-04-04 00:48:01 +02:00
|
|
|
PERLBRANCH=
|
|
|
|
PERLRPMNAME=
|
|
|
|
PERLTARBALL=
|
2007-04-04 01:16:13 +02:00
|
|
|
SHELLBRANCH=
|
|
|
|
SHELLRPMNAME=
|
|
|
|
SHELLTARBALL=
|
2007-11-24 19:25:27 +01:00
|
|
|
BUILDCOMMON=
|
|
|
|
BUILDPERL=
|
|
|
|
BUILDSHELL=
|
|
|
|
BUILDLITE=
|
2007-11-24 19:37:44 +01:00
|
|
|
PATCHRELEASE=
|
2007-11-25 17:25:00 +01:00
|
|
|
PATCHNUM=
|
2008-12-10 19:21:32 +01:00
|
|
|
|
|
|
|
SVN6BRANCH=
|
|
|
|
SAMPLES6TAG=
|
|
|
|
LITE6SVNBRANCH=
|
|
|
|
SHOREWALL6DIR=
|
|
|
|
LITE6DIR=
|
|
|
|
BUILD6=
|
|
|
|
BUILD6LITE=
|
|
|
|
RPM6NAME=
|
|
|
|
LITE6RPMNAME=
|
|
|
|
TARBALL6=
|
|
|
|
LITE6TARBALL=
|
2007-04-04 00:48:01 +02:00
|
|
|
################################################################################
|
|
|
|
# F U N C T I O N S
|
|
|
|
################################################################################
|
|
|
|
progress_message()
|
|
|
|
{
|
|
|
|
echo >> $LOGFILE
|
|
|
|
echo "$@" | tee -a $LOGFILE
|
|
|
|
echo >> $LOGFILE
|
|
|
|
}
|
|
|
|
|
|
|
|
report()
|
|
|
|
{
|
|
|
|
echo "$@" | tee -a $LOGFILE
|
|
|
|
}
|
|
|
|
|
|
|
|
do_or_die()
|
|
|
|
{
|
|
|
|
eval $@ || { progress_message "Step \"$*\" FAILED" ; exit 2; }
|
|
|
|
}
|
|
|
|
|
|
|
|
fatal_error() {
|
|
|
|
progress_message "$*"
|
|
|
|
exit 2
|
|
|
|
}
|
|
|
|
|
|
|
|
list_search() # $1 = element to search for , $2-$n = list
|
|
|
|
{
|
2008-03-14 03:07:28 +01:00
|
|
|
local e
|
|
|
|
e=$1
|
2007-04-04 00:48:01 +02:00
|
|
|
|
|
|
|
while [ $# -gt 1 ]; do
|
|
|
|
shift
|
|
|
|
[ "x$e" = "x$1" ] && return 0
|
|
|
|
done
|
|
|
|
|
|
|
|
return 1
|
|
|
|
}
|
|
|
|
|
2007-08-28 16:22:16 +02:00
|
|
|
#
|
|
|
|
# It's easy to mis-type the GPG passphrase; this function allows us additional chances to get it right
|
|
|
|
#
|
2007-08-28 16:14:17 +02:00
|
|
|
do_rpmbuild() {
|
|
|
|
while ! rpmbuild $@ >> $LOGFILE 2>&1; do
|
2007-08-28 16:22:16 +02:00
|
|
|
echo "rpmbuild $@ failed" >&2
|
|
|
|
echo -n "Retry? Y/n " >&2
|
2007-08-28 16:14:17 +02:00
|
|
|
read response
|
|
|
|
case $response in
|
|
|
|
Y*|y*)
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
[ -n "$response" ] && return 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2007-04-04 00:48:01 +02:00
|
|
|
usage()
|
|
|
|
{
|
2007-11-25 01:18:50 +01:00
|
|
|
echo "usage: $(basename $0) [ -trhxlcpsS] <version> [ <old-version> ]"
|
2007-04-04 00:48:01 +02:00
|
|
|
exit 2
|
|
|
|
}
|
|
|
|
################################################################################
|
|
|
|
# E X E C U T I O N S T A R T S H E R E
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
set -e
|
|
|
|
set -u
|
|
|
|
|
|
|
|
|
|
|
|
done=
|
|
|
|
|
|
|
|
[ $# -eq 0 ] && usage
|
|
|
|
|
|
|
|
case $1 in
|
|
|
|
-*)
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
BUILDTARBALL=Yes
|
|
|
|
BUILDRPM=Yes
|
|
|
|
BUILDHTML=Yes
|
|
|
|
BUILDXML=Yes
|
|
|
|
BUILDRPM=Yes
|
2007-11-24 19:25:27 +01:00
|
|
|
BUILDCOMMON=Yes
|
|
|
|
BUILDPERL=Yes
|
|
|
|
BUILDSHELL=Yes
|
|
|
|
BUILDLITE=Yes
|
2008-12-14 21:18:06 +01:00
|
|
|
|
|
|
|
case $1 in
|
2008-12-17 20:31:10 +01:00
|
|
|
4.0.*)
|
2008-12-14 21:18:06 +01:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
BUILD6=Yes
|
|
|
|
BUILD6LITE=Yes
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2007-04-04 00:48:01 +02:00
|
|
|
done=Yes
|
|
|
|
SIGN=Yes
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
while [ -z "$done" ]; do
|
|
|
|
[ $# -eq 0 ] && break
|
|
|
|
|
|
|
|
option=$1
|
|
|
|
case $option in
|
|
|
|
-*)
|
2007-12-11 01:03:02 +01:00
|
|
|
shift
|
2007-04-04 00:48:01 +02:00
|
|
|
option=${option#-}
|
|
|
|
|
2007-12-11 01:03:02 +01:00
|
|
|
[ -z "$option" ] && done=Yes && break
|
2007-04-04 00:48:01 +02:00
|
|
|
|
|
|
|
while [ -n "$option" ]; do
|
|
|
|
case $option in
|
|
|
|
t*)
|
|
|
|
BUILDTARBALL=Yes
|
|
|
|
option=${option#t}
|
|
|
|
;;
|
|
|
|
r*)
|
|
|
|
BUILDTARBALL=Yes
|
|
|
|
BUILDRPM=Yes
|
|
|
|
option=${option#r}
|
|
|
|
;;
|
|
|
|
h*)
|
|
|
|
BUILDHTML=Yes
|
|
|
|
option=${option#h}
|
|
|
|
;;
|
|
|
|
x*)
|
|
|
|
BUILDXML=Yes
|
|
|
|
option=${option#x}
|
|
|
|
;;
|
2007-11-25 01:18:50 +01:00
|
|
|
c*)
|
2007-11-24 19:25:27 +01:00
|
|
|
BUILDCOMMON=Yes
|
2007-11-25 01:18:50 +01:00
|
|
|
option=${option#c}
|
2007-11-24 19:25:27 +01:00
|
|
|
;;
|
2008-12-10 19:21:32 +01:00
|
|
|
6*)
|
|
|
|
BUILD6=Yes
|
|
|
|
option=${option#6}
|
|
|
|
;;
|
2007-11-25 01:18:50 +01:00
|
|
|
p*)
|
2007-11-24 19:25:27 +01:00
|
|
|
BUILDPERL=Yes
|
2007-11-25 01:18:50 +01:00
|
|
|
option=${option#p}
|
2007-11-24 19:25:27 +01:00
|
|
|
;;
|
2007-11-25 01:18:50 +01:00
|
|
|
s*)
|
2007-11-24 19:25:27 +01:00
|
|
|
BUILDSHELL=Yes
|
2007-11-25 01:18:50 +01:00
|
|
|
option=${option#s}
|
2007-11-24 19:25:27 +01:00
|
|
|
;;
|
2007-11-25 01:18:50 +01:00
|
|
|
l*)
|
2007-11-24 19:25:27 +01:00
|
|
|
BUILDLITE=Yes
|
2007-11-25 01:18:50 +01:00
|
|
|
option=${option#l}
|
2007-11-24 19:25:27 +01:00
|
|
|
;;
|
2008-12-10 19:21:32 +01:00
|
|
|
L*)
|
|
|
|
BUILD6LITE=Yes
|
|
|
|
option=${option#L}
|
|
|
|
;;
|
2007-11-25 01:18:50 +01:00
|
|
|
S*)
|
2007-04-04 00:48:01 +02:00
|
|
|
SIGN=Yes
|
2007-11-25 01:18:50 +01:00
|
|
|
option=${option#S}
|
2007-04-04 00:48:01 +02:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
usage
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
done=Yes
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2007-12-11 01:03:02 +01:00
|
|
|
echo "Arguments are $*"
|
|
|
|
|
2007-04-04 00:48:01 +02:00
|
|
|
case $# in
|
|
|
|
1)
|
|
|
|
;;
|
|
|
|
2)
|
|
|
|
OLDVERSION=$2
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
usage
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
VERSION=$1
|
2007-12-10 18:17:25 +01:00
|
|
|
BASEVERSION=$1
|
2007-11-25 17:25:00 +01:00
|
|
|
|
2007-04-04 00:48:01 +02:00
|
|
|
LOGFILE=$LOGDIR/shorewall_build_${VERSION}.log
|
|
|
|
touch $LOGFILE
|
|
|
|
progress_message "Build of Shorewall $VERSION on $(date)"
|
|
|
|
|
|
|
|
case $VERSION in
|
2008-12-10 19:21:32 +01:00
|
|
|
4.3.*)
|
|
|
|
SVNBRANCH="trunk/Shorewall-common"
|
|
|
|
SVN6BRANCH="trunk/Shorewall6"
|
2008-12-10 19:43:37 +01:00
|
|
|
LITESVNBRANCH="trunk/Shorewall-lite"
|
|
|
|
LITE6SVNBRANCH="trunk/Shorewall6-lite"
|
2008-12-10 19:21:32 +01:00
|
|
|
PERLBRANCH="trunk/Shorewall-perl"
|
|
|
|
SHELLBRANCH="trunk/Shorewall-shell"
|
|
|
|
DOCTAG="trunk/docs"
|
|
|
|
XMLPROJ="docs-4.3"
|
2008-12-10 22:41:07 +01:00
|
|
|
SAMPLESTAG="trunk/Samples"
|
2008-12-10 19:21:32 +01:00
|
|
|
SAMPLES6TAG="trunk/Samples6"
|
|
|
|
MANPAGETAG=trunk/manpages
|
2008-12-14 19:08:56 +01:00
|
|
|
MANPAGE6TAG=trunk/manpages6
|
2008-12-10 19:21:32 +01:00
|
|
|
LITEMANPAGETAG=trunk/manpages-lite
|
2008-12-14 19:08:56 +01:00
|
|
|
LITE6MANPAGETAG=trunk/manpages6-lite
|
2008-12-10 19:21:32 +01:00
|
|
|
;;
|
2008-12-17 22:15:44 +01:00
|
|
|
4.2.*-*)
|
|
|
|
SVNBRANCH="trunk/Shorewall-common"
|
|
|
|
SVN6BRANCH="trunk/Shorewall6"
|
|
|
|
LITESVNBRANCH="trunk/Shorewall-lite"
|
|
|
|
LITE6SVNBRANCH="trunk/Shorewall6-lite"
|
|
|
|
PERLBRANCH="trunk/Shorewall-perl"
|
|
|
|
SHELLBRANCH="trunk/Shorewall-shell"
|
|
|
|
DOCTAG="trunk/docs"
|
|
|
|
XMLPROJ="docs-4.2"
|
|
|
|
SAMPLESTAG="trunk/Samples"
|
|
|
|
SAMPLES6TAG="trunk/Samples6"
|
|
|
|
MANPAGETAG=trunk/manpages
|
|
|
|
MANPAGE6TAG=trunk/manpages6
|
|
|
|
LITEMANPAGETAG=trunk/manpages-lite
|
|
|
|
LITE6MANPAGETAG=trunk/manpages6-lite
|
|
|
|
;;
|
2008-10-27 15:00:27 +01:00
|
|
|
4.2.*.*)
|
2007-12-10 18:17:25 +01:00
|
|
|
PATCHRELEASE=Yes
|
|
|
|
PATCHNUM=${VERSION##*.}
|
|
|
|
BASEVERSION=${VERSION%.*}
|
2007-12-08 23:00:06 +01:00
|
|
|
SVNBRANCH="tags/${BASEVERSION}/Shorewall-common-${PATCHNUM}"
|
|
|
|
LITESVNBRANCH="/tags/${BASEVERSION}/Shorewall-lite-${PATCHNUM}"
|
|
|
|
PERLBRANCH="tags/${BASEVERSION}/Shorewall-perl-${PATCHNUM}"
|
|
|
|
SHELLBRANCH="tags/${BASEVERSION}/Shorewall-shell-${PATCHNUM}"
|
|
|
|
DOCTAG="trunk/docs"
|
2008-10-27 15:00:27 +01:00
|
|
|
XMLPROJ="docs-4.2"
|
2007-12-10 18:17:25 +01:00
|
|
|
SAMPLESTAG="tags/${BASEVERSION}/Samples"
|
2008-04-19 21:42:21 +02:00
|
|
|
MANPAGETAG="tags/${BASEVERSION}/manpages"
|
2007-12-10 18:17:25 +01:00
|
|
|
LITEMANPAGETAG="tags/${BASEVERSION}/manpages-lite"
|
2007-12-08 23:00:06 +01:00
|
|
|
;;
|
2008-10-27 15:00:27 +01:00
|
|
|
4.2.*)
|
|
|
|
SVNBRANCH="branches/4.2/Shorewall-common"
|
|
|
|
LITESVNBRANCH="branches/4.2/Shorewall-lite"
|
|
|
|
PERLBRANCH="branches/4.2/Shorewall-perl"
|
|
|
|
SHELLBRANCH="branches/4.2/Shorewall-shell"
|
2007-04-04 00:48:01 +02:00
|
|
|
DOCTAG="trunk/docs"
|
2008-10-27 15:00:27 +01:00
|
|
|
XMLPROJ="docs-4.2"
|
2007-05-16 00:35:22 +02:00
|
|
|
SAMPLESTAG="trunk/Samples"
|
|
|
|
MANPAGETAG=trunk/manpages
|
|
|
|
LITEMANPAGETAG=trunk/manpages-lite
|
|
|
|
;;
|
2007-12-10 18:17:25 +01:00
|
|
|
4.0.*.*)
|
|
|
|
PATCHRELEASE=Yes
|
|
|
|
PATCHNUM=${VERSION##*.}
|
|
|
|
BASEVERSION=${VERSION%.*}
|
2007-11-25 17:25:00 +01:00
|
|
|
SVNBRANCH="tags/${BASEVERSION}/Shorewall-common-${PATCHNUM}"
|
|
|
|
LITESVNBRANCH="/tags/${BASEVERSION}/Shorewall-lite-${PATCHNUM}"
|
|
|
|
PERLBRANCH="tags/${BASEVERSION}/Shorewall-perl-${PATCHNUM}"
|
|
|
|
SHELLBRANCH="tags/${BASEVERSION}/Shorewall-shell-${PATCHNUM}"
|
|
|
|
DOCTAG="trunk/docs"
|
|
|
|
XMLPROJ="docs-4.0"
|
2007-12-10 18:25:54 +01:00
|
|
|
SAMPLESTAG="tags/${BASEVERSION}/Samples"
|
2008-04-19 21:42:21 +02:00
|
|
|
MANPAGETAG="tags/${BASEVERSION}/manpages"
|
2007-12-10 18:25:54 +01:00
|
|
|
LITEMANPAGETAG="tags/${BASEVERSION}/manpages-lite"
|
2007-11-25 17:25:00 +01:00
|
|
|
;;
|
2007-05-16 00:35:22 +02:00
|
|
|
4.0.*)
|
2007-08-09 20:18:03 +02:00
|
|
|
SVNBRANCH="branches/4.0/Shorewall-common"
|
|
|
|
LITESVNBRANCH="branches/4.0/Shorewall-lite"
|
|
|
|
PERLBRANCH="branches/4.0/Shorewall-perl"
|
2007-08-09 20:21:39 +02:00
|
|
|
SHELLBRANCH="branches/4.0/Shorewall-shell"
|
2007-05-16 00:35:22 +02:00
|
|
|
DOCTAG="trunk/docs"
|
|
|
|
XMLPROJ="docs-4.0"
|
2007-08-09 20:18:03 +02:00
|
|
|
SAMPLESTAG="branches/4.0/Samples"
|
2007-12-08 22:30:51 +01:00
|
|
|
MANPAGETAG=branches/4.0/manpages
|
|
|
|
LITEMANPAGETAG=branches/4.0/manpages-lite
|
2007-04-04 00:48:01 +02:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Unsupported Version: $VERSION"
|
|
|
|
exit 2
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
[ -d $DIR ] || { echo "Directory $DIR does not exist or is unaccessible" ; exit 2 ; }
|
|
|
|
|
|
|
|
progress_message "Distribution directory is $DIR"
|
|
|
|
|
|
|
|
cd $DIR
|
|
|
|
|
2008-01-13 17:48:00 +01:00
|
|
|
[ -n "$BUILDCOMMON" ] && SHOREWALLDIR=shorewall-common-${VERSION} || SHOREWALLDIR=shorewall-common
|
2008-12-10 19:21:32 +01:00
|
|
|
SHOREWALL6DIR=shorewall6-${VERSION}
|
2008-01-13 17:48:00 +01:00
|
|
|
SHOREWALLLITEDIR=shorewall-lite-${VERSION}
|
2008-12-10 19:21:32 +01:00
|
|
|
LITE6DIR=shorewall6-lite-${VERSION}
|
2008-01-13 17:48:00 +01:00
|
|
|
TARBALL=shorewall-common-${VERSION}.tgz
|
2008-12-10 19:21:32 +01:00
|
|
|
TARBALL6=shorewall6-${VERSION}.tgz
|
2008-01-13 17:48:00 +01:00
|
|
|
LITETARBALL=shorewall-lite-${VERSION}.tgz
|
2008-12-10 19:21:32 +01:00
|
|
|
LITE6TARBALL=shorewall6-lite-${VERSION}.tgz
|
2008-01-13 17:48:00 +01:00
|
|
|
SHELLTARBALL=shorewall-shell-${VERSION}.tgz
|
|
|
|
SHELLDIR=shorewall-shell-${VERSION}
|
2008-01-13 17:50:16 +01:00
|
|
|
PERLTARBALL=shorewall-perl-${VERSION}.tgz
|
|
|
|
PERLDIR=shorewall-perl-${VERSION}
|
2008-01-13 17:48:00 +01:00
|
|
|
|
2007-04-04 00:48:01 +02:00
|
|
|
case $VERSION in
|
2007-09-23 17:08:43 +02:00
|
|
|
*Beta*|*RC*|*Pre*)
|
2007-04-04 00:48:01 +02:00
|
|
|
#
|
|
|
|
# Beta or Release Candidate
|
|
|
|
#
|
2007-12-12 20:18:43 +01:00
|
|
|
BASEVERSION=${VERSION%-*}
|
2008-01-13 17:48:00 +01:00
|
|
|
RPMNAME=shorewall-common-${BASEVERSION}-0${VERSION#*-}.noarch.rpm
|
2008-12-17 22:15:44 +01:00
|
|
|
RPM6NAME=shorewall6-${BASEVERSION}-0${VERSION#*-}.noarch.rpm
|
2008-01-13 17:48:00 +01:00
|
|
|
LITERPMNAME=shorewall-lite-${BASEVERSION}-0${VERSION#*-}.noarch.rpm
|
2008-12-17 20:31:10 +01:00
|
|
|
LITE6RPMNAME=shorewall6-lite-${BASEVERSION}-0${VERSION#*-}.noarch.rpm
|
2008-01-13 17:48:00 +01:00
|
|
|
PERLRPMNAME=shorewall-perl-${BASEVERSION}-0${VERSION#*-}.noarch.rpm
|
|
|
|
SHELLRPMNAME=shorewall-shell-${BASEVERSION}-0${VERSION#*-}.noarch.rpm
|
2007-04-04 00:48:01 +02:00
|
|
|
;;
|
2007-12-10 18:38:04 +01:00
|
|
|
*.*.*.*)
|
|
|
|
#
|
|
|
|
# Patch Release
|
|
|
|
#
|
2008-01-13 17:48:00 +01:00
|
|
|
RPMNAME=shorewall-common-${BASEVERSION}-${PATCHNUM}.noarch.rpm
|
2008-12-17 20:31:10 +01:00
|
|
|
RPM6NAME=shorewall6-${BASEVERSION}-${PATCHNUM}.noarch.rpm
|
2008-01-13 17:48:00 +01:00
|
|
|
LITERPMNAME=shorewall-lite-${BASEVERSION}-${PATCHNUM}.noarch.rpm
|
2008-12-17 20:31:10 +01:00
|
|
|
LITE6RPMNAME=shorewall6-lite-${BASEVERSION}-${PATCHNUM}.noarch.rpm
|
2008-01-13 17:48:00 +01:00
|
|
|
PERLRPMNAME=shorewall-perl-${BASEVERSION}-${PATCHNUM}.noarch.rpm
|
|
|
|
SHELLRPMNAME=shorewall-shell-${BASEVERSION}-${PATCHNUM}.noarch.rpm
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
#
|
|
|
|
# Normal Release
|
|
|
|
#
|
|
|
|
RPMNAME=shorewall-common-${VERSION}-0base.noarch.rpm
|
2008-12-10 19:51:01 +01:00
|
|
|
RPM6NAME=shorewall6-${VERSION}-0base.noarch.rpm
|
2008-01-13 17:48:00 +01:00
|
|
|
LITERPMNAME=shorewall-lite-${VERSION}-0base.noarch.rpm
|
2008-12-12 01:48:41 +01:00
|
|
|
LITE6RPMNAME=shorewall6-lite-${VERSION}-0base.noarch.rpm
|
2008-01-13 17:48:00 +01:00
|
|
|
PERLRPMNAME=shorewall-perl-${VERSION}-0base.noarch.rpm
|
|
|
|
SHELLRPMNAME=shorewall-shell-${VERSION}-0base.noarch.rpm
|
2007-04-04 00:48:01 +02:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
HTMLDIR=shorewall-docs-html-$VERSION
|
|
|
|
|
|
|
|
if [ -n "${BUILDTARBALL}${BUILDRPM}" ]; then
|
|
|
|
report "Shorewall directory is $DIR/$SHOREWALLDIR"
|
2008-12-10 19:43:37 +01:00
|
|
|
report "Shorewall6 directory is $DIR/$SHOREWALL6DIR"
|
2007-04-04 00:48:01 +02:00
|
|
|
report "Shorewall Lite directory is $DIR/$SHOREWALLLITEDIR"
|
2008-12-10 19:43:37 +01:00
|
|
|
report "Shorewall6 Lite directory is $DIR/$LITE6DIR"
|
2007-04-04 01:16:13 +02:00
|
|
|
report "Shorewall Shell directory is $DIR/$SHELLDIR"
|
|
|
|
report "Shorewall Perl directory is $DIR/$PERLDIR"
|
2007-04-04 00:48:01 +02:00
|
|
|
report "SVN tag is $SVNBRANCH"
|
2008-12-10 22:41:07 +01:00
|
|
|
report "Samples tag is $SAMPLESTAG"
|
|
|
|
report "Samples6 tag is $SAMPLES6TAG"
|
|
|
|
report "SVN6 tag is $SVN6BRANCH"
|
2007-04-04 00:48:01 +02:00
|
|
|
report "Lite SVN tag is $LITESVNBRANCH"
|
2008-12-10 22:41:07 +01:00
|
|
|
report "Lite6 SVN tag is $LITE6SVNBRANCH"
|
2007-04-04 01:16:13 +02:00
|
|
|
report "Shell SVN tag is $SHELLBRANCH"
|
|
|
|
report "Perl SVN tag is $PERLBRANCH"
|
2008-12-10 19:43:37 +01:00
|
|
|
if [ -n "$BUILDTARBALL" ]; then
|
|
|
|
report "TARBALL is $TARBALL"
|
|
|
|
report "TARBALL6 is $TARBALL6"
|
|
|
|
report "LITETARBALL is $LITETARBALL"
|
|
|
|
report "LITE6TARBALL is $LITE6TARBALL"
|
|
|
|
report "SHELLTARBALL is $SHELLTARBALL"
|
|
|
|
report "PERLTARBALL is $PERLTARBALL"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -n "$BUILDRPM" ]; then
|
|
|
|
report "RPM is $RPMNAME"
|
|
|
|
[ -n "$RPM6NAME" ] && report "RPM6 is $RPM6NAME"
|
|
|
|
report "LITERPM is $LITERPMNAME"
|
|
|
|
[ -n "LITE6RPMNAME" ] && report "LITE6RPM is $LITE6RPMNAME"
|
|
|
|
report "SHELLRPM is $SHELLRPMNAME"
|
|
|
|
report "PERLRPM is $PERLRPMNAME"
|
|
|
|
fi
|
2007-04-04 00:48:01 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
[ -n "$BUILDHTML" ] && report "HTML Directory is $HTMLDIR"
|
|
|
|
|
2008-12-10 19:21:32 +01:00
|
|
|
[ -n "$RPM6NAME" ] || BUILD6=
|
2008-12-10 19:43:37 +01:00
|
|
|
[ -n "$LITE6RPMNAME" ] || BUILD6LITE=
|
2008-12-10 19:21:32 +01:00
|
|
|
|
2007-04-04 01:16:13 +02:00
|
|
|
if [ -n "${BUILDTARBALL}${BUILDRPM}" ]; then
|
2007-04-04 00:48:01 +02:00
|
|
|
|
2007-11-24 19:49:30 +01:00
|
|
|
rm -rf $SHOREWALLDIR
|
|
|
|
|
2008-12-10 19:21:32 +01:00
|
|
|
[ -n "$BUILD6" ] && rm -rf $SHOREWALL6DIR
|
2007-11-24 19:25:27 +01:00
|
|
|
[ -n "$BUILDLITE" ] && rm -rf $SHOREWALLLITEDIR
|
2008-12-10 19:21:32 +01:00
|
|
|
[ -n "$BUILD6LITE" ] && rm -rf $LITE6DIR
|
2007-11-24 19:25:27 +01:00
|
|
|
[ -n "$BUILDPERL" ] && rm -rf $PERLDIR
|
|
|
|
[ -n "$BUILDSHELL" ] && rm -rf $SHELLDIR
|
2007-04-04 00:48:01 +02:00
|
|
|
|
2007-11-24 19:49:30 +01:00
|
|
|
progress_message "Exporting $SVNBRANCH from SVN..." && do_or_die "svn export --non-interactive --force ${SVN}/$SVNBRANCH $SHOREWALLDIR >> $LOGFILE 2>&1"
|
2008-12-10 19:21:32 +01:00
|
|
|
|
|
|
|
[ -n "$BUILD6" ] && progress_message "Exporting $SVN6BRANCH from SVN..." && do_or_die "svn export --non-interactive --force ${SVN}/$SVN6BRANCH $SHOREWALL6DIR >> $LOGFILE 2>&1"
|
2007-04-04 00:48:01 +02:00
|
|
|
|
2008-12-10 19:43:37 +01:00
|
|
|
[ -n "$BUILDLITE" ] && progress_message "Exporting $LITESVNBRANCH from SVN..." && do_or_die "svn export --non-interactive --force ${SVN}/$LITESVNBRANCH $SHOREWALLLITEDIR >> $LOGFILE 2>&1"
|
2008-12-10 19:21:32 +01:00
|
|
|
|
2008-12-10 19:43:37 +01:00
|
|
|
[ -n "$BUILD6LITE" ] && progress_message "Exporting $LITE6SVNBRANCH from SVN..." && do_or_die "svn export --non-interactive --force ${SVN}/$LITE6SVNBRANCH $LITE6DIR >> $LOGFILE 2>&1"
|
2007-04-07 19:20:09 +02:00
|
|
|
|
2008-12-10 19:21:32 +01:00
|
|
|
[ -n "$BUILDPERL" ] && progress_message "Exporting $PERLBRANCH from SVN..." && do_or_die "svn export --non-interactive --force ${SVN}/$PERLBRANCH $PERLDIR >> $LOGFILE 2>&1"
|
2007-04-07 19:20:09 +02:00
|
|
|
|
2008-12-10 19:21:32 +01:00
|
|
|
[ -n "$BUILDSHELL" ] && progress_message "Exporting $SHELLBRANCH from SVN..." && do_or_die "svn export --non-interactive --force ${SVN}/$SHELLBRANCH $SHELLDIR >> $LOGFILE 2>&1"
|
2007-04-07 21:20:14 +02:00
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
|
2007-11-24 19:49:30 +01:00
|
|
|
if [ -n "$BUILDLITE" ]; then
|
2007-11-24 19:25:27 +01:00
|
|
|
do_or_die "cp $SHOREWALLDIR/modules $SHOREWALLLITEDIR >> $LOGFILE 2>&1"
|
2007-04-07 19:04:50 +02:00
|
|
|
do_or_die "cp $SHOREWALLDIR/lib.base $SHOREWALLLITEDIR >> $LOGFILE 2>&1"
|
|
|
|
if [ -f $SHOREWALLDIR/lib.cli ]; then
|
|
|
|
do_or_die "cp $SHOREWALLDIR/lib.cli $SHOREWALLLITEDIR >> $LOGFILE 2>&1"
|
2007-04-04 00:48:01 +02:00
|
|
|
fi
|
2007-04-07 19:04:50 +02:00
|
|
|
if [ -f $SHOREWALLDIR/wait4ifup ]; then
|
|
|
|
do_or_die "cp $SHOREWALLDIR/wait4ifup $SHOREWALLLITEDIR >> $LOGFILE 2>&1"
|
|
|
|
fi
|
2007-04-04 00:48:01 +02:00
|
|
|
fi
|
|
|
|
|
2008-12-10 19:21:32 +01:00
|
|
|
if [ -n "$BUILD6LITE" ]; then
|
|
|
|
do_or_die "cp $SHOREWALL6DIR/modules $LITE6DIR >> $LOGFILE 2>&1"
|
|
|
|
do_or_die "cp $SHOREWALL6DIR/lib.base $LITE6DIR >> $LOGFILE 2>&1"
|
|
|
|
do_or_die "cp $SHOREWALL6DIR/lib.cli $LITE6DIR >> $LOGFILE 2>&1"
|
|
|
|
do_or_die "cp $SHOREWALL6DIR/wait4ifup $LITE6DIR >> $LOGFILE 2>&1"
|
|
|
|
fi
|
|
|
|
|
|
|
|
[ -n "$BUILD6" ] && do_or_die "cp $SHOREWALLDIR/changelog.txt $SHOREWALLDIR/releasenotes.txt $SHOREWALL6DIR >> $LOGFILE 2>&1"
|
2007-11-24 19:25:27 +01:00
|
|
|
[ -n "$BUILDLITE" ] && do_or_die "cp $SHOREWALLDIR/changelog.txt $SHOREWALLDIR/releasenotes.txt $SHOREWALLLITEDIR >> $LOGFILE 2>&1"
|
2008-12-10 19:43:37 +01:00
|
|
|
[ -n "$BUILD6LITE" ] && do_or_die "cp $SHOREWALLDIR/changelog.txt $SHOREWALLDIR/releasenotes.txt $LITE6DIR >> $LOGFILE 2>&1"
|
2007-11-24 19:25:27 +01:00
|
|
|
[ -n "$BUILDPERL" ] && do_or_die "cp $SHOREWALLDIR/changelog.txt $SHOREWALLDIR/releasenotes.txt $PERLDIR >> $LOGFILE 2>&1"
|
|
|
|
[ -n "$BUILDSHELL" ] && do_or_die "cp $SHOREWALLDIR/changelog.txt $SHOREWALLDIR/releasenotes.txt $SHELLDIR >> $LOGFILE 2>&1"
|
|
|
|
|
|
|
|
if [ -n "$BUILDCOMMON" ]; then
|
|
|
|
fgrep VERSION=$VERSION $SHOREWALLDIR/install.sh > /dev/null 2>&1 || fatal_error "install.sh has wrong version"
|
|
|
|
fgrep VERSION=$VERSION $SHOREWALLDIR/uninstall.sh > /dev/null 2>&1 || fatal_error "uninstall.sh has wrong version"
|
|
|
|
fgrep VERSION=$VERSION $SHOREWALLDIR/fallback.sh > /dev/null 2>&1 || fatal_error "fallback.sh has wrong version"
|
|
|
|
fi
|
2007-04-04 00:48:01 +02:00
|
|
|
|
2008-12-10 19:21:32 +01:00
|
|
|
if [ -n "$BUILD6" ]; then
|
|
|
|
fgrep VERSION=$VERSION $SHOREWALL6DIR/install.sh > /dev/null 2>&1 || fatal_error "6 install.sh has wrong version"
|
|
|
|
fgrep VERSION=$VERSION $SHOREWALL6DIR/uninstall.sh > /dev/null 2>&1 || fatal_error "6 uninstall.sh has wrong version"
|
|
|
|
fgrep VERSION=$VERSION $SHOREWALL6DIR/fallback.sh > /dev/null 2>&1 || fatal_error "6 fallback.sh has wrong version"
|
|
|
|
fi
|
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
if [ -n "$BUILDLITE" ]; then
|
|
|
|
fgrep VERSION=$VERSION $SHOREWALLLITEDIR/install.sh > /dev/null 2>&1 || fatal_error "Lite install.sh has wrong version"
|
|
|
|
fgrep VERSION=$VERSION $SHOREWALLLITEDIR/uninstall.sh > /dev/null 2>&1 || fatal_error "Lite uninstall.sh has wrong version"
|
|
|
|
fgrep VERSION=$VERSION $SHOREWALLLITEDIR/fallback.sh > /dev/null 2>&1 || fatal_error "Lite fallback.sh has wrong version"
|
|
|
|
fi
|
2007-04-23 19:26:17 +02:00
|
|
|
|
2008-12-10 19:21:32 +01:00
|
|
|
if [ -n "$BUILD6LITE" ]; then
|
|
|
|
fgrep VERSION=$VERSION $LITE6DIR/install.sh > /dev/null 2>&1 || fatal_error "Lite 6 install.sh has wrong version"
|
|
|
|
fgrep VERSION=$VERSION $LITE6DIR/uninstall.sh > /dev/null 2>&1 || fatal_error "Lite 6 uninstall.sh has wrong version"
|
|
|
|
fgrep VERSION=$VERSION $LITE6DIR/fallback.sh > /dev/null 2>&1 || fatal_error "Lite 6 fallback.sh has wrong version"
|
|
|
|
fi
|
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
if [ -n "$BUILDSHELL" ]; then
|
|
|
|
fgrep VERSION=$VERSION $SHELLDIR/install.sh > /dev/null 2>&1 || fatal_error "Shell install.sh has wrong version"
|
|
|
|
fi
|
2007-04-23 19:26:17 +02:00
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
if [ -n "$BUILDPERL" ]; then
|
|
|
|
fgrep VERSION=$VERSION $PERLDIR/install.sh > /dev/null 2>&1 || fatal_error "Perl install.sh has wrong version"
|
2007-12-12 00:58:43 +01:00
|
|
|
[ $(eval perl -e "'use lib \"$PERLDIR\"; use Shorewall::Config qw(:internal); print \"\$globals{VERSION}\n\"'") = $VERSION ] || \
|
|
|
|
fatal_error "Perl Config.pm has wrong version"
|
2007-04-04 00:48:01 +02:00
|
|
|
fi
|
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
if [ -n "$BUILDCOMMON" ]; then
|
2007-04-04 00:48:01 +02:00
|
|
|
cd $SHOREWALLDIR
|
2007-11-24 19:25:27 +01:00
|
|
|
do_or_die "svn export --non-interactive --force ${SVN}/$SAMPLESTAG Samples >> $LOGFILE 2>&1"
|
2007-04-04 00:48:01 +02:00
|
|
|
progress_message "Exporting $MANPAGETAG from SVN..."
|
|
|
|
do_or_die "svn export --non-interactive --force ${SVN}/$MANPAGETAG manpages >> $LOGFILE 2>&1"
|
|
|
|
cd manpages
|
|
|
|
for f in *.xml; do
|
|
|
|
if [ $f != shorewall-template.xml ]; then
|
|
|
|
progress_message "Generating Man Page from $f..."
|
2008-07-10 20:39:09 +02:00
|
|
|
do_or_die "xmlto --skip-validation man $f >> $LOGFILE 2>&1"
|
2008-07-10 20:26:36 +02:00
|
|
|
case $f in
|
|
|
|
*.conf.*|shorewall.xml)
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
g=${f#shorewall-}
|
|
|
|
h=$(ls ${g%.xml}.[58])
|
|
|
|
mv $h shorewall-$h
|
|
|
|
;;
|
|
|
|
esac
|
2007-04-04 00:48:01 +02:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
rm *.xml
|
|
|
|
cd $DIR
|
2007-11-24 19:25:27 +01:00
|
|
|
fi
|
2008-12-10 19:58:44 +01:00
|
|
|
|
|
|
|
if [ -n "$BUILD6" ]; then
|
|
|
|
cd $SHOREWALL6DIR
|
2008-12-10 22:56:16 +01:00
|
|
|
do_or_die "svn export --non-interactive --force ${SVN}/$SAMPLES6TAG Samples6 >> $LOGFILE 2>&1"
|
2008-12-14 19:08:56 +01:00
|
|
|
progress_message "Exporting $MANPAGE6TAG from SVN..."
|
|
|
|
do_or_die "svn export --non-interactive --force ${SVN}/$MANPAGE6TAG manpages >> $LOGFILE 2>&1"
|
|
|
|
cd manpages
|
|
|
|
for f in *.xml; do
|
|
|
|
if [ $f != shorewall6-template.xml ]; then
|
|
|
|
progress_message "Generating Man Page from $f..."
|
|
|
|
do_or_die "xmlto --skip-validation man $f >> $LOGFILE 2>&1"
|
|
|
|
case $f in
|
|
|
|
*.conf.*|shorewall6.xml)
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
g=${f#shorewall6-}
|
|
|
|
h=$(ls ${g%.xml}.[58])
|
|
|
|
mv $h shorewall6-$h
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
rm *.xml
|
2008-12-10 19:58:44 +01:00
|
|
|
cd $DIR
|
|
|
|
fi
|
2007-04-04 00:48:01 +02:00
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
if [ -n "$BUILDLITE" ]; then
|
2007-04-04 00:48:01 +02:00
|
|
|
cd $SHOREWALLLITEDIR
|
|
|
|
progress_message "Exporting $LITEMANPAGETAG from SVN..."
|
|
|
|
do_or_die "svn export --non-interactive --force ${SVN}/$LITEMANPAGETAG manpages >> $LOGFILE 2>&1"
|
|
|
|
cd manpages
|
|
|
|
for f in *.xml; do
|
|
|
|
if [ $f != shorewall-template.xml ]; then
|
|
|
|
progress_message "Generating Man Page from $f..."
|
2008-07-10 20:39:09 +02:00
|
|
|
do_or_die "xmlto --skip-validation man $f >> $LOGFILE 2>&1"
|
2008-07-10 20:26:36 +02:00
|
|
|
case $f in
|
|
|
|
*.conf.*|shorewall-lite.xml)
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
g=${f#shorewall-lite-}
|
|
|
|
h=$(ls ${g%.xml}.[58])
|
|
|
|
mv $h shorewall-lite-$h
|
|
|
|
;;
|
|
|
|
esac
|
2007-04-04 00:48:01 +02:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
rm *.xml
|
|
|
|
cd $DIR
|
|
|
|
fi
|
|
|
|
|
2008-12-14 19:08:56 +01:00
|
|
|
if [ -n "$BUILD6LITE" ]; then
|
|
|
|
cd $LITE6DIR
|
|
|
|
progress_message "Exporting $LITE6MANPAGETAG from SVN..."
|
|
|
|
do_or_die "svn export --non-interactive --force ${SVN}/$LITE6MANPAGETAG manpages >> $LOGFILE 2>&1"
|
|
|
|
cd manpages
|
|
|
|
for f in *.xml; do
|
|
|
|
if [ $f != shorewall6-template.xml ]; then
|
|
|
|
progress_message "Generating Man Page from $f..."
|
|
|
|
do_or_die "xmlto --skip-validation man $f >> $LOGFILE 2>&1"
|
|
|
|
case $f in
|
|
|
|
*.conf.*|shorewall6-lite.xml)
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
g=${f#shorewall6-lite-}
|
|
|
|
h=$(ls ${g%.xml}.[58])
|
|
|
|
mv $h shorewall6-lite-$h
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
rm *.xml
|
|
|
|
cd $DIR
|
|
|
|
fi
|
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
[ -n "$BUILDCOMMON" ] && do_or_die "rm -rf $SHOREWALLDIR/debian"
|
2008-12-10 19:21:32 +01:00
|
|
|
[ -n "$BUILD6" ] && do_or_die "rm -rf $SHOREWALL6DIR/debian"
|
2007-11-24 19:25:27 +01:00
|
|
|
[ -n "$BUILDLITE" ] && do_or_die "rm -rf $SHOREWALLLITEDIR/debian"
|
2008-12-10 19:21:32 +01:00
|
|
|
[ -n "$BUILD6LITE" ] && do_or_die "rm -rf $LITE6DIR/debian"
|
2007-11-24 19:25:27 +01:00
|
|
|
[ -n "$BUILDPERL" ] && do_or_die "rm -rf $PERLDIR/debian"
|
|
|
|
[ -n "$BUILDSHELL" ] && do_or_die "rm -rf $SHELLDIR/debian"
|
2007-04-04 00:48:01 +02:00
|
|
|
|
|
|
|
if [ -n "$BUILDTARBALL" ]; then
|
2007-11-24 19:25:27 +01:00
|
|
|
if [ -n "$BUILDCOMMON" ]; then
|
|
|
|
progress_message "Creating $DIR/$TARBALL..."
|
2007-11-28 20:41:35 +01:00
|
|
|
rm -f $SHOREWALLDIR/*.diff
|
2007-11-24 19:25:27 +01:00
|
|
|
do_or_die "tar -zcvf $TARBALL $SHOREWALLDIR >> $LOGFILE 2>&1"
|
2008-02-07 18:05:44 +01:00
|
|
|
do_or_die "tar -jcvf shorewall-common-${VERSION}.tar.bz2 $SHOREWALLDIR >> $LOGFILE 2>&1"
|
2007-11-24 19:25:27 +01:00
|
|
|
if [ -n "$SIGN" ]; then
|
|
|
|
for shoresuffix in tgz tar.bz2; do
|
2008-02-07 18:05:44 +01:00
|
|
|
shoreball=shorewall-common-${VERSION}.${shoresuffix}
|
2007-11-24 19:25:27 +01:00
|
|
|
report "GPG signing $DIR/$shoreball"
|
|
|
|
rm -f ${shoreball}.asc
|
|
|
|
do_or_die "$GPG $shoreball"
|
|
|
|
done
|
|
|
|
fi
|
2007-04-04 00:48:01 +02:00
|
|
|
fi
|
2007-11-24 19:25:27 +01:00
|
|
|
|
2008-12-10 19:21:32 +01:00
|
|
|
if [ -n "$BUILD6" ]; then
|
|
|
|
progress_message "Creating $DIR/$TARBALL6..."
|
|
|
|
rm -f $SHOREWALL6DIR/*.diff
|
|
|
|
do_or_die "tar -zcvf $TARBALL6 $SHOREWALL6DIR >> $LOGFILE 2>&1"
|
|
|
|
do_or_die "tar -jcvf shorewall6-${VERSION}.tar.bz2 $SHOREWALL6DIR >> $LOGFILE 2>&1"
|
|
|
|
if [ -n "$SIGN" ]; then
|
|
|
|
for shoresuffix in tgz tar.bz2; do
|
|
|
|
shoreball=shorewall6-${VERSION}.${shoresuffix}
|
|
|
|
report "GPG signing $DIR/$shoreball"
|
|
|
|
rm -f ${shoreball}.asc
|
|
|
|
do_or_die "$GPG $shoreball"
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
if [ -n "$BUILDLITE" ]; then
|
|
|
|
progress_message "Creating $DIR/$LITETARBALL..."
|
2007-11-28 20:41:35 +01:00
|
|
|
rm -f $SHOREWALLLITEDIR/*.diff
|
2007-11-24 19:25:27 +01:00
|
|
|
do_or_die "tar -zcvf $LITETARBALL $SHOREWALLLITEDIR >> $LOGFILE 2>&1"
|
2008-02-07 18:05:44 +01:00
|
|
|
do_or_die "tar -jcvf shorewall-lite-${VERSION}.tar.bz2 $SHOREWALLLITEDIR >> $LOGFILE 2>&1"
|
2007-11-24 19:25:27 +01:00
|
|
|
if [ -n "$SIGN" ]; then
|
|
|
|
for shoresuffix in tgz tar.bz2; do
|
2008-02-07 18:05:44 +01:00
|
|
|
shoreball=shorewall-lite-${VERSION}.${shoresuffix}
|
2007-11-24 19:25:27 +01:00
|
|
|
report "GPG signing $DIR/$shoreball"
|
|
|
|
rm -f ${shoreball}.asc
|
|
|
|
do_or_die "$GPG $shoreball"
|
|
|
|
done
|
|
|
|
fi
|
2007-04-07 19:04:50 +02:00
|
|
|
fi
|
|
|
|
|
2008-12-10 19:21:32 +01:00
|
|
|
if [ -n "$BUILD6LITE" ]; then
|
|
|
|
progress_message "Creating $DIR/$LITE6TARBALL..."
|
|
|
|
rm -f $LITE6DIR/*.diff
|
|
|
|
do_or_die "tar -zcvf $LITE6TARBALL $LITE6DIR >> $LOGFILE 2>&1"
|
|
|
|
do_or_die "tar -jcvf shorewall6-lite-${VERSION}.tar.bz2 $LITE6DIR >> $LOGFILE 2>&1"
|
|
|
|
if [ -n "$SIGN" ]; then
|
|
|
|
for shoresuffix in tgz tar.bz2; do
|
|
|
|
shoreball=shorewall6-lite-${VERSION}.${shoresuffix}
|
|
|
|
report "GPG signing $DIR/$shoreball"
|
|
|
|
rm -f ${shoreball}.asc
|
|
|
|
do_or_die "$GPG $shoreball"
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
if [ -n "$BUILDPERL" ]; then
|
|
|
|
progress_message "Creating $DIR/$PERLTARBALL..."
|
2007-11-28 20:41:35 +01:00
|
|
|
rm -f $PERLDIR/*.diff
|
2007-11-24 19:25:27 +01:00
|
|
|
do_or_die "tar -zcvf $PERLTARBALL $PERLDIR >> $LOGFILE 2>&1"
|
2008-02-07 18:05:44 +01:00
|
|
|
do_or_die "tar -jcvf shorewall-perl-${VERSION}.tar.bz2 $PERLDIR >> $LOGFILE 2>&1"
|
2007-11-24 19:25:27 +01:00
|
|
|
|
|
|
|
if [ -n "$SIGN" ]; then
|
|
|
|
for shoresuffix in tgz tar.bz2; do
|
2008-02-07 18:05:44 +01:00
|
|
|
shoreball=shorewall-perl-${VERSION}.${shoresuffix}
|
2007-11-24 19:25:27 +01:00
|
|
|
report "GPG signing $DIR/$shoreball"
|
|
|
|
rm -f ${shoreball}.asc
|
|
|
|
do_or_die "$GPG $shoreball"
|
|
|
|
done
|
|
|
|
fi
|
2007-04-04 00:48:01 +02:00
|
|
|
fi
|
2007-04-07 21:20:14 +02:00
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
if [ -n "$BUILDSHELL" ]; then
|
|
|
|
progress_message "Creating $DIR/$SHELLTARBALL..."
|
2007-11-28 20:41:35 +01:00
|
|
|
rm -f $SHELLDIR/*.diff
|
2007-11-24 19:25:27 +01:00
|
|
|
do_or_die "tar -zcvf $SHELLTARBALL $SHELLDIR >> $LOGFILE 2>&1"
|
2008-02-07 18:05:44 +01:00
|
|
|
do_or_die "tar -jcvf shorewall-shell-${VERSION}.tar.bz2 $SHELLDIR >> $LOGFILE 2>&1"
|
2007-04-07 21:20:14 +02:00
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
if [ -n "$SIGN" ]; then
|
|
|
|
for shoresuffix in tgz tar.bz2; do
|
2008-02-07 18:05:44 +01:00
|
|
|
shoreball=shorewall-shell-${VERSION}.${shoresuffix}
|
2007-11-24 19:25:27 +01:00
|
|
|
report "GPG signing $DIR/$shoreball"
|
|
|
|
rm -f ${shoreball}.asc
|
|
|
|
do_or_die "$GPG $shoreball"
|
|
|
|
done
|
|
|
|
fi
|
2007-04-07 21:20:14 +02:00
|
|
|
fi
|
2007-04-04 00:48:01 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -n "$BUILDRPM" ]; then
|
|
|
|
test -n "$SIGN" && SIGN="--sign"
|
2007-11-24 19:25:27 +01:00
|
|
|
|
|
|
|
if [ -n "$BUILDCOMMON" ]; then
|
|
|
|
progress_message "Building $RPMNAME..."
|
|
|
|
|
2008-01-07 20:03:53 +01:00
|
|
|
cd /tmp
|
|
|
|
rm -rf shorewall-common-${BASEVERSION}
|
|
|
|
do_or_die "cp -a $DIR/$SHOREWALLDIR shorewall-common-${BASEVERSION}"
|
|
|
|
do_or_die "tar -zcf $RPMDIR/SOURCES/shorewall-common-${BASEVERSION}.tgz shorewall-common-${BASEVERSION}"
|
|
|
|
cd $DIR
|
2007-11-24 19:25:27 +01:00
|
|
|
do_or_die "cp $SHOREWALLDIR/shorewall-common.spec $RPMDIR/SPECS/"
|
|
|
|
do_or_die "do_rpmbuild -ba $SIGN $RPMDIR/SPECS/shorewall-common.spec"
|
|
|
|
do_or_die cp -a $RPMDIR/RPMS/noarch/$RPMNAME .
|
|
|
|
fi
|
|
|
|
|
2008-12-10 19:21:32 +01:00
|
|
|
if [ -n "$BUILD6" ]; then
|
|
|
|
progress_message "Building $RPM6NAME..."
|
|
|
|
|
|
|
|
cd /tmp
|
|
|
|
rm -rf shorewall6-${BASEVERSION}
|
|
|
|
do_or_die "cp -a $DIR/$SHOREWALL6DIR shorewall6-${BASEVERSION}"
|
|
|
|
do_or_die "tar -zcf $RPMDIR/SOURCES/shorewall6-${BASEVERSION}.tgz shorewall6-${BASEVERSION}"
|
|
|
|
cd $DIR
|
|
|
|
do_or_die "cp $SHOREWALL6DIR/shorewall6.spec $RPMDIR/SPECS/"
|
|
|
|
do_or_die "do_rpmbuild -ba $SIGN $RPMDIR/SPECS/shorewall6.spec"
|
|
|
|
do_or_die cp -a $RPMDIR/RPMS/noarch/$RPM6NAME .
|
|
|
|
fi
|
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
if [ -n "$BUILDLITE" ]; then
|
|
|
|
progress_message "Building $LITERPMNAME..."
|
|
|
|
|
2008-01-07 20:03:53 +01:00
|
|
|
cd /tmp
|
|
|
|
rm -rf shorewall-lite-${BASEVERSION}
|
|
|
|
do_or_die "cp -a $DIR/$SHOREWALLLITEDIR shorewall-lite-${BASEVERSION}"
|
|
|
|
do_or_die "tar -zcf $RPMDIR/SOURCES/shorewall-lite-${BASEVERSION}.tgz shorewall-lite-${BASEVERSION}"
|
|
|
|
cd $DIR
|
2007-11-24 19:25:27 +01:00
|
|
|
do_or_die "cp $SHOREWALLLITEDIR/shorewall-lite.spec $RPMDIR/SPECS/"
|
|
|
|
do_or_die "do_rpmbuild -ba $SIGN $RPMDIR/SPECS/shorewall-lite.spec"
|
|
|
|
do_or_die cp -a $RPMDIR/RPMS/noarch/$LITERPMNAME .
|
|
|
|
fi
|
|
|
|
|
2008-12-10 19:21:32 +01:00
|
|
|
if [ -n "$BUILD6LITE" ]; then
|
|
|
|
progress_message "Building $LITE6RPMNAME..."
|
|
|
|
|
|
|
|
cd /tmp
|
|
|
|
rm -rf shorewall6-lite-${BASEVERSION}
|
2008-12-10 22:56:16 +01:00
|
|
|
do_or_die "cp -a $DIR/$LITE6DIR shorewall6-lite-${BASEVERSION}"
|
2008-12-10 19:21:32 +01:00
|
|
|
do_or_die "tar -zcf $RPMDIR/SOURCES/shorewall6-lite-${BASEVERSION}.tgz shorewall6-lite-${BASEVERSION}"
|
|
|
|
cd $DIR
|
2008-12-10 22:56:16 +01:00
|
|
|
do_or_die "cp $LITE6DIR/shorewall6-lite.spec $RPMDIR/SPECS/"
|
2008-12-10 19:21:32 +01:00
|
|
|
do_or_die "do_rpmbuild -ba $SIGN $RPMDIR/SPECS/shorewall6-lite.spec"
|
|
|
|
do_or_die cp -a $RPMDIR/RPMS/noarch/$LITE6RPMNAME .
|
|
|
|
fi
|
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
if [ -n "$BUILDPERL" ]; then
|
|
|
|
progress_message "Building $PERLRPMNAME..."
|
|
|
|
|
2008-01-07 20:03:53 +01:00
|
|
|
cd /tmp
|
|
|
|
rm -rf shorewall-perl-${BASEVERSION}
|
|
|
|
do_or_die "cp -a $DIR/$PERLDIR shorewall-perl-${BASEVERSION}"
|
|
|
|
do_or_die "tar -zcf $RPMDIR/SOURCES/shorewall-perl-${BASEVERSION}.tgz shorewall-perl-${BASEVERSION}"
|
|
|
|
cd $DIR
|
2007-11-24 19:25:27 +01:00
|
|
|
do_or_die "cp $PERLDIR/shorewall-perl.spec $RPMDIR/SPECS/"
|
|
|
|
do_or_die "do_rpmbuild -ba $SIGN $RPMDIR/SPECS/shorewall-perl.spec"
|
|
|
|
do_or_die cp -a $RPMDIR/RPMS/noarch/$PERLRPMNAME .
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -n "$BUILDSHELL" ]; then
|
|
|
|
progress_message "Building $SHELLRPMNAME..."
|
|
|
|
|
2008-01-07 20:03:53 +01:00
|
|
|
cd /tmp
|
|
|
|
rm -rf shorewall-shell-${BASEVERSION}
|
|
|
|
do_or_die "cp -a $DIR/$SHELLDIR shorewall-shell-${BASEVERSION}"
|
|
|
|
do_or_die "tar -zcf $RPMDIR/SOURCES/shorewall-shell-${BASEVERSION}.tgz shorewall-shell-${BASEVERSION}"
|
|
|
|
cd $DIR
|
2007-11-24 19:25:27 +01:00
|
|
|
do_or_die "cp $SHELLDIR/shorewall-shell.spec $RPMDIR/SPECS/"
|
|
|
|
do_or_die "do_rpmbuild -ba $SIGN $RPMDIR/SPECS/shorewall-shell.spec"
|
|
|
|
do_or_die cp -a $RPMDIR/RPMS/noarch/$SHELLRPMNAME .
|
|
|
|
fi
|
2007-04-04 00:48:01 +02:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -n "${BUILDXML}${BUILDHTML}" ]; then
|
|
|
|
progress_message "Exporting $XMLPROJ from SVN..."
|
|
|
|
|
|
|
|
rm -rf $XMLPROJ
|
|
|
|
rm -rf shorewall-docs-xml-$VERSION
|
|
|
|
|
|
|
|
do_or_die "svn export --non-interactive --force ${SVN}/$DOCTAG $XMLPROJ >> $LOGFILE 2>&1"
|
|
|
|
do_or_die mv $XMLPROJ shorewall-docs-xml-$VERSION
|
|
|
|
|
|
|
|
rm -f shorewall-docs-xml-$VERSION/images/*.vsd
|
|
|
|
rm -f shorewall-docs-xml-$VERSION/images/~*
|
|
|
|
rm -f shorewall-docs-xml-$VERSION/images/*.JPG
|
|
|
|
rm -f shorewall-docs-xml-$VERSION/images/publish
|
|
|
|
rm -f shorewall-docs-xml-$VERSION/images/Thumbs.db
|
|
|
|
|
2007-06-24 17:06:56 +02:00
|
|
|
cd shorewall-docs-xml-$VERSION
|
|
|
|
|
|
|
|
progress_message "Exporting $MANPAGETAG from SVN..."
|
|
|
|
do_or_die "svn export --non-interactive --force ${SVN}/$MANPAGETAG manpages >> $LOGFILE 2>&1"
|
2008-12-14 19:08:56 +01:00
|
|
|
mv manpages manpages.save
|
2007-06-24 17:06:56 +02:00
|
|
|
|
2008-12-14 19:08:56 +01:00
|
|
|
if [ -n "$MANPAGE6TAG" ]; then
|
|
|
|
progress_message "Exporting $MANPAGE6TAG from SVN..."
|
|
|
|
do_or_die "svn export --non-interactive --force ${SVN}/$MANPAGE6TAG manpages >> $LOGFILE 2>&1"
|
|
|
|
do_or_die mv manpages/* manpages.save/
|
|
|
|
fi
|
2007-06-24 17:06:56 +02:00
|
|
|
|
2008-12-14 19:08:56 +01:00
|
|
|
progress_message "Exporting $LITEMANPAGETAG from SVN..."
|
2007-06-24 17:06:56 +02:00
|
|
|
do_or_die "svn export --non-interactive --force ${SVN}/$LITEMANPAGETAG manpages >> $LOGFILE 2>&1"
|
|
|
|
do_or_die mv manpages/* manpages.save/
|
|
|
|
|
2008-12-14 19:08:56 +01:00
|
|
|
if [ -n "$LITE6MANPAGETAG" ]; then
|
|
|
|
progress_message "Exporting $LITE6MANPAGETAG from SVN..."
|
|
|
|
do_or_die "svn export --non-interactive --force ${SVN}/$LITE6MANPAGETAG manpages >> $LOGFILE 2>&1"
|
|
|
|
do_or_die mv manpages/* manpages.save/
|
|
|
|
fi
|
|
|
|
|
2007-06-24 17:06:56 +02:00
|
|
|
do_or_die rm -rf manpages
|
|
|
|
|
|
|
|
do_or_die mv manpages.save manpages
|
|
|
|
|
|
|
|
cd $DIR
|
|
|
|
|
2007-04-04 00:48:01 +02:00
|
|
|
if [ -n "$BUILDXML" ]; then
|
|
|
|
progress_message "Creating $DIR/shorewall-docs-xml-$VERSION tarballs"
|
2008-09-03 20:54:14 +02:00
|
|
|
tar -zcvf shorewall-docs-xml-$VERSION.tgz shorewall-docs-xml-$VERSION >> $LOGFILE 2>&1
|
|
|
|
tar -jcvf shorewall-docs-xml-$VERSION.tar.bz2 shorewall-docs-xml-$VERSION >> $LOGFILE 2>&1 || true
|
2007-04-04 00:48:01 +02:00
|
|
|
if [ -n "$SIGN" ]; then
|
|
|
|
for shoresuffix in tgz tar.bz2; do
|
|
|
|
xmlball=shorewall-docs-xml-$VERSION.${shoresuffix}
|
|
|
|
report "GPG signing $DIR/$xmlball tarball"
|
|
|
|
rm -f ${xmlball}.asc
|
|
|
|
do_or_die "$GPG $xmlball"
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -n "$BUILDHTML" ]; then
|
|
|
|
progress_message "Building $HTMLDIR ..."
|
|
|
|
|
|
|
|
rm -rf $HTMLDIR
|
|
|
|
|
|
|
|
do_or_die mkdir $HTMLDIR
|
|
|
|
do_or_die mkdir $HTMLDIR/images
|
|
|
|
#
|
|
|
|
# The original HTML documents were created using MS FrontPage and used
|
|
|
|
# the .htm suffix. The remainder use the .html suffix.
|
|
|
|
#
|
|
|
|
HTMFILES="
|
|
|
|
6to4.htm
|
|
|
|
blacklisting_support.htm
|
|
|
|
configuration_file_basics.htm
|
|
|
|
CorpNetwork.htm
|
|
|
|
dhcp.htm
|
|
|
|
Documentation.htm
|
|
|
|
errata.htm
|
|
|
|
fallback.htm
|
|
|
|
FAQ.htm
|
|
|
|
GnuCopyright.htm
|
|
|
|
Install.htm
|
|
|
|
IPIP.htm
|
|
|
|
IPSEC.htm
|
|
|
|
kernel.htm
|
|
|
|
myfiles.htm
|
|
|
|
NAT.htm
|
|
|
|
ports.htm
|
|
|
|
PPTP.htm
|
|
|
|
ProxyARP.htm
|
|
|
|
quotes.htm
|
|
|
|
samba.htm
|
|
|
|
shorewall_extension_scripts.htm
|
|
|
|
shorewall_features.htm
|
|
|
|
shorewall_mirrors.htm
|
|
|
|
shorewall_prerequisites.htm
|
|
|
|
shorewall_quickstart_guide.htm
|
|
|
|
shorewall_setup_guide_fr.htm
|
|
|
|
shorewall_setup_guide.htm
|
|
|
|
Shorewall_sfindex_frame.htm
|
|
|
|
standalone.htm
|
|
|
|
starting_and_stopping_shorewall.htm
|
|
|
|
support.htm
|
|
|
|
three-interface.htm
|
|
|
|
traffic_shaping.htm
|
|
|
|
troubleshoot.htm
|
|
|
|
two-interface.htm
|
|
|
|
upgrade_issues.htm
|
|
|
|
VPN.htm
|
|
|
|
whitelisting_under_shorewall.htm"
|
|
|
|
|
|
|
|
NOTOC="
|
|
|
|
Documentation_Index.xml
|
|
|
|
ECN.xml
|
|
|
|
fallback.xml
|
|
|
|
GettingStarted.xml
|
|
|
|
IPP2P.xml
|
|
|
|
ping.xml
|
|
|
|
ProxyARP.xml
|
|
|
|
Shorewall_Doesnt.xml
|
|
|
|
shorewall_features.xml
|
|
|
|
shorewall_prerequisites.xml
|
|
|
|
SimpleBridge.xml"
|
|
|
|
|
|
|
|
for file in shorewall-docs-xml-$VERSION/*.xml; do
|
|
|
|
a=$(basename $file)
|
|
|
|
b=${a%.*}
|
|
|
|
list_search $b.htm $HTMFILES && b=$b.htm || b=$b.html
|
|
|
|
f="shorewall-docs-html-$VERSION/$b"
|
|
|
|
list_search $1 $NOTOC && GENTOC="--stringparam generate.toc ''" || GENTOC=
|
2007-08-08 21:59:40 +02:00
|
|
|
|
|
|
|
case $file in
|
|
|
|
*_ru.xml)
|
|
|
|
LANGUAGE="--stringparam l10n.gentext.default.language ru"
|
|
|
|
;;
|
|
|
|
*_fr.xml)
|
2007-08-08 22:21:01 +02:00
|
|
|
LANGUAGE="--stringparam l10n.gentext.default.language fr"
|
2007-08-08 21:59:40 +02:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
LANGUAGE=
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2007-04-04 00:48:01 +02:00
|
|
|
report "Converting $DIR/$file from XML to HTML ($DIR/$f) ..."
|
|
|
|
|
|
|
|
do_or_die xsltproc --output $f --stringparam html.stylesheet html.css --stringparam ulink.target _self $GENTOC -param toc.section.depth 3 $STYLESHEET $file
|
|
|
|
done
|
|
|
|
|
2007-06-24 17:06:56 +02:00
|
|
|
for f in shorewall-docs-xml-$VERSION/manpages/*.xml; do
|
2007-06-24 01:33:17 +02:00
|
|
|
if [ $f != shorewall-template.xml ]; then
|
|
|
|
progress_message "Generating HTML from $f..."
|
|
|
|
do_or_die xsltproc --output ${f%.xml}.html --stringparam html.stylesheet html.css --stringparam ulink.target _self -param toc.section.depth 3 $STYLESHEET $f
|
|
|
|
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2007-06-24 17:06:56 +02:00
|
|
|
progress_message "Copying manpages to $DIR/$HTMLDIR/images ..."
|
2007-06-24 01:33:17 +02:00
|
|
|
|
2007-06-24 17:06:56 +02:00
|
|
|
do_or_die mkdir $HTMLDIR/manpages
|
|
|
|
do_or_die cp -a shorewall-docs-xml-$VERSION/manpages/*.html $HTMLDIR/manpages/
|
|
|
|
do_or_die rm -f shorewall-docs-xml-$VERSION/manpages/*.html
|
2007-06-24 01:33:17 +02:00
|
|
|
|
2007-04-04 00:48:01 +02:00
|
|
|
progress_message "Copying images to $DIR/$HTMLDIR/images ..."
|
|
|
|
|
|
|
|
do_or_die cp -a shorewall-docs-xml-$VERSION/images/*.png $HTMLDIR/images
|
|
|
|
do_or_die cp -a shorewall-docs-xml-$VERSION/images/*.gif $HTMLDIR/images
|
|
|
|
do_or_die cp -a shorewall-docs-xml-$VERSION/images/*.jpg $HTMLDIR/images
|
|
|
|
do_or_die cp -a shorewall-docs-xml-$VERSION/*.css $HTMLDIR
|
|
|
|
|
|
|
|
do_or_die ln -s Documentation_Index.html shorewall-docs-html-$VERSION/index.html
|
|
|
|
|
|
|
|
progress_message "Creating $DIR/shorewall-docs-html-$VERSION tarballs ..."
|
|
|
|
|
|
|
|
do_or_die "tar -zcvf shorewall-docs-html-$VERSION.tgz shorewall-docs-html-$VERSION >> $LOGFILE 2>&1"
|
|
|
|
do_or_die "tar -jcvf shorewall-docs-html-$VERSION.tar.bz2 shorewall-docs-html-$VERSION >> $LOGFILE 2>&1"
|
|
|
|
if [ -n "$SIGN" ]; then
|
|
|
|
for shoresuffix in tgz tar.bz2; do
|
|
|
|
htmlball=shorewall-docs-html-$VERSION.${shoresuffix}
|
|
|
|
report "GPG signing $DIR/$htmlball tarball"
|
|
|
|
rm -f ${htmlball}.asc
|
|
|
|
do_or_die "$GPG $htmlball"
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
progress_message "Creating md5sums and sha1sums"
|
|
|
|
|
|
|
|
rm -f $VERSION.md5sums $VERSION.sha1sums
|
|
|
|
|
|
|
|
#
|
|
|
|
# The following rather awkward algorithm gets around the problem of builds that don't
|
|
|
|
# include the RPM
|
|
|
|
#
|
|
|
|
case $VERSION in
|
|
|
|
*Beta*|*RC*)
|
2007-11-24 19:25:27 +01:00
|
|
|
if [ -n "$BUILDCOMMON" ]; then
|
2007-11-25 17:25:00 +01:00
|
|
|
do_or_die "md5sum shorewall-common-${BASEVERSION}-0${VERSION#*-}.noarch.rpm >> $VERSION.md5sums"
|
|
|
|
do_or_die "sha1sum shorewall-common-${BASEVERSION}-0${VERSION#*-}.noarch.rpm >> $VERSION.sha1sums"
|
2007-11-24 19:25:27 +01:00
|
|
|
fi
|
2007-04-07 19:04:50 +02:00
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
if [ -n "$BUILDLITE" ]; then
|
2007-11-25 17:25:00 +01:00
|
|
|
do_or_die "md5sum shorewall-lite-${BASEVERSION}-0${VERSION#*-}.noarch.rpm >> $VERSION.md5sums"
|
|
|
|
do_or_die "sha1sum shorewall-lite-${BASEVERSION}-0${VERSION#*-}.noarch.rpm >> $VERSION.sha1sums"
|
2007-11-24 19:25:27 +01:00
|
|
|
fi
|
2007-04-07 19:04:50 +02:00
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
if [ -n "$BUILDPERL" ]; then
|
2007-11-25 17:25:00 +01:00
|
|
|
do_or_die "md5sum shorewall-perl-${BASEVERSION}-0${VERSION#*-}.noarch.rpm >> $VERSION.md5sums"
|
|
|
|
do_or_die "sha1sum shorewall-perl-${BASEVERSION}-0${VERSION#*-}.noarch.rpm >> $VERSION.sha1sums"
|
2007-11-24 19:25:27 +01:00
|
|
|
fi
|
2007-04-07 21:20:14 +02:00
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
if [ -n "$BUILDSHELL" ]; then
|
2007-11-25 17:25:00 +01:00
|
|
|
do_or_die "md5sum shorewall-shell-${BASEVERSION}-0${VERSION#*-}.noarch.rpm >> $VERSION.md5sums"
|
|
|
|
do_or_die "sha1sum shorewall-shell-${BASEVERSION}-0${VERSION#*-}.noarch.rpm >> $VERSION.sha1sums"
|
2007-11-24 19:25:27 +01:00
|
|
|
fi
|
2007-04-04 00:48:01 +02:00
|
|
|
;;
|
2008-02-07 18:26:57 +01:00
|
|
|
*.*.*.*)
|
|
|
|
[ -f $RPMNAME ] && do_or_die "md5sum $RPMNAME >> $VERSION.md5sums"
|
2008-12-10 19:21:32 +01:00
|
|
|
[ -f $RPM6NAME ] && do_or_die "md5sum $RPM6NAME >> $VERSION.md5sums"
|
2008-02-07 18:26:57 +01:00
|
|
|
[ -f $LITERPMNAME ] && do_or_die "md5sum $LITERPMNAME >> $VERSION.md5sums"
|
2008-12-10 19:21:32 +01:00
|
|
|
[ -f $LITE6RPMNAME ] && do_or_die "md5sum $LITE6RPMNAME >> $VERSION.md5sums"
|
2008-02-07 18:26:57 +01:00
|
|
|
[ -f $PERLRPMNAME ] && do_or_die "md5sum $PERLRPMNAME >> $VERSION.md5sums"
|
|
|
|
[ -f $SHELLRPMNAME ] && do_or_die "md5sum $SHELLRPMNAME >> $VERSION.md5sums"
|
|
|
|
;;
|
2007-04-04 00:48:01 +02:00
|
|
|
esac
|
|
|
|
|
|
|
|
for file in *; do
|
|
|
|
case $file in
|
|
|
|
*$VERSION[-.]*tgz|*$VERSION[-.]*rpm|*$VERSION[-.]*bz2)
|
|
|
|
do_or_die "md5sum $file >> $VERSION.md5sums"
|
|
|
|
do_or_die "sha1sum $file >> $VERSION.sha1sums"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2007-11-24 22:19:53 +01:00
|
|
|
if [ -n "$PATCHRELEASE" ]; then
|
2007-11-25 17:25:00 +01:00
|
|
|
svn update ~/shorewall/tags/${BASEVERSION}
|
|
|
|
if [ -f ~/shorewall/tags/${BASEVERSION}/known_problems.txt ]; then
|
|
|
|
cp ~/shorewall/tags/${BASEVERSION}/known_problems.txt .
|
2007-12-10 18:17:25 +01:00
|
|
|
else
|
|
|
|
[ -f known_problems.txt ] || echo "There are no known problems in Shorewall version $VERSION" > known_problems.txt
|
2007-11-24 22:19:53 +01:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "There are no known problems in Shorewall version $VERSION" > known_problems.txt
|
|
|
|
fi
|
|
|
|
|
2007-04-04 00:48:01 +02:00
|
|
|
if [ -n "$OLDVERSION" ]; then
|
2007-11-24 19:25:27 +01:00
|
|
|
|
2007-04-04 00:48:01 +02:00
|
|
|
progress_message "Creating patch-$VERSION ..."
|
|
|
|
|
2007-12-11 01:03:02 +01:00
|
|
|
[ -d shorewall-common-$VERSION ] && diff -Naur -X $(dirname $0)/exclude.txt shorewall-common-$OLDVERSION shorewall-common-$VERSION > patch-common-$VERSION || true
|
2008-12-13 16:49:48 +01:00
|
|
|
[ -d shorewall6-$VERSION ] && diff -Naur -X $(dirname $0)/exclude.txt shorewall6-$OLDVERSION shorewall6-$VERSION > patch-6-$VERSION || true
|
2007-12-11 01:03:02 +01:00
|
|
|
[ -d shorewall-lite-$VERSION ] && diff -Naur -X $(dirname $0)/exclude.txt shorewall-lite-$OLDVERSION shorewall-lite-$VERSION > patch-lite-$VERSION || true
|
2008-12-13 16:49:48 +01:00
|
|
|
[ -d shorewall6-lite-$VERSION ] && diff -Naur -X $(dirname $0)/exclude.txt shorewall6-lite-$OLDVERSION shorewall6-lite-$VERSION > patch-6-lite-$VERSION || true
|
2007-12-11 01:03:02 +01:00
|
|
|
[ -d shorewall-perl-$VERSION ] && diff -Naur -X $(dirname $0)/exclude.txt shorewall-perl-$OLDVERSION shorewall-perl-$VERSION > patch-perl-$VERSION || true
|
|
|
|
[ -d shorewall-shell-$VERSION ] && diff -Naur -X $(dirname $0)/exclude.txt shorewall-shell-$OLDVERSION shorewall-shell-$VERSION > patch-shell-$VERSION || true
|
2007-12-10 21:35:05 +01:00
|
|
|
|
2007-04-04 00:48:01 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
progress_message "Shorewall $VERSION Build complete - $(date)"
|