[SM-Commit] GIT changes to master grimoire by Vlad Glagolev (57410e655b9f2ac98f5faec084313ef369abb4e7)

Vlad Glagolev scm at sourcemage.org
Wed Jul 23 07:21:36 EDT 2008


GIT changes to master grimoire by Vlad Glagolev <stealth at sourcemage.org>:

 dev/null                       |binary
 net/ferm/DETAILS               |   16 ++++++++--------
 net/ferm/HISTORY               |    4 ++++
 net/ferm/PRE_BUILD             |    6 ++++++
 net/ferm/ferm-1.3.5.tar.gz.sig |    0 
 net/ferm/ferm-2.0.tar.gz.sig   |binary
 net/ferm/flush.patch           |   38 ++++++++++++++++++++++++++++++++++++++
 7 files changed, 56 insertions(+), 8 deletions(-)

New commits:
commit 57410e655b9f2ac98f5faec084313ef369abb4e7
Author: Vlad Glagolev <stealth at sourcemage.org>
Commit: Vlad Glagolev <stealth at sourcemage.org>

    ferm: => 2.0

diff --git a/net/ferm/DETAILS b/net/ferm/DETAILS
index 4858535..882283f 100755
--- a/net/ferm/DETAILS
+++ b/net/ferm/DETAILS
@@ -1,17 +1,17 @@
            SPELL=ferm
-         VERSION=1.3.5
+         VERSION=2.0
           SOURCE=$SPELL-$VERSION.tar.gz
-   SOURCE_URL[0]=http://ferm.foo-projects.org/download/${VERSION%.?}/$SOURCE
+   SOURCE_URL[0]=http://ferm.foo-projects.org/download/$VERSION/$SOURCE
       SOURCE_GPG=gurus.gpg:$SOURCE.sig
-SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
+SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION"
         WEB_SITE=http://ferm.foo-projects.org/
       LICENSE[0]=GPL
          ENTERED=20071220
            SHORT="tool to maintain complex firewalls"
 cat << EOF
-ferm is a tool to maintain complex firewalls, without having the trouble
-to rewrite the complex rules over and over again. ferm allows the entire
-firewall rule set to be stored in a separate file, and to be loaded with one
-command. The firewall configuration resembles structured programming-like
-language, which can contain levels and lists.
+ferm is a tool to maintain complex firewalls, without having the trouble to
+rewrite the complex rules over and over again. ferm allows the entire firewall
+rule set to be stored in a separate file, and to be loaded with one command.
+The firewall configuration resembles structured programming-like language,
+which can contain levels and lists.
 EOF
diff --git a/net/ferm/HISTORY b/net/ferm/HISTORY
index 0b0f6b4..677ce83 100644
--- a/net/ferm/HISTORY
+++ b/net/ferm/HISTORY
@@ -1,3 +1,7 @@
+2008-07-23 Vlad Glagolev <stealth at sourcemage.org>
+	* DETAILS: Fixed SOURCE_URL[0], updated spell to 2.0
+	* PRE_BUILD: added some comments, fixed a bug about flushing the rules
+
 2008-07-22 Vlad Glagolev <stealth at sourcemage.org>
 	* DETAILS: updated spell to 1.3.5
 
diff --git a/net/ferm/PRE_BUILD b/net/ferm/PRE_BUILD
index 7078d80..622ef5d 100755
--- a/net/ferm/PRE_BUILD
+++ b/net/ferm/PRE_BUILD
@@ -1,5 +1,11 @@
 default_pre_build &&
 cd "$SOURCE_DIRECTORY" &&
 
+# bug, found in 2.0 while flushing the rules, fixed in trunk
+patch -p0 < "$SPELL_DIRECTORY/flush.patch" &&
+
+# install man page to the correct location
 sed -i "s:man/:share/man/:" config.mk &&
+
+# use correct path for iptables-save
 sed -i "s:sbin:usr/sbin:g" src/import-ferm
diff --git a/net/ferm/ferm-1.3.5.tar.gz.sig b/net/ferm/ferm-1.3.5.tar.gz.sig
deleted file mode 100644
index e3cae70..0000000
Binary files a/net/ferm/ferm-1.3.5.tar.gz.sig and /dev/null differ
diff --git a/net/ferm/ferm-2.0.tar.gz.sig b/net/ferm/ferm-2.0.tar.gz.sig
new file mode 100644
index 0000000..4370c5c
Binary files /dev/null and b/net/ferm/ferm-2.0.tar.gz.sig differ
diff --git a/net/ferm/flush.patch b/net/ferm/flush.patch
new file mode 100644
index 0000000..90028c9
--- /dev/null
+++ b/net/ferm/flush.patch
@@ -0,0 +1,38 @@
+--- src/ferm.orig	2008-07-22 21:44:45.000000000 +0400
++++ src/ferm	2008-07-23 15:13:02.000000000 +0400
+@@ -2089,6 +2089,17 @@
+     return $status;
+ }
+ 
++sub table_to_save($$) {
++    my ($result_r, $table_info) = @_;
++
++    foreach my $chain (sort keys %{$table_info->{chains}}) {
++        my $chain_info = $table_info->{chains}{$chain};
++        foreach my $rule (@{$chain_info->{rules}}) {
++            $$result_r .= "-A $chain$rule->{rule}\n";
++        }
++    }
++}
++
+ sub rules_to_save($) {
+     my ($domain_info) = @_;
+ 
+@@ -2113,15 +2124,8 @@
+             $result .= ":$chain $policy\ [0:0]\n";
+         }
+ 
+-        next if $option{flush};
+-
+-        # dump rules
+-        foreach my $chain (sort keys %{$table_info->{chains}}) {
+-            my $chain_info = $table_info->{chains}{$chain};
+-            foreach my $rule (@{$chain_info->{rules}}) {
+-                $result .= "-A $chain$rule->{rule}\n";
+-            }
+-        }
++        table_to_save(\$result, $table_info)
++          unless $option{flush};
+ 
+         # do it
+         $result .= "COMMIT\n";



More information about the SM-Commit mailing list