First cut at re-factoring packages

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6703 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-06-29 15:46:32 +00:00
parent 725dca2686
commit d7927591dc
6 changed files with 28 additions and 25 deletions

View File

@ -8,12 +8,12 @@ Shorewall 4.0.0 Beta 7
2) You are now offered a choice as to which compiler(s) you install. In 2) You are now offered a choice as to which compiler(s) you install. In
4.0.0, there are the following packages: 4.0.0, there are the following packages:
- Shorewall ( common files ) - Shorewall-common ( common files )
- Shorewall-shell ( the shell-based compiler ) - Shorewall-shell ( the shell-based compiler )
- Shorewall-perl (the Perl-based compiler ) - Shorewall-perl (the Perl-based compiler )
You must install Shorewall and at least one of the compiler packages You must install Shorewall-common and at least one of the compiler
(you may install them both). packages (you may install them both).
3) The facilities for supporting bridge/firewalls under earlier 3) The facilities for supporting bridge/firewalls under earlier
releases are deprecated and their documentation is omitted from the releases are deprecated and their documentation is omitted from the
@ -53,24 +53,24 @@ Migration Considerations:
If you attempt to upgrade using the RPM, you get this result: If you attempt to upgrade using the RPM, you get this result:
gateway:~ # rpm -Uvh shorewall-4.0.0.noarch.rpm gateway:~ # rpm -Uvh shorewall-common-4.0.0.noarch.rpm
error: Failed dependencies: error: Failed dependencies:
shorewall_compiler is needed by shorewall-4.0.0-1.noarch shorewall_compiler is needed by shorewall-common-4.0.0-1.noarch
gateway:~ # gateway:~ #
You must either: You must either:
rpm -U shorewall-4.0.0.noarch.rpm \ rpm -U shorewall-common-4.0.0.noarch.rpm \
shorewall-shell-4.0.0.noarch.rpm shorewall-shell-4.0.0.noarch.rpm
or or
rpm -U shorewall-4.0.0.noarch.rpm \ rpm -U shorewall-common-4.0.0.noarch.rpm \
shorewall-perl-4.0.0.noarch.rpm shorewall-perl-4.0.0.noarch.rpm
or or
rpm -U shorewall-4.0.0.noarch.rpm \ rpm -U shorewall-common-4.0.0.noarch.rpm \
shorewall-perl-4.0.0.noarch.rpm \ shorewall-perl-4.0.0.noarch.rpm \
shorewall-shell-4.0.0.noarch.rpm shorewall-shell-4.0.0.noarch.rpm

View File

@ -1,4 +1,4 @@
%define name shorewall %define name shorewall-common
%define version 4.0.0 %define version 4.0.0
%define release 0Beta7 %define release 0Beta7
%define prefix /usr %define prefix /usr
@ -23,8 +23,9 @@ The Shoreline Firewall, more commonly known as "Shorewall", is a Netfilter
(iptables) based firewall that can be used on a dedicated firewall system, (iptables) based firewall that can be used on a dedicated firewall system,
a multi-function gateway/ router/server or on a standalone GNU/Linux system. a multi-function gateway/ router/server or on a standalone GNU/Linux system.
To be fully functional, this package requires installation of either This package contains those Shorewall components required by both of the
shorewall-shell or shorewall-perl available compiler packages. To be fully functional, this package requires
installation of either shorewall-shell or shorewall-perl
%prep %prep

View File

@ -15,7 +15,7 @@ Source: %{name}-%{version}.tgz
URL: http://www.shorewall.net/ URL: http://www.shorewall.net/
BuildArch: noarch BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRoot: %{_tmppath}/%{name}-%{version}-root
Requires: perl Requires: perl shorewall >= 3.4.2
Provides: shorewall_compiler Provides: shorewall_compiler
%description %description

View File

@ -17,6 +17,8 @@ BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRoot: %{_tmppath}/%{name}-%{version}-root
Requires: iptables iproute Requires: iptables iproute
Provides: shorewall_compiler Provides: shorewall_compiler
Provides: shorewall = %{version}-%{release}
Obsoletes: shorewall < 4.0.0
%description %description

View File

@ -111,7 +111,7 @@
</listitem> </listitem>
<listitem> <listitem>
<para>Shorewall - the part of Shorewall common to both <para>Shorewall-common - the part of Shorewall common to both
compilers.</para> compilers.</para>
</listitem> </listitem>

View File

@ -276,9 +276,9 @@ case $VERSION in
# #
SHOREWALLDIR=shorewall-${VERSION%-*} SHOREWALLDIR=shorewall-${VERSION%-*}
SHOREWALLLITEDIR=shorewall-lite-${VERSION%-*} SHOREWALLLITEDIR=shorewall-lite-${VERSION%-*}
TARBALL=shorewall-${VERSION%-*}.tgz TARBALL=shorewall-common-${VERSION%-*}.tgz
LITETARBALL=shorewall-lite-${VERSION%-*}.tgz LITETARBALL=shorewall-lite-${VERSION%-*}.tgz
RPMNAME=shorewall-${VERSION%-*}-0${VERSION#*-}.noarch.rpm RPMNAME=shorewall-common-${VERSION%-*}-0${VERSION#*-}.noarch.rpm
LITERPMNAME=shorewall-lite-${VERSION%-*}-0${VERSION#*-}.noarch.rpm LITERPMNAME=shorewall-lite-${VERSION%-*}-0${VERSION#*-}.noarch.rpm
PERLRPMNAME=shorewall-perl-${VERSION%-*}-0${VERSION#*-}.noarch.rpm PERLRPMNAME=shorewall-perl-${VERSION%-*}-0${VERSION#*-}.noarch.rpm
PERLTARBALL=shorewall-perl-${VERSION%-*}.tgz PERLTARBALL=shorewall-perl-${VERSION%-*}.tgz
@ -293,9 +293,9 @@ case $VERSION in
# #
SHOREWALLDIR=shorewall-$VERSION SHOREWALLDIR=shorewall-$VERSION
SHOREWALLLITEDIR=shorewall-lite-$VERSION SHOREWALLLITEDIR=shorewall-lite-$VERSION
TARBALL=shorewall-$VERSION.tgz TARBALL=shorewall-common-$VERSION.tgz
LITETARBALL=shorewall-lite-$VERSION.tgz LITETARBALL=shorewall-lite-$VERSION.tgz
RPMNAME=shorewall-${VERSION}-1.noarch.rpm RPMNAME=shorewall-common-${VERSION}-1.noarch.rpm
LITERPMNAME=shorewall-lite-${VERSION}-1.noarch.rpm LITERPMNAME=shorewall-lite-${VERSION}-1.noarch.rpm
PERLRPMNAME=shorewall-perl-${VERSION}-1.noarch.rpm PERLRPMNAME=shorewall-perl-${VERSION}-1.noarch.rpm
PERLDIR=shorewall-perl-$VERSION PERLDIR=shorewall-perl-$VERSION
@ -416,10 +416,10 @@ 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-common-${VERSION%-*}.tar.bz2 $SHOREWALLDIR >> $LOGFILE 2>&1"
if [ -n "$SIGN" ]; then if [ -n "$SIGN" ]; then
for shoresuffix in tgz tar.bz2; do for shoresuffix in tgz tar.bz2; do
shoreball=shorewall-${VERSION%-*}.${shoresuffix} shoreball=shorewall-common-${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"
@ -470,9 +470,9 @@ if [ -n "${BUILDTARBALL}${BUILDRPM}" ]; then
test -n "$SIGN" && SIGN="--sign" test -n "$SIGN" && SIGN="--sign"
rm -rf $RPMDIR/BUILD/shorewall-${VERSION%-*} rm -rf $RPMDIR/BUILD/shorewall-${VERSION%-*}
do_or_die "cp shorewall-${VERSION%-*}.tgz $RPMDIR/SOURCES/" do_or_die "cp shorewall-common-${VERSION%-*}.tgz $RPMDIR/SOURCES/"
do_or_die "cp $SHOREWALLDIR/shorewall.spec $RPMDIR/SPECS/" do_or_die "cp $SHOREWALLDIR/shorewall-common.spec $RPMDIR/SPECS/"
do_or_die "rpmbuild -ba $SIGN $RPMDIR/SPECS/shorewall.spec >> $LOGFILE 2>&1" do_or_die "rpmbuild -ba $SIGN $RPMDIR/SPECS/shorewall-common.spec >> $LOGFILE 2>&1"
do_or_die cp -a $RPMDIR/RPMS/noarch/$RPMNAME . do_or_die cp -a $RPMDIR/RPMS/noarch/$RPMNAME .
progress_message "Building $LITERPMNAME..." progress_message "Building $LITERPMNAME..."
@ -678,12 +678,12 @@ fi
progress_message "Creating $DIR/shorewall-${VERSION}.tgz ..." progress_message "Creating $DIR/shorewall-${VERSION}.tgz ..."
do_or_die "tar -zcvf shorewall-${VERSION}.tgz shorewall-$VERSION >> $LOGFILE 2>&1" do_or_die "tar -zcvf shorewall-common-${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-common-$VERSION.tar.bz2 shorewall-$VERSION >> $LOGFILE 2>&1"
if [ -n "$SIGN" ]; then if [ -n "$SIGN" ]; then
for shoresuffix in tgz tar.bz2; do for shoresuffix in tgz tar.bz2; do
betaball=shorewall-$VERSION.${shoresuffix} betaball=shorewall-common-$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"