Theo Van Dinter wrote:
On Thu, Aug 10, 2006 at 05:12:48PM -0400, DAve wrote:
SpamAssassin sha1 contents (would all be one line) have the signature first,
f7c3edde6e9e2330318c3fc6a8e70af68387eaeb /home/updatesd/tmp/stage/3.2.0/update.tgzSHA1

My sha1 contents (would all be one line) have the signature last,
(/data/data/lastremaining.com/public_html/updates/tls-local/20060810.tar.gz)= 8918d6852caab9e57f645e0ff8510c3026fdedd2

Line 524 in sa-update is the failure I believe. I suspect anyone creating a channel on FreeBSD may have the same problem.

FWIW, the format sa-update expects is the standard format from sha1sum.
Does FreeBSD have a sha1sum that produces the format that you showed?

Answering my own question, FreeBSD seems to not have a "sha1sum",
but has a "sha1" which has that kind of format, which seems to be the
same output as "openssl sha1 file".  Of course to be consistent,
"openssl ssl < file" produces just the hash.

I made it work by removing the line start caret from the regex. Tested against some text files and it didn't hit anything the existing regex didn't hit.

I created my sha1 files using,
openssl dgst sha1 -out file.sha1 file

I goofed around with it after reading the man page and tried a few things, the redirect works and requires no change to sa-update so I'll likely change my script to use that for now.


For now, you may want to either do the openssl redirect thing, or use
build/sha1sum.pl from the tarball.  Both produce the expected format.


Hmm my 3.1.1 doesn't have sha1sum.pl in build, contrib, or tools. But how hard can a wrapper for openssl to swap the file path and signature be ;^)

If you feel like it, open a BZ ticket about this and we can see about
changing the spec/code to accept the 40 byte string at either the start
or the end of the line, thereby allowing either format to work.

I'm happy changing my script, so long as the SA supplied code works on FreeBSD, I don't think it's an issue myself. I can make my shell script conform.

DAve

--
Three years now I've asked Google why they don't have a
logo change for Memorial Day. Why do they choose to do logos
for other non-international holidays, but nothing for
Veterans?

Maybe they forgot who made that choice possible.

Reply via email to