Package: fwbuilder
Version: 5.1.0-2
Severity: normal
Tags: patch

I'm trying to script the (re)generation of firewall rules from the data
file, but apparently some part of fwbuilder is missing from the package:

$ fwb_compile_all -a -f dedi1.fw 
/usr/bin/fwb_compile_all: 1: /usr/bin/fwb_compile_all: fwblookup: not found
$ dpkg -S fwblookup
dpkg-query: no path found matching pattern *fwblookup*.
$ 

The upstream changelog mentions that "with addition of the "list"
command to fwbedit, utility fwblookup has been deprecated and removed
from the package and source code tree"; unfortunately, the
fwb_compile_all script has not been ported to use this new command.  It
turns out that it has not been ported to use other changes in "API"
either.

The following patch fixes this problem.  I suppose it should be
forwarded upstream, too.

--- /usr/bin/fwb_compile_all	2012-03-23 07:10:54.000000000 +0100
+++ fwb_compile_all	2012-06-18 16:58:56.140621661 +0200
@@ -43,7 +43,7 @@
 
 shift `expr $OPTIND - 1`
 
-test -n "$all" && LIST=`fwblookup -f $XMLFILE -lN /${LIB}/Firewalls | grep -v Firewalls` || {
+test -n "$all" && LIST=`fwbedit list -f $XMLFILE -c -o /${LIB}/Firewalls` || {
     while test -n "$1"; do
         LIST="$LIST $1"
         shift
@@ -51,7 +51,8 @@
 }
 
 for f in `echo $LIST`; do
-    platform=`fwblookup -f $XMLFILE -a platform /${LIB}/Firewalls/$f`
+    platform=`fwbedit list -f $XMLFILE -F %platform% -o $f`
+    id=`fwbedit list -f $XMLFILE -F %id% -o $f`
     case "$platform" in
         iptables) comp="fwb_ipt" ;;
         ipf)      comp="fwb_ipf" ;;
@@ -62,6 +63,6 @@
     esac
     echo
     echo "################ $f"
-    $comp $V -f $XMLFILE -d $DIR $f;
+    $comp $V -f $XMLFILE -d $DIR -i $id;
   done
 
Thanks,

Roland.

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages fwbuilder depends on:
ii  fwbuilder-common  5.1.0-2
ii  libc6             2.13-33
ii  libgcc1           1:4.7.1-1
ii  libqt4-network    4:4.8.2-1
ii  libqtcore4        4:4.8.2-1
ii  libqtgui4         4:4.8.2-1
ii  libsnmp15         5.4.3~dfsg-2.5
ii  libstdc++6        4.7.1-1
ii  libxml2           2.8.0+dfsg1-4
ii  libxslt1.1        1.1.26-12+rebuild1
ii  zlib1g            1:1.2.7.dfsg-11

Versions of packages fwbuilder recommends:
ii  fwbuilder-doc  5.1.0-2

fwbuilder suggests no packages.

-- no debconf information

-- 
Roland Mas

Qu'est-ce qui est jaune, qui pèse deux cents kilos et qui chante ?
Un canari.  Belle bête, pas vrai ?

Reply via email to