#329: add md5sums for spkgs
---------------------------+------------------------------------------------
   Reporter:  was          |       Owner:  pdenapo   
       Type:  enhancement  |      Status:  new       
   Priority:  minor        |   Milestone:  sage-4.3.3
  Component:  packages     |    Keywords:            
     Author:               |    Upstream:  N/A       
   Reviewer:               |      Merged:            
Work_issues:               |  
---------------------------+------------------------------------------------

Comment(by ddrake):

 Replying to [comment:7 drkirkby]:
 > One could use 'cksum' instead of md5.

 I just experimented with this a bit and it seems like a reasonable idea. I
 propose we use cksum, and if someone gets an invalid spkg that passes the
 cksum test, we can then think about using something a bit more powerful.

 One tiny problem is that cksum on Solaris doesn't produce precisely the
 same output as on Linux or OS X; it uses a tab character instead of space.
 (Reading the POSIX spec, this seems to be a minor violation; it looks like
 you are supposed to use spaces.)

 Anyway, we could "normalize" the output by using, say, awk:
 {{{
 tar stuff | cksum | awk '{print $1, $2}'
 }}}
 which should print out the two fields separated by a space. That works on
 Linux (Ubuntu 8.04 and 9.10), OS X (bsd.math), Solaris (t2.math), and
 Cygwin. POSIX says [
 http://www.opengroup.org/onlinepubs/009695399/utilities/awk.html default
 OFS for awk is a space], so we should be safe.

 I propose we use cksum instead of md5sum, along with a bit of awk as
 above. While cksum may not be as strong as md5 sums, it does include the
 file size, which I suspect would catch a large majority of download
 errors. I also propose we standardize the filenames and put
 "spkgname.cksum" into the tarball and output to spkgname.computed.cksum
 and spkgname.stored.cksum.

 Along with the new spkg/md5 (or, I suppose, spkg/cksum) directory proposed
 at comment:35:ticket:8306, I think we might have something usable and
 workable for this ticket.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/329#comment:8>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to