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:
|
|
|
|
#
|
|
|
|
# makeshorewall [ -trhxl ] <version> [ <previous version> ]
|
|
|
|
#
|
|
|
|
# -t Build tarball
|
|
|
|
# -r Build RPM
|
|
|
|
# -h Build HTML documentation
|
|
|
|
# -x Build XML documentation
|
|
|
|
# -s Sign with GPG
|
|
|
|
#
|
|
|
|
# If no options are given, all options are assumed.
|
|
|
|
#
|
|
|
|
# If <previous version> is given, a patch file reflecting the differences
|
|
|
|
# between that version and the current version ( <version> ) is
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
# Directory where you want the release to be built
|
|
|
|
#
|
|
|
|
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
|
|
|
|
#
|
|
|
|
# Program that generates man pages from Docbook XML
|
|
|
|
#
|
|
|
|
DOCBOOK2MAN="docbook-to-man -C /usr/share/docbook2X/xslt/catalog.xml --utf8trans-map /usr/share/docbook2X/charmaps/roff.charmap"
|
|
|
|
################################################################################
|
|
|
|
# V A R I A B L E S
|
|
|
|
################################################################################
|
|
|
|
VERSION=
|
|
|
|
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=
|
|
|
|
LITEMANPAGETAG=
|
|
|
|
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-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
|
|
|
|
{
|
|
|
|
local e=$1
|
|
|
|
|
|
|
|
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()
|
|
|
|
{
|
|
|
|
echo "usage: $(basename $0) [ -trhxl] <version> [ <old-version> ]"
|
|
|
|
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
|
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
|
|
|
|
-*)
|
|
|
|
option=${option#-}
|
|
|
|
|
|
|
|
[ -z "$option" ] && break
|
|
|
|
|
|
|
|
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-24 19:25:27 +01:00
|
|
|
C*)
|
|
|
|
BUILDCOMMON=Yes
|
|
|
|
option=${option#C}
|
|
|
|
;;
|
|
|
|
P*)
|
|
|
|
BUILDPERL=Yes
|
|
|
|
option=${option#P}
|
|
|
|
;;
|
|
|
|
S*)
|
|
|
|
BUILDSHELL=Yes
|
|
|
|
option=${option#S}
|
|
|
|
;;
|
|
|
|
L*)
|
|
|
|
BUILDLITE=Yes
|
|
|
|
option=${option#L}
|
|
|
|
;;
|
2007-04-04 00:48:01 +02:00
|
|
|
s*)
|
|
|
|
SIGN=Yes
|
|
|
|
option=${option#s}
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
usage
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
shift
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
done=Yes
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
case $# in
|
|
|
|
1)
|
|
|
|
;;
|
|
|
|
2)
|
|
|
|
OLDVERSION=$2
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
usage
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
VERSION=$1
|
|
|
|
LOGFILE=$LOGDIR/shorewall_build_${VERSION}.log
|
|
|
|
touch $LOGFILE
|
|
|
|
progress_message "Build of Shorewall $VERSION on $(date)"
|
|
|
|
|
|
|
|
case $VERSION in
|
2007-11-19 22:17:41 +01:00
|
|
|
4.1.*)
|
2007-04-04 01:16:13 +02:00
|
|
|
SVNBRANCH="trunk/Shorewall-common"
|
2007-04-04 00:48:01 +02:00
|
|
|
LITESVNBRANCH="trunk/Shorewall-lite"
|
2007-04-04 01:16:13 +02:00
|
|
|
PERLBRANCH="trunk/Shorewall-perl"
|
|
|
|
SHELLBRANCH="trunk/Shorewall-shell"
|
2007-04-04 00:48:01 +02:00
|
|
|
DOCTAG="trunk/docs"
|
2007-11-19 22:17:41 +01:00
|
|
|
XMLPROJ="docs-4.1"
|
2007-05-16 00:35:22 +02:00
|
|
|
SAMPLESTAG="trunk/Samples"
|
|
|
|
MANPAGETAG=trunk/manpages
|
|
|
|
LITEMANPAGETAG=trunk/manpages-lite
|
|
|
|
;;
|
|
|
|
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-04-04 00:48:01 +02:00
|
|
|
MANPAGETAG=trunk/manpages
|
|
|
|
LITEMANPAGETAG=trunk/manpages-lite
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
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
|
|
|
|
|
|
|
|
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-06-29 17:50:52 +02:00
|
|
|
SHOREWALLDIR=shorewall-common-${VERSION%-*}
|
2007-04-04 00:48:01 +02:00
|
|
|
SHOREWALLLITEDIR=shorewall-lite-${VERSION%-*}
|
2007-06-29 17:46:32 +02:00
|
|
|
TARBALL=shorewall-common-${VERSION%-*}.tgz
|
2007-04-04 00:48:01 +02:00
|
|
|
LITETARBALL=shorewall-lite-${VERSION%-*}.tgz
|
2007-06-29 17:46:32 +02:00
|
|
|
RPMNAME=shorewall-common-${VERSION%-*}-0${VERSION#*-}.noarch.rpm
|
2007-04-04 00:48:01 +02:00
|
|
|
LITERPMNAME=shorewall-lite-${VERSION%-*}-0${VERSION#*-}.noarch.rpm
|
|
|
|
PERLRPMNAME=shorewall-perl-${VERSION%-*}-0${VERSION#*-}.noarch.rpm
|
|
|
|
PERLTARBALL=shorewall-perl-${VERSION%-*}.tgz
|
|
|
|
PERLDIR=shorewall-perl-${VERSION%-*}
|
2007-04-04 01:16:13 +02:00
|
|
|
SHELLRPMNAME=shorewall-shell-${VERSION%-*}-0${VERSION#*-}.noarch.rpm
|
|
|
|
SHELLTARBALL=shorewall-shell-${VERSION%-*}.tgz
|
|
|
|
SHELLDIR=shorewall-shell-${VERSION%-*}
|
2007-04-04 00:48:01 +02:00
|
|
|
;;
|
2007-11-24 16:10:53 +01:00
|
|
|
*-*)
|
|
|
|
#
|
|
|
|
# Patch Release
|
|
|
|
#
|
2007-11-24 19:37:44 +01:00
|
|
|
PATCHRELEASE=Yes
|
2007-11-24 19:49:30 +01:00
|
|
|
[ -n "$BUILDCOMMON" ] && SHOREWALLDIR=shorewall-common-${VERSION} || SHOREWALLDIR=shorewall-common-${VERSION%-*}
|
2007-11-24 16:10:53 +01:00
|
|
|
SHOREWALLLITEDIR=shorewall-lite-${VERSION%-*}
|
|
|
|
TARBALL=shorewall-common-${VERSION%-*}.tgz
|
|
|
|
LITETARBALL=shorewall-lite-${VERSION%-*}.tgz
|
|
|
|
RPMNAME=shorewall-common-${VERSION}.noarch.rpm
|
|
|
|
LITERPMNAME=shorewall-lite-${VERSION}.noarch.rpm
|
|
|
|
PERLRPMNAME=shorewall-perl-${VERSION}.noarch.rpm
|
|
|
|
PERLTARBALL=shorewall-perl-${VERSION%-*}.tgz
|
|
|
|
PERLDIR=shorewall-perl-${VERSION%-*}
|
|
|
|
SHELLRPMNAME=shorewall-shell-${VERSION}.noarch.rpm
|
|
|
|
SHELLTARBALL=shorewall-shell-${VERSION%-*}.tgz
|
|
|
|
SHELLDIR=shorewall-shell-${VERSION%-*}
|
|
|
|
;;
|
2007-04-04 00:48:01 +02:00
|
|
|
*)
|
|
|
|
#
|
|
|
|
# Normal Release
|
|
|
|
#
|
2007-06-29 17:50:52 +02:00
|
|
|
SHOREWALLDIR=shorewall-common-$VERSION
|
2007-04-04 00:48:01 +02:00
|
|
|
SHOREWALLLITEDIR=shorewall-lite-$VERSION
|
2007-06-29 17:46:32 +02:00
|
|
|
TARBALL=shorewall-common-$VERSION.tgz
|
2007-04-04 00:48:01 +02:00
|
|
|
LITETARBALL=shorewall-lite-$VERSION.tgz
|
2007-06-29 17:46:32 +02:00
|
|
|
RPMNAME=shorewall-common-${VERSION}-1.noarch.rpm
|
2007-04-04 00:48:01 +02:00
|
|
|
LITERPMNAME=shorewall-lite-${VERSION}-1.noarch.rpm
|
|
|
|
PERLRPMNAME=shorewall-perl-${VERSION}-1.noarch.rpm
|
|
|
|
PERLDIR=shorewall-perl-$VERSION
|
|
|
|
PERLTARBALL=shorewall-perl-$VERSION.tgz
|
2007-04-04 01:16:13 +02:00
|
|
|
SHELLRPMNAME=shorewall-shell-${VERSION}-1.noarch.rpm
|
|
|
|
SHELLDIR=shorewall-shell-$VERSION
|
|
|
|
SHELLTARBALL=shorewall-shell-$VERSION.tgz
|
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"
|
|
|
|
report "Shorewall Lite directory is $DIR/$SHOREWALLLITEDIR"
|
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"
|
|
|
|
report "Lite SVN tag is $LITESVNBRANCH"
|
2007-04-04 01:16:13 +02:00
|
|
|
report "Shell SVN tag is $SHELLBRANCH"
|
|
|
|
report "Perl SVN tag is $PERLBRANCH"
|
|
|
|
[ -n "$BUILDTARBALL" ] && report "TARBALL is $TARBALL" && report "LITETARBALL is $LITETARBALL"&& report "SHELLTARBALL is $SHELLTARBALL"&& report "PERLTARBALL is $PERLTARBALL"
|
|
|
|
[ -n "$BUILDRPM" ] && report "RPM is $RPMNAME" && report "LITERPM is $LITERPMNAME" && report "SHELLRPM is $SHELLRPMNAME" && report "PERLRPM is $PERLRPMNAME"
|
2007-04-04 00:48:01 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
[ -n "$BUILDHTML" ] && report "HTML Directory is $HTMLDIR"
|
|
|
|
|
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
|
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
[ -n "$BUILDLITE" ] && rm -rf $SHOREWALLLITEDIR
|
|
|
|
[ -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"
|
2007-04-04 00:48:01 +02:00
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
[ -n "$BUILDLITE" ] && progress_message "Exporting $LITESVNBRANCH from SVN..." && do_or_die "svn export --non-interactive --force ${SVN}/$LITESVNBRANCH $SHOREWALLLITEDIR >> $LOGFILE 2>&1"
|
2007-04-07 19:20:09 +02:00
|
|
|
|
2007-11-24 19:25:27 +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
|
|
|
|
2007-11-24 19:25:27 +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
|
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
[ -n "$BUILDLITE" ] && do_or_die "cp $SHOREWALLDIR/changelog.txt $SHOREWALLDIR/releasenotes.txt $SHOREWALLLITEDIR >> $LOGFILE 2>&1"
|
|
|
|
[ -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
|
|
|
|
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
|
|
|
|
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"
|
|
|
|
fgrep "VERSION => '$VERSION'" $PERLDIR/Shorewall/Config.pm > /dev/null 2>&1 || 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..."
|
|
|
|
$DOCBOOK2MAN $f
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
rm *.xml
|
|
|
|
perl -p -i'' -e 's/ \[.*?html\]//g' *.5 *.8
|
|
|
|
cd $DIR
|
2007-11-24 19:25:27 +01:00
|
|
|
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..."
|
|
|
|
$DOCBOOK2MAN $f
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
rm *.xml
|
|
|
|
perl -p -i'' -e 's/ \[.*?html\]//g' *.5 *.8
|
|
|
|
cd $DIR
|
|
|
|
fi
|
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
[ -n "$BUILDCOMMON" ] && do_or_die "rm -rf $SHOREWALLDIR/debian"
|
|
|
|
[ -n "$BUILDLITE" ] && do_or_die "rm -rf $SHOREWALLLITEDIR/debian"
|
|
|
|
[ -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-04-04 00:48:01 +02:00
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
do_or_die "tar -zcvf $TARBALL $SHOREWALLDIR >> $LOGFILE 2>&1"
|
|
|
|
do_or_die "tar -jcvf shorewall-common-${VERSION%-*}.tar.bz2 $SHOREWALLDIR >> $LOGFILE 2>&1"
|
|
|
|
if [ -n "$SIGN" ]; then
|
|
|
|
for shoresuffix in tgz tar.bz2; do
|
|
|
|
shoreball=shorewall-common-${VERSION%-*}.${shoresuffix}
|
|
|
|
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
|
|
|
|
|
|
|
if [ -n "$BUILDLITE" ]; then
|
|
|
|
progress_message "Creating $DIR/$LITETARBALL..."
|
|
|
|
do_or_die "tar -zcvf $LITETARBALL $SHOREWALLLITEDIR >> $LOGFILE 2>&1"
|
|
|
|
do_or_die "tar -jcvf shorewall-lite-${VERSION%-*}.tar.bz2 $SHOREWALLLITEDIR >> $LOGFILE 2>&1"
|
|
|
|
if [ -n "$SIGN" ]; then
|
|
|
|
for shoresuffix in tgz tar.bz2; do
|
|
|
|
shoreball=shorewall-lite-${VERSION%-*}.${shoresuffix}
|
|
|
|
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
|
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
if [ -n "$BUILDPERL" ]; then
|
|
|
|
progress_message "Creating $DIR/$PERLTARBALL..."
|
|
|
|
do_or_die "tar -zcvf $PERLTARBALL $PERLDIR >> $LOGFILE 2>&1"
|
|
|
|
do_or_die "tar -jcvf shorewall-perl-${VERSION%-*}.tar.bz2 $PERLDIR >> $LOGFILE 2>&1"
|
|
|
|
|
|
|
|
if [ -n "$SIGN" ]; then
|
|
|
|
for shoresuffix in tgz tar.bz2; do
|
|
|
|
shoreball=shorewall-perl-${VERSION%-*}.${shoresuffix}
|
|
|
|
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..."
|
|
|
|
do_or_die "tar -zcvf $SHELLTARBALL $SHELLDIR >> $LOGFILE 2>&1"
|
|
|
|
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
|
|
|
|
shoreball=shorewall-shell-${VERSION%-*}.${shoresuffix}
|
|
|
|
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..."
|
|
|
|
|
|
|
|
rm -rf $RPMDIR/BUILD/shorewall-${VERSION%-*}
|
|
|
|
do_or_die "cp shorewall-common-${VERSION%-*}.tgz $RPMDIR/SOURCES/"
|
|
|
|
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
|
|
|
|
|
|
|
|
if [ -n "$BUILDLITE" ]; then
|
|
|
|
progress_message "Building $LITERPMNAME..."
|
|
|
|
|
|
|
|
rm -rf $RPMDIR/BUILD/shorewall-${VERSION%-*}
|
|
|
|
do_or_die "cp shorewall-lite-${VERSION%-*}.tgz $RPMDIR/SOURCES/"
|
|
|
|
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
|
|
|
|
|
|
|
|
if [ -n "$BUILDPERL" ]; then
|
|
|
|
progress_message "Building $PERLRPMNAME..."
|
|
|
|
|
|
|
|
rm -rf $RPMDIR/BUILD/shorewall-perl-${VERSION%-*}*
|
|
|
|
do_or_die "cp shorewall-perl-${VERSION%-*}.tgz $RPMDIR/SOURCES/"
|
|
|
|
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..."
|
|
|
|
|
|
|
|
rm -rf $RPMDIR/BUILD/shorewall-shell-${VERSION%-*}*
|
|
|
|
do_or_die "cp shorewall-shell-${VERSION%-*}.tgz $RPMDIR/SOURCES/"
|
|
|
|
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"
|
|
|
|
|
|
|
|
do_or_die mv manpages manpages.save
|
|
|
|
|
|
|
|
progress_message "Exporting $LITEMANPAGETAG from SVN..."
|
|
|
|
|
|
|
|
do_or_die "svn export --non-interactive --force ${SVN}/$LITEMANPAGETAG manpages >> $LOGFILE 2>&1"
|
|
|
|
|
|
|
|
do_or_die mv manpages/* manpages.save/
|
|
|
|
|
|
|
|
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"
|
|
|
|
do_or_die "tar -zcvf shorewall-docs-xml-$VERSION.tgz shorewall-docs-xml-$VERSION >> $LOGFILE 2>&1"
|
|
|
|
do_or_die "tar -jcvf shorewall-docs-xml-$VERSION.tar.bz2 shorewall-docs-xml-$VERSION >> $LOGFILE 2>&1"
|
|
|
|
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
|
|
|
|
|
|
|
|
[ -n "$BUILDTARBALL" ] && case $VERSION in
|
2007-11-24 16:10:53 +01:00
|
|
|
*-*)
|
2007-04-04 00:48:01 +02:00
|
|
|
#
|
|
|
|
# The original tarball created above didn't include the -Beta or -RC portion of the
|
|
|
|
# name in either the tarball name or the directory name. Create it here
|
|
|
|
#
|
2007-11-24 19:25:27 +01:00
|
|
|
if [ -n "$BUILDCOMMON" ]; then
|
|
|
|
progress_message "Creating $DIR/shorewall-common-$VERSION..."
|
2007-04-04 00:48:01 +02:00
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
rm -rf shorewall-common-$VERSION
|
2007-04-04 00:48:01 +02:00
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
do_or_die mv $SHOREWALLDIR shorewall-common-$VERSION
|
2007-04-04 00:48:01 +02:00
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
progress_message "Creating $DIR/shorewall-common-${VERSION}.tgz ..."
|
2007-04-04 00:48:01 +02:00
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
do_or_die "tar -zcvf shorewall-common-${VERSION}.tgz shorewall-common-$VERSION >> $LOGFILE 2>&1"
|
|
|
|
do_or_die "tar -jcvf shorewall-common-$VERSION.tar.bz2 shorewall-common-$VERSION >> $LOGFILE 2>&1"
|
2007-04-04 00:48:01 +02:00
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
if [ -n "$SIGN" ]; then
|
|
|
|
for shoresuffix in tgz tar.bz2; do
|
|
|
|
betaball=shorewall-common-$VERSION.${shoresuffix}
|
|
|
|
report "GPG signing $DIR/$betaball tarball"
|
|
|
|
rm -f ${betaball}.asc
|
|
|
|
do_or_die "$GPG $betaball"
|
|
|
|
done
|
|
|
|
fi
|
2007-04-04 00:48:01 +02:00
|
|
|
fi
|
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
if [ -n "$BUILDLITE" ]; then
|
|
|
|
progress_message "Creating $DIR/shorewall-lite-$VERSION..."
|
2007-04-04 00:48:01 +02:00
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
rm -rf shorewall-lite-$VERSION
|
2007-04-04 00:48:01 +02:00
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
do_or_die mv $SHOREWALLLITEDIR shorewall-lite-$VERSION
|
2007-04-04 00:48:01 +02:00
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
progress_message "Creating $DIR/shorewall-lite-${VERSION}.tgz ..."
|
2007-04-04 00:48:01 +02:00
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
do_or_die "tar -zcvf shorewall-lite-${VERSION}.tgz shorewall-lite-$VERSION >> $LOGFILE 2>&1"
|
|
|
|
do_or_die "tar -jcvf shorewall-lite-$VERSION.tar.bz2 shorewall-lite-$VERSION >> $LOGFILE 2>&1"
|
2007-04-07 19:04:50 +02:00
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
progress_message "Creating $DIR/shorewall-lite-$VERSION..."
|
|
|
|
|
|
|
|
rm -rf shorewall-shell-$VERSION
|
2007-05-19 21:56:37 +02:00
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
do_or_die mv $SHELLDIR shorewall-shell-$VERSION
|
2007-05-19 21:56:37 +02:00
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
progress_message "Creating $DIR/shorewall-shell-${VERSION}.tgz ..."
|
2007-05-19 21:56:37 +02:00
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
do_or_die "tar -zcvf shorewall-shell-${VERSION}.tgz shorewall-shell-$VERSION >> $LOGFILE 2>&1"
|
|
|
|
do_or_die "tar -jcvf shorewall-shell-$VERSION.tar.bz2 shorewall-shell-$VERSION >> $LOGFILE 2>&1"
|
2007-05-19 21:56:37 +02:00
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
rm -rf shorewall-perl-$VERSION
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -n "$BUILDPERL" ]; then
|
2007-05-19 21:56:37 +02:00
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
rm -rf shorewall-perl-$VERSION
|
2007-05-19 21:56:37 +02:00
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
do_or_die mv $PERLDIR shorewall-perl-$VERSION
|
2007-05-19 21:56:37 +02:00
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
progress_message "Creating $DIR/shorewall-perl-${VERSION}.tgz ..."
|
|
|
|
|
|
|
|
do_or_die "tar -zcvf shorewall-perl-${VERSION}.tgz shorewall-perl-$VERSION >> $LOGFILE 2>&1"
|
|
|
|
do_or_die "tar -jcvf shorewall-perl-$VERSION.tar.bz2 shorewall-perl-$VERSION >> $LOGFILE 2>&1"
|
|
|
|
fi
|
|
|
|
|
2007-04-07 19:04:50 +02:00
|
|
|
if [ -n "$SIGN" ]; then
|
|
|
|
for shoresuffix in tgz tar.bz2; do
|
2007-11-24 19:25:27 +01:00
|
|
|
if [ -n "$BUILDLITE" ]; then
|
|
|
|
betaball=shorewall-lite-$VERSION.${shoresuffix}
|
|
|
|
report "GPG signing $DIR/$betaball tarball"
|
|
|
|
rm -f ${betaball}.asc
|
|
|
|
do_or_die "$GPG $betaball"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -n "$BUILDSHELL" ]; then
|
|
|
|
betaball=shorewall-shell-$VERSION.${shoresuffix}
|
|
|
|
report "GPG signing $DIR/$betaball tarball"
|
|
|
|
rm -f ${betaball}.asc
|
|
|
|
do_or_die "$GPG $betaball"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -n "$BUILDSHELL" ]; then
|
|
|
|
betaball=shorewall-perl-$VERSION.${shoresuffix}
|
|
|
|
report "GPG signing $DIR/$betaball tarball"
|
|
|
|
rm -f ${betaball}.asc
|
|
|
|
do_or_die "$GPG $betaball"
|
|
|
|
fi
|
2007-04-07 19:04:50 +02:00
|
|
|
done
|
2007-04-04 00:48:01 +02:00
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
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
|
|
|
|
do_or_die "md5sum shorewall-common-${VERSION%-*}-0${VERSION#*-}.noarch.rpm >> $VERSION.md5sums"
|
|
|
|
do_or_die "sha1sum shorewall-common-${VERSION%-*}-0${VERSION#*-}.noarch.rpm >> $VERSION.sha1sums"
|
|
|
|
fi
|
2007-04-07 19:04:50 +02:00
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
if [ -n "$BUILDLITE" ]; then
|
|
|
|
do_or_die "md5sum shorewall-lite-${VERSION%-*}-0${VERSION#*-}.noarch.rpm >> $VERSION.md5sums"
|
|
|
|
do_or_die "sha1sum shorewall-lite-${VERSION%-*}-0${VERSION#*-}.noarch.rpm >> $VERSION.sha1sums"
|
|
|
|
fi
|
2007-04-07 19:04:50 +02:00
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
if [ -n "$BUILDPERL" ]; then
|
|
|
|
do_or_die "md5sum shorewall-perl-${VERSION%-*}-0${VERSION#*-}.noarch.rpm >> $VERSION.md5sums"
|
|
|
|
do_or_die "sha1sum shorewall-perl-${VERSION%-*}-0${VERSION#*-}.noarch.rpm >> $VERSION.sha1sums"
|
|
|
|
fi
|
2007-04-07 21:20:14 +02:00
|
|
|
|
2007-11-24 19:25:27 +01:00
|
|
|
if [ -n "$BUILDSHELL" ]; then
|
|
|
|
do_or_die "md5sum shorewall-shell-${VERSION%-*}-0${VERSION#*-}.noarch.rpm >> $VERSION.md5sums"
|
|
|
|
do_or_die "sha1sum shorewall-shell-${VERSION%-*}-0${VERSION#*-}.noarch.rpm >> $VERSION.sha1sums"
|
|
|
|
fi
|
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
|
|
|
|
|
|
|
|
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-11-24 19:25:27 +01:00
|
|
|
> patch-$VERSION
|
|
|
|
|
|
|
|
[ -n "$BUILDCOMMON" ] && diff -Naur -X $(dirname $0)/exclude.txt shorewall-common-$OLDVERSION shorewall-common-$VERSION >> patch-$VERSION || true
|
|
|
|
[ -n "$BUILDLITE" ] && diff -Naur -X $(dirname $0)/exclude.txt shorewall-lite-$OLDVERSION shorewall-lite-$VERSION >> patch-$VERSION || true
|
|
|
|
[ -n "$BUILDPERL" ] && diff -Naur -X $(dirname $0)/exclude.txt shorewall-perl-$OLDVERSION shorewall-perl-$VERSION >> patch-$VERSION || true
|
|
|
|
[ -n "$BUILDSHELL" ] && diff -Naur -X $(dirname $0)/exclude.txt shorewall-shell-$OLDVERSION shorewall-shell-$VERSION >> patch-$VERSION || true
|
|
|
|
|
2007-11-24 19:37:44 +01:00
|
|
|
[ -n "$PATCHRELEASE" ] && eval perl -i -p -e "'if ( /\+\+\+/ ) { s/shorewall-common-$VERSION/Shorewall-common/;s/shorewall-lite-$VERSION/Shorewall-lite/;s/shorewall-perl-$VERSION/Shorewall-perl/;s/shorewall-shell-$VERSION/Shorewall-shell/ }'" patch-$VERSION
|
2007-04-07 19:04:50 +02:00
|
|
|
|
2007-04-04 00:48:01 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
progress_message "Shorewall $VERSION Build complete - $(date)"
|