Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Oct 2013 00:45:18 -0500
From:      Scot Hetzel <swhetzel@gmail.com>
To:        Michael Grimm <trashcan@odo.in-berlin.de>
Cc:        "freebsd-ports@freebsd.org" <freebsd-ports@freebsd.org>
Subject:   Re: amavis[12345]: (12345-02) (!)file utility failed: exit 1
Message-ID:  <CACdU%2Bf-jOTO9mpo797Xn6Sx8=94qc=6n3cB-GjCDCxrRAeHymA@mail.gmail.com>
In-Reply-To: <029DD189-E4F7-441D-95A4-08E73327DBDB@odo.in-berlin.de>
References:  <201310232003.39787.Mark.Martinec%2Bfreebsd@ijs.si> <029DD189-E4F7-441D-95A4-08E73327DBDB@odo.in-berlin.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Oct 23, 2013 at 1:25 PM, Michael Grimm
<trashcan@odo.in-berlin.de> wrote:
> Hi --
>
> On 23.10.2013, at 20:03, Mark Martinec <Mark.Martinec+freebsd@ijs.si> wrote:
>
>> The text "ERROR: line 163: regex error 17, (illegal byte sequence)"
>> comes from the file utility, unmodified.
>>
>>> 1) Is the file utility to blame?
>>
>> Yes.
>>
>>> 2) My setup?
>>
>> Possibly (e.g. broken magic database).
>>
>> Looks like a known bug in the file utility, already fixed upstream:
>>
>>  http://bugs.gw.com/my_view_page.php
>>    (search for: illegal byte sequence)
>>
>> Should be reproducible by running the file(1) from a command line
>> (in the same/similar environment as amavisd is running, just in case).
>
> Confirmed, it's throwing the same error message[1]:
>
> | mail> /usr/local/bin/file zzz
> | zzz: ERROR: line 163: regex error 17, (illegal byte sequence)
>
> Thank you for helping me understand that issue. Now, I will wait for
> a corrected file port.
>
> With kind regards,

To cause the error to occur do the following:

cd /usr/ports/sysutils/file
make install
cd /usr/ports/sysutils/file/work/file-5.15/magic/Magdir
LC_ALL=en_US.UTF-8 /usr/local/bin/file -d -m windows
/usr/ports/sysutils/file/Makefile

I tested all the magic files in the directory using:

sh
(for i in `ls` ; do echo "==== $i ====" ; LC_ALL=en_US.UTF-8
/usr/local/bin/file -d -m $i /usr/ports/sysutils/file/Makefile ; done)
2>&1 > ../fine.test

The only one that failed was the 'windows' magic file.  Which is bug 292

http://bugs.gw.com/view.php?id=292

I was able to resolve the bug in PR 183257.

http://www.freebsd.org/cgi/query-pr.cgi?pr=183257

Could someone check that the regex is correct an commit it to the port
and submit it upstream.

Thanks,

Scot



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACdU%2Bf-jOTO9mpo797Xn6Sx8=94qc=6n3cB-GjCDCxrRAeHymA>