Allow building without GPG signature

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4323 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
paulgear 2006-08-09 01:07:17 +00:00
parent 48d06133a6
commit 91f70f3e3f

View File

@ -29,6 +29,7 @@
# -r Build RPM # -r Build RPM
# -h Build HTML documentation # -h Build HTML documentation
# -x Build XML documentation # -x Build XML documentation
# -s Don't sign with GPG
# #
# If no options are given, all options are assumed. # If no options are given, all options are assumed.
# #
@ -83,6 +84,7 @@ BUILDXML=
BUILDHTML= BUILDHTML=
SAMPLESTAG= SAMPLESTAG=
HASLITE= HASLITE=
SIGN=
################################################################################ ################################################################################
# F U N C T I O N S # F U N C T I O N S
################################################################################ ################################################################################
@ -145,6 +147,7 @@ case $1 in
BUILDHTML=Yes BUILDHTML=Yes
BUILDXML=Yes BUILDXML=Yes
BUILDRPM=Yes BUILDRPM=Yes
SIGN=Yes
done=Yes done=Yes
;; ;;
esac esac
@ -178,6 +181,10 @@ while [ -z "$done" ]; do
BUILDXML=Yes BUILDXML=Yes
option=${option#x} option=${option#x}
;; ;;
s*)
SIGN=""
option=${option#s}
;;
*) *)
usage usage
;; ;;
@ -316,35 +323,40 @@ if [ -n "${BUILDTARBALL}${BUILDRPM}" ]; then
progress_message "Creating $DIR/$TARBALL..." progress_message "Creating $DIR/$TARBALL..."
do_or_die "tar -zcvf $TARBALL $SHOREWALLDIR >> $LOGFILE 2>&1" do_or_die "tar -zcvf $TARBALL $SHOREWALLDIR >> $LOGFILE 2>&1"
do_or_die "tar -jcvf shorewall-${VERSION%-*}.tar.bz2 $SHOREWALLDIR >> $LOGFILE 2>&1" do_or_die "tar -jcvf shorewall-${VERSION%-*}.tar.bz2 $SHOREWALLDIR >> $LOGFILE 2>&1"
for shoresuffix in tgz tar.bz2; do if [ -n "$SIGN" ]; then
shoreball=shorewall-${VERSION%-*}.${shoresuffix}
report "GPG signing $DIR/$shoreball"
rm -f ${shoreball}.asc
do_or_die "$GPG $shoreball"
done
if [ -n "$HASLITE" ]; 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"
for shoresuffix in tgz tar.bz2; do for shoresuffix in tgz tar.bz2; do
shoreball=shorewall-lite-${VERSION%-*}.${shoresuffix} shoreball=shorewall-${VERSION%-*}.${shoresuffix}
report "GPG signing $DIR/$shoreball" report "GPG signing $DIR/$shoreball"
rm -f ${shoreball}.asc rm -f ${shoreball}.asc
do_or_die "$GPG $shoreball" do_or_die "$GPG $shoreball"
done done
fi fi
if [ -n "$HASLITE" ]; 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
fi
fi fi
if [ -n "$BUILDRPM" ]; then if [ -n "$BUILDRPM" ]; then
progress_message "Building $RPMNAME..." progress_message "Building $RPMNAME..."
do_or_die "rpmbuild -tb --sign $TARBALL >> $LOGFILE 2>&1" test -n "$SIGN" && SIGN="--sign"
do_or_die "rpmbuild -tb $SIGN $TARBALL >> $LOGFILE 2>&1"
do_or_die cp -a $RPMDIR/RPMS/noarch/$RPMNAME . do_or_die cp -a $RPMDIR/RPMS/noarch/$RPMNAME .
if [ -n "$HASLITE" ]; then if [ -n "$HASLITE" ]; then
progress_message "Building $LITERPMNAME..." progress_message "Building $LITERPMNAME..."
do_or_die "rpmbuild -tb --sign $LITETARBALL >> $LOGFILE 2>&1" do_or_die "rpmbuild -tb $SIGN $LITETARBALL >> $LOGFILE 2>&1"
do_or_die cp -a $RPMDIR/RPMS/noarch/$LITERPMNAME . do_or_die cp -a $RPMDIR/RPMS/noarch/$LITERPMNAME .
fi fi
fi fi
@ -369,12 +381,14 @@ if [ -n "${BUILDXML}${BUILDHTML}" ]; then
progress_message "Creating $DIR/shorewall-docs-xml-$VERSION tarballs" 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 -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" do_or_die "tar -jcvf shorewall-docs-xml-$VERSION.tar.bz2 shorewall-docs-xml-$VERSION >> $LOGFILE 2>&1"
for shoresuffix in tgz tar.bz2; do if [ -n "$SIGN" ]; then
xmlball=shorewall-docs-xml-$VERSION.${shoresuffix} for shoresuffix in tgz tar.bz2; do
report "GPG signing $DIR/$xmlball tarball" xmlball=shorewall-docs-xml-$VERSION.${shoresuffix}
rm -f ${xmlball}.asc report "GPG signing $DIR/$xmlball tarball"
do_or_die "$GPG $xmlball" rm -f ${xmlball}.asc
done do_or_die "$GPG $xmlball"
done
fi
fi fi
if [ -n "$BUILDHTML" ]; then if [ -n "$BUILDHTML" ]; then
@ -453,12 +467,14 @@ if [ -n "${BUILDXML}${BUILDHTML}" ]; then
do_or_die "tar -zcvf shorewall-docs-html-$VERSION.tgz shorewall-docs-html-$VERSION >> $LOGFILE 2>&1" 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" do_or_die "tar -jcvf shorewall-docs-html-$VERSION.tar.bz2 shorewall-docs-html-$VERSION >> $LOGFILE 2>&1"
for shoresuffix in tgz tar.bz2; do if [ -n "$SIGN" ]; then
htmlball=shorewall-docs-html-$VERSION.${shoresuffix} for shoresuffix in tgz tar.bz2; do
report "GPG signing $DIR/$htmlball tarball" htmlball=shorewall-docs-html-$VERSION.${shoresuffix}
rm -f ${htmlball}.asc report "GPG signing $DIR/$htmlball tarball"
do_or_die "$GPG $htmlball" rm -f ${htmlball}.asc
done do_or_die "$GPG $htmlball"
done
fi
fi fi
fi fi
@ -479,12 +495,14 @@ fi
do_or_die "tar -zcvf shorewall-${VERSION}.tgz shorewall-$VERSION >> $LOGFILE 2>&1" do_or_die "tar -zcvf shorewall-${VERSION}.tgz shorewall-$VERSION >> $LOGFILE 2>&1"
do_or_die "tar -jcvf shorewall-$VERSION.tar.bz2 shorewall-$VERSION >> $LOGFILE 2>&1" do_or_die "tar -jcvf shorewall-$VERSION.tar.bz2 shorewall-$VERSION >> $LOGFILE 2>&1"
for shoresuffix in tgz tar.bz2; do if [ -n "$SIGN" ]; then
betaball=shorewall-$VERSION.${shoresuffix} for shoresuffix in tgz tar.bz2; do
report "GPG signing $DIR/$betaball tarball" betaball=shorewall-$VERSION.${shoresuffix}
rm -f ${betaball}.asc report "GPG signing $DIR/$betaball tarball"
do_or_die "$GPG $betaball" rm -f ${betaball}.asc
done do_or_die "$GPG $betaball"
done
fi
if [ -n "$HASLITE" ]; then if [ -n "$HASLITE" ]; then
@ -500,12 +518,14 @@ fi
do_or_die "tar -zcvf shorewall-lite-${VERSION}.tgz shorewall-lite-$VERSION >> $LOGFILE 2>&1" 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" do_or_die "tar -jcvf shorewall-lite-$VERSION.tar.bz2 shorewall-lite-$VERSION >> $LOGFILE 2>&1"
for shoresuffix in tgz tar.bz2; do if [ -n "$SIGN" ]; then
betaball=shorewall-lite-$VERSION.${shoresuffix} for shoresuffix in tgz tar.bz2; do
report "GPG signing $DIR/$betaball tarball" betaball=shorewall-lite-$VERSION.${shoresuffix}
rm -f ${betaball}.asc report "GPG signing $DIR/$betaball tarball"
do_or_die "$GPG $betaball" rm -f ${betaball}.asc
done do_or_die "$GPG $betaball"
done
fi
fi fi
;; ;;
esac esac