coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

RFC: Impossible to verify checksum on Windows for any binary file that has the sequence `\r\n`

Open Pistonight opened this issue 4 months ago • 0 comments

hashsum with --check always run in text mode on Windows: https://github.com/uutils/coreutils/blob/3f694faa2e9399bcc7838322113cbf4c93575e8e/src/uu/hashsum/src/hashsum.rs#L236-L247 And you can't specify --binary https://github.com/uutils/coreutils/blob/3f694faa2e9399bcc7838322113cbf4c93575e8e/src/uu/hashsum/src/hashsum.rs#L225-L227 So this happens Image

(top is running Linux, bottom is running Windows + coreutils)

I don't know if the mode for --check is supposed to be derived from the binary marker, but that would be one way to address the issue. However, that still requires (most of the time) some hack to modify the checksum file that ships with the binary to include the binary marker, because it's not included unless --binary is specified.

At the current state, the check mode is useless

Pistonight avatar Oct 21 '24 04:10 Pistonight