Mailing List Archive

gunpg on solaris 2.6
I've been hacking away at getting 0.9.4 to compile on solaris 2.6. As an
earlier email showed, there are problems using solaris sed so I installed
gnu sed and am able to compile (also you need to use gnu make). Anyhow,
'make check' fails on one test (passes all others though):
mds.test: fails on the empty string test
Here are the sums generated for the empty string. You'll notice that they
differ significantly from the expected ones:
MD5 = 81 8B 63 13 72 F1 0A D0 9E 29 46 31 80 B1 C7 D7
SHA1 = 3229 8A3A 960E 22F6 53C4 13CC D12C BA6B 339E F1C5
RMD160 = 00BC 22A3 0B0E 054E BF69 68EF FED9 145A CB0F 4D11
TIGER = CAD2F701 2E403B42 00C9FF03 B686D52B 33F81500 4B67A170
Expected:
test_one "MD5" "D41D8CD98F00B204E9800998ECF8427E"
test_one "SHA1" "DA39A3EE5E6B4B0D3255BFEF95601890AFD80709"
test_one "RMD160" "9C1185A5C5E9FC54612808977EE8F548B2258D31"
test_one "TIGER" "24F0130C63AC933216166E76B1BB925FF373DE2D49584E7A"

Any ideas why this would fail and how to fix it?

-Jason

"Never attribute to malice that which can be adequately explained by stupidity"
- Hanlon's Razor
Re: gunpg on solaris 2.6 [ In reply to ]
"Jason C. Axley" <jason@axley.net> writes:

> mds.test: fails on the empty string test

Mea culpa.

$ echo -n ""

Isn't good on Solaris?



--
Werner Koch at guug.de www.gnupg.org keyid 621CC013
Re: gunpg on solaris 2.6 [ In reply to ]
On Mon, 15 Mar 1999, Werner Koch wrote:

> "Jason C. Axley" <jason@axley.net> writes:
>
> > mds.test: fails on the empty string test
>
> Mea culpa.
>
> $ echo -n ""
>
> Isn't good on Solaris?

See the man page excerpt below for details, these examples are done with
bash-2.02.

$ uname -a
SunOS alvin 5.7 Generic sun4u sparc SUNW,Ultra-5_10
$ echo ""

$ echo -n ""
$ /bin/echo ""

$ /bin/echo -n ""
-n
$ echo '\c'
\c
$ /bin/echo '\c'
$

Excerpts from 'echo(1)':

The C shell, the Korn shell, and the Bourne shell all have
echo built-in commands, which, by default, will be invoked
if the user calls echo without a full pathname. See
shell_builtins(1). sh 's echo , ksh 's echo , and
/usr/bin/echo understand the back-slashed escape characters,
except that sh 's echo does not understand \a as the alert
character. In addition, ksh 's echo , does not have a -n
option. sh 's
echo and /usr/bin/echo only have a -n option if the SYSV3
environment variable is set (see ENVIRONMENT below). If it
is, none of the backslashed characters mentioned above are
availible. csh 's echo and /usr/ucb/echo, on the other
hand, have a -n option, but do not understand the back-
slashed escape characters.

[...]

string A string to be written to standard output. If any
operand is "-n", it will be treated as a string,
not an option. The following character sequences
will be recognized within any of the arguments:

[...]
\c print line without new-line
[...]

Portable applications should not use -n (as the first argu-
ment) or escape sequences.

[...]

New applications are encouraged to use printf instead of
echo .


C=)

--------------------------------------------------------------------------
When you smell odorless gas, it's probably carbon monoxide.
--------------------------------------------------------------------------
Caskey <caskey*technocage.com> /// pager.818.698.2306
TechnoCage Inc. ///| gpg: aiiieeeeeee!!!
--------------------------------------------------------------------------
Cats are intended to teach us that not everything in nature
has a purpose. -- Garrison Keillor
Re: gunpg on solaris 2.6 [ In reply to ]
Wow this takes a while to propagate to me!

Anyhow, I took some time to test some different things out and replacing
'echo -n ""'

with simply

'/bin/echo'

provides the correct sums on solaris. This is good because it means that
the bug is in the test--not what is being tested! I get to use gpg on
solaris now--hooray!

The libtool script sed problem either needs a solaris-compatible sed
statement or to use gnu sed, if available. I just edit libtool after
running ./configure and change sed to /usr/local/bin/sed to use gnu sed.
The general portability issue would still be there even if you could
select gnu sed since it shouldn't probably require installing gnu sed to
build. Not knowing sed too well, I can't offer a replacement statement
that would work on solaris, but I'm willing to test things out if a
solaris platform isn't available.

-Jason

"Never attribute to malice that which can be adequately explained by stupidity"
- Hanlon's Razor

On Mon, 15 Mar 1999, Werner Koch wrote:

> "Jason C. Axley" <jason@axley.net> writes:
>
> > mds.test: fails on the empty string test
>
> Mea culpa.
>
> $ echo -n ""
>
> Isn't good on Solaris?
>
>
>
> --
> Werner Koch at guug.de www.gnupg.org keyid 621CC013
>
Re: gunpg on solaris 2.6 [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

* Werner Koch <wk@isil.d.shuttle.de> on Mon, 15 Mar 1999
| $ echo -n ""
| Isn't good on Solaris?

- -n is a switch to the BSD echo(1). The SVR4 equivalent to that command is
something like this:

echo "... \c"
[do stuff]
echo "done"

\c suppresses the newline.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v0.9.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE27aqMgl+vIlSVSNkRAtRyAKDl4i+tOi2Q7D4/+/FRzfLqhfPdUgCfYhHc
7G1Yx0SMBNmJqZ1f/yDG7ME=
=KkBs
-----END PGP SIGNATURE-----

--
Rat <ratinox@peorth.gweep.net> \ Caution: Happy Fun Ball may suddenly
Minion of Nathan - Nathan says Hi! \ accelerate to dangerous speeds.
PGP Key: at a key server near you! \
Re: gunpg on solaris 2.6 [ In reply to ]
"Caskey L. Dickson" <caskey@technocage.com> writes:

> New applications are encouraged to use printf instead of
> echo .

But is it available on all systems? I think

$ cat /dev/null | gpg ......

is the easiest solution to provide an empty string.


--
Werner Koch at guug.de www.gnupg.org keyid 621CC013
Re: gunpg on solaris 2.6 [ In reply to ]
On Tue, 16 Mar 1999, Werner Koch wrote:

> "Caskey L. Dickson" <caskey@technocage.com> writes:
>
> > New applications are encouraged to use printf instead of
> > echo .

That's an excerpt from the manpage and the suggestion of Sun, not me.

> But is it available on all systems? I think
>
> $ cat /dev/null | gpg ......
>
> is the easiest solution to provide an empty string.

That's the way I would do it.

C=)

P.S. I was just trying to provide information 'cause I was already
connected to our sun box in another window when I read the message, not
take a position.

--------------------------------------------------------------------------
When you smell odorless gas, it's probably carbon monoxide.
--------------------------------------------------------------------------
Caskey <caskey*technocage.com> /// pager.818.698.2306
TechnoCage Inc. ///| gpg: aiiieeeeeee!!!
--------------------------------------------------------------------------
Cats are intended to teach us that not everything in nature
has a purpose. -- Garrison Keillor
Re: gunpg on solaris 2.6 [ In reply to ]
"Caskey L. Dickson" <caskey@technocage.com> writes:

> > $ cat /dev/null | gpg ......
> >
> > is the easiest solution to provide an empty string.
>
> That's the way I would do it.

Some lines below there is still a echo -n - I have replaced it with

$ /bin/echo "bla bla\c"

Okay?


--
Werner Koch at guug.de www.gnupg.org keyid 621CC013
Re: gunpg on solaris 2.6 [ In reply to ]
> > $ cat /dev/null | gpg ......
> >
> > is the easiest solution to provide an empty string.

gpg ...... </dev/null
is even easier ;-)
Re: gunpg on solaris 2.6 [ In reply to ]
On Wed, 17 Mar 1999, Chip Christian wrote:

> > > $ cat /dev/null | gpg ......
> > >
> > > is the easiest solution to provide an empty string.
>
> gpg ...... </dev/null
> is even easier ;-)

For that matter, why not `gpg /dev/null` ?

C=)

--------------------------------------------------------------------------
When you smell odorless gas, it's probably carbon monoxide.
--------------------------------------------------------------------------
Caskey <caskey*technocage.com> /// pager.818.698.2306
TechnoCage Inc. ///| gpg: aiiieeeeeee!!!
--------------------------------------------------------------------------
Cats are intended to teach us that not everything in nature
has a purpose. -- Garrison Keillor