Re: md5 newbie question
On Sat, Dec 06, 2003 at 09:59:07AM -0500, Marty Landman wrote: > Trying to verify a d/l before compiling: > > Swami: md5 -s 466c63bb71b710d20a5c353df8c1a19c /tmp/httpd-2.0.48.tar.gz > MD5 ("466c63bb71b710d20a5c353df8c1a19c") = 017b97dd023763b82a219bdfedd5cc29 > MD5 (/tmp/httpd-2.0.48.tar.gz) = 466c63bb71b710d20a5c353df8c1a19c > Swami: > > By eyeballing the first part of line1 against the second part of line 2 > they appear equal so I guess my d/l's integrity is intact. What is the more > automated way to do this though, so that I get a line at the end saying > "ok" or "ah, phooey". Or am I supposed to extract and diff these myself? md5 -s "some string" will give you the md5 hash of "some string" -- it's not what you want. You need to run: md5 httpd-2.0.48.tar.gz and then compare that output to the distinfo file in the www/apache2 port: % cat distinfo MD5 (apache2/httpd-2.0.48.tar.gz) = 466c63bb71b710d20a5c353df8c1a19c MD5 (apache2/powerlogo.gif) = 0f106073b3c7844cf22d4df126b27c62 Yup. You've got the correct httpd-2.0.48.tar.gz sources. Of couse, you don't have to do this by hand. It's done automatically as part of building the port. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK pgp0.pgp Description: PGP signature
Re: md5 newbie question
At 05:55 PM 12/6/2003, Chris Pressey wrote: >From "man md5": -q Quiet mode - only the MD5 sum is printed out. #md5 -q httpd-2.0.48.tar.gz > thing1 ; echo 466c63bb71b710d20a5c353df8c1a19c > thing2 ; echo difference is `diff thing1 thing2` ; rm thing1 thing2 difference is Thanks Chris, that's just what I was looking for... too bad when I read the man page for md5 I didn't read closely enough. Marty Landman Face 2 Interface Inc 845-679-9387 Sign On Required: Web membership software for your site Make a Website: http://face2interface.com/Home/Demo.shtml ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: md5 newbie question
On Sat, 06 Dec 2003 16:52:42 -0500 Marty Landman <[EMAIL PROTECTED]> wrote: > [...] > Seems the problem here is that the md5 cmd's output is not simply the > result string but a description of the cmd together with the result. > If I need to do much of this guess a little pgm's called for. >From "man md5": -q Quiet mode - only the MD5 sum is printed out. So, try: md5 -q /tmp/httpd-2.0.48.tar.gz -Chris ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: md5 newbie question
At 02:48 PM 12/6/2003, Chris Pressey wrote: The "-s 466c63bb71b710d20a5c353df8c1a19c" part of your command is requesting an md5 hash of the literal string of characters "466c63bb71b710d20a5c353df8c1a19c". That's almost certainly not what you want, and will only serve to confuse. Ah, but you've now unconfused me. Try running just this instead: md5 /tmp/httpd-2.0.48.tar.gz What I want to do is avoid having to verify a match by eye. Here's what I just tried: FreeB md5 httpd-2.0.48.tar.gz > thing1 ; echo 466c63bb71b710d20a5c353df8c1a19c > thing2 ; echo difference is `diff thing1 thing2` ; rm thing1 thing2 difference is 1c1 < MD5 (httpd-2.0.48.tar.gz) = 466c63bb71b710d20a5c353df8c1a19c --- > 466c63bb71b710d20a5c353df8c1a19c FreeB md5 httpd-2.0.48.tar.gz > thing1 ; echo 466c63bb71b710d20a5c353df8c1a19c > thing2 FreeB more thing1 MD5 (httpd-2.0.48.tar.gz) = 466c63bb71b710d20a5c353df8c1a19c FreeB Seems the problem here is that the md5 cmd's output is not simply the result string but a description of the cmd together with the result. If I need to do much of this guess a little pgm's called for. Marty Landman Face 2 Interface Inc 845-679-9387 Sign On Required: Web membership software for your site Make a Website: http://face2interface.com/Home/Demo.shtml ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: md5 newbie question
On Sat, 06 Dec 2003 09:59:07 -0500 Marty Landman <[EMAIL PROTECTED]> wrote: > Trying to verify a d/l before compiling: > > Swami: md5 -s 466c63bb71b710d20a5c353df8c1a19c /tmp/httpd-2.0.48.tar.gz > MD5 ("466c63bb71b710d20a5c353df8c1a19c") = 017b97dd023763b82a219bdfedd5cc29 > MD5 (/tmp/httpd-2.0.48.tar.gz) = 466c63bb71b710d20a5c353df8c1a19c > Swami: The "-s 466c63bb71b710d20a5c353df8c1a19c" part of your command is requesting an md5 hash of the literal string of characters "466c63bb71b710d20a5c353df8c1a19c". That's almost certainly not what you want, and will only serve to confuse. Try running just this instead: md5 /tmp/httpd-2.0.48.tar.gz and see "man md5" for more info. > By eyeballing the first part of line1 against the second part of line > 2 they appear equal so I guess my d/l's integrity is intact. What is > the more automated way to do this though, so that I get a line at the > end saying "ok" or "ah, phooey". Or am I supposed to extract and diff > these myself? Essentially, yes; many source tarballs come with an .md5 file which you can diff against the output of the md5 command. But FreeBSD's ports system will check md5's for you automatically. The ports tree is very, very convenient, and I'd recommend using it whenever possible. -Chris ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"