From ad06133e3b955f2cd99b912e83be560da929665a Mon Sep 17 00:00:00 2001 From: teastep Date: Wed, 20 Jun 2007 21:07:08 +0000 Subject: [PATCH] Phase II of publishing Shorewall::Ports.pm git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6621 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-common/releasenotes.txt | 17 +++++++++++++---- Shorewall-perl/Shorewall/Chains.pm | 1 + Shorewall-perl/Shorewall/Config.pm | 5 +---- Shorewall-perl/Shorewall/Ports.pm | 2 +- Shorewall-perl/{buildproto.pl => buildports.pl} | 6 +++--- Shorewall-perl/install.sh | 2 +- Shorewall-perl/shorewall-perl.spec | 2 +- 7 files changed, 21 insertions(+), 14 deletions(-) rename Shorewall-perl/{buildproto.pl => buildports.pl} (96%) diff --git a/Shorewall-common/releasenotes.txt b/Shorewall-common/releasenotes.txt index 365756747..298db0659 100644 --- a/Shorewall-common/releasenotes.txt +++ b/Shorewall-common/releasenotes.txt @@ -66,13 +66,22 @@ Other changes in Shorewall 4.0.0 Beta 6 3) Previously, Shorewall-perl read /etc/protocols and /etc/services during compiler startup to build internal protocol and service - tables. This had a fixed cost of up to one second or more, + tables. This had a fixed cost of up to one half second or more, depending on the speed of the system and the distribution (The /etc/services released with OpenSuSE 10.2 is over 14,000 lines!!) These tables are now initialized by the Perl compiler - which speeds up compilation considerably. The /etc/protocols and - /etc/services used to build these tables are from Ubuntu Fiesty - Fawn and are included in /usr/share/shorewall-perl/. + which speeds up compilation considerably. + + The file /usr/share/shorewall-perl/Shorewall/Ports.pm contains the + tables. As released from shorewall.net, the tables match + /etc/protocols and /etc/services from Ubuntu Feisty Fawn. + + If you insist on having the tables match your own /etc/protocols + and /etc/services, then as root: + + 1. Backup your /usr/share/shorewall-perl/Shorewall/Ports.pm + file. + 2. /usr/share/shorewall-perl/buildports.pl > /usr/share/shorewall-perl/Shorewall/Ports.pm Migration Considerations: diff --git a/Shorewall-perl/Shorewall/Chains.pm b/Shorewall-perl/Shorewall/Chains.pm index 1c0bf7948..c3b43d2c7 100644 --- a/Shorewall-perl/Shorewall/Chains.pm +++ b/Shorewall-perl/Shorewall/Chains.pm @@ -29,6 +29,7 @@ require Exporter; use Shorewall::Common; use Shorewall::Config; +use Shorewall::Ports; use Shorewall::Zones; use Shorewall::Interfaces; use Shorewall::IPAddrs; diff --git a/Shorewall-perl/Shorewall/Config.pm b/Shorewall-perl/Shorewall/Config.pm index b558fb9d6..398fb3ebf 100644 --- a/Shorewall-perl/Shorewall/Config.pm +++ b/Shorewall-perl/Shorewall/Config.pm @@ -30,7 +30,6 @@ package Shorewall::Config; use strict; use warnings; use Shorewall::Common; -use Shorewall::Ports; use File::Basename; our @ISA = qw(Exporter); @@ -63,9 +62,7 @@ our @EXPORT = qw( %config %globals - %capabilities - %protocols - %services ); + %capabilities ); our @EXPORT_OK = qw( $shorewall_dir initialize ); our @VERSION = 1.00; diff --git a/Shorewall-perl/Shorewall/Ports.pm b/Shorewall-perl/Shorewall/Ports.pm index d15af13a5..c8879ffe5 100644 --- a/Shorewall-perl/Shorewall/Ports.pm +++ b/Shorewall-perl/Shorewall/Ports.pm @@ -26,7 +26,7 @@ # modules files during compiler startup. # # -# Protocol and Services module generated using buildproto.pl - Wed Jun 20 13:47:35 2007 +# Protocol and Services module generated using buildports.pl - Wed Jun 20 14:03:53 2007 # package Shorewall::Ports; diff --git a/Shorewall-perl/buildproto.pl b/Shorewall-perl/buildports.pl similarity index 96% rename from Shorewall-perl/buildproto.pl rename to Shorewall-perl/buildports.pl index 14e35b84b..44977e37c 100644 --- a/Shorewall-perl/buildproto.pl +++ b/Shorewall-perl/buildports.pl @@ -19,7 +19,7 @@ # # Usage: # -# buildproto.pl [ ] > /usr/share/shorewall-perl/Shorewall/Ports.pm +# buildports.pl [ ] > /usr/share/shorewall-perl/Shorewall/Ports.pm # # Where: # @@ -93,7 +93,7 @@ print <<"EOF"; # modules files during compiler startup. # # -# Protocol and Services module generated using buildproto.pl - $date +# Protocol and Services module generated using buildports.pl - $date # EOF @@ -122,7 +122,7 @@ while ( read_a_line1 ) { print "\t\t );\n\n"; -print "our %services = (\n"; +print "our \%services = (\n"; open_file 'services' or fatal_error "Cannot open services: $!"; diff --git a/Shorewall-perl/install.sh b/Shorewall-perl/install.sh index 562fc0b90..397d3312e 100755 --- a/Shorewall-perl/install.sh +++ b/Shorewall-perl/install.sh @@ -188,7 +188,7 @@ done # # Install buildproto.pl # -install_file buildproto.pl ${PREFIX}/usr/share/shorewall-perl/buildproto.pl 0555 +install_file buildports.pl ${PREFIX}/usr/share/shorewall-perl/buildports.pl 0555 echo $VERSION > ${PREFIX}/usr/share/shorewall-perl/version # diff --git a/Shorewall-perl/shorewall-perl.spec b/Shorewall-perl/shorewall-perl.spec index 072f9c769..730955550 100644 --- a/Shorewall-perl/shorewall-perl.spec +++ b/Shorewall-perl/shorewall-perl.spec @@ -54,7 +54,7 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %dir /usr/share/shorewall-perl %attr(0755,root,root) %dir /usr/share/shorewall-perl/Shorewall -%attr(555,root,root) /usr/share/shorewall-perl/buildproto.pl +%attr(555,root,root) /usr/share/shorewall-perl/buildports.pl %attr(555,root,root) /usr/share/shorewall-perl/compiler.pl %attr(0644,root,root) /usr/share/shorewall-perl/prog.header %attr(0644,root,root) /usr/share/shorewall-perl/prog.functions