Opened 17 years ago

Closed 17 years ago

Last modified 15 years ago

#15269 closed defect (fixed)

checksum phase sometimes skipped!

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: raimue (Rainer Müller)
Priority: High Milestone: MacPorts 1.7.0
Component: base Version: 1.7.0
Keywords: Cc: jmroot (Joshua Root)
Port:

Description

The checksum phase is sometimes skipped, allowing the extract, configure, build, etc. phases to complete even though the checksums have never been checked and maybe don't match. Clearly this is bad. The revision that introduced this problem is r35806.

The incorrect behavior can be triggered by explicitly requesting the fetch phase, then proceeding to another later phase without cleaning the work area. To test the issue, go to a port's directory (for example the zlib port) and make its checksum invalid (e.g. set its checksum to "x") and do this:

sudo port clean --work && sudo port fetch && sudo port checksum

The correct behavior (which is seen before r35806) is:

--->  Cleaning zlib
--->  Fetching zlib
--->  Verifying checksum(s) for zlib
Error: Checksum (md5) mismatch for zlib-1.2.3.tar.bz2
Error: Checksum (sha1) mismatch for zlib-1.2.3.tar.bz2
Error: Checksum (rmd160) mismatch for zlib-1.2.3.tar.bz2
Error: Target org.macports.checksum returned: Unable to verify file checksums
Error: Status 1 encountered during processing.

The incorrect behavior (seen in r35806 and after) is:

--->  Cleaning zlib
--->  Fetching zlib
--->  Verifying checksum(s) for zlib

Priority is high because this is a regression and a potential security issue.

Change History (6)

comment:1 Changed 17 years ago by rhwood@…

Owner: changed from macports-tickets@… to raimue@…

comment:2 Changed 17 years ago by jmroot (Joshua Root)

Cc: jmr@… added; raimue@… removed

Should be fine to simply revert that change, since IIRC it was obsoleted by r35808.

comment:3 Changed 17 years ago by raimue (Rainer Müller)

Resolution: fixed
Status: newclosed

I can reproduce the issue. checksum needs the global variable all_dist_files which is populated in the proc checkfiles in the fetch phase.

I reverted this change in r36734, the ping feature still works.

comment:4 Changed 17 years ago by raimue (Rainer Müller)

Ah, I forgot: Thanks Ryan for reporting the issue and nailing it down to this revision!

comment:5 Changed 16 years ago by tobypeterson

Milestone: MacPorts base bugsMacPorts Future

Milestone MacPorts base bugs deleted

comment:6 Changed 15 years ago by jmroot (Joshua Root)

Milestone: MacPorts FutureMacPorts 1.7.0
Note: See TracTickets for help on using tickets.