Skip to content

wrong checksum in ide-urls #1142

@hohwille

Description

@hohwille

Expected behavior

Our update process populating ide-urls shall compute correct sha256 checksums for each download file so that devonfw-ide will be able to verify that checksum. Therefore when I download the according file and compute the checksum with sha256sum, I should get the exact same hash.

Actual behavior

For some tools the checksums are computed wrong. According to my analysis some download URLs lead to HTML websites that themselves contain some JavaScript redirecting to the actual download on a mirror. This especially applies to sourceforge.net.
Tools like curl can magically handle this and do the actual download. However, our according UrlUpdaters cannot handle this situation. As a result they consider the HTML content as the actual download file. Therefore they compute the SHA256 checksum of the HTML content instead of the binary download file.
I have already changed the code such that the SHA256 checksum computation will fail if the content type header is present and its value starts with text (such as text/html).

Steps to reproduce (bug) / Use Case of feature request (enhancement)

$ sha256sum ~/Downloads/devonfw-ide/npm-9.6.0-windows.tgz
628f7650e50a4081746a681c74aeca48f9d1cebb333d4d69fdffaa1a487c3ada *...

$ cat urls/npm/npm/9.6.0/windows_x64.urls.sha256
5f1da1ef6ba776449900c931e7acc3b60e47f3080425bf0e6a1c0c5a07dbd6fd

https://github.com/devonfw/ide-urls/blob/master/npm/npm/9.6.0/windows_x64.urls.sha256

Related/Dependent Issues

#1009

Comments/Hints:

Affected version:

2023.04.001

Metadata

Metadata

Labels

SCMsoftware-configuration-management (github actions, internal processes, git or github utilization)bugSomething isn't workingurlside-urls repo and related processes and features

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions