Skip to content

Commit 2181f3c

Browse files
committed
Adds filename to sha256 file for use with sha256 -c
The manpage says: > The sums are computed as described in FIPS-180-2. 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. By adding the filename to the generated sha256 file, a user would be able to download an iso, the sha256 file, then use `sha256 -c [file].iso.sha256` to verify the file. * * * This fixes nixos-homepage#224
1 parent 9f96e1e commit 2181f3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mirror-nixos-branch.pl

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ sub fetch {
108108

109109
if (! -e $dstFile) {
110110
print STDERR "downloading $srcFile to $dstFile...\n";
111-
write_file("$dstFile.sha256", $sha256_expected);
111+
write_file("$dstFile.sha256", "$sha256_expected $dstName");
112112
system("NIX_REMOTE=https://cache.nixos.org/ nix cat-store '$srcFile' > '$dstFile.tmp'") == 0
113113
or die "unable to fetch $srcFile\n";
114114
rename("$dstFile.tmp", $dstFile) or die;

0 commit comments

Comments
 (0)