Opened 15 months ago

Last modified 14 months ago

#68088 reopened defect

gr-adapt @20200630-13245e3f_7: checksum mismatch

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: ra1nb0w
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc: michaelld (Michael Dickens)
Port: gr-adapt

Description

https://build.macports.org/builders/ports-11_arm64-builder/builds/101380/steps/install-port/logs/stdio

--->  Verifying checksums for gr-adapt
DEBUG: Executing org.macports.checksum (gr-adapt)
--->  Checksumming gr-adapt-13245e3fbf31c7f78a0805dfffadafa5952549fc.tar.gz
DEBUG: Calculated (rmd160) is 45f657dc4d5e05809fea9217b395b520a1098626
Error: Checksum (rmd160) mismatch for gr-adapt-13245e3fbf31c7f78a0805dfffadafa5952549fc.tar.gz
Portfile checksum: gr-adapt-13245e3fbf31c7f78a0805dfffadafa5952549fc.tar.gz rmd160 05f5531bd9290190aad4719fcd605b6c9cf979f7
Distfile checksum: gr-adapt-13245e3fbf31c7f78a0805dfffadafa5952549fc.tar.gz rmd160 45f657dc4d5e05809fea9217b395b520a1098626
DEBUG: Calculated (sha256) is 6a830ffb84a85572cdb392bbd70add9eb720c2487fc407bca9d40c72c36bdbaf
Error: Checksum (sha256) mismatch for gr-adapt-13245e3fbf31c7f78a0805dfffadafa5952549fc.tar.gz
Portfile checksum: gr-adapt-13245e3fbf31c7f78a0805dfffadafa5952549fc.tar.gz sha256 078d23713a44ddd6b9352a8d14821714fae652bf4b9936456fc9957c25eba663
Distfile checksum: gr-adapt-13245e3fbf31c7f78a0805dfffadafa5952549fc.tar.gz sha256 6a830ffb84a85572cdb392bbd70add9eb720c2487fc407bca9d40c72c36bdbaf
DEBUG: Calculated (size) is 463945
Error: Checksum (size) mismatch for gr-adapt-13245e3fbf31c7f78a0805dfffadafa5952549fc.tar.gz
Portfile checksum: gr-adapt-13245e3fbf31c7f78a0805dfffadafa5952549fc.tar.gz size 463936
Distfile checksum: gr-adapt-13245e3fbf31c7f78a0805dfffadafa5952549fc.tar.gz size 463945
The correct checksum line may be:
checksums           rmd160  45f657dc4d5e05809fea9217b395b520a1098626 \
                    sha256  6a830ffb84a85572cdb392bbd70add9eb720c2487fc407bca9d40c72c36bdbaf \
                    size    463945
Error: Failed to checksum gr-adapt: Unable to verify file checksums

Change History (7)

comment:1 Changed 15 months ago by ra1nb0w

Resolution: fixed
Status: assignedclosed

In 85b5a823d70737db69a309d3a68d137c84d40d9f/macports-ports (master):

gr-adapt: fix checksum

Closes: #68088

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

You changed the checksums but not the dist_subdir so anyone who has the old distfile will get a checksum mismatch.

What changed between the old and new distfile that required the revision to be increased?

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

Resolution: fixed
Status: closedreopened

Answering my own question, the old file from 2020 extracted to a directory called karel-gr-adapt-13245e3 while the new file extracts to a directory called karel-gr-adapt-c04972f. So the port is now installing the wrong version of the software.

The culprit is this line:

git.branch   maint-3.8

That needs to be removed. It causes the port to fetch the latest commit on that branch, which of course we don't want. Then the old checksums need to be restored. And the dist_subdir needs to be changed so that anyone who had the new (wrong) file doesn't get checksum mismatches. And the revision needs to be increased in case anyone installed the one that used the wrong distfile.

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

Many of the other GNU Radio ports have this problem and need git.branch removed, along with verifying whether or not their checksums are then correct:

gr-adapt/Portfile:    git.branch   maint-3.8
gr-adapt/Portfile:    git.branch   maint-3.7
gr-foo/Portfile:    git.branch      maint-3.8
gr-foo/Portfile:    git.branch      maint-3.7
gr-fosphor/Portfile:    git.branch      gr3.7-qt5
gr-gfdm/Portfile:    git.branch      maint-3.7
gr-ieee802-11/Portfile:    git.branch      maint-3.8
gr-ieee802-11/Portfile:    git.branch      maint-3.7
gr-ieee802-15-4/Portfile:    git.branch      maint-3.8
gr-ieee802-15-4/Portfile:    git.branch      maint-3.7
gr-iqbalance/Portfile:    git.branch    gr3.7
gr-iridium/Portfile:    git.branch      maint-3.8
gr-iridium/Portfile:    git.branch      maint-3.7
gr-lora/Portfile:    git.branch      gr3.7
gr-rds/Portfile:    git.branch      maint-3.8
gr-rds/Portfile:    git.branch      maint-3.7

comment:5 Changed 14 months ago by ra1nb0w

Sorry but I don't grasp the point: we need to use git.branch to select the version of the OOT (GNURadio module) otherwise if we use main/master it gets the source for code for a more modern GNURadio version that we don't have in the ports. Thank you

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

github.setup takes between 3 and 5 parameters. It sets git.branch to the concatenation of the 4th parameter, the 3rd parameter, and the 5th parameter. It indicates what you want to download.

The most typical use case is to download a versioned tag. If the tag name for example is v1.2.3, then you call github.setup with 1.2.3 in the 3rd parameter, v in the 4th parameter, and leave the 5th parameter empty, and github.setup will set git.branch to v1.2.3 for you.

Another use case is to download from a specific commit. In that case, you call github.setup with the commit hash in the 3rd parameter and leave the 4th and 5th parameters empty, and github.setup sets git.branch to the commit hash for you.

By later overwriting git.branch, you are instructing MacPorts to download from something else. In this Portfile, by setting git.branch maint-3.8, you're instructing MacPorts to download from the head of the maint-3.8 branch, which is not something we want to do, because it will cause checksum mismatches every time somebody commits something to that branch.

In combination with a developer name and repository name, a tag name or commit hash are fully sufficient to tell git what to download. There is no need, and no way, to specify what branch that commit or tag was from.

comment:7 Changed 14 months ago by ra1nb0w

Thank you very much Ryan. Now it is very clear! We used to setting git.branch to use livecheck as a way to check if there are newer commits and I hadn't noticed that this usage overwrite the commit that we have choose in the Portfile. Is there a way to get the right behavior and the livecheck functionality? Have a nice day

Note: See TracTickets for help on using tickets.