diff --git a/Shorewall-perl/Shorewall/Compiler.pm b/Shorewall-perl/Shorewall/Compiler.pm index 315338ba3..6a14e88e8 100644 --- a/Shorewall-perl/Shorewall/Compiler.pm +++ b/Shorewall-perl/Shorewall/Compiler.pm @@ -96,22 +96,21 @@ sub generate_script_1() { 'VARDIR=/var/lib/shorewall-lite', 'PRODUCT="Shorewall Lite"' ); - - copy "$globals{SHAREDIR}/lib.base"; - - emitj ( '################################################################################', - '# End of /usr/share/shorewall/lib.base', - '################################################################################' - ); } else { emitj ( 'SHAREDIR=/usr/share/shorewall', 'CONFDIR=/etc/shorewall', 'VARDIR=/var/lib/shorewall', 'PRODUCT=\'Shorewall\'', - '. /usr/share/shorewall/lib.base' ); } + copy "$globals{SHAREDIRPL}/lib.base"; + + emitj ( '################################################################################', + '# End of /usr/share/shorewall-perl/lib.base', + '################################################################################' + ); + emit "TEMPFILE=\n"; for my $exit qw/init start tcclear started stop stopped clear/ { diff --git a/Shorewall-perl/Shorewall/Config.pm b/Shorewall-perl/Shorewall/Config.pm index 50c843861..4b39ae561 100644 --- a/Shorewall-perl/Shorewall/Config.pm +++ b/Shorewall-perl/Shorewall/Config.pm @@ -936,22 +936,6 @@ sub ensure_config_path() { } } -# -# Ensure that the version of Shorewall-common currently installed is acceptable -# -sub validate_shorewall_common() { - my $f = "$globals{SHAREDIR}/version"; - fatal_error "$f does not exist" unless -f $f; - fatal_error "$f is empty" unless -s _; - open V, '<', $f or fatal_error "Cannot open $f: $!"; - my $version = ; - close V; - chomp $version; - fatal_error "Invalid $f contents" unless $version =~ /(\d+)\.(\d+)\.(\d+)/; - $version = ( $1 * 10000 ) + ( $2 * 100 ) + $3; - fatal_error "Shorewall-perl $globals{VERSION} requires shorewall-common >= $globals{MIN_COMMON_VERSION_PRINTABLE}" unless $version >= $globals{MIN_COMMON_VERSION}; -} - # # Set $shorewall_dir # @@ -1047,8 +1031,6 @@ sub get_configuration( $ ) { my $export = $_[0]; - validate_shorewall_common; - ensure_config_path; process_shorewall_conf; diff --git a/Shorewall-perl/install.sh b/Shorewall-perl/install.sh index a85e990c3..8a5fb142d 100755 --- a/Shorewall-perl/install.sh +++ b/Shorewall-perl/install.sh @@ -182,6 +182,9 @@ for f in Shorewall/*.pm ; do echo "Module ${f%.*} installed as ${PREFIX}/usr/share/shorewall-perl/$f" done +install_file lib.base ${PREFIX}/usr/share/shorewall-perl/lib.base 0644 +echo "Shell library lib.base installed as ${PREFIX}/usr/share/shorewall-perl/lib.base"; + # # Install the program skeleton files # diff --git a/Shorewall-perl/shorewall-perl.spec b/Shorewall-perl/shorewall-perl.spec index 5c97f7e00..901285450 100644 --- a/Shorewall-perl/shorewall-perl.spec +++ b/Shorewall-perl/shorewall-perl.spec @@ -63,6 +63,7 @@ fi %attr(755,root,root) /usr/share/shorewall-perl/buildports.pl %attr(755,root,root) /usr/share/shorewall-perl/compiler.pl +%attr(0644,root,root) /usr/share/shorewall-perl/lib.base %attr(0644,root,root) /usr/share/shorewall-perl/prog.header %attr(0644,root,root) /usr/share/shorewall-perl/prog.functions %attr(0644,root,root) /usr/share/shorewall-perl/prog.footer diff --git a/Shorewall-shell/compiler b/Shorewall-shell/compiler index 42ad8592f..029e97bfb 100755 --- a/Shorewall-shell/compiler +++ b/Shorewall-shell/compiler @@ -35,8 +35,8 @@ # SHOREWALL_DIR A directory name was passed to /sbin/shorewall # VERBOSE Standard Shorewall verbosity control. -MIN_COMMON_VERSION=40000 -MIN_COMMON_VERSION_PRINTABLE=4.0.0 +COMMON_VERSION=40000 +COMMON_VERSION_PRINTABLE=4.0.0 # # Fatal error -- stops the compiler after issuing the error message @@ -5741,7 +5741,7 @@ done VERSION=$(cat $SHELLSHAREDIR/version) -[ $SHOREWALL_LIBVERSION -ge $MIN_COMMON_VERSION ] || fatal_error "Shorewall-shell $VERSION requires Shorewall-common >= $MIN_COMMON_VERSION_PRINTABLE" +[ $SHOREWALL_LIBVERSION -ne $COMMON_VERSION ] || fatal_error "Shorewall-shell $VERSION requires Shorewall-common $MIN_COMMON_VERSION_PRINTABLE" PROGRAM=compiler diff --git a/Shorewall-shell/shorewall-shell.spec b/Shorewall-shell/shorewall-shell.spec index 685e38a84..44f2ead21 100644 --- a/Shorewall-shell/shorewall-shell.spec +++ b/Shorewall-shell/shorewall-shell.spec @@ -13,7 +13,7 @@ Source: %{name}-%{version}.tgz URL: http://www.shorewall.net/ BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-root -Requires: iptables iproute shorewall-common >= 4.0.0 +Requires: iptables iproute shorewall-common = 4.0.0-0RC1 Provides: shorewall_compiler = %{version}-%{release} Provides: shorewall = %{version}-%{release} Obsoletes: shorewall < 4.0.0-0Beta7 diff --git a/tools/build/buildshorewall b/tools/build/buildshorewall index 64b81509f..c4e03d3a2 100755 --- a/tools/build/buildshorewall +++ b/tools/build/buildshorewall @@ -346,6 +346,7 @@ if [ -n "${BUILDTARBALL}${BUILDRPM}" ]; then do_or_die "cp $SHOREWALLDIR/modules $SHOREWALLLITEDIR >> $LOGFILE 2>&1" if [ -f $SHOREWALLDIR/lib.base ]; then do_or_die "cp $SHOREWALLDIR/lib.base $SHOREWALLLITEDIR >> $LOGFILE 2>&1" + do_or_die "cp $SHOREWALLDIR/lib.base $PERLDIR >> $LOGFILE 2>&1" if [ -f $SHOREWALLDIR/lib.cli ]; then do_or_die "cp $SHOREWALLDIR/lib.cli $SHOREWALLLITEDIR >> $LOGFILE 2>&1" fi