Skip to content

Commit 02f2544

Browse files
committed
Use b2sum for coreutils 8
Ubuntu 22.04 ships with coreutils 8...
1 parent 76e7a2f commit 02f2544

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

docs/changelog-assets/README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,18 @@ Files should be hashed and named after their hash (`{hash}.{ext}`). This has mul
1414

1515
The files in this directory aren't going to be looked up manually. They will be referenced by the CHANGELOG. As such, craming information into the file name is useless and will just lead to weird names and a complete mess.
1616

17-
For hashing, we'll use Blake2b with a length of 128. This hash can be computed using the [`cksum`](https://www.gnu.org/software/coreutils/manual/html_node/cksum-invocation.html#cksum-invocation) coreutils program:
17+
For hashing, we'll use Blake2b with a length of 128. This hash can be computed using the [`cksum`](https://www.gnu.org/software/coreutils/manual/html_node/cksum-invocation.html#cksum-invocation) coreutils program (requires coreutils 9 or greater):
1818

1919
```bash
2020
cksum -a blake2b --untagged --length=128 filename
2121
```
2222

23+
Alternatively, `b2sum` can be used directly for distros that have coreutils 8:
24+
25+
```bash
26+
b2sum --length=128 filename
27+
```
28+
2329
### Images
2430

2531
- Images should be cropped to the contents, don't upload full screenshots.

scripts/changelog-prepare-assets.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ for file in $FILES; do
2626
filename="${filename%.*}"
2727

2828
echo "$file: hashing"
29-
filehash=$(cksum -a blake2b --untagged --length=128 "$file" | awk '{print $1}')
29+
filehash=$(b2sum --length=128 "$file" | awk '{print $1}')
3030

3131
if [[ "$filename" == "$filehash" ]]; then
3232
echo "$file: valid"

0 commit comments

Comments
 (0)