Opened 3 months ago

Closed 3 months ago

#70508 closed defect (fixed)

texworks @0.6.3: checksum mismatch

Reported by: barracuda156 Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.9.3
Keywords: Cc: mojca (Mojca Miklavec)
Port: texworks

Description

--->  Fetching distfiles for texworks
--->  texworks-0.6.3.tar.gz does not exist in /opt/local/var/macports/distfiles/texworks
--->  Attempting to fetch texworks-0.6.3.tar.gz from https://codeload.github.com/TeXworks/texworks/legacy.tar.gz/release-0.6.3?dummy=
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 11.5M    0 11.5M    0     0  5310k      0 --:--:--  0:00:02 --:--:-- 5312k
--->  Verifying checksums for texworks
--->  Checksumming texworks-0.6.3.tar.gz
Error: Checksum (rmd160) mismatch for texworks-0.6.3.tar.gz
Portfile checksum: texworks-0.6.3.tar.gz rmd160 dc56df2c97b4bc408fbfeb9c2b30d4024ed8c5f5
Distfile checksum: texworks-0.6.3.tar.gz rmd160 b081e2c8ff80170c8fcaca24a4cb516a053fc4ee
Error: Checksum (sha256) mismatch for texworks-0.6.3.tar.gz
Portfile checksum: texworks-0.6.3.tar.gz sha256 eb7426b9296aa92da06183690f542c2dcf0f2236215de5843f4585dd544d28be
Distfile checksum: texworks-0.6.3.tar.gz sha256 e4c1e9ad62e6a4ce454aeac5c1aa9a87b484132a33ab12d707d6880e159684d7
Error: Checksum (size) mismatch for texworks-0.6.3.tar.gz
Portfile checksum: texworks-0.6.3.tar.gz size 12082392
Distfile checksum: texworks-0.6.3.tar.gz size 12082396
The correct checksum line may be:
checksums           rmd160  b081e2c8ff80170c8fcaca24a4cb516a053fc4ee \
                    sha256  e4c1e9ad62e6a4ce454aeac5c1aa9a87b484132a33ab12d707d6880e159684d7 \
                    size    12082396

Change History (4)

comment:1 Changed 3 months ago by jmroot (Joshua Root)

Needs to use github.tarball_from archive.

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

In general, yes, ports that have no choice but to use automatically generated archives from GitHub should use github.tarball_from archive instead of the default, but that is not the reason for this checksum mismatch (and making that change will cause a checksum mismatch, so combine it with a version update of any port where you make the change, or handle it as a stealth update). The port was updated to 0.6.3 in 2019 and we had successful builds of this port as recently as 2022 so the checksums were correct then. Version 0.6.9 is available and when the port is updated to that version it should change to using github.tarball_from archive.

The reason for the checksum mismatch is a stealth update, not directly caused by the developer, but by the way that automatically generated git archives work:

  • TeXworks-texworks-9c2bf51/GitArchiveInfo.txt

    old new  
    11// This file is used to identify the latest git commit. Please do not touch.
    2 #define GIT_COMMIT_HASH "a2470cac"
     2#define GIT_COMMIT_HASH "a2470cac9"
    33#define GIT_COMMIT_DATE "2019-03-16 18:06:14 +0100"
    44

The file in the repository contains:

// This file is used to identify the latest git commit. Please do not touch.
#define GIT_COMMIT_HASH "$Format:%h$"
#define GIT_COMMIT_DATE "$Format:%cI$"

git archive replaces those placeholders with the real values. git likes to use abbreviated hashes, but as more commits have been made in the repository, 8 characters are no longer sufficient to uniquely identify a commit, so git has changed to using 9 character abbreviated hashes for this repository. That causes the contents and therefore the checksums of the archive to change. It is yet another example of why developers should supply release tarballs and not rely on automatically generated archives.

Since switching to the new tarball offers no benefits we should avoid the stealth update for now by using master_sites macports_distfiles.

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

Owner: set to ryandesign
Status: newaccepted
Summary: texworks: checksum mismatchtexworks @0.6.3: checksum mismatch

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

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.