Opened 5 months ago

Last modified 5 months ago

#73088 assigned defect

TeXShop @5.47: checksum mismatch

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: Schamschula (Marius Schamschula)
Priority: Normal Milestone:
Component: ports Version: 2.11.5
Keywords: monterey Cc:
Port: TeXShop

Description

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

--->  Attempting to fetch texshopsource556.zip from http://pages.uoregon.edu/koch/texshop/texshop-64
--->  Verifying checksums for TeXShop
--->  Checksumming texshopsource556.zip
DEBUG: Calculated (rmd160) is 3276e321ef49809cb06a6c051933a38f1002acd2
Error: Checksum (rmd160) mismatch for texshopsource556.zip
Portfile checksum: texshopsource556.zip rmd160 dacbc0d49396153257dd5dcc16ad3af349b35983
Distfile checksum: texshopsource556.zip rmd160 3276e321ef49809cb06a6c051933a38f1002acd2
DEBUG: Calculated (sha256) is 0fb34ad26b62c7d7f28d30bcc0ed9b33f1e0660a93ff28fba56e5ccd6cf58472
Error: Checksum (sha256) mismatch for texshopsource556.zip
Portfile checksum: texshopsource556.zip sha256 d517a74bbee04d60bc7fb73b489dc28341a3af9b9d9c034d9a7d9481439710a5
Distfile checksum: texshopsource556.zip sha256 0fb34ad26b62c7d7f28d30bcc0ed9b33f1e0660a93ff28fba56e5ccd6cf58472
Portfile checksum: texshopsource556.zip size 188511405
Distfile checksum: texshopsource556.zip size 181229017
DEBUG: Calculated (size) is 181229017
Error: Checksum (size) mismatch for texshopsource556.zip
The correct checksum line may be:
checksums           rmd160  3276e321ef49809cb06a6c051933a38f1002acd2 \
                    sha256  0fb34ad26b62c7d7f28d30bcc0ed9b33f1e0660a93ff28fba56e5ccd6cf58472 \
                    size    181229017
Error: Failed to checksum TeXShop: Unable to verify file checksums

Notably, on macOS 12, it should be downloading version 5.47, not 5.56; the checksums are probably for version 5.47.

The problem is this subport doesn't set distname. Since each subport needs distname set the same a better solution than setting it manually in each one would be to set it a single time, either as a default before declaring the subports (default distname {texshopsource[strsed ${version} {/\.//}]}), or after declaring the subports (distname texshopsource[strsed ${version} {/\.//}]). Same goes for worksrcdir except that it looks like you're setting it to its default value so it could possibly be omitted.

Finally, there's a problem where dist_subdir is being set, ostensibly in response to a stealth update, however it affects all subports; presumably only one of the subports was stealth updated and only that subport should set dist_subdir.

Change History (10)

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

"Subport" wasn't the right word. I meant the port does different things on different OS versions, and there is some repeated code in each of those cases that can be deduplicated, thereby fixing the bug of forgetting to duplicate it everywhere it's needed.

comment:2 Changed 5 months ago by Schamschula (Marius Schamschula)

This port has a lot of legacy cruft in it. I will attempt to do some cleanup.

However, for all I can tell, the build bots never build the ancient macOS versions, but I have had requests to keep them in the Portfile, so there they are!

comment:3 Changed 5 months ago by Marius Schamschula <mschamschula@…>

In 5abaff08967bb654606a10c9e3d33616f020bc72/macports-ports (master):

TeXShop: code cleanup

See: #73088

comment:4 in reply to:  2 Changed 5 months ago by ryandesign (Ryan Carsten Schmidt)

Replying to Schamschula:

However, for all I can tell, the build bots never build the ancient macOS versions,

It should, if it hasn't already been built.

Here is where it still failed in response to your cleanup commit:

https://build.macports.org/builders/ports-12_x86_64-builder/builds/141249/

comment:5 Changed 5 months ago by Schamschula (Marius Schamschula)

That makes for the second stealth update to this version!

comment:6 Changed 5 months ago by Marius Schamschula <mschamschula@…>

In c814c5291615dc1ee288bee4ccd7b6d2c1d03755/macports-ports (master):

TeXShop: further cleanup

See: #73088

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

No I don't think there's any stealth update, it's just still the problem that on macOS 12 you want to be using version 5.47 but you're checking the 5.47 checksums against the 5.56 distfile.

You can verify before committing whether your changes are correct. The port uses a different version on different OS versions:

% for m in $(seq 9 25); do printf "os.major: %s  " $m; port info --version TeXShop os.major=$m; done
os.major: 9  version: 2.47
os.major: 10  version: 2.47
os.major: 11  version: 4.44
os.major: 12  version: 4.44
os.major: 13  version: 4.44
os.major: 14  version: 4.44
os.major: 15  version: 4.44
os.major: 16  version: 4.44
os.major: 17  version: 4.44
os.major: 18  version: 4.44
os.major: 19  version: 4.44
os.major: 20  version: 4.79
os.major: 21  version: 5.47
os.major: 22  version: 5.47
os.major: 23  version: 5.47
os.major: 24  version: 5.56
os.major: 25  version: 5.56

So we need to check whether each of those versions works, for example:

% for m in 10 19 20 21 25; do printf "os.major: %s  " $m; port info --version TeXShop os.major=$m; sudo port -n patch TeXShop os.major=$m; sudo port clean TeXShop; done
os.major: 10  version: 2.47
--->  Computing dependencies for TeXShop
--->  Fetching distfiles for TeXShop
--->  Attempting to fetch texshopsource247.zip from http://distfiles.macports.org/TeXShop/
--->  Verifying checksums for TeXShop                                                
--->  Extracting TeXShop
Error: Failed to extract TeXShop: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_TeXShop/TeXShop/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port TeXShop failed
--->  Cleaning TeXShop
os.major: 19  version: 4.44
--->  Computing dependencies for TeXShop
--->  Fetching distfiles for TeXShop
--->  Attempting to fetch texshopsource444.zip from https://distfiles.macports.org/TeXShop/
--->  Verifying checksums for TeXShop                                                
--->  Extracting TeXShop
--->  Cleaning TeXShop
os.major: 20  version: 4.79
--->  Computing dependencies for TeXShop
--->  Fetching distfiles for TeXShop
--->  Attempting to fetch texshopsource479.zip from https://distfiles.macports.org/TeXShop/
--->  Verifying checksums for TeXShop                                                
--->  Extracting TeXShop
--->  Applying patches to TeXShop
--->  Cleaning TeXShop
os.major: 21  version: 5.47
--->  Computing dependencies for TeXShop
--->  Fetching distfiles for TeXShop
--->  Attempting to fetch texshopsource556.zip from https://distfiles.macports.org/TeXShop/
--->  Attempting to fetch texshopsource556.zip from https://ywg.ca.distfiles.macports.org/mirror/macports/distfiles/TeXShop/
--->  Attempting to fetch texshopsource556.zip from https://bos.us.distfiles.macports.org/TeXShop/
--->  Attempting to fetch texshopsource556.zip from http://ykf.ca.distfiles.macports.org/MacPorts/mpdistfiles/TeXShop/
--->  Attempting to fetch texshopsource556.zip from http://pages.uoregon.edu/koch/texshop/texshop-64
--->  Verifying checksums for TeXShop                                                
Error: Checksum (rmd160) mismatch for texshopsource556.zip
Error: Checksum (sha256) mismatch for texshopsource556.zip
Error: Checksum (size) mismatch for texshopsource556.zip
Error: Failed to checksum TeXShop: Unable to verify file checksums
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_TeXShop/TeXShop/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port TeXShop failed
--->  Cleaning TeXShop
os.major: 25  version: 5.56
--->  Computing dependencies for TeXShop
--->  Fetching distfiles for TeXShop
--->  Attempting to fetch texshopsource556.zip from https://distfiles.macports.org/TeXShop/5.56_1
--->  Verifying checksums for TeXShop                                                
--->  Extracting TeXShop
--->  Applying patches to TeXShop
--->  Cleaning TeXShop

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

(The above is with the previous version of the Portfile but you can use those commands to recheck the current version.)

comment:9 Changed 5 months ago by Schamschula (Marius Schamschula)

Withe the updated Portfile I don't get any checksum mismatches,

Applying patches is another matter!

Version 0, edited 5 months ago by Schamschula (Marius Schamschula) (next)

comment:10 Changed 5 months ago by Schamschula (Marius Schamschula)

Another problem: TeXShop 5.47 is no lonegr available upstream.

Last edited 5 months ago by Schamschula (Marius Schamschula) (previous) (diff)
Note: See TracTickets for help on using tickets.