core icon indicating copy to clipboard operation
core copied to clipboard

.NET aggregate checksum files are formatted incorrectly

Open lbussell opened this issue 6 months ago • 0 comments

Examples:

  • https://builds.dotnet.microsoft.com/dotnet/checksums/8.0.17-sha.txt
  • https://builds.dotnet.microsoft.com/dotnet/checksums/9.0.6-sha.txt

Spacing between checksum and filename

1308565...ecb18d5 aspnetcore-runtime-8.0.17-linux-arm.tar.gz
4f1a441...aced3c5 aspnetcore-runtime-8.0.17-linux-arm64.tar.gz
...

There is one space between the checksum and the filename. sha512sum's output has two spaces. From man sha512sum:

When checking, the input should be a former output of this program. The default mode is to print a line with: checksum, a space, a character indicating input mode ('*' for binary, ' ' for text or where binary is insignificant), and name for each FILE. ... There is no difference between binary mode and text mode on GNU systems.

Line endings

Line endings are CRLF, and not LF. On some Linux systems this causes the CR to interpreted as part of the filename, resulting in no files being verified. Running the file through sed -i 's/\r$//' fixes this, but that should not be necessary.

lbussell avatar Jun 30 '25 16:06 lbussell