mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 19:40:37 +02:00
switch to b2sum
This commit is contained in:
parent
afd91ea3db
commit
abdc8d845e
3 changed files with 17 additions and 17 deletions
|
@ -259,11 +259,11 @@ _reproducibility_iso() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_create_cksum() {
|
_create_cksum() {
|
||||||
## create sha256sums.txt
|
## create b2sums.txt
|
||||||
echo "Generating sha256sum..."
|
echo "Generating b2sum..."
|
||||||
[[ -f "sha256sums.txt" ]] && rm "sha256sums.txt"
|
[[ -f "b2sums.txt" ]] && rm "b2sums.txt"
|
||||||
[[ "$(echo ./*.iso)" == "./*.iso" ]] || cksum -a sha256 ./*.iso > "sha256sums.txt"
|
[[ "$(echo ./*.iso)" == "./*.iso" ]] || cksum -a blake2b ./*.iso > "b2sums.txt"
|
||||||
[[ "$(echo ./*.img)" == "./*.img" ]] || cksum -a sha256 ./*.img > "sha256sums.txt"
|
[[ "$(echo ./*.img)" == "./*.img" ]] || cksum -a blake2b ./*.img > "b2sums.txt"
|
||||||
}
|
}
|
||||||
|
|
||||||
_cleanup_iso() {
|
_cleanup_iso() {
|
||||||
|
|
|
@ -153,16 +153,16 @@ _create_iso() {
|
||||||
# removing container
|
# removing container
|
||||||
echo "Removing container ${_W_DIR}..."
|
echo "Removing container ${_W_DIR}..."
|
||||||
rm -r "${_W_DIR}"
|
rm -r "${_W_DIR}"
|
||||||
# create sha256sums
|
# create b2sums
|
||||||
echo "Generating sha256sum..."
|
echo "Generating b2sum..."
|
||||||
for i in *; do
|
for i in *; do
|
||||||
if [[ -f "${i}" ]]; then
|
if [[ -f "${i}" ]]; then
|
||||||
cksum -a sha256 "${i}" >> sha256sum.txt
|
cksum -a blake2b "${i}" >> b2sum.txt
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
for i in boot/*; do
|
for i in boot/*; do
|
||||||
if [[ -f "${i}" ]]; then
|
if [[ -f "${i}" ]]; then
|
||||||
cksum -a sha256 "${i}" >> sha256sum.txt
|
cksum -a blake2b "${i}" >> b2sum.txt
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,16 +78,16 @@ _create_archive() {
|
||||||
[[ -d "${_DIR}" ]] && mv "${_DIR}" archive/
|
[[ -d "${_DIR}" ]] && mv "${_DIR}" archive/
|
||||||
}
|
}
|
||||||
|
|
||||||
# sign files and create new sha256sum.txt
|
# sign files and create new b2sum.txt
|
||||||
_sign_sha256sum() {
|
_sign_b2sum() {
|
||||||
for i in $1; do
|
for i in $1; do
|
||||||
#shellcheck disable=SC2086
|
#shellcheck disable=SC2086
|
||||||
if [[ -f "${i}" ]]; then
|
if [[ -f "${i}" ]]; then
|
||||||
sudo -u "${_USER}" gpg ${_GPG} "${i}"
|
sudo -u "${_USER}" gpg ${_GPG} "${i}"
|
||||||
cksum -a sha256 "${i}" >> sha256sum.txt
|
cksum -a blake2b "${i}" >> b2sum.txt
|
||||||
fi
|
fi
|
||||||
if [[ -f "${i}.sig" ]]; then
|
if [[ -f "${i}.sig" ]]; then
|
||||||
cksum -a sha256 "${i}.sig" >> sha256sum.txt
|
cksum -a blake2b "${i}.sig" >> b2sum.txt
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
@ -109,10 +109,10 @@ _server_release() {
|
||||||
chmod 755 "${_ISO_BUILD_DIR}"
|
chmod 755 "${_ISO_BUILD_DIR}"
|
||||||
chown -R "${_USER}:${_GROUP}" "${_ISO_BUILD_DIR}"
|
chown -R "${_USER}:${_GROUP}" "${_ISO_BUILD_DIR}"
|
||||||
cd "${_ISO_BUILD_DIR}" || exit 1
|
cd "${_ISO_BUILD_DIR}" || exit 1
|
||||||
# removing sha256sum
|
# removing b2sum
|
||||||
rm sha256sum.txt
|
rm b2sum.txt
|
||||||
_sign_sha256sum "*"
|
_sign_b2sum "*"
|
||||||
_sign_sha256sum "boot/*"
|
_sign_b2sum "boot/*"
|
||||||
chown -R "${_USER}:${_GROUP}" ./*
|
chown -R "${_USER}:${_GROUP}" ./*
|
||||||
cd ..
|
cd ..
|
||||||
_create_archive
|
_create_archive
|
||||||
|
|
Loading…
Reference in a new issue