diff --git a/usr/lib/archboot/iso.sh b/usr/lib/archboot/iso.sh index 02922092f..554874608 100644 --- a/usr/lib/archboot/iso.sh +++ b/usr/lib/archboot/iso.sh @@ -259,11 +259,11 @@ _reproducibility_iso() { } _create_cksum() { - ## create sha256sums.txt - echo "Generating sha256sum..." - [[ -f "sha256sums.txt" ]] && rm "sha256sums.txt" - [[ "$(echo ./*.iso)" == "./*.iso" ]] || cksum -a sha256 ./*.iso > "sha256sums.txt" - [[ "$(echo ./*.img)" == "./*.img" ]] || cksum -a sha256 ./*.img > "sha256sums.txt" + ## create b2sums.txt + echo "Generating b2sum..." + [[ -f "b2sums.txt" ]] && rm "b2sums.txt" + [[ "$(echo ./*.iso)" == "./*.iso" ]] || cksum -a blake2b ./*.iso > "b2sums.txt" + [[ "$(echo ./*.img)" == "./*.img" ]] || cksum -a blake2b ./*.img > "b2sums.txt" } _cleanup_iso() { diff --git a/usr/lib/archboot/release.sh b/usr/lib/archboot/release.sh index 0984b6048..f1bdb6fbf 100644 --- a/usr/lib/archboot/release.sh +++ b/usr/lib/archboot/release.sh @@ -153,16 +153,16 @@ _create_iso() { # removing container echo "Removing container ${_W_DIR}..." rm -r "${_W_DIR}" - # create sha256sums - echo "Generating sha256sum..." + # create b2sums + echo "Generating b2sum..." for i in *; do if [[ -f "${i}" ]]; then - cksum -a sha256 "${i}" >> sha256sum.txt + cksum -a blake2b "${i}" >> b2sum.txt fi done for i in boot/*; do if [[ -f "${i}" ]]; then - cksum -a sha256 "${i}" >> sha256sum.txt + cksum -a blake2b "${i}" >> b2sum.txt fi done } diff --git a/usr/lib/archboot/server.sh b/usr/lib/archboot/server.sh index 8c47fb17b..861d98b74 100644 --- a/usr/lib/archboot/server.sh +++ b/usr/lib/archboot/server.sh @@ -78,16 +78,16 @@ _create_archive() { [[ -d "${_DIR}" ]] && mv "${_DIR}" archive/ } -# sign files and create new sha256sum.txt -_sign_sha256sum() { +# sign files and create new b2sum.txt +_sign_b2sum() { for i in $1; do #shellcheck disable=SC2086 if [[ -f "${i}" ]]; then sudo -u "${_USER}" gpg ${_GPG} "${i}" - cksum -a sha256 "${i}" >> sha256sum.txt + cksum -a blake2b "${i}" >> b2sum.txt fi if [[ -f "${i}.sig" ]]; then - cksum -a sha256 "${i}.sig" >> sha256sum.txt + cksum -a blake2b "${i}.sig" >> b2sum.txt fi done } @@ -109,10 +109,10 @@ _server_release() { chmod 755 "${_ISO_BUILD_DIR}" chown -R "${_USER}:${_GROUP}" "${_ISO_BUILD_DIR}" cd "${_ISO_BUILD_DIR}" || exit 1 - # removing sha256sum - rm sha256sum.txt - _sign_sha256sum "*" - _sign_sha256sum "boot/*" + # removing b2sum + rm b2sum.txt + _sign_b2sum "*" + _sign_b2sum "boot/*" chown -R "${_USER}:${_GROUP}" ./* cd .. _create_archive