[MacPorts] #70508: texworks: checksum mismatch
MacPorts
noreply at macports.org
Thu Aug 8 22:12:09 UTC 2024
#70508: texworks: checksum mismatch
---------------------------+--------------------
Reporter: barracuda156 | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.9.3
Resolution: | Keywords:
Port: texworks |
---------------------------+--------------------
Comment (by ryandesign):
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:
{{{#!diff
--- macports/TeXworks-texworks-9c2bf51/GitArchiveInfo.txt 2019-03-16
12:06:14.000000000 -0500
+++ github/TeXworks-texworks-9c2bf51/GitArchiveInfo.txt 2019-03-16
12:06:14.000000000 -0500
@@ -1,4 +1,4 @@
// This file is used to identify the latest git commit. Please do not
touch.
-#define GIT_COMMIT_HASH "a2470cac"
+#define GIT_COMMIT_HASH "a2470cac9"
#define GIT_COMMIT_DATE "2019-03-16 18:06:14 +0100"
}}}
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`.
--
Ticket URL: <https://trac.macports.org/ticket/70508#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list