Bug 16539 - MD5 signature file format
Summary: MD5 signature file format
Status: RESOLVED FIXED
Alias: None
Product: Ant
Classification: Unclassified
Component: Documentation (show other bugs)
Version: 1.5.1
Hardware: All All
: P3 enhancement with 1 vote (vote)
Target Milestone: 1.7.0
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-29 13:14 UTC by Ryan Gies
Modified: 2004-11-16 19:05 UTC (History)
1 user (show)



Attachments
Patch File containg diffs for checkstyle modification (9.68 KB, patch)
2004-08-12 15:49 UTC, Mark R. Diggory
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Gies 2003-01-29 13:14:11 UTC
This description uses the real data for: jakarta-ant-1.5.1-bin.tar.gz

Currently the MD5 
signature file is

    2be27d9e09011bf1cc3d1967ee34f7d1

Why not change it to the md5sum 
output of:

    2be27d9e09011bf1cc3d1967ee34f7d1 *jakarta-ant-1.5.1-bin.tar.gz

This 
way one can easily check the file using

    $ md5sum -c jakarta-ant-1.5.1-
bin.tar.gz.md5

Cheers,
Ryan
Comment 1 Mark R. Diggory 2004-08-12 15:49:25 UTC
Created attachment 12406 [details]
Patch File containg diffs for checkstyle modification
Comment 2 Mark R. Diggory 2004-08-12 15:51:20 UTC
I've added a partially tested patch for checksum to have file formats added.
I've not build the ant source yet so its untested, please feel free to try it
out and add any comments.
Comment 3 Stefan Bodewig 2004-09-07 16:01:19 UTC
I'd probably turn the format attribute into an EnumeratedAttribute and defer
writing/parsing of the format to a strategy or something similar.  Skipping
to the first equals sign when we find MD5 at the start of the line doesn't look
scalable if anybody wants to implement yet another format ;-)
Comment 4 Stefan Bodewig 2004-09-07 16:29:11 UTC
Hmm,

thinking about it once again, we probably should have an attribute that takes a
format string like "{0} *{1}" where the task would replace {0] with the checksum
and [1} with the filename.  On top of that we could have a different attribute that
selects one of the well known formats by name, i.e. MD5SUM for "{0} *{1}" and
SVF for "MD5 ({1}) = {0]".

I'm not entirely sure how the formats deal with relative paths, do you have any
quick pointers to the format specification?  I do have a manual page for md5sum on
my Linux box, but it doesn't talk about relative file names.
Comment 5 Mark R. Diggory 2004-09-07 19:49:35 UTC
On BSD, it is relative to the point you are executing md5 so here is an example

mdiggory@minotaur:/home/mdiggory> md5 jakarta-commons/math/project.xml
MD5 (jakarta-commons/math/project.xml) = c0e775c3e5900ab006acf0f86fae0c37

On Linux its the same:

[root@lorien mdiggory]# md5sum workspace/jakarta-commons/math/project.xml
f82313b7772b9c6a9ef9e247021a26ef  workspace/jakarta-commons/math/project.xml

I like the parameterization idea, but do not think it currently neccessary to
implement the existing formats. If its easy to do, then great, we should.

-Mark
Comment 6 Stefan Bodewig 2004-09-08 14:31:36 UTC
MessageFormat does most of the heavy lifting, it turned out to be not that
difficult at all.

OK, code is in CVS HEAD, docs are missing.
Comment 7 Stefan Bodewig 2004-09-10 14:21:34 UTC
docs commited