bogofilter 0.91.4 "make check" fails on Solaris 8

Matt Christian mattc at visi.com
Wed Jun 23 16:03:12 CEST 2004


Matthias Andree <matthias.andree at gmx.de> writes:

> On Tue, 22 Jun 2004, Matt Christian wrote:
>
>> Bogofilter 0.91.4 "make check" fails on Solaris 8 because of a failed
>> trap command in src/tests/t.lock3.
> [...] 
> Shell bug :-(
>
> $ /usr/xpg4/bin/sh -c 'trap exit 0; save=$(trap); eval "$save"'
> /usr/xpg4/bin/sh: --:  not found
>
> This needs to be reported to Sun.
>
> /usr/xpg4/bin/sh is documented as identical to ksh, and ksh is
> documented to allow the exact algorithm shown above to restore traps;
> unfortunately, the trap builtin does not strip the -- although it prints
> it. Sun cannot ever have tried restoring traps. :-(

Hmm from the Sun sh manual page it does say...

     The /usr/xpg4/bin/sh utility is identical  to  /usr/bin/ksh.
     See ksh(1).

Strangely enough the two shells are two different binaries (sizes and
MD5s) which is not what I would have expected when they say "identical":

$ ls -al /usr/xpg4/bin/sh /usr/bin/ksh
-r-xr-xr-x    3 root     bin        209128 Jan 21  2003 /usr/bin/ksh
-r-xr-xr-x    1 root     bin        201336 Jan 21  2003 /usr/xpg4/bin/sh
$  md5sum /usr/xpg4/bin/sh /usr/bin/ksh
33c1f427535bf757a1f75fe7f2e047de  /usr/xpg4/bin/sh
9cf76265ba01958d7d10ef1240997b88  /usr/bin/ksh

However both shells failed your above test...

$ /usr/xpg4/bin/sh -c 'trap exit 0; save=$(trap); eval "$save"'
/usr/xpg4/bin/sh: --:  not found
$ /usr/bin/ksh -c 'trap exit 0; save=$(trap); eval "$save"'
/usr/bin/ksh: --:  not found

I also tried above tests on another Solaris machine with a slighly newer
kernel version (108528-20 vs 19) and they still failed:

$ uname -a
SunOS host2 5.8 Generic_108528-20 sun4u sparc SUNW,Ultra-2 Solaris

>> I hacked on src/tests/t.lock3 and src/tests/t.frame for a while but
>> couldn't find a solution.  Ideas?
>
> Ditch Solaris for shell processing. :-/
>
> More seriously, file a bug report with sun and hope they'll patch the
> shell and let me know the patch numbers that fix the bug so we can list
> it.

I poked around SunSolve but I couldn't find a simple "report bug" form
for Solaris.  To open a "support request" requires a support contract,
which I don't have because the Solaris machine I'm working on is owned
and operated by my ISP.  If someone else out there knows how to report a
bug in Solaris, please followup.

> As a short-term solution, use this patch:
>
> diff -u -c -r1.3 -r1.4
> *** src/tests/t.lock3	20 Jun 2004 11:43:31 -0000	1.3
> --- src/tests/t.lock3	22 Jun 2004 23:34:09 -0000	1.4
> [...] 

Thanks, that patch works around the issue.

- Matt

-- 
Matt Christian  mattc at visi.com  Learn to love and love to learn.
http://www.visi.com/~mattc/ 0111 ftp://ftp.visi.com/users/mattc/
5468652073656372657420697320131b331b2e1b311b341b311b351b39110d0a



More information about the Bogofilter mailing list