jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2.x Install Plugin
  • MINSTALL-47

Add option to append the file name to the md5/sha1 checksums

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 2.2
  • Fix Version/s: None
  • Component/s: install:install, install:install-file
  • Labels:
    None
  • Patch Submitted:
    Yes

Description

Some tools which check checksums expect the sum to be followed by <space>*filename

http://www.mail-archive.com/commons-dev@jakarta.apache.org/msg67770.html

It would be good to have a configuration option so that the install plugin can do this

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    maven-install-checksum-append-filename-v1.patch
    20/Feb/08 8:13 PM
    1 kB
    Niall Pemberton
  2. Text File
    maven-install-checksum-patterns-v1.patch
    23/Feb/08 7:41 PM
    2 kB
    Niall Pemberton

Issue Links

is related to

Bug - A problem which impairs or prevents the functions of the product. MNG-797 fix checksum parsing

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Bug - A problem which impairs or prevents the functions of the product. MNG-1349 openssl checksums are not accepted by maven

  • Trivial - Cosmetic problem like misspelt words or misaligned text.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Wendy Smoak added a comment - 20/Feb/08 8:48 PM

Can all versions of Maven consume a checksum with the filename appended? If so, should we just make this the default? (is there a standard checksum file format?)

Show
Wendy Smoak added a comment - 20/Feb/08 8:48 PM Can all versions of Maven consume a checksum with the filename appended? If so, should we just make this the default? (is there a standard checksum file format?)
Hide
Permalink
Niall Pemberton added a comment - 20/Feb/08 9:20 PM

Ant's checksum task has the facility to supply a pattern for the checksum output:
http://ant.apache.org/manual/CoreTasks/checksum.html

This provides more flexibility - I can provide a patch for that if required.

Docs on the checksum file format are hard to find - wikipedia has the following which mentions this format:
http://en.wikipedia.org/wiki/Md5sum

Show
Niall Pemberton added a comment - 20/Feb/08 9:20 PM Ant's checksum task has the facility to supply a pattern for the checksum output: http://ant.apache.org/manual/CoreTasks/checksum.html This provides more flexibility - I can provide a patch for that if required. Docs on the checksum file format are hard to find - wikipedia has the following which mentions this format: http://en.wikipedia.org/wiki/Md5sum
Hide
Permalink
Niall Pemberton added a comment - 23/Feb/08 7:41 PM

Attaching an alternative patch that provides the option to specify a MessagFormat style patterns for the MD5 and SHA1 checksums:

Has two new pattern properties (md5Pattern and sha1Pattern) where {0} is replaced with the checksum, {1} with the file name and {2} is a new line.

This is almost the same as the functionality provided by the Ant checksum task and gives greater and individual control over what is output for both md5 and sha1 checksums.

Show
Niall Pemberton added a comment - 23/Feb/08 7:41 PM Attaching an alternative patch that provides the option to specify a MessagFormat style patterns for the MD5 and SHA1 checksums: Has two new pattern properties (md5Pattern and sha1Pattern) where {0} is replaced with the checksum, {1} with the file name and {2} is a new line. This is almost the same as the functionality provided by the Ant checksum task and gives greater and individual control over what is output for both md5 and sha1 checksums.
Hide
Permalink
Wendy Smoak added a comment - 24/Feb/08 9:32 AM

Niall, what do these checksums get used for? I'm not opposed to the patch, just curious.

The feature to create checksums was added in MINSTALL-9, so we might as well give the user control over what the checksums look like.

As far as I can tell, Maven ignores checksums for files that are already in the local repo. (So my question about whether Maven can consume this new format is irrelevant for the install plugin.)

Show
Wendy Smoak added a comment - 24/Feb/08 9:32 AM Niall, what do these checksums get used for? I'm not opposed to the patch, just curious. The feature to create checksums was added in MINSTALL-9, so we might as well give the user control over what the checksums look like. As far as I can tell, Maven ignores checksums for files that are already in the local repo. (So my question about whether Maven can consume this new format is irrelevant for the install plugin.)
Hide
Permalink
Benjamin Bentmann added a comment - 02/Jan/09 4:04 AM

Can all versions of Maven consume a checksum with the filename appended?

As per MNG-797, many versions can handle the format requested by Niall. Only SHA-1 checksums in OpenSSL format were not handled (MNG-1349).

What might need further investigation is how we deal with local vs. remote checksums. Niall's patches are straightforward but their effect would be limited to the local repo. The checksums deployed to remote repos are created by the Maven core, i.e. are independent from the checksums created by the Install Plugin. Unless we sync the formats between core and Install Plugin, the format of a checksum file depends on whether it was locally installed or downloaded remotely. Not sure how useful that is.

When we wanted to sync the formats, we would need a way to configure the format used by the Maven core. Not sure how to do that without expanding the POM structure, i.e. have some new elements within <distributiionManagement>.

To avoid the configuration issue and have equal local and remote checksums, I suggest we start off by hard-coding the format suggested by Niall in his first patch, both for the Install Plugin and the Maven core:

<checksum><space>*<filename><newline>
Show
Benjamin Bentmann added a comment - 02/Jan/09 4:04 AM
Can all versions of Maven consume a checksum with the filename appended?
As per MNG-797, many versions can handle the format requested by Niall. Only SHA-1 checksums in OpenSSL format were not handled (MNG-1349). What might need further investigation is how we deal with local vs. remote checksums. Niall's patches are straightforward but their effect would be limited to the local repo. The checksums deployed to remote repos are created by the Maven core, i.e. are independent from the checksums created by the Install Plugin. Unless we sync the formats between core and Install Plugin, the format of a checksum file depends on whether it was locally installed or downloaded remotely. Not sure how useful that is. When we wanted to sync the formats, we would need a way to configure the format used by the Maven core. Not sure how to do that without expanding the POM structure, i.e. have some new elements within <distributiionManagement>. To avoid the configuration issue and have equal local and remote checksums, I suggest we start off by hard-coding the format suggested by Niall in his first patch, both for the Install Plugin and the Maven core:
<checksum><space>*<filename><newline>
Hide
Permalink
Benjamin Bentmann added a comment - 02/Jan/09 10:38 AM

Corresponding discussion thread on dev@: Checksum Format for .md5 and .sha1 Files.

Show
Benjamin Bentmann added a comment - 02/Jan/09 10:38 AM Corresponding discussion thread on dev@: Checksum Format for .md5 and .sha1 Files.

People

  • Assignee:
    Unassigned
    Reporter:
    Niall Pemberton
Vote (0)
Watch (1)

Dates

  • Created:
    20/Feb/08 8:13 PM
    Updated:
    15/Mar/09 11:13 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.