mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-23 08:03:11 +01:00
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:
parent
48d06133a6
commit
91f70f3e3f
@ -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,16 +323,19 @@ 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"
|
||||||
|
if [ -n "$SIGN" ]; then
|
||||||
for shoresuffix in tgz tar.bz2; do
|
for shoresuffix in tgz tar.bz2; do
|
||||||
shoreball=shorewall-${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
|
||||||
if [ -n "$HASLITE" ]; then
|
if [ -n "$HASLITE" ]; then
|
||||||
progress_message "Creating $DIR/$LITETARBALL..."
|
progress_message "Creating $DIR/$LITETARBALL..."
|
||||||
do_or_die "tar -zcvf $LITETARBALL $SHOREWALLLITEDIR >> $LOGFILE 2>&1"
|
do_or_die "tar -zcvf $LITETARBALL $SHOREWALLLITEDIR >> $LOGFILE 2>&1"
|
||||||
do_or_die "tar -jcvf shorewall-lite-${VERSION%-*}.tar.bz2 $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
|
for shoresuffix in tgz tar.bz2; do
|
||||||
shoreball=shorewall-lite-${VERSION%-*}.${shoresuffix}
|
shoreball=shorewall-lite-${VERSION%-*}.${shoresuffix}
|
||||||
report "GPG signing $DIR/$shoreball"
|
report "GPG signing $DIR/$shoreball"
|
||||||
@ -334,17 +344,19 @@ if [ -n "${BUILDTARBALL}${BUILDRPM}" ]; then
|
|||||||
done
|
done
|
||||||
fi
|
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,6 +381,7 @@ 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"
|
||||||
|
if [ -n "$SIGN" ]; then
|
||||||
for shoresuffix in tgz tar.bz2; do
|
for shoresuffix in tgz tar.bz2; do
|
||||||
xmlball=shorewall-docs-xml-$VERSION.${shoresuffix}
|
xmlball=shorewall-docs-xml-$VERSION.${shoresuffix}
|
||||||
report "GPG signing $DIR/$xmlball tarball"
|
report "GPG signing $DIR/$xmlball tarball"
|
||||||
@ -376,6 +389,7 @@ if [ -n "${BUILDXML}${BUILDHTML}" ]; then
|
|||||||
do_or_die "$GPG $xmlball"
|
do_or_die "$GPG $xmlball"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -n "$BUILDHTML" ]; then
|
if [ -n "$BUILDHTML" ]; then
|
||||||
progress_message "Building $HTMLDIR ..."
|
progress_message "Building $HTMLDIR ..."
|
||||||
@ -453,6 +467,7 @@ 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"
|
||||||
|
if [ -n "$SIGN" ]; then
|
||||||
for shoresuffix in tgz tar.bz2; do
|
for shoresuffix in tgz tar.bz2; do
|
||||||
htmlball=shorewall-docs-html-$VERSION.${shoresuffix}
|
htmlball=shorewall-docs-html-$VERSION.${shoresuffix}
|
||||||
report "GPG signing $DIR/$htmlball tarball"
|
report "GPG signing $DIR/$htmlball tarball"
|
||||||
@ -461,6 +476,7 @@ if [ -n "${BUILDXML}${BUILDHTML}" ]; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
[ -n "$BUILDTARBALL" ] && case $VERSION in
|
[ -n "$BUILDTARBALL" ] && case $VERSION in
|
||||||
*Beta*|*RC*)
|
*Beta*|*RC*)
|
||||||
@ -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"
|
||||||
|
|
||||||
|
if [ -n "$SIGN" ]; then
|
||||||
for shoresuffix in tgz tar.bz2; do
|
for shoresuffix in tgz tar.bz2; do
|
||||||
betaball=shorewall-$VERSION.${shoresuffix}
|
betaball=shorewall-$VERSION.${shoresuffix}
|
||||||
report "GPG signing $DIR/$betaball tarball"
|
report "GPG signing $DIR/$betaball tarball"
|
||||||
rm -f ${betaball}.asc
|
rm -f ${betaball}.asc
|
||||||
do_or_die "$GPG $betaball"
|
do_or_die "$GPG $betaball"
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ -n "$HASLITE" ]; then
|
if [ -n "$HASLITE" ]; then
|
||||||
@ -500,6 +518,7 @@ 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"
|
||||||
|
|
||||||
|
if [ -n "$SIGN" ]; then
|
||||||
for shoresuffix in tgz tar.bz2; do
|
for shoresuffix in tgz tar.bz2; do
|
||||||
betaball=shorewall-lite-$VERSION.${shoresuffix}
|
betaball=shorewall-lite-$VERSION.${shoresuffix}
|
||||||
report "GPG signing $DIR/$betaball tarball"
|
report "GPG signing $DIR/$betaball tarball"
|
||||||
@ -507,6 +526,7 @@ fi
|
|||||||
do_or_die "$GPG $betaball"
|
do_or_die "$GPG $betaball"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user