[leaf-commits] src/bering-uclibc4/source/shorewall6 buildtool.cfg, NONE, 1.1 buildtool.mk, NONE, 1.1 shorewall6-default, NONE, 1.1 shorewall6-lrp.diff, NONE, 1.1

KP Kirchd?rfer <[email protected]>
Newsgroups gmane.linux.leaf.cvs
Message-ID <[email protected]>
Update of /cvsroot/leaf/src/bering-uclibc4/source/shorewall6
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv2913

Added Files:
	buildtool.cfg buildtool.mk shorewall6-default 
	shorewall6-lrp.diff 
Log Message:
shorewall6 4.4.10.2


--- NEW FILE: shorewall6-default ---
#
# Shoreline Firewall startup options
#
# Any flags that appear in this file will be passed to shorewall
# by init.d on startup.
#
# -f = fast
# -q = quiet
#
OPTIONS="-f"

# if your Shorewall configuration requires detection of the ip address of a ppp
# interface, you must list such interfaces in "wait_interface" to get Shorewall
# wait until the interface is configured. Otherwise the script will fail because
# it won't be able to detect the IP address.
#
# Example:
#    wait_interface="ppp0"
# or
#    wait_interface="ppp0 ppp1"
#
#wait_interface="ppp0"

--- NEW FILE: shorewall6-lrp.diff ---
diff -urN shorewall6-4.4.10.2.orig/init.debian.sh shorewall6-4.4.10.2/init.debian.sh
--- shorewall6-4.4.10.2.orig/init.debian.sh	2010-06-25 20:16:06.000000000 +0200
+++ shorewall6-4.4.10.2/init.debian.sh	2010-06-27 22:09:37.000000000 +0200
@@ -1,76 +1,15 @@
 #!/bin/sh
-### BEGIN INIT INFO
-# Provides:          shorewall6
-# Required-Start:    $network $remote_fs
-# Required-Stop:     $network $remote_fs
-# Default-Start:     S
-# Default-Stop:      0 6
-# Short-Description: Configure the firewall at boot time
-# Description:       Configure the firewall according to the rules specified in
-#                    /etc/shorewall6
-### END INIT INFO
-
-
-
+RCDLINKS="2,S19 3,S19 4,S19 5,S19 0,K91 6,K91"
 SRWL=/sbin/shorewall6
-SRWL_OPTS="-tvv"
 WAIT_FOR_IFUP=/usr/share/shorewall6/wait4ifup
-test -n ${INITLOG:=/var/log/shorewall6-init.log}
-
-test -x $SRWL || exit 0
-test -x $WAIT_FOR_IFUP || exit 0
-test -n "$INITLOG" || {
-	echo "INITLOG cannot be empty, please configure $0" ; 
-	exit 1;
-}
 
-if [ "$(id -u)" != "0" ]
-then
-  echo "You must be root to start, stop or restart \"Shorewall6 firewall\"."
-  exit 1
-fi
-
-echo_notdone () {
-
-  if [ "$INITLOG" = "/dev/null" ] ; then 
-	  echo "not done."
-  else 
-	  echo "not done (check $INITLOG)."
-  fi
-
-  exit 1
-}
-
-not_configured () {
-	echo "#### WARNING ####"
-	echo "The firewall won't be started/stopped unless it is configured"
-	if [ "$1" != "stop" ]
-	then
-		echo ""
-		echo "Please read about Debian specific customization in"
-		echo "/usr/share/doc/shorewall6/README.Debian.gz."
-	fi
-	echo "#################"
-	exit 0
-}
-
-# check if shorewall is configured or not
+# parse the shorewall params file in order to use params in
+# /etc/default/shorewall
 if [ -f "/etc/default/shorewall6" ]
 then
-	. /etc/default/shorewall6
-	SRWL_OPTS="$SRWL_OPTS $OPTIONS"
-	if [ "$startup" != "1" ]
-	then
-		not_configured
-	fi
-else
-	not_configured
-fi
-
-[ "$INITLOG" = "/dev/null" ] && SHOREWALL_INIT_SCRIPT=1 || SHOREWALL_INIT_SCRIPT=0
-
-export SHOREWALL_INIT_SCRIPT
-
+        . /etc/default/shorewall6
+        fi
+        
 # wait for an unconfigured interface 
 wait_for_pppd () {
 	if [ "$wait_interface" != "" ]
@@ -86,32 +25,28 @@
 shorewall6_start () {
   echo -n "Starting \"Shorewall6 firewall\": "
   wait_for_pppd
-  $SRWL $SRWL_OPTS start >> $INITLOG 2>&1 && echo "done." || echo_notdone
+  $SRWL $OPTIONS start 2>&1 && echo "done." || echo_notdone
   return 0
 }
 
 # stop the firewall
 shorewall6_stop () {
   echo -n "Stopping \"Shorewall6 firewall\": "
-  if [ "$SAFESTOP" = 1 ]; then
-      $SRWL $SRWL_OPTS stop >> $INITLOG 2>&1 && echo "done." || echo_notdone
-  else
-      $SRWL $SRWL_OPTS clear >> $INITLOG 2>&1 && echo "done." || echo_notdone
-  fi
-  return 0
+      $SRWL clear 2>&1 && echo "done." || echo_notdone
+    return 0
 }
 
 # restart the firewall
 shorewall6_restart () {
   echo -n "Restarting \"Shorewall6 firewall\": "
-  $SRWL $SRWL_OPTS restart >> $INITLOG 2>&1 && echo "done." || echo_notdone
+  $SRWL $OPTIONS restart 2>&1 && echo "done." || echo_notdone
   return 0
 }
 
 # refresh the firewall
 shorewall6_refresh () {
   echo -n "Refreshing \"Shorewall6 firewall\": "
-  $SRWL $SRWL_OPTS refresh >> $INITLOG 2>&1 && echo "done." || echo_notdone
+  $SRWL refresh 2>&1 && echo "done." || echo_notdone
   return 0
 }
 
diff -urN shorewall6-4.4.10.2.orig/shorewall6.conf shorewall6-4.4.10.2/shorewall6.conf
--- shorewall6-4.4.10.2.orig/shorewall6.conf	2010-07-07 19:19:54.000000000 +0200
+++ shorewall6-4.4.10.2/shorewall6.conf	2010-07-31 19:25:36.873214208 +0200
@@ -10,7 +10,7 @@
 #		       S T A R T U P   E N A B L E D
 ###############################################################################
 
-STARTUP_ENABLED=No
+STARTUP_ENABLED=Yes
 
 ###############################################################################
 #		              V E R B O S I T Y
@@ -22,7 +22,7 @@
 #			       L O G G I N G
 ###############################################################################
 
-LOGFILE=/var/log/messages
+LOGFILE=/var/log/shorewall6.log
 
 STARTUP_LOG=/var/log/shorewall6-init.log
 
@@ -60,7 +60,7 @@
 
 SHOREWALL_SHELL=/bin/sh
 
-SUBSYSLOCK=/var/lock/subsys/shorewall
+SUBSYSLOCK=/var/run/shorewall6
 
 MODULESDIR=
 
@@ -91,7 +91,7 @@
 #			F I R E W A L L	  O P T I O N S
 ###############################################################################
 
-IP_FORWARDING=Off
+IP_FORWARDING=On
 
 TC_ENABLED=No
 

--- NEW FILE: buildtool.cfg ---
<Server shorewall-net>
	Type = http
	Name = www.shorewall.net
	Serverpath = /pub/shorewall
</Server>

<File shorewall6-4.4.10.2.tgz>
	Server = shorewall-net
	Directory = 4.4/shorewall-4.4.10/superceded
	Envname = SHOREWALL_SOURCE
</File>

<File buildtool.mk>
	Server = cvs4-sourceforge
	Revision = HEAD
	Directory = shorewall6
</File>

 This patch provides generic changes to run under Bering uClibc
<File shorewall6-lrp.diff>
	Server = cvs4-sourceforge
	Revision = HEAD
	Directory = shorewall6
	Envname = SHOREWALL_LRP_DIFF
</File>

 This patch provides the Bering-uClibc specific configuration defaults
<File shorewall6-default>
	Server = cvs4-sourceforge
	Revision = HEAD
	Directory = shorewall6
	Envname = SHOREWALL_DEFAULT
</File>

# ---------------------------------------------------------------------
<Package>
	<shorwall6>
		packagename=shorwall6
		Version 4.4.10.2
		Revision = 1

		Help <<EOF
		Shoreline Firewall (Shorewall) 
		This is the perl-based version of shorewall for IPv6.
		Homepage: http://www.shorewall.net
		Requires: ip6tables.lrp shorwall.lrp perl.lrp

		LEAF package by __PACKAGER__, __BUILDDATE__
		EOF

		<Permissions>
			Files = 644
			Directories = 755
		</Permissions>

		<Owner>
			Files = root:root
			Directories = root:root
		</Owner>

		<Contents>
                      <File>
                                Filename    = etc/init.d/shorewall6
                                Source      = etc/init.d/shorewall6
                                Permissions = 755
                                Type        = binary
                                Type        = local

                        </File>
                       	<File>
                                Filename    = sbin/shorewall6
                                Source      = sbin/shorewall6
                                Permissions = 755
                                Type        = binary
                        </File>
                        <File>
                                Filename    = usr/share/shorewall6/
                                Type        = local
                        </File>
			<File>
                                Filename    = usr/share/shorewall6/
                                Source      = usr/share/shorewall6/macro*
                                Type        = binary
                        </File>
                        <File>
                                Filename    = usr/share/shorewall6/wait4ifup
                                Source      = usr/share/shorewall6/wait4ifup
                                Permissions = 755
                                Type        = binary
                        </File>

                        <File>
                                Filename    = usr/share/shorewall6/version
                                Source      = usr/share/shorewall6/version
                                Type        = binary
                        </File>
                        <File>
                                Filename    = usr/share/shorewall6/lib.cli
                                Source      = usr/share/shorewall6/lib.cli
                                Type        = binary
                        </File>
                        <File>
                                Filename    = usr/share/shorewall6/lib.common
                                Source      = usr/share/shorewall6/lib.common
                                Type        = binary
                        </File>
                        <File>
                                Filename    = usr/share/shorewall6/lib.base
                                Source      = usr/share/shorewall6/lib.base
                                Type        = binary
                        </File>
                        <File>
                                Filename    = usr/share/shorewall6/configpath
                                Source      = usr/share/shorewall6/configpath
                                Type        = binary
                        </File>

                        <File>
                                Target      = usr/share/shorewall6/lib.base
                                Filename    = usr/share/shorewall6/functions
                                Type        = link
                        </File>
                        <File>
                                Filename    = usr/share/shorewall6/helpers
                                Source      = usr/share/shorewall6/helpers
                                Type        = binary
                        </File>
                        <File>
                                Filename    = usr/share/shorewall6/actions.std
                                Source      = usr/share/shorewall6/actions.std
                                Type        = binary
                        </File>
                        <File>
                                Filename    = usr/share/shorewall6/action.Drop
                                Source      = usr/share/shorewall6/action.Drop
                                Type        = binary
                        </File>
                        <File>
                                Filename    = usr/share/shorewall6/action.Reject
                                Source      = usr/share/shorewall6/action.Reject
                                Type        = binary
                        </File>
                        <File>
                                Filename    = usr/share/shorewall6/action.template
                                Source      = usr/share/shorewall6/action.template
                                Type        = binary
                        </File>
                        <File>
                                Filename    = usr/share/shorewall6/action.AllowICMPs
                                Source      = usr/share/shorewall6/action.AllowICMPs
                                Type        = binary
                        </File>
                        <File>
                                Filename    = var/lib/shorewall6/
                                Type        = directory
                        </File>
                        <File>
                                Filename    = etc/default/shorewall6
                                Source      = etc/default/shorewall6
                                Description = Default     Shorewall6 Runtime Startup options
                                Type        = binary
                                Type        = conf
                                Type        = local
                        </File>
                        <File>
                                Filename    = etc/shorewall6/
                                Type        = local
                        </File>
                        <File>
                                Filename    = etc/shorewall6/params
                                Source      = etc/shorewall6/params
                                Permissions = 600
                                Description = Params    Assign parameter values
                                Type        = binary
                                Type        = conf
                        </File>
                        <File>
                                Filename    = etc/shorewall6/zones
                                Source      = etc/shorewall6/zones
                                Description = Zones     Partition the network into Zones
                                Type        = binary
                                Type        = conf
                        </File>
                        <File>
                                Filename    = etc/shorewall6/interfaces
                                Source      = etc/shorewall6/interfaces
                                Permissions = 600
                                Description = Ifaces    Shorewall Networking Interfaces
                                Type        = binary
                                Type        = conf
                        </File>
                        <File>
                                Filename    = etc/shorewall6/hosts
                                Source      = etc/shorewall6/hosts
                                Permissions = 600
                                Description = Hosts     Define specific zones
                                Type        = binary
                                Type        = conf
                        </File>
                        <File>
                                Filename    = etc/shorewall6/policy
                                Source      = etc/shorewall6/policy
                                Permissions = 600
                                Description = Policy    Firewall high-level policy
                                Type        = binary
                                Type        = conf
                        </File>
                        <File>
                                Filename    = etc/shorewall6/rules
                                Source      = etc/shorewall6/rules
                                Permissions = 600
                                Description = Rules     Exceptions to policy
                                Type        = binary
                                Type        = conf
                        </File>
                        <File>
                                Filename    = etc/shorewall6/routestopped
                                Source      = etc/shorewall6/routestopped
                                Permissions = 600
                                Description = RStopped  Hosts admitted after 'shorewall stop'
                                Type        = binary
                                Type        = conf
                        </File>
                        <File>
                                Filename    = etc/shorewall6/shorewall6.conf
                                Source      = etc/shorewall6/shorewall6.conf
                                Permissions = 600
                                Description = Config    Shorewall Global Parameters
                                Type        = binary
                                Type        = conf
                        </File>
                        <File>
                                Filename    = usr/share/shorewall6/modules
                                Source      = usr/share/shorewall6/modules
                                Permissions = 600
                                Description = Modules   Netfilter modules to load
                                Type        = binary
                                Type        = conf
                        </File>
                        <File>
                                Filename    = etc/shorewall6/tos
                                Source      = etc/shorewall6/tos
                                Permissions = 600
                                Description = TOS       Type of Service policy
                                Type        = binary
                                Type        = conf
                        </File>
                        <File>
                                Filename    = etc/shorewall6/blacklist
                                Source      = etc/shorewall6/blacklist
                                Permissions = 600
                                Description = Blacklist Blacklisted hosts
                                Type        = binary
                                Type        = conf
                        </File>
                        <File>
                                Filename    = etc/shorewall6/init
                                Source      = etc/shorewall6/init
                                Permissions = 600
                                Description = Init      Commands executed before [re]start
                                Type        = binary
                                Type        = conf
                        </File>
                        <File>
                                Filename    = etc/shorewall6/start
                                Source      = etc/shorewall6/start
                                Permissions = 600
                                Description = Start     Commands executed after [re]start
                                Type        = binary
                                Type        = conf
                        </File>
                        <File>
                                Filename    = etc/shorewall6/started
                                Source      = etc/shorewall6/started
                                Permissions = 600
                                Description = Started     Commands executed after complete [re]start
                                Type        = binary
                                Type        = conf
                        </File>
                        <File>
                                Filename    = etc/shorewall6/stop
                                Source      = etc/shorewall6/stop
                                Permissions = 600
                                Description = Stop      Commands executed before stop
                                Type        = binary
                                Type        = conf
                        </File>
                        <File>
                                Filename    = etc/shorewall6/stopped
                                Source      = etc/shorewall6/stopped
                                Permissions = 600
                                Description = Stopped   Commands executed after stop
                                Type        = binary
                                Type        = conf
                        </File>
                        <File>
                                Filename    = etc/shorewall6/actions
                                Source      = etc/shorewall6/actions
                                Permissions = 600
                                Description = Actions   Define user actions
                                Type        = binary
                                Type        = conf
                        </File>
                        <File>
                                Filename    = etc/shorewall6/route_rules
                                Source      = etc/shorewall6/route_rules
                                Permissions = 600
                                Description = Route_rules Routing to providers
                                Type        = binary
                                Type        = conf
                        </File>
                        <File>
                                Filename    = etc/shorewall6/accounting
                                Source      = etc/shorewall6/accounting
                                Permissions = 600
                                Description = Account   Traffic Accounting Rules
                                Type        = binary
                                Type        = conf
                        </File>
                        <File>
                                Filename    = etc/shorewall6/maclist
                                Source      = etc/shorewall6/maclist
                                Permissions = 600
                                Description = Maclist   MAC Verification
                                Type        = binary
                                Type        = conf
                        </File>
                        <File>
                                Filename    = etc/shorewall6/providers
                                Source      = etc/shorewall6/providers
                                Permissions = 600
                                Description = Providers Additional routing table
                                Type        = binary
                                Type        = conf
                        </File>

                        <File>
                                Filename    = etc/shorewall6/tcdevices
                                Source      = etc/shorewall6/tcdevices
                                Permissions = 600
                                Description = TCDevices  Specify speed of devices for traffic shaping
                                Type        = binary
                                Type        = conf
                        </File>
                        <File>
                                Filename    = etc/shorewall6/tcrules
                                Source      = etc/shorewall6/tcrules
                                Permissions = 600
                                Description = TCRules   FWMark Rules
                                Type        = binary
                                Type        = conf
                        </File>
                        <File>
                                Filename    = etc/shorewall6/tcinterfaces
                                Source      = etc/shorewall6/tcinterfaces
                                Permissions = 600
                                Description = TCInterfaces Devices for simplified traffic shaping
                                Type        = binary
                                Type        = conf
                        </File>
                        <File>
                                Filename    = etc/shorewall6/tcpri
                                Source      = etc/shorewall6/tcpri
                                Permissions = 600
                                Description = TCPri  Classify traffic for simplified traffic shaping
                                Type        = binary
                                Type        = conf
                        </File>
                        <File>
                                Filename    = etc/shorewall6/tunnels
                                Source      = etc/shorewall6/tunnels
                                Permissions = 600
                                Description = Tunnels   Tunnel Definition (ipsec
                                Type        = binary
                                Type        = conf
                        </File>
                        <File>
                                Filename    = etc/shorewall6/notrack
                                Source      = etc/shorewall6/notrack
                                Permissions = 600
                                Description = Notrack  Exclude traffic from connection tracking
                                Type        = binary
                                Type        = conf
                        </File>
                        <File>
                                Filename    = etc/shorewall6/refreshed
                                Source      = etc/shorewall6/refreshed
                                Permissions = 600
                                Type        = binary
                                Type        = local
                        </File>
		</Contents>
	</shorwall6>
</Package>

--- NEW FILE: buildtool.mk ---
######################################
#
# buildtool makefile for Shoreline Firewall (IPv6)
#
######################################

include $(MASTERMAKEFILE)

TARGET_DIR=$(BT_BUILD_DIR)/shorewall6

SHOREWALL_DIR:=shorewall6-4.4.10.2

$(SHOREWALL_DIR)/.source:
	zcat $(SHOREWALL_SOURCE) | tar -xvf -
	cat $(SHOREWALL_LRP_DIFF)	| patch -d $(SHOREWALL_DIR) -p1
#	cat $(SHOREWALL_CONFIG_DIFF)	| patch -d $(SHOREWALL_DIR) -p1
	touch $(SHOREWALL_DIR)/.source

#errata
#	cp compiler $(SHOREWALL_DIR)	

$(SHOREWALL_DIR)/.build: $(SHOREWALL_DIR)/.source
	cp $(SHOREWALL_DIR)/init.debian.sh $(SHOREWALL_DIR)/init.sh
	mkdir -p $(TARGET_DIR)
	(cd $(SHOREWALL_DIR); env PREFIX=$(TARGET_DIR) ./install.sh)
	
#	chmod 755 $(TARGET_DIR)/usr/share/shorewall/firewall
	mkdir -p $(TARGET_DIR)/etc/default
	install -c $(SHOREWALL_DEFAULT) $(TARGET_DIR)/etc/default/shorewall6

	rm -rf $(TARGET_DIR)/usr/share/shorewall6/configfiles
	rm -rf $(TARGET_DIR)/etc/logrotate.d
	rm -rf $(TARGET_DIR)/usr/share/man
	cp -afv $(TARGET_DIR)/* $(BT_STAGING_DIR)
	touch $(SHOREWALL_DIR)/.build

source: $(SHOREWALL_DIR)/.source

build:  $(SHOREWALL_DIR)/.build                                                                                                   
	cp -afv $(TARGET_DIR)/* $(BT_STAGING_DIR)

clean:	stageclean
	rm -rf $(TARGET_DIR)
	rm -f  $(SHOREWALL_DIR)/.build

stageclean:
	rm -f  $(BT_STAGING_DIR)/etc/init.d/shorewall
	rm -f  $(BT_STAGING_DIR)/etc/default/shorewall
	rm -f  $(BT_STAGING_DIR)/sbin/shorewall
	rm -rf $(BT_STAGING_DIR)/etc/shorewall6
	rm -rf $(BT_STAGING_DIR)/usr/share/shorewall6
	rm -rf $(BT_STAGING_DIR)/var/lib/shorewall6
	rm -rf $(BT_STAGING_DIR)/var/state/shorewall6

srcclean: clean
	rm -rf $(SHOREWALL_DIR)


------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.