V8.13.294.2025.10.28
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 2m6s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 2m6s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -22,24 +22,25 @@ fi
|
|||||||
|
|
||||||
cat << 'EOF' >| "${src}"
|
cat << 'EOF' >| "${src}"
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
# bashsupport disable=BP5007
|
||||||
|
|
||||||
# SPDX-Version: 3.0
|
# SPDX-Version: 3.0
|
||||||
# SPDX-CreationInfo: 2025-10-11; WEIDNER, Marc S.; <msw@coresecret.dev>
|
# SPDX-CreationInfo: 2025-10-28; WEIDNER, Marc S.; <msw@coresecret.dev>
|
||||||
# SPDX-ExternalRef: GIT https://git.coresecret.dev/msw/CISS.debian.live.builder.git
|
# SPDX-ExternalRef: GIT https://git.coresecret.dev/msw/CISS.debian.live.builder.git
|
||||||
# SPDX-FileContributor: WEIDNER, Marc S.; Centurion Intelligence Consulting Agency
|
# SPDX-FileContributor: WEIDNER, Marc S.; Centurion Intelligence Consulting Agency
|
||||||
# SPDX-FileCopyrightText: 2024-2025; WEIDNER, Marc S.; <msw@coresecret.dev>
|
# SPDX-FileCopyrightText: 2024-2025; WEIDNER, Marc S.; <msw@coresecret.dev>
|
||||||
# SPDX-FileType: SOURCE
|
# SPDX-FileType: SOURCE
|
||||||
# SPDX-License-Identifier: EUPL-1.2 OR LicenseRef-CCLA-1.0
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
# SPDX-LicenseComment: This file is part of the CISS.debian.installer.secure framework.
|
# SPDX-LicenseComment: This file is part of the CISS.debian.installer.secure framework.
|
||||||
# SPDX-PackageName: CISS.debian.live.builder
|
# SPDX-PackageName: CISS.debian.live.builder
|
||||||
# SPDX-Security-Contact: security@coresecret.eu
|
# SPDX-Security-Contact: security@coresecret.eu
|
||||||
|
|
||||||
### Changed version of https://salsa.debian.org/live-team/live-boot 'components/0030-verify-checksums'
|
### Modified Version of the original file:
|
||||||
### In case of successful verification of the offered checksums, proceed with booting, else panic.
|
### https://salsa.debian.org/live-team/live-boot 'components/0030-verify-checksums'
|
||||||
|
### In case of successful verification of one of the offered checksums, proceed with booting, else panic.
|
||||||
### Inside 0002_verify_checksums.chroot ###
|
|
||||||
|
|
||||||
#######################################
|
#######################################
|
||||||
# Live build ISO with the modified checksum verification script for continuing the boot process.
|
# Modified checksum-verification script for continuing the boot process.
|
||||||
# Globals:
|
# Globals:
|
||||||
# LIVE_BOOT_CMDLINE
|
# LIVE_BOOT_CMDLINE
|
||||||
# LIVE_VERIFY_CHECKSUMS
|
# LIVE_VERIFY_CHECKSUMS
|
||||||
@@ -52,30 +53,40 @@ cat << 'EOF' >| "${src}"
|
|||||||
# _RETURN
|
# _RETURN
|
||||||
# _TTY
|
# _TTY
|
||||||
# Arguments:
|
# Arguments:
|
||||||
# $1: ${_PARAMETER}
|
# 1: ${_PARAMETER}
|
||||||
# Returns:
|
# Returns:
|
||||||
# 0 : Successful Verification
|
# 0 : Successful Verification
|
||||||
#######################################
|
#######################################
|
||||||
Verify_checksums() {
|
Verify_checksums() {
|
||||||
for _PARAMETER in ${LIVE_BOOT_CMDLINE}; do
|
for _PARAMETER in ${LIVE_BOOT_CMDLINE}; do
|
||||||
|
|
||||||
case "${_PARAMETER}" in
|
case "${_PARAMETER}" in
|
||||||
|
|
||||||
live-boot.verify-checksums=* | verify-checksums=*)
|
live-boot.verify-checksums=* | verify-checksums=*)
|
||||||
|
|
||||||
LIVE_VERIFY_CHECKSUMS="true"
|
LIVE_VERIFY_CHECKSUMS="true"
|
||||||
LIVE_VERIFY_CHECKSUMS_DIGESTS="${_PARAMETER#*verify-checksums=}"
|
LIVE_VERIFY_CHECKSUMS_DIGESTS="${_PARAMETER#*verify-checksums=}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
live-boot.verify-checksums | verify-checksums)
|
live-boot.verify-checksums | verify-checksums)
|
||||||
|
|
||||||
LIVE_VERIFY_CHECKSUMS="true"
|
LIVE_VERIFY_CHECKSUMS="true"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
case "${LIVE_VERIFY_CHECKSUMS}" in
|
case "${LIVE_VERIFY_CHECKSUMS}" in
|
||||||
true) ;;
|
|
||||||
|
true)
|
||||||
|
:
|
||||||
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
_MOUNTPOINT="${1}"
|
_MOUNTPOINT="${1}"
|
||||||
@@ -88,42 +99,60 @@ Verify_checksums() {
|
|||||||
# shellcheck disable=SC2164
|
# shellcheck disable=SC2164
|
||||||
cd "${_MOUNTPOINT}"
|
cd "${_MOUNTPOINT}"
|
||||||
|
|
||||||
|
# shellcheck disable=SC2001
|
||||||
for _DIGEST in $(echo "${LIVE_VERIFY_CHECKSUMS_DIGESTS}" | sed -e 's|,| |g'); do
|
for _DIGEST in $(echo "${LIVE_VERIFY_CHECKSUMS_DIGESTS}" | sed -e 's|,| |g'); do
|
||||||
|
|
||||||
# shellcheck disable=SC2060
|
# shellcheck disable=SC2060
|
||||||
_CHECKSUMS="$(echo "${_DIGEST}" | tr [a-z] [A-Z])SUMS ${_DIGEST}sum.txt"
|
_CHECKSUMS="$(echo "${_DIGEST}" | tr [a-z] [A-Z])SUMS ${_DIGEST}sum.txt"
|
||||||
|
|
||||||
for _CHECKSUM in ${_CHECKSUMS}; do
|
for _CHECKSUM in ${_CHECKSUMS}; do
|
||||||
|
|
||||||
|
# shellcheck disable=SC2292
|
||||||
if [ -e "${_CHECKSUM}" ]; then
|
if [ -e "${_CHECKSUM}" ]; then
|
||||||
echo "Found ${_CHECKSUM}..." > "${_TTY}"
|
|
||||||
|
#echo "Found ${_CHECKSUM}..." > "${_TTY}"
|
||||||
|
log_begin_msg "Found ${_CHECKSUM}..."
|
||||||
|
|
||||||
if [ -e "/bin/${_DIGEST}sum" ]; then
|
if [ -e "/bin/${_DIGEST}sum" ]; then
|
||||||
echo "Checking ${_CHECKSUM}..." > "${_TTY}"
|
|
||||||
|
#echo "Checking ${_CHECKSUM}..." > "${_TTY}"
|
||||||
|
log_begin_msg "Checking ${_CHECKSUM}..."
|
||||||
|
|
||||||
# Verify checksums
|
# Verify checksums
|
||||||
|
# shellcheck disable=SC2312
|
||||||
grep -v '^#' "${_CHECKSUM}" | /bin/"${_DIGEST}"sum -c > "${_TTY}"
|
grep -v '^#' "${_CHECKSUM}" | /bin/"${_DIGEST}"sum -c > "${_TTY}"
|
||||||
_RETURN="${?}"
|
_RETURN="${?}"
|
||||||
|
|
||||||
# Stop after the first verification
|
# Stop after the first verification
|
||||||
# break 2
|
# break 2
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "Not found /bin/${_DIGEST}sum..." > "${_TTY}"
|
|
||||||
|
#echo "Not found /bin/${_DIGEST}sum..." > "${_TTY}"
|
||||||
|
log_begin_msg "Not found /bin/${_DIGEST}sum...."
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
log_end_msg
|
log_end_msg
|
||||||
|
|
||||||
case "${_RETURN}" in
|
case "${_RETURN}" in
|
||||||
|
|
||||||
0)
|
0)
|
||||||
log_success_msg "Verification sha512 sha384 sha256 successful, continuing booting in 10 seconds."
|
log_success_msg "Verification of ${_CHECKSUMS[*]} successful; continuing booting in 8 seconds."
|
||||||
sleep 10
|
sleep 8
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
panic "Verification failed, $(basename ${_TTY}) for more information."
|
panic "Verification failed, $(basename "${_TTY}") for more information."
|
||||||
;;
|
;;
|
||||||
|
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh
|
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ lb_config_write_trixie() {
|
|||||||
--apt-secure true \
|
--apt-secure true \
|
||||||
--apt-source-archives true \
|
--apt-source-archives true \
|
||||||
--architecture "${VAR_ARCHITECTURE}" \
|
--architecture "${VAR_ARCHITECTURE}" \
|
||||||
--archive-areas "main contrib non-free non-free-firmware" \
|
--archive-areas main contrib non-free non-free-firmware \
|
||||||
--backports true \
|
--backports true \
|
||||||
--binary-filesystem fat32 \
|
--binary-filesystem fat32 \
|
||||||
--binary-image iso-hybrid \
|
--binary-image iso-hybrid \
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
### In case of successful verification of one of the offered checksums, proceed with booting, else panic.
|
### In case of successful verification of one of the offered checksums, proceed with booting, else panic.
|
||||||
|
|
||||||
#######################################
|
#######################################
|
||||||
# Modified checksum verification script for continuing the boot process.
|
# Modified checksum-verification script for continuing the boot process.
|
||||||
# Globals:
|
# Globals:
|
||||||
# LIVE_BOOT_CMDLINE
|
# LIVE_BOOT_CMDLINE
|
||||||
# LIVE_VERIFY_CHECKSUMS
|
# LIVE_VERIFY_CHECKSUMS
|
||||||
|
|||||||
Reference in New Issue
Block a user