Opened 15 months ago

Closed 15 months ago

Last modified 15 months ago

#68105 closed defect (fixed)

tree-sitter-go-mod @1.0.0: checksum mismatch due to upstream repository rename

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: amake (Aaron Madlon-Kay)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc: papadil
Port: tree-sitter-go-mod

Description

$ sudo port clean --all tree-sitter-go-mod
--->  Cleaning tree-sitter-go-mod
$ sudo port fetch --no-mirrors tree-sitter-go-mod
--->  Fetching distfiles for tree-sitter-go-mod
--->  Attempting to fetch tree-sitter-go-mod-1.0.0.tar.gz from https://codeload.github.com/camdencheek/tree-sitter-go-mod/legacy.tar.gz/v1.0.0?dummy=
$ sudo port checksum tree-sitter-go-mod
--->  Verifying checksums for tree-sitter-go-mod
Error: Checksum (rmd160) mismatch for tree-sitter-go-mod-1.0.0.tar.gz
Error: Checksum (sha256) mismatch for tree-sitter-go-mod-1.0.0.tar.gz
Error: Checksum (size) mismatch for tree-sitter-go-mod-1.0.0.tar.gz
Error: Failed to checksum tree-sitter-go-mod: Unable to verify file checksums
Error: See /opt/local/var/macports/logs/_private_tmp/tree-sitter-go-mod/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port tree-sitter-go-mod failed

This was originally reported on the mailing list.

Only users who happen to be closest to a GitHub distribution site will see this problem; users who are closer to a MacPorts mirror will get the "right" file from us.

The difference between the file MacPorts originally mirrored and the one we get from GitHub now is only in the extracted directory name; the contents are identical:

$ ls -ld macports/c* upstream/c*
drwxr-xr-x  15 rschmidt  wheel  480 May 16  2022 macports/camdencheek-tree-sitter-gomod-4a65743
drwxr-xr-x  15 rschmidt  wheel  480 May 16  2022 upstream/camdencheek-tree-sitter-go-mod-4a65743

It looks like the repository name was originally tree-sitter-go-mod and that's also what's specified in the Portfile. But a user reported being confused because this was inconsistent with the project's main function which is named tree_sitter_gomod. As a result, the developer changed the repository name to tree-sitter-gomod. This in turn caused the automatically-generated tarballs to have a different enclosing directory name and different checksums which caused problems for others and so the change was reverted and the repository was renamed back to tree-sitter-go-mod, changing the checksums and enclosing directory name of the automatically-generated tarballs back to what they originally were.

Unfortunately it looks like MacPorts updated tree-sitter-go-mod to 1.0.0 at an inopportune time during the brief interval when the repository name was changed. Now that it is "back to normal", we are the ones experiencing the checksum mismatches.

The simplest fix will be to set master_sites macports_distfiles until the next version is released.

Change History (2)

comment:1 Changed 15 months ago by Aaron Madlon-Kay <amake@…>

Resolution: fixed
Status: assignedclosed

In fec136552e3563570f035c24db8f4322f9c6c7e8/macports-ports (master):

tree-sitter-go-mod: fetch from MacPorts for now

Fixes #68105

comment:2 Changed 15 months ago by ryandesign (Ryan Carsten Schmidt)

Thanks. Users who had the "bad" file will need to run sudo port clean --all tree-sitter-go-mod and of course sudo port selfupdate (an hour or more from now) before trying again.

When updating to the next version, please also switch the port to either github.tarball_from releases (if the developers create release downloads as I've recommended they do) or github.tarball_from archive (if they do not).

Note: See TracTickets for help on using tickets.