2005-05-28 14:27:59 +02:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Shorewall Release Processing -- (C) 2003,2004,2005 -- Tom Eastep (teastep@shorewall.net)
|
|
|
|
#
|
|
|
|
# This program is under GPL [http://www.gnu.org/copyleft/gpl.htm]
|
|
|
|
#
|
|
|
|
# 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
|
|
|
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA
|
|
|
|
#
|
|
|
|
# I install this script in /usr/local/bin/makeshorewall.
|
|
|
|
#
|
|
|
|
# Usage:
|
|
|
|
#
|
|
|
|
# makeshorewall [ -trhxl ] <version> [ <previous version> ]
|
|
|
|
#
|
|
|
|
# -t Build tarball
|
|
|
|
# -r Build RPM
|
2005-10-09 22:21:11 +02:00
|
|
|
# -h Build HTML documentation
|
2005-05-28 14:27:59 +02:00
|
|
|
# -x Build XML documentation
|
|
|
|
# -l Build LRP
|
|
|
|
#
|
|
|
|
# If no options are given, all options are assumed.
|
|
|
|
#
|
|
|
|
# If <previous version> is given, a patch file reflecting the differences
|
2005-10-09 22:21:11 +02:00
|
|
|
# between that version and the current version ( <version> ) is
|
2005-05-28 14:27:59 +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
|
|
|
|
#
|
2005-07-26 22:43:30 +02:00
|
|
|
LOGDIR=$PWD
|
2005-05-28 14:27:59 +02:00
|
|
|
#
|
|
|
|
# Your RPM build directory
|
|
|
|
#
|
2005-07-26 22:03:42 +02:00
|
|
|
RPMDIR=~/rpm/
|
2005-05-28 14:27:59 +02:00
|
|
|
#
|
|
|
|
# Directory where you want the release to be built
|
|
|
|
#
|
|
|
|
DIR=$PWD
|
2005-07-26 22:03:42 +02:00
|
|
|
#
|
|
|
|
# CVS Root
|
|
|
|
#
|
|
|
|
export CVSROOT=:ext:${USER}@cvs.sourceforge.net:/cvsroot/shorewall
|
2005-05-28 14:27:59 +02:00
|
|
|
################################################################################
|
|
|
|
# V A R I A B L E S
|
|
|
|
################################################################################
|
|
|
|
VERSION=
|
|
|
|
OLDVERSION=
|
|
|
|
SHOREWALLDIR=
|
|
|
|
SOURCEDIR=
|
|
|
|
LRPPROJ=
|
|
|
|
LRPDIR=
|
|
|
|
LRP=
|
2005-07-09 10:07:40 +02:00
|
|
|
CVSTAG=
|
|
|
|
#CVSSTABLE=
|
2005-05-28 14:27:59 +02:00
|
|
|
XMLPROJ=
|
|
|
|
RPMNAME=
|
|
|
|
TARBALL=
|
|
|
|
LOGFILE=
|
|
|
|
HTMLDIR=
|
|
|
|
BUILDTARBALL=
|
|
|
|
BUILDRPM=
|
|
|
|
BUILDXML=
|
|
|
|
BUILDHTML=
|
|
|
|
BUILDLRP=
|
2005-10-21 17:47:09 +02:00
|
|
|
SAMPLESTAG=
|
2005-05-28 14:27:59 +02:00
|
|
|
################################################################################
|
|
|
|
# F U N C T I O N S
|
|
|
|
################################################################################
|
2005-10-09 22:21:11 +02:00
|
|
|
progress_message()
|
2005-05-28 14:27:59 +02:00
|
|
|
{
|
|
|
|
echo >> $LOGFILE
|
|
|
|
echo "$@" | tee -a $LOGFILE
|
|
|
|
echo >> $LOGFILE
|
|
|
|
}
|
|
|
|
|
2005-10-09 22:21:11 +02:00
|
|
|
report()
|
2005-05-28 14:27:59 +02:00
|
|
|
{
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2005-10-09 22:21:11 +02:00
|
|
|
usage()
|
2005-05-28 14:27:59 +02:00
|
|
|
{
|
|
|
|
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
|
|
|
|
################################################################################
|
2005-07-09 10:07:40 +02:00
|
|
|
|
|
|
|
set -e
|
|
|
|
set -u
|
|
|
|
|
2005-05-28 14:27:59 +02:00
|
|
|
done=
|
|
|
|
|
2005-07-23 00:43:08 +02:00
|
|
|
[ $# -eq 0 ] && usage
|
|
|
|
|
2005-05-28 14:27:59 +02:00
|
|
|
case $1 in
|
|
|
|
-*)
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
BUILDTARBALL=Yes
|
|
|
|
BUILDRPM=Yes
|
|
|
|
BUILDHTML=Yes
|
|
|
|
BUILDXML=Yes
|
|
|
|
BUILDRPM=Yes
|
|
|
|
BUILDLRP=Yes
|
|
|
|
done=Yes
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
while [ -z "$done" ]; do
|
|
|
|
[ $# -eq 0 ] && break
|
2005-10-09 22:21:11 +02:00
|
|
|
|
2005-05-28 14:27:59 +02:00
|
|
|
option=$1
|
|
|
|
case $option in
|
|
|
|
-*)
|
|
|
|
option=${option#-}
|
|
|
|
|
|
|
|
[ -z "$option" ] && break
|
2005-10-09 22:21:11 +02:00
|
|
|
|
2005-05-28 14:27:59 +02:00
|
|
|
while [ -n "$option" ]; do
|
|
|
|
case $option in
|
|
|
|
t*)
|
|
|
|
BUILDTARBALL=Yes
|
|
|
|
option=${option#t}
|
|
|
|
;;
|
|
|
|
r*)
|
2005-08-24 22:46:56 +02:00
|
|
|
BUILDTARBALL=Yes
|
2005-05-28 14:27:59 +02:00
|
|
|
BUILDRPM=Yes
|
|
|
|
option=${option#r}
|
|
|
|
;;
|
|
|
|
h*)
|
|
|
|
BUILDHTML=Yes
|
|
|
|
option=${option#h}
|
|
|
|
;;
|
|
|
|
x*)
|
|
|
|
BUILDXML=Yes
|
|
|
|
option=${option#x}
|
|
|
|
;;
|
|
|
|
l*)
|
|
|
|
BUILDLRP=Yes
|
|
|
|
option=${option#l}
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
usage
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
shift
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
done=Yes
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
case $# in
|
|
|
|
1)
|
|
|
|
;;
|
|
|
|
2)
|
|
|
|
OLDVERSION=$2
|
|
|
|
;;
|
|
|
|
*)
|
2005-10-09 22:21:11 +02:00
|
|
|
usage
|
2005-05-28 14:27:59 +02:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
VERSION=$1
|
|
|
|
LOGFILE=$LOGDIR/shorewall_build_${VERSION}.log
|
2005-07-27 20:01:51 +02:00
|
|
|
# location and options for GnuPG
|
2005-09-18 01:19:36 +02:00
|
|
|
GPG="/usr/bin/gpg -ab --batch --comment 'To verify this, you can download our public key at https://lists.shorewall.net/shorewall.gpg.key'"
|
2005-05-28 14:27:59 +02:00
|
|
|
touch $LOGFILE
|
|
|
|
progress_message "Build of Shorewall $VERSION on $(date)"
|
|
|
|
|
|
|
|
case $VERSION in
|
|
|
|
2.0.*)
|
2005-07-09 10:07:40 +02:00
|
|
|
CVSTAG=SHOREWALL-2_0
|
2005-08-28 19:44:41 +02:00
|
|
|
DOCTAG=HEAD
|
2005-05-28 14:27:59 +02:00
|
|
|
XMLPROJ=Shorewall-docs
|
|
|
|
LRP=shorwall-${VERSION}.lrp
|
|
|
|
LRPPROJ=Lrp
|
|
|
|
;;
|
|
|
|
2.2.*)
|
2005-07-09 10:20:25 +02:00
|
|
|
CVSTAG=SHOREWALL-2_2
|
2005-08-28 19:44:41 +02:00
|
|
|
DOCTAG=SHOREWALL_2_4
|
2005-05-28 14:27:59 +02:00
|
|
|
XMLPROJ=Shorewall-docs2
|
|
|
|
LRP=shorewall-lrp-${VERSION}.tgz
|
|
|
|
LRPPROJ=Lrp2
|
|
|
|
;;
|
2005-07-09 10:07:40 +02:00
|
|
|
2.4.*)
|
|
|
|
CVSTAG=SHOREWALL-2_4
|
2005-08-28 19:44:41 +02:00
|
|
|
DOCTAG=SHOREWALL_2_4
|
2005-05-28 14:27:59 +02:00
|
|
|
XMLPROJ=Shorewall-docs2
|
|
|
|
BUILDLRP=
|
|
|
|
;;
|
2005-07-11 16:27:09 +02:00
|
|
|
*ex)
|
|
|
|
CVSTAG=EXPERIMENTAL
|
2005-08-28 19:44:41 +02:00
|
|
|
DOCTAG=HEAD
|
2005-07-11 16:27:09 +02:00
|
|
|
XMLPROJ=Shorewall-docs2
|
|
|
|
BUILDLRP=
|
|
|
|
;;
|
2005-11-17 20:05:16 +01:00
|
|
|
3.0.*)
|
2005-12-24 22:26:12 +01:00
|
|
|
CVSTAG=SHOREWALL-3_0
|
|
|
|
DOCTAG=HEAD
|
|
|
|
XMLPROJ=Shorewall-docs2
|
|
|
|
BUILDLRP=
|
|
|
|
SAMPLESTAG=HEAD
|
|
|
|
;;
|
|
|
|
3.1.*)
|
2005-07-09 10:07:40 +02:00
|
|
|
CVSTAG=HEAD
|
2005-08-28 19:44:41 +02:00
|
|
|
DOCTAG=HEAD
|
2005-05-28 14:27:59 +02:00
|
|
|
XMLPROJ=Shorewall-docs2
|
|
|
|
BUILDLRP=
|
2005-10-21 17:47:09 +02:00
|
|
|
SAMPLESTAG=HEAD
|
2005-05-28 14:27:59 +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
|
|
|
|
|
|
|
|
case $VERSION in
|
|
|
|
*Beta*|*RC*)
|
|
|
|
#
|
|
|
|
# Beta or Release Canditate
|
|
|
|
#
|
|
|
|
SHOREWALLDIR=shorewall-${VERSION%-*}
|
|
|
|
TARBALL=shorewall-${VERSION%-*}.tgz
|
|
|
|
RPMNAME=shorewall-${VERSION%-*}-0${VERSION#*-}.noarch.rpm
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
#
|
|
|
|
# Normal Release
|
|
|
|
#
|
|
|
|
SHOREWALLDIR=shorewall-$VERSION
|
|
|
|
TARBALL=shorewall-$VERSION.tgz
|
|
|
|
RPMNAME=shorewall-${VERSION}-1.noarch.rpm
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
HTMLDIR=shorewall-docs-html-$VERSION
|
|
|
|
LRPDIR=shorewall-lrp-$VERSION
|
|
|
|
|
|
|
|
if [ -n "${BUILDTARBALL}${BUILDRPM}" ]; then
|
|
|
|
report "Shorewall directory is $DIR/$SHOREWALLDIR"
|
2005-07-09 10:07:40 +02:00
|
|
|
report "CVS tag is $CVSTAG"
|
2005-05-28 14:27:59 +02:00
|
|
|
[ -n "$BUILDTARBALL" ] && report "TARBALL is $TARBALL"
|
|
|
|
[ -n "$BUILDRPM" ] && report "RPM is $RPMNAME"
|
|
|
|
fi
|
|
|
|
|
|
|
|
[ -n "$BUILDHTML" ] && report "HTML Directory is $HTMLDIR"
|
|
|
|
[ -n "$BUILDLRP" ] && report "LRP Directory is $LRPDIR"
|
|
|
|
|
|
|
|
if [ -n "${BUILDTARBALL}${BUILDRPM}" ]; then
|
2005-07-09 10:07:40 +02:00
|
|
|
progress_message "Exporting $CVSTAG from CVS..."
|
2005-05-28 14:27:59 +02:00
|
|
|
|
|
|
|
rm -rf $SHOREWALLDIR
|
|
|
|
|
2005-07-27 20:01:51 +02:00
|
|
|
do_or_die "cvs -z3 export -r $CVSTAG -d $SHOREWALLDIR Shorewall >> $LOGFILE 2>&1"
|
2005-05-28 14:27:59 +02:00
|
|
|
|
2006-02-10 20:52:48 +01:00
|
|
|
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"
|
|
|
|
[ -f $SHOREWALLDIR/shorecap ] && \
|
|
|
|
{ fgrep VERSION=$VERSION $SHOREWALLDIR/shorecap > /dev/null 2>&1 || fatal_error "shorecap has wrong version"; }
|
2005-05-28 14:27:59 +02:00
|
|
|
|
2005-10-21 17:47:09 +02:00
|
|
|
if [ -n "$SAMPLESTAG" ]; then
|
2005-10-21 00:55:58 +02:00
|
|
|
cd $SHOREWALLDIR
|
2005-10-21 17:47:09 +02:00
|
|
|
do_or_die "cvs -z3 export -r $SAMPLESTAG Samples >> $LOGFILE 2>&1"
|
2005-10-21 00:55:58 +02:00
|
|
|
cd $DIR
|
2005-10-21 00:47:46 +02:00
|
|
|
fi
|
|
|
|
|
2005-11-30 00:53:28 +01:00
|
|
|
do_or_die "rm -rf $SHOREWALLDIR/debian"
|
|
|
|
|
2005-10-09 22:21:11 +02:00
|
|
|
if [ -n "$BUILDTARBALL" ]; then
|
2005-05-28 14:27:59 +02:00
|
|
|
progress_message "Creating $DIR/$TARBALL..."
|
|
|
|
do_or_die "tar -zcvf $TARBALL $SHOREWALLDIR >> $LOGFILE 2>&1"
|
2005-10-09 22:21:11 +02:00
|
|
|
do_or_die "tar -jcvf shorewall-${VERSION%-*}.tar.bz2 $SHOREWALLDIR >> $LOGFILE 2>&1"
|
2005-07-27 20:01:51 +02:00
|
|
|
for shoresuffix in tgz tar.bz2; do
|
2005-10-09 22:21:11 +02:00
|
|
|
shoreball=shorewall-${VERSION%-*}.${shoresuffix}
|
2005-07-27 20:01:51 +02:00
|
|
|
report "GPG signing $DIR/$shoreball"
|
|
|
|
rm -f ${shoreball}.asc
|
|
|
|
do_or_die "$GPG $shoreball"
|
2005-07-23 00:43:08 +02:00
|
|
|
done
|
2005-05-28 14:27:59 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -n "$BUILDRPM" ]; then
|
|
|
|
progress_message "Building $RPMNAME..."
|
|
|
|
|
2005-07-26 22:03:42 +02:00
|
|
|
do_or_die "rpmbuild -tb --sign $TARBALL >> $LOGFILE 2>&1"
|
2005-05-28 14:27:59 +02:00
|
|
|
do_or_die cp -a $RPMDIR/RPMS/noarch/$RPMNAME .
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -n "${BUILDXML}${BUILDHTML}" ]; then
|
|
|
|
progress_message "Exporting $XMLPROJ from CVS..."
|
|
|
|
|
|
|
|
rm -rf $XMLPROJ
|
|
|
|
rm -rf shorewall-docs-xml-$VERSION
|
|
|
|
|
2005-08-28 19:44:41 +02:00
|
|
|
do_or_die "cvs -z3 export -r $DOCTAG $XMLPROJ >> $LOGFILE 2>&1"
|
2005-05-28 14:27:59 +02:00
|
|
|
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
|
|
|
|
|
|
|
|
if [ -n "$BUILDXML" ]; then
|
2005-07-27 20:01:51 +02:00
|
|
|
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"
|
2005-07-23 00:43:08 +02:00
|
|
|
do_or_die "tar -jcvf shorewall-docs-xml-$VERSION.tar.bz2 shorewall-docs-xml-$VERSION >> $LOGFILE 2>&1"
|
2005-07-27 20:01:51 +02:00
|
|
|
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"
|
2005-07-23 00:43:08 +02:00
|
|
|
done
|
2005-05-28 14:27:59 +02:00
|
|
|
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"
|
2005-10-09 22:21:11 +02:00
|
|
|
|
2005-05-28 14:27:59 +02:00
|
|
|
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"
|
2005-10-09 22:21:11 +02:00
|
|
|
|
2005-05-28 14:27:59 +02:00
|
|
|
report "Converting $DIR/$file from XML to HTML ($DIR/$f) ..."
|
2005-10-09 22:21:11 +02:00
|
|
|
|
2005-05-28 14:27:59 +02:00
|
|
|
do_or_die xsltproc --output $f --stringparam html.stylesheet html.css --stringparam ulink.target _self -param toc.section.depth 3 $STYLESHEET $file
|
|
|
|
done
|
|
|
|
|
|
|
|
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
|
2005-10-09 22:21:11 +02:00
|
|
|
|
2005-07-23 00:43:08 +02:00
|
|
|
progress_message "Creating $DIR/shorewall-docs-html-$VERSION tarballs ..."
|
2005-10-09 22:21:11 +02:00
|
|
|
|
2005-05-28 14:27:59 +02:00
|
|
|
do_or_die "tar -zcvf shorewall-docs-html-$VERSION.tgz shorewall-docs-html-$VERSION >> $LOGFILE 2>&1"
|
2005-07-23 00:43:08 +02:00
|
|
|
do_or_die "tar -jcvf shorewall-docs-html-$VERSION.tar.bz2 shorewall-docs-html-$VERSION >> $LOGFILE 2>&1"
|
2005-07-27 20:01:51 +02:00
|
|
|
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"
|
2005-07-23 00:43:08 +02:00
|
|
|
done
|
2005-05-28 14:27:59 +02:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
[ -n "$BUILDTARBALL" ] && case $VERSION in
|
|
|
|
*Beta*|*RC*)
|
|
|
|
#
|
2005-10-09 22:21:11 +02:00
|
|
|
# The original tarball created above didn't include the -Beta or -RC portion of the
|
2005-05-28 14:27:59 +02:00
|
|
|
# name in either the tarball name or the directory name. Create it here
|
|
|
|
#
|
|
|
|
progress_message "Creating $DIR/shorewall-$VERSION..."
|
|
|
|
|
|
|
|
rm -rf shorewall-$VERSION
|
2005-10-09 22:21:11 +02:00
|
|
|
|
2005-05-28 14:27:59 +02:00
|
|
|
do_or_die mv $SHOREWALLDIR shorewall-$VERSION
|
2005-10-09 22:21:11 +02:00
|
|
|
|
2005-05-28 14:27:59 +02:00
|
|
|
progress_message "Creating $DIR/shorewall-${VERSION}.tgz ..."
|
2005-10-09 22:21:11 +02:00
|
|
|
|
2005-07-27 20:01:51 +02:00
|
|
|
do_or_die "tar -zcvf shorewall-${VERSION}.tgz shorewall-$VERSION >> $LOGFILE 2>&1"
|
2005-07-23 00:43:08 +02:00
|
|
|
do_or_die "tar -jcvf shorewall-$VERSION.tar.bz2 shorewall-$VERSION >> $LOGFILE 2>&1"
|
2005-10-09 22:21:11 +02:00
|
|
|
|
2005-07-27 20:01:51 +02:00
|
|
|
for shoresuffix in tgz tar.bz2; do
|
|
|
|
betaball=shorewall-$VERSION.${shoresuffix}
|
|
|
|
report "GPG signing $DIR/$betaball tarball"
|
|
|
|
rm -f ${betaball}.asc
|
|
|
|
do_or_die "$GPG $betaball"
|
2005-07-23 00:43:08 +02:00
|
|
|
done
|
|
|
|
|
|
|
|
;;
|
2005-05-28 14:27:59 +02:00
|
|
|
esac
|
|
|
|
|
|
|
|
if [ -n "$BUILDLRP" ]; then
|
|
|
|
progress_message "Exporting $LRPPROJ from CVS ..."
|
2005-10-09 22:21:11 +02:00
|
|
|
|
2005-05-28 14:27:59 +02:00
|
|
|
rm -rf $LRPDIR
|
|
|
|
rm -rf $LRPPROJ
|
2005-10-09 22:21:11 +02:00
|
|
|
|
2005-07-27 20:01:51 +02:00
|
|
|
do_or_die "cvs -z3 export -D now $LRPPROJ >> $LOGFILE 2>&1"
|
2005-05-28 14:27:59 +02:00
|
|
|
do_or_die mv $LRPPROJ $LRPDIR
|
2005-10-09 22:21:11 +02:00
|
|
|
|
2005-05-28 14:27:59 +02:00
|
|
|
cd $LRPDIR
|
2005-10-09 22:21:11 +02:00
|
|
|
|
2005-05-28 14:27:59 +02:00
|
|
|
[ "$VERSION" = $(cat usr/share/shorewall/version) ] || fatal_error "$LRPPROJ has wrong version"
|
2005-10-09 22:21:11 +02:00
|
|
|
|
2005-05-28 14:27:59 +02:00
|
|
|
rm -f var/lib/lrpkg/shorwall.version
|
2005-10-09 22:21:11 +02:00
|
|
|
|
2005-05-28 14:27:59 +02:00
|
|
|
do_or_die ln -s ../../../usr/share/shorewall/version var/lib/lrpkg/shorwall.version
|
|
|
|
|
|
|
|
[ -d var/lib/shorewall ] || do_or_die mkdir var/lib/shorewall
|
2005-10-09 22:21:11 +02:00
|
|
|
|
2005-05-28 14:27:59 +02:00
|
|
|
do_or_die chmod 700 etc etc/init.d etc/shorewall sbin usr usr/share usr/share/shorewall var var/lib var/lib/lrpkg var/lib/shorewall
|
|
|
|
do_or_die chmod 600 etc/shorewall/*
|
|
|
|
do_or_die chmod 700 etc/init.d/shorewall
|
|
|
|
do_or_die chmod 700 sbin/shorewall
|
|
|
|
do_or_die chmod 600 usr/share/shorewall/*
|
|
|
|
do_or_die chmod 700 usr/share/shorewall/firewall
|
|
|
|
do_or_die chmod 600 var/lib/lrpkg/shorwall.help
|
|
|
|
do_or_die chmod 600 var/lib/lrpkg/shorwall.list
|
|
|
|
do_or_die chmod 600 var/lib/lrpkg/shorwall.conf
|
2005-10-09 22:21:11 +02:00
|
|
|
|
2005-05-28 14:27:59 +02:00
|
|
|
case $VERSION in
|
|
|
|
2.*)
|
|
|
|
[ -d etc/shorewall/start.d ] || do_or_die mkdir etc/shorewall/start.d
|
|
|
|
[ -d etc/shorewall/stop.d ] || do_or_die mkdir etc/shorewall/stop.d
|
|
|
|
do_or_die chmod 755 etc/shorewall/start.d
|
|
|
|
do_or_die chmod 755 etc/shorewall/stop.d
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
progress_message "Creating $DIR/$LRP ..."
|
2005-10-09 22:21:11 +02:00
|
|
|
|
2005-05-28 14:27:59 +02:00
|
|
|
do_or_die "tar -zcvf ../$LRP $(cat var/lib/lrpkg/shorwall.list) >> $LOGFILE 2>&1"
|
2005-10-09 22:21:11 +02:00
|
|
|
|
2005-05-28 14:27:59 +02:00
|
|
|
cd $DIR
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -n "$OLDVERSION" ]; then
|
|
|
|
progress_message "Creating patch-$VERSION ..."
|
2005-10-09 22:21:11 +02:00
|
|
|
|
2005-11-22 22:54:07 +01:00
|
|
|
diff -Naur shorewall-$OLDVERSION shorewall-$VERSION > patch-$VERSION
|
2005-10-09 22:21:11 +02:00
|
|
|
fi
|
2005-05-28 14:27:59 +02:00
|
|
|
|
2006-02-10 21:23:56 +01:00
|
|
|
progress_message "Creating md5sums"
|
|
|
|
do_or_die "*$VERSION[-.]*tgz *$VERSION[-.]*rpm *$VERSION[-.]*bz2 > $VERSION.md5sums"
|
2006-02-10 20:52:48 +01:00
|
|
|
|
2006-02-10 21:23:56 +01:00
|
|
|
progress_message "Creating sha1sums"
|
2006-02-10 21:15:07 +01:00
|
|
|
do_or_die "sha1sum *$VERSION[-.]*tgz *$VERSION[-.]*rpm *$VERSION[-.]*bz2 > $VERSION.sha1sums"
|
2006-02-10 20:52:48 +01:00
|
|
|
|
2005-05-28 14:27:59 +02:00
|
|
|
progress_message "Shorewall $VERSION Build complete - $(date)"
|