V8.13.292.2025.10.27
Some checks failed
🔐 Generating a Private Live ISO TRIXIE. / 🔐 Generating a Private Live ISO TRIXIE. (push) Has been cancelled
🛡️ Retrieve DNSSEC status of coresecret.dev. / 🛡️ Retrieve DNSSEC status of coresecret.dev. (push) Successful in 1m6s
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Has been cancelled
Some checks failed
🔐 Generating a Private Live ISO TRIXIE. / 🔐 Generating a Private Live ISO TRIXIE. (push) Has been cancelled
🛡️ Retrieve DNSSEC status of coresecret.dev. / 🛡️ Retrieve DNSSEC status of coresecret.dev. (push) Successful in 1m6s
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Has been cancelled
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
107
config/hooks/live/zzzz_ciss_pgp_signer.hook.binary
Normal file
107
config/hooks/live/zzzz_ciss_pgp_signer.hook.binary
Normal file
@@ -0,0 +1,107 @@
|
||||
#!/bin/bash
|
||||
# SPDX-Version: 3.0
|
||||
# SPDX-CreationInfo: 2025-10-26; WEIDNER, Marc S.; <msw@coresecret.dev>
|
||||
# SPDX-ExternalRef: GIT https://git.coresecret.dev/msw/CISS.debian.live.builder.git
|
||||
# SPDX-FileContributor: WEIDNER, Marc S.; Centurion Intelligence Consulting Agency
|
||||
# SPDX-FileCopyrightText: 2024-2025; WEIDNER, Marc S.; <msw@coresecret.dev>
|
||||
# SPDX-FileType: SOURCE
|
||||
# SPDX-License-Identifier: EUPL-1.2 OR LicenseRef-CCLA-1.0
|
||||
# SPDX-LicenseComment: This file is part of the CISS.debian.installer.secure framework.
|
||||
# SPDX-PackageName: CISS.debian.live.builder
|
||||
# SPDX-Security-Contact: security@coresecret.eu
|
||||
|
||||
set -Ceuo pipefail
|
||||
|
||||
### Including common functions.
|
||||
if [[ -e "${LIVE_BUILD}/scripts/build.sh" ]]; then
|
||||
. "${LIVE_BUILD}/scripts/build.sh"
|
||||
else
|
||||
. /usr/lib/live/build.sh
|
||||
fi
|
||||
|
||||
### Setting static variables.
|
||||
# shellcheck disable=SC2034
|
||||
DESCRIPTION="Create binary checksums and PGP signature files."
|
||||
# shellcheck disable=SC2034
|
||||
USAGE="${PROGRAM} [--force]"
|
||||
|
||||
### Processing arguments and configuration files.
|
||||
Init_config_data "${@}"
|
||||
|
||||
if [[ "${LB_CHECKSUMS}" = "none" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ "${LB_INITRAMFS}" = "dracut-live" ]]; then
|
||||
### The checksums will be generated by binary_iso.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
### Requiring stage file.
|
||||
Require_stagefiles config bootstrap
|
||||
|
||||
### Checking stage file.
|
||||
Check_stagefile
|
||||
|
||||
### Acquire a lock file.
|
||||
Acquire_lockfile
|
||||
|
||||
declare CHECKSUM=""
|
||||
|
||||
for CHECKSUM in ${LB_CHECKSUMS}; do
|
||||
|
||||
CHECKSUMS="${CHECKSUM}sum.txt"
|
||||
|
||||
Echo_message "Begin creating binary ${CHECKSUMS} ..."
|
||||
|
||||
### Remove old checksums.
|
||||
if [[ -f "binary/${CHECKSUMS}" ]]; then
|
||||
|
||||
rm -f "binary/${CHECKSUMS}"
|
||||
|
||||
fi
|
||||
|
||||
### Calculating checksums.
|
||||
cd binary
|
||||
find . -type f \
|
||||
\! -path './isolinux/isolinux.bin' \
|
||||
\! -path './boot/boot.bin' \
|
||||
\! -path './boot/grub/stage2_eltorito' \
|
||||
\! -path './*SUMS' \
|
||||
\! -path './*sum.txt' \
|
||||
\! -path './*sum.README' \
|
||||
-print0 | LC_ALL=C sort -z | xargs -0 "${CHECKSUM}sum" >| "${CHECKSUMS}"
|
||||
|
||||
cat << EOF >| "${CHECKSUM}sum.README"
|
||||
# SPDX-Version: 3.0
|
||||
# SPDX-CreationInfo: 2025-10-26; WEIDNER, Marc S.; <msw@coresecret.dev>
|
||||
# SPDX-ExternalRef: GIT https://git.coresecret.dev/msw/CISS.debian.live.builder.git
|
||||
# SPDX-FileContributor: WEIDNER, Marc S.; Centurion Intelligence Consulting Agency
|
||||
# SPDX-FileCopyrightText: 2024-2025; WEIDNER, Marc S.; <msw@coresecret.dev>
|
||||
# SPDX-FileType: SOURCE
|
||||
# SPDX-License-Identifier: EUPL-1.2 OR LicenseRef-CCLA-1.0
|
||||
# SPDX-LicenseComment: This file is part of the CISS.debian.installer.secure framework.
|
||||
# SPDX-PackageName: CISS.debian.live.builder
|
||||
# SPDX-Security-Contact: security@coresecret.eu
|
||||
|
||||
The file ${CHECKSUMS} contains the ${CHECKSUM} checksums of all files on this medium.
|
||||
|
||||
You can verify them automatically with the 'verify-checksums' boot parameter, or, manually with:
|
||||
${CHECKSUM}sum -c ${CHECKSUMS}
|
||||
|
||||
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=text
|
||||
EOF
|
||||
|
||||
cd "${OLDPWD}"
|
||||
|
||||
done
|
||||
|
||||
### File list.
|
||||
cd binary
|
||||
find . | sed -e 's|^.||g' | grep "^/" | LC_ALL=C sort > ../"${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.contents"
|
||||
cd "${OLDPWD}"
|
||||
|
||||
### Creating a stage file.
|
||||
Create_stagefile
|
||||
|
||||
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh
|
||||
Reference in New Issue
Block a user