[Box Backup] Boxbackup Digest, Vol 7, Issue 2

Chris Wilson chris at qwirx.com
Sun Jun 6 09:15:30 BST 2010


Hi Magnus,

On Sat, 5 Jun 2010, Magnus Homann wrote:

> sm8ps-boxbackup1 at yahoo.com skrev:
>> Thank you for your answers! I am relieved to see that I am not the only 
>> poor soul on earth suffering from this bug which makes my (Box-)backups 
>> virtually useless.
>> 
>> James, my locale is set to de_CH.UTF-8. Comparing to Wolfgang's statement, 
>> that does not seem to be the cause.
>> I am using the pre-packaged 0.11-rc3-r2502-2 on a Ubuntu 9.10 client.
>> 
>> could you give some more specific information, please? If it is a known 
>> error on Ubuntu, then we should file a bug an Launchpad.
>
> There was some discussion a year or two ago with Chris, that came to the 
> conclusion that it was the binary build that was in error (I think). 
> Sorry, nothing more than that can I remember now. Try searching the 
> archives?

Unfortunately the archives are not currently available, after they were 
mislaid during a server move.

I've investigated the problem and I'm fairly confident (without debugging 
down to the exact lines in libedit) that this is the problem:

   http://marc.info/?l=netbsd-users&m=119056066913928&w=2

Specifically, libedit "will have problems with UTF-8 and multibyte 
character sets, because it reads characters from the terminal one byte at 
a time, and checks them bytewise for printability."

This works on FreeBSD but not on Linux, due to differences in the locale 
tables. FreeBSD lists some of the bytes 0x80 to 0xfd as printable, which 
allows Unicode to be entered bytewise, wherease Linux does not, at least 
on by Ubuntu system. This causes libedit to reject the characters.

I can't see modifying the locale tables as a useful workaround, and 
switching the character set to ISO-8859-1 also does not solve the problem 
(some characters can be entered, but others cannot). However you might 
find that the following is a partial workaround on your system:

   LC_ALL=de_DE.ISO8859-1 bbackupquery ...

Otherwise, libedit needs to be disabled or fixed in order to properly 
support international characters, or readline must be used instead. 
Disabling it removes other functionality, so this is a difficult choice to 
make, but I think it makes sense to disable it (at least by default) on 
Linux systems.

Using readline was not previously an option because of license conflicts. 
I think that even though Box Backup is now dual-licensed, there may still 
be a conflict in linking both GPL readline and non-GPL OpenSSL into the 
same binary, so Debian probably would not accept a switch to readline as a 
solution.

I've looked into fixing libedit and it's definitely not trivial. I started 
to "look at the tcsh code (where the editline code was created from) and 
copy the changes," but the whole of tcsh was converted to use wide 
character strings at the same time, which would break backwards 
compatibility with existing applications if applied directly to libedit.

I'm considering adding a command-line switch to bbackupquery to disable 
readline/editline, and/or doing it automatically if the locale tables 
don't appear to support entering Unicode characters.

In the mean time I recommend that international users of bbackupquery 
build their binaries from source (rather than using their distribution's 
binary package) and link to readline instead of editline, by passing the 
--enable-gnu-readline option to the ./configure script, and treat the 
resulting binary as covered by the GPL alone.

Cheers, Chris.
-- 
_ ___ __     _
  / __/ / ,__(_)_  | Chris Wilson <0000 at qwirx.com> - Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Perl/SQL/HTML Developer |
\ _/_/_/_//_/___/ | We are GNU-free your mind-and your software |



More information about the Boxbackup mailing list