Firestarter fails to run on locales other than English

Bug #222038 reported by Obelich
54
This bug affects 3 people
Affects Status Importance Assigned to Milestone
firestarter
Won't Fix
Critical
firestarter (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Hi we have ubuntu 8.04 and install firestart in the spanish interface firestarter is not working say the dispositive eth0 is not ready buth in english interface is runing perfectly, i switch the interface from spanish to english to paste the text and i found it run correctly.

Related branches

Changed in firestarter:
status: New → Confirmed
Revision history for this message
Ricardo Pérez López (ricardo) wrote :

The problem is in the (generated) file /etc/firestarter/firestarter.sh. The following lines:

IP=`/sbin/ifconfig $IF | grep inet | cut -d : -f 2 | cut -d \\ -f 1`
MASK=`/sbin/ifconfig $IF | grep Mas | cut -d : -f 4`
BCAST=`/sbin/ifconfig $IF |grep Bcast: | cut -d : -f 3 | cut -d \\ -f 1`

fails when the local is other than English, because they look up several keyword ("Mas", "Bcast:") which doesn't appears in ifconfig in Spanish. Example:

ricardo@kadath:~$ LANG=C ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:18:f3:53:b2:9a
          inet addr:192.168.2.100 Bcast:192.168.2.255 Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:2736 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2634 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2917432 (2.7 MB) TX bytes:368744 (360.1 KB)
          Interrupt:18 Base address:0xa000

ricardo@kadath:~$ ifconfig eth0
eth0 Link encap:Ethernet direcciónHW 00:18:f3:53:b2:9a
          inet dirección:192.168.2.100 Difusión:192.168.2.255 Máscara:255.255.255.0
          ARRIBA DIFUSIÓN CORRIENDO MULTICAST MTU:1500 Metric:1
          RX packets:2723 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2620 errors:0 dropped:0 overruns:0 carrier:0
          colisiones:0 txqueuelen:1000
          RX bytes:2908959 (2.7 MB) TX bytes:365950 (357.3 KB)
          Interrupción:18 Dirección base: 0xa000

As a workaround, you can hack the /etc/firestarter/firestarter.sh file, replacing the three above lines with the following:

IP=`LANG=C /sbin/ifconfig $IF | grep inet | cut -d : -f 2 | cut -d \\ -f 1`
MASK=`LANG=C /sbin/ifconfig $IF | grep Mas | cut -d : -f 4`
BCAST=`LANG=C /sbin/ifconfig $IF |grep Bcast: | cut -d : -f 3 | cut -d \\ -f 1`

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

This patch tries to resolve the issue, using the LANG=C prefix in the generated firestarter.sh file.

Revision history for this message
Juan Martín (nauj27) wrote :

I was looking for this bug because I have found same issue. Anyway the bug it's already in confirmed status.

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Any news about this bug? This is a VERY annoying (critical, IMHO) bug of a frequently used program, and the patch solves it very easily.

Any Ubuntu developer (or MOTU) could take a look over it in order to get it fixed before 8.04.1 release?

Changed in firestarter:
status: Unknown → New
Revision history for this message
Jisakiel (jisakiel) wrote :

I can confirm this as well in the intrepid version. Very annoying and easily solved (I just added export LC_ALL="C" before those lines)

Changed in firestarter:
status: New → Confirmed
Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Can any MOTU member apply the patch?

Revision history for this message
esenoy (esenoy) wrote :

In spanish version you have only to change:

MASK=`LANG=C /sbin/ifconfig $IF | grep Mas | cut -d : -f 4`

for:

MASK=`LANG=C /sbin/ifconfig $IF | grep Más | cut -d : -f 4`

With tilde in "Más". It worked for me.

Revision history for this message
Adam Niedling (krychek) wrote :

Is this still an issue in Intrepid? Please test when it comes out.

Changed in firestarter:
status: Confirmed → Incomplete
Revision history for this message
Juan Martín (nauj27) wrote :

Yes, it's still an issue in Intrepid Ibex 8.10.

Adam Niedling (krychek)
Changed in firestarter:
status: Incomplete → New
Revision history for this message
Jorge Román (joroman) wrote :

I have got the same problem with firestart.sh, but when I edit the file and fix the problem after run the wizard the file discards the fixed file and replaces it with the old one. How can avoid this situation?

Revision history for this message
Hector Palacios (hectorpal) wrote :

This is still an issue in Intrepid. Please guys, the devil is in the details.
(BTW, there should be a policy agaisnt solving i18n issues by a grep like this)

Revision history for this message
Hector Palacios (hectorpal) wrote :

This is even worst. I have WiFi at eth1 and Ethertnet at eth0. The scripsts call WiFi an external network, and Ethernet internal network. (No idea why).

When my WiFi is not connected, "/sbin/ipconfig eth1" doesn't report any mask, but then the following line in firestarter.sh avoids firestarter to start (:-)).

if [ "$MASK" = "" -a "$1" != "stop" ]; then
 echo "External network device $IF is not ready. Aborting.."
 exit 2
fi

Revision history for this message
Hector Palacios (hectorpal) wrote :

Sorry for the SPAM. It seems tha Firestarter configuration file assumes that I'll do share my WiFi connection (http://www.fs-security.com/docs/connection-sharing.php), and that some provision in needed to deal with both Ethernet and WiFi connections (http://ubuntuforums.org/showthread.php?t=253174) pretty confusing. I think most people just want to configure without thinking about what device they are connecting through.

Revision history for this message
TheHobbit (the-hobbit) wrote :

As a rule, when a patch is added to a bug report the relevant sponsors group should be subscribed to the bug. I'm doing this. I'm also checking the patch.

Revision history for this message
TheHobbit (the-hobbit) wrote :

Ok, the proposed diff obviusly solves the problem. I'll attach here a debdiff for jaunty.

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

@TheHobbit:
Thanks a lot for taking care of this issue!

TheHobbit (the-hobbit)
Changed in firestarter (Ubuntu):
status: New → Confirmed
Revision history for this message
TheHobbit (the-hobbit) wrote :

Here is the debdiff for Intrepid

Revision history for this message
Scott Kitterman (kitterman) wrote :

motu-release ack as long as the sponsor tests it in a non-english locale.

Revision history for this message
Iain Lane (laney) wrote :

Tested and works. Waiting for approval now; thanks for your contribution!

Changed in firestarter (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package firestarter - 1.0.3-7ubuntu4

---------------
firestarter (1.0.3-7ubuntu4) jaunty; urgency=low

  * made looking interface settings independant from locale (LP: #222038)

 -- Leo Cacciari (TheHobbit) <email address hidden> Thu, 09 Apr 2009 18:50:57 +0200

Changed in firestarter (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Ricardo Pérez López (ricardo) wrote :

@TheHobbit:

The patch is not sufficient to fix the issue. I realized that the /etc/firestarter/firestarter.sh generated by Firestarter wizard contains the following:

# External network interface data
IP=`LANG=C /sbin/ifconfig $IF | grep inet | cut -d : -f 2 | cut -d \ -f 1`
MASK=`LANG=C /sbin/ifconfig $IF | grep Mas | cut -d : -f 4`
BCAST=`LANG=C /sbin/ifconfig $IF |grep Bcast: | cut -d : -f 3 | cut -d \ -f 1`
NET=$IP/$MASK

if [ "$NAT" = "on" ]; then
        # Internal network interface data
        INIP=`/sbin/ifconfig $INIF | grep inet | cut -d : -f 2 | cut -d \ -f 1`
        INMASK=`/sbin/ifconfig $INIF | grep Mas | cut -d : -f 4`
        INBCAST=`/sbin/ifconfig $INIF |grep Bcast: | cut -d : -f 3 | cut -d \ -f 1`
        INNET=$INIP/$INMASK
fi

So the IP, MASK, BCAST and NET variables are right, but the INIP, INMASK, INBCAST and INNET are still using the wrong locale.

What about setting LANG=C at the beggining of the firestarter.sh generated script?

Changed in firestarter (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Iain Lane (laney) wrote :

Boo. My limited testing obviously wasn't enough. Please work up a better patch and I'll sponsor it again if it's ready in the very very near future (release is soon).

Unsubscribing sponsors for now. Please resubscribe when ready.

Revision history for this message
TheHobbit (the-hobbit) wrote :

whoa....
I'll do it tomorrow, now is way to later.
Sorry for the error

Revision history for this message
TheHobbit (the-hobbit) wrote :

well, it was to stupid that I can sleep with. Here is the right debdiff. I did not changed again the version, so that the release is still 1.0.3-7ubuntu4. Could do a 1.0.3-7ubuntu5 if this is better.

The bug only showed up when nat was checked, thus it did not shown. But I definitively _should_ have checked.

Revision history for this message
TheHobbit (the-hobbit) wrote :

well, in case it is useful, here it is

Revision history for this message
Iain Lane (laney) wrote :

subscribing sponsors so that someone who can test the change properly (i.e. who can speak another language; shame on me) can upload. ScottK gave his approval on IRC.

Revision history for this message
Jonathan Marsden (jmarsden) wrote :

Laney,

I've tested this in a Jaunty VM in English, French, German, Spanish and Filipino. It appears to work fine in all of those locales. My Russian is too minimal for me to try it out in that locale :)

In the process of testing and packaging it, I fixed a few lintian issues, added a watch file, and shrank the diff.gz by getting config.guess and config.sub changes out of it.

Jaunty's lintian finds some Warnings:

 I: firestarter: arch-dep-package-has-big-usr-share 1420kB 72%
 W: firestarter: script-calls-init-script-directly ./etc/network/if-down.d/50firestarter:3
 W: firestarter: script-calls-init-script-directly ./etc/network/if-up.d/50firestarter:3
 W: firestarter: script-calls-init-script-directly ./etc/ppp/ip-down.d/50firestarter:3
 W: firestarter: script-calls-init-script-directly ./etc/ppp/ip-up.d/50firestarter:3
 W: firestarter: copyright-refers-to-versionless-license-file usr/share/common-licenses/GPL

There is also one source file src/eggtrayicon.c which has an LGPL v2 or later licence (with the old address) and a copyright attribution to a different person than the program as a whole. This is not mentioned in debian/copyright, which IMO is probably a licencing bug.

I'm attaching my debdiff. You can either go with my changes, or (if it is too close to Jaunty release for that) just go with the original patch for the locale issue, whichever is best for Ubuntu.

Jonathan

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package firestarter - 1.0.3-7ubuntu5

---------------
firestarter (1.0.3-7ubuntu5) jaunty; urgency=low

  * debian/patches/21_locales_failing.dpatch:
    - Add second half of patch by Leo Cacciari (LP: #222038)
  * debian/patches/22_remove_encoding_from_desktop.dpatch:
    - Remove deprecated Encoding= line from .desktop file.
  * debian/watch: Added watch file.

 -- Jonathan Marsden <email address hidden> Fri, 17 Apr 2009 18:08:02 -0700

Changed in firestarter (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Iain Lane (laney) wrote :

Thanks for your contribution(s). Please forward all changes (including config) to Debian so that we don't have to maintain this delta forever.

Changed in firestarter:
importance: Unknown → Critical
Changed in firestarter:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.