Opened 3 months ago

Closed 3 months ago

#70652 closed defect (fixed)

libpostal: checksum mismatch

Reported by: barracuda156 Owned by: amake (Aaron Madlon-Kay)
Priority: Normal Milestone:
Component: ports Version: 2.10.1
Keywords: Cc:
Port: libpostal

Description

--->  Fetching distfiles for libpostal
--->  libpostal-1.1.tar.gz does not exist in /opt/local/var/macports/distfiles/libpostal
--->  Attempting to fetch libpostal-1.1.tar.gz from https://github.com/openvenues/libpostal/archive/v1.1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   105  100   105    0     0    289      0 --:--:-- --:--:-- --:--:--   291
--->  Verifying checksums for libpostal
--->  Checksumming libpostal-1.1.tar.gz
Error: Checksum (rmd160) mismatch for libpostal-1.1.tar.gz
Portfile checksum: libpostal-1.1.tar.gz rmd160 7b176495ed2f907ff51e08c7aac32fcb5d759358
Distfile checksum: libpostal-1.1.tar.gz rmd160 fcde81d3029a9616d6643c1848b10be567b391f4
Error: Checksum (sha256) mismatch for libpostal-1.1.tar.gz
Portfile checksum: libpostal-1.1.tar.gz sha256 8cc473a05126895f183f2578ca234428d8b58ab6fadf550deaacd3bd0ae46032
Distfile checksum: libpostal-1.1.tar.gz sha256 ae8bc46a892af33ace26f1d5666cd67a18322c493ec364747faa0b5fc8b92ec3
Error: Checksum (size) mismatch for libpostal-1.1.tar.gz
Portfile checksum: libpostal-1.1.tar.gz size 5602643
Distfile checksum: libpostal-1.1.tar.gz size 105
The correct checksum line may be:
checksums           rmd160  fcde81d3029a9616d6643c1848b10be567b391f4 \
                    sha256  ae8bc46a892af33ace26f1d5666cd67a18322c493ec364747faa0b5fc8b92ec3 \
                    size    105
Error: Failed to checksum libpostal: Unable to verify file checksums

Change History (6)

comment:1 Changed 3 months ago by amake (Aaron Madlon-Kay)

% curl https://github.com/openvenues/libpostal/archive/v1.1/libpostal-1.1.tar.gz
the given path has multiple possibilities: #<Git::Ref:0x00007f8c81ad5bf0>, #<Git::Ref:0x00007f8c81ad5650>%     

I don't understand how GitHub resolves :user/:project/archive/:tag/:tarball but it seems that something has changed so that the URL currently constructed for the github.tarball_from archive case is ambiguous for this project/release.

Looking at the links shown on the GitHub web interface, I find that customizing the URL to add refs/tags allows us to resolve the original file for which we have checksums: github.master_sites ${github.homepage}/archive/refs/tags/${git.branch}

I'm not sure what the right thing to do here is. It seems like we could be forming more specific master_sites URLs.

comment:2 Changed 3 months ago by amake (Aaron Madlon-Kay)

Cc: ryandesign added

CCing Ryan Schmidt because he added github.tarball_from archive in the v1.1 update of the portfile.

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

Cc: ryandesign removed

Then I suppose you'll want to change the github portgroup to use those more specific URLs, after verifying that it does not break other ports that use the portgroup.

comment:4 Changed 3 months ago by ryandesign (Ryan Carsten Schmidt)

Elsewhere I've read this can happen if a project has both a tag and a branch with the same name, as is indeed the case here for libpostal and v1.1. When designing the github portgroup I was not aware that the URL I was using would also match branches; I assumed it would only use tags, and using a branch would be wrong in a Portfile as that would not be reproducible if commits are made to that branch later. If adding refs/tags to the URL ensures that it only matches tags, then that would seem to be the right fix to make to the portgroup. Please also check the URLs of the older tarball type, not just the archive type, to see if they need and can accommodate a similar fix.

comment:5 Changed 3 months ago by amake (Aaron Madlon-Kay)

Elsewhere I've read this can happen if a project has both a tag and a branch with the same name, as is indeed the case here for libpostal and v1.1.

Ah, that makes sense. I didn't notice the branch.

Then I suppose you'll want to change the github portgroup to use those more specific URLs, after verifying that it does not break other ports that use the portgroup.

This is way beyond what I'm able to offer at the moment. Changing this port to github.tarball_from tarball and bumping the checksums is my limit for the time being.

comment:6 Changed 3 months ago by Aaron Madlon-Kay <amake@…>

Resolution: fixed
Status: assignedclosed

In 2517030d81515000d0dfa47f888d650fbc4f1c5f/macports-ports (master):

libpostal: fix checksum mismatch

Fixes #70652

Note: See TracTickets for help on using tickets.