V8.13.294.2025.10.28
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 2m2s

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-10-28 12:33:33 +01:00
parent 7c3c3654dc
commit 2b5fbde43f
7 changed files with 55 additions and 21 deletions

View File

@@ -132,6 +132,7 @@ declare -gx VAR_SETUP="true"
source_guard "./lib/lib_check_provider.sh" source_guard "./lib/lib_check_provider.sh"
source_guard "./lib/lib_check_stats.sh" source_guard "./lib/lib_check_stats.sh"
source_guard "./lib/lib_check_var.sh" source_guard "./lib/lib_check_var.sh"
source_guard "./lib/lib_ciss_upgrades.sh"
source_guard "./lib/lib_clean_screen.sh" source_guard "./lib/lib_clean_screen.sh"
source_guard "./lib/lib_clean_up.sh" source_guard "./lib/lib_clean_up.sh"
source_guard "./lib/lib_copy_integrity.sh" source_guard "./lib/lib_copy_integrity.sh"
@@ -140,7 +141,6 @@ declare -gx VAR_SETUP="true"
source_guard "./lib/lib_hardening_ultra.sh" source_guard "./lib/lib_hardening_ultra.sh"
source_guard "./lib/lib_helper_ip.sh" source_guard "./lib/lib_helper_ip.sh"
source_guard "./lib/lib_lb_build_start.sh" source_guard "./lib/lib_lb_build_start.sh"
source_guard "./lib/lib_lb_ciss_upgrades.sh"
source_guard "./lib/lib_lb_config_start.sh" source_guard "./lib/lib_lb_config_start.sh"
source_guard "./lib/lib_lb_config_write.sh" source_guard "./lib/lib_lb_config_write.sh"
source_guard "./lib/lib_lb_config_write_trixie.sh" source_guard "./lib/lib_lb_config_write_trixie.sh"
@@ -219,7 +219,7 @@ fi
check_hooks check_hooks
hardening_ssh hardening_ssh
lb_ciss_upgrade ciss_upgrades
lb_config_start lb_config_start
if [[ "${VAR_SUITE}" == "bookworm" ]]; then if [[ "${VAR_SUITE}" == "bookworm" ]]; then

View File

@@ -14,7 +14,7 @@ include_toc: true
## V8.13.294.2025.10.28 ## V8.13.294.2025.10.28
* **Added**: [lib_lb_config_write_trixie.sh](../lib/lib_lb_config_write_trixie.sh) + mksquashfs-excludes * **Added**: [lib_lb_config_write_trixie.sh](../lib/lib_lb_config_write_trixie.sh) + mksquashfs-excludes
* **Added**: [lib_lb_ciss_upgrades.sh](../lib/lib_lb_ciss_upgrades.sh) + modifies '/usr/lib/live/build/...' scripts * **Added**: [lib_lb_ciss_upgrades.sh](../lib/lib_ciss_upgrades.sh) + modifies '/usr/lib/live/build/...' scripts
* **Added**: [binary_rootfs.sh](../scripts/usr/lib/live/build/binary_rootfs.sh) + modifies binary_rootfs script * **Added**: [binary_rootfs.sh](../scripts/usr/lib/live/build/binary_rootfs.sh) + modifies binary_rootfs script
* **Updated**: [generate_PRIVATE_trixie_1.yaml](../.gitea/workflows/generate_PRIVATE_trixie_1.yaml) + --sshfp * **Updated**: [generate_PRIVATE_trixie_1.yaml](../.gitea/workflows/generate_PRIVATE_trixie_1.yaml) + --sshfp
* **Updated**: [0001_initramfs_modules.chroot](../config/hooks/live/0001_initramfs_modules.chroot) + update_initramfs=all COMPRESSLEVEL=10 * **Updated**: [0001_initramfs_modules.chroot](../config/hooks/live/0001_initramfs_modules.chroot) + update_initramfs=all COMPRESSLEVEL=10

View File

@@ -23,7 +23,7 @@ guard_sourcing
# Returns: # Returns:
# 0: on success # 0: on success
####################################### #######################################
lb_ciss_upgrade() { ciss_upgrades() {
printf "\e[95m++++ ++++ ++++ ++++ ++++ ++++ ++ 🧪 %s starting ... \e[0m\n" "${BASH_SOURCE[0]}" printf "\e[95m++++ ++++ ++++ ++++ ++++ ++++ ++ 🧪 %s starting ... \e[0m\n" "${BASH_SOURCE[0]}"
if [[ ! -e /usr/lib/live/build/binary_rootfs.original ]]; then if [[ ! -e /usr/lib/live/build/binary_rootfs.original ]]; then

View File

@@ -124,12 +124,6 @@ debootstrap
debootstrap/* debootstrap/*
root/.wget-hsts root/.wget-hsts
tmp/* tmp/*
usr/lib/firmware/amd-ucode/*
usr/lib/firmware/intel-ucode/*
var/cache/apt/pkgcache.bin
var/cache/apt/srcpkgcache.bin
var/lib/apt/lists/*
var/lib/initramfs-tools/*-amd64
EOF EOF
chmod 0644 "${VAR_HANDLER_BUILD_DIR}/config/rootfs/excludes" chmod 0644 "${VAR_HANDLER_BUILD_DIR}/config/rootfs/excludes"

View File

@@ -12,7 +12,6 @@
set -Ceuo pipefail set -Ceuo pipefail
printf "\e[95m++++ ++++ ++++ ++++ ++++ ++++ ++ 🧪 '%s' starting ... \e[0m\n" "${0}" printf "\e[95m++++ ++++ ++++ ++++ ++++ ++++ ++ 🧪 '%s' starting ... \e[0m\n" "${0}"
# sleep 1
cat << 'EOF' >| "${HANDLER_BUILD_DIR}"/config/includes.chroot/etc/custom-resolv.conf cat << 'EOF' >| "${HANDLER_BUILD_DIR}"/config/includes.chroot/etc/custom-resolv.conf
# dns01.eddns.eu: # dns01.eddns.eu:
@@ -36,7 +35,7 @@ cat << 'EOF' >| "${HANDLER_BUILD_DIR}"/config/includes.binary/hooks/live-bottom/
# SPDX-Security-Contact: security@coresecret.eu # SPDX-Security-Contact: security@coresecret.eu
### No bash in the installer environment, only BusyBox. ### No bash in the installer environment, only BusyBox.
### Live-Boot: override resolv.conf after network is up ### Live-Boot: override resolv.conf after the network is up
if [ -f /etc/custom-resolv.conf ]; then if [ -f /etc/custom-resolv.conf ]; then
cp /etc/custom-resolv.conf /etc/resolv.conf cp /etc/custom-resolv.conf /etc/resolv.conf

View File

@@ -1,19 +1,32 @@
#!/bin/bash #!/bin/sh
# bashsupport disable=BP5007
# SPDX-Version: 3.0 # SPDX-Version: 3.0
# SPDX-CreationInfo: 2025-10-26; WEIDNER, Marc S.; <msw@coresecret.dev> # 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-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: 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
# 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
set -Ceuo pipefail ## Modified Version of the original file:
## live-build(7) - System Build Scripts
## Copyright (C) 2016-2020 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
## under certain conditions; see COPYING for details.
set -e
### Including common functions. ### Including common functions.
if [[ -e "${LIVE_BUILD}/scripts/build.sh" ]]; then # shellcheck disable=SC2292
if [ -e "${LIVE_BUILD}/scripts/build.sh" ]; then
. "${LIVE_BUILD}/scripts/build.sh" . "${LIVE_BUILD}/scripts/build.sh"
else else
. /usr/lib/live/build.sh . /usr/lib/live/build.sh
@@ -28,11 +41,13 @@ USAGE="${PROGRAM} [--force]"
### Processing arguments and configuration files. ### Processing arguments and configuration files.
Init_config_data "${@}" Init_config_data "${@}"
if [[ "${LB_CHECKSUMS}" = "none" ]]; then # shellcheck disable=SC2292
if [ "${LB_CHECKSUMS}" = "none" ]; then
exit 0 exit 0
fi fi
if [[ "${LB_INITRAMFS}" = "dracut-live" ]]; then # shellcheck disable=SC2292
if [ "${LB_INITRAMFS}" = "dracut-live" ]; then
### The checksums will be generated by binary_iso. ### The checksums will be generated by binary_iso.
exit 0 exit 0
fi fi
@@ -55,7 +70,8 @@ for CHECKSUM in ${LB_CHECKSUMS}; do
Echo_message "Begin creating binary ${CHECKSUMS} ..." Echo_message "Begin creating binary ${CHECKSUMS} ..."
### Remove old checksums. ### Remove old checksums.
if [[ -f "binary/${CHECKSUMS}" ]]; then # shellcheck disable=SC2292
if [ -f "binary/${CHECKSUMS}" ]; then
rm -f "binary/${CHECKSUMS}" rm -f "binary/${CHECKSUMS}"
@@ -63,6 +79,7 @@ for CHECKSUM in ${LB_CHECKSUMS}; do
### Calculating checksums. ### Calculating checksums.
cd binary cd binary
# shellcheck disable=SC2312
find . -type f \ find . -type f \
\! -path './isolinux/isolinux.bin' \ \! -path './isolinux/isolinux.bin' \
\! -path './boot/boot.bin' \ \! -path './boot/boot.bin' \
@@ -98,6 +115,7 @@ done
### File list. ### File list.
cd binary cd binary
# shellcheck disable=SC2312
find . | sed -e 's|^.||g' | grep "^/" | LC_ALL=C sort > ../"${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.contents" find . | sed -e 's|^.||g' | grep "^/" | LC_ALL=C sort > ../"${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.contents"
cd "${OLDPWD}" cd "${OLDPWD}"

View File

@@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
# bashsupport disable=BP5007
# SPDX-Version: 3.0 # SPDX-Version: 3.0
# SPDX-CreationInfo: 2025-10-28; 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
@@ -22,7 +24,8 @@
set -e set -e
# Including common functions # Including common functions.
# shellcheck disable=SC2292
if [ -e "${LIVE_BUILD}/scripts/build.sh" ]; then if [ -e "${LIVE_BUILD}/scripts/build.sh" ]; then
. "${LIVE_BUILD}/scripts/build.sh" . "${LIVE_BUILD}/scripts/build.sh"
else else
@@ -74,6 +77,7 @@ esac
# Creating directory # Creating directory
mkdir -p "binary/${INITFS}" mkdir -p "binary/${INITFS}"
# shellcheck disable=SC2292
if In_list "rootfs" "${LB_CACHE_STAGES}" && [ -d cache/binary_rootfs ] if In_list "rootfs" "${LB_CACHE_STAGES}" && [ -d cache/binary_rootfs ]
then then
# Removing old chroot # Removing old chroot
@@ -100,6 +104,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
Install_packages Install_packages
# Remove old image # Remove old image
# shellcheck disable=SC2292
if [ -f "binary/${INITFS}/filesystem.${LB_CHROOT_FILESYSTEM}" ] if [ -f "binary/${INITFS}/filesystem.${LB_CHROOT_FILESYSTEM}" ]
then then
rm -f "binary/${INITFS}/filesystem.${LB_CHROOT_FILESYSTEM}" rm -f "binary/${INITFS}/filesystem.${LB_CHROOT_FILESYSTEM}"
@@ -135,6 +140,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
FAKE_MTAB=true FAKE_MTAB=true
fi fi
BLOCK_SIZE=1024 BLOCK_SIZE=1024
# shellcheck disable=SC2292
if [ "${LB_DM_VERITY}" = "true" ] if [ "${LB_DM_VERITY}" = "true" ]
then then
# Module dm-verity needs a block size of at least 4k # Module dm-verity needs a block size of at least 4k
@@ -162,6 +168,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
# Removing depends # Removing depends
Remove_packages Remove_packages
# shellcheck disable=SC2292
if [ -e chroot/chroot.cache ] if [ -e chroot/chroot.cache ]
then then
Remove_lockfile Remove_lockfile
@@ -208,11 +215,13 @@ case "${LB_CHROOT_FILESYSTEM}" in
Install_packages Install_packages
# Remove old jffs2 image # Remove old jffs2 image
# shellcheck disable=SC2292
if [ -f "binary/${INITFS}/filesystem.jffs2" ] if [ -f "binary/${INITFS}/filesystem.jffs2" ]
then then
rm -f "binary/${INITFS}/filesystem.jffs2" rm -f "binary/${INITFS}/filesystem.jffs2"
fi fi
# shellcheck disable=SC2292
if [ -n "${LB_JFFS2_ERASEBLOCK}" ] if [ -n "${LB_JFFS2_ERASEBLOCK}" ]
then then
JFFS2_OPTIONS="--eraseblock=${LB_JFFS2_ERASEBLOCK}" JFFS2_OPTIONS="--eraseblock=${LB_JFFS2_ERASEBLOCK}"
@@ -228,6 +237,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
# Removing depends # Removing depends
Remove_packages Remove_packages
# shellcheck disable=SC2292
if [ -e chroot/chroot.cache ] if [ -e chroot/chroot.cache ]
then then
Remove_lockfile Remove_lockfile
@@ -256,6 +266,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
;; ;;
plain) plain)
# shellcheck disable=SC2292
if [ -d "binary/${INITFS}/filesystem.dir" ] if [ -d "binary/${INITFS}/filesystem.dir" ]
then then
rm -rf "binary/${INITFS}/filesystem.dir" rm -rf "binary/${INITFS}/filesystem.dir"
@@ -263,6 +274,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
case "${LB_BUILD_WITH_CHROOT}" in case "${LB_BUILD_WITH_CHROOT}" in
true) true)
# shellcheck disable=SC2292
if [ -e chroot/chroot.cache ] if [ -e chroot/chroot.cache ]
then then
# Different from the other LB_CHROOT_FILESYSTEM values: # Different from the other LB_CHROOT_FILESYSTEM values:
@@ -298,6 +310,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
Echo_message "This may take a while." Echo_message "This may take a while."
# Remove old squashfs image # Remove old squashfs image
# shellcheck disable=SC2292
if [ -f "binary/${INITFS}/filesystem.squashfs" ] if [ -f "binary/${INITFS}/filesystem.squashfs" ]
then then
rm -f "binary/${INITFS}/filesystem.squashfs" rm -f "binary/${INITFS}/filesystem.squashfs"
@@ -309,16 +322,19 @@ case "${LB_CHROOT_FILESYSTEM}" in
# Do not display the progress bar if: # Do not display the progress bar if:
# - Run with --quiet, or # - Run with --quiet, or
# - stdin is not a terminal (e.g., in CI, cron, etc.) # - stdin is not a terminal (e.g., in CI, cron, etc.)
# shellcheck disable=SC2292
if [ "${_QUIET}" = "true" ] || [ ! -t 0 ] if [ "${_QUIET}" = "true" ] || [ ! -t 0 ]
then then
MKSQUASHFS_OPTIONS="-no-progress ${MKSQUASHFS_OPTIONS}" MKSQUASHFS_OPTIONS="-no-progress ${MKSQUASHFS_OPTIONS}"
fi fi
# shellcheck disable=SC2292
if [ "${_VERBOSE}" = "true" ] if [ "${_VERBOSE}" = "true" ]
then then
MKSQUASHFS_OPTIONS="-info ${MKSQUASHFS_OPTIONS}" MKSQUASHFS_OPTIONS="-info ${MKSQUASHFS_OPTIONS}"
fi fi
# shellcheck disable=SC2292
if [ -f config/rootfs/squashfs.sort ] if [ -f config/rootfs/squashfs.sort ]
then then
MKSQUASHFS_OPTIONS="-sort squashfs.sort ${MKSQUASHFS_OPTIONS}" MKSQUASHFS_OPTIONS="-sort squashfs.sort ${MKSQUASHFS_OPTIONS}"
@@ -335,6 +351,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
fi fi
# Set squashfs compression type or default to xz # Set squashfs compression type or default to xz
# shellcheck disable=SC2292
if [ -n "${LB_CHROOT_SQUASHFS_COMPRESSION_TYPE}" ] if [ -n "${LB_CHROOT_SQUASHFS_COMPRESSION_TYPE}" ]
then then
MKSQUASHFS_OPTIONS="-comp ${LB_CHROOT_SQUASHFS_COMPRESSION_TYPE} ${MKSQUASHFS_OPTIONS}" MKSQUASHFS_OPTIONS="-comp ${LB_CHROOT_SQUASHFS_COMPRESSION_TYPE} ${MKSQUASHFS_OPTIONS}"
@@ -342,6 +359,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
MKSQUASHFS_OPTIONS="-comp xz ${MKSQUASHFS_OPTIONS}" MKSQUASHFS_OPTIONS="-comp xz ${MKSQUASHFS_OPTIONS}"
fi fi
# shellcheck disable=SC2292
if [ -n "${LB_CHROOT_SQUASHFS_COMPRESSION_LEVEL}" ] if [ -n "${LB_CHROOT_SQUASHFS_COMPRESSION_LEVEL}" ]
then then
MKSQUASHFS_OPTIONS="-Xcompression-level ${LB_CHROOT_SQUASHFS_COMPRESSION_LEVEL} ${MKSQUASHFS_OPTIONS}" MKSQUASHFS_OPTIONS="-Xcompression-level ${LB_CHROOT_SQUASHFS_COMPRESSION_LEVEL} ${MKSQUASHFS_OPTIONS}"
@@ -349,6 +367,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
case "${LB_BUILD_WITH_CHROOT}" in case "${LB_BUILD_WITH_CHROOT}" in
true) true)
# shellcheck disable=SC2292
if [ -e config/rootfs/excludes ] if [ -e config/rootfs/excludes ]
then then
@@ -384,6 +403,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
# Removing depends # Removing depends
Remove_packages Remove_packages
# shellcheck disable=SC2292
if [ -e chroot/chroot.cache ] if [ -e chroot/chroot.cache ]
then then
Remove_lockfile Remove_lockfile
@@ -403,6 +423,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
;; ;;
false) false)
# shellcheck disable=SC2292
if [ -e config/rootfs/excludes ] if [ -e config/rootfs/excludes ]
then then
MKSQUASHFS_OPTIONS="-wildcards -ef config/rootfs/excludes ${MKSQUASHFS_OPTIONS}" MKSQUASHFS_OPTIONS="-wildcards -ef config/rootfs/excludes ${MKSQUASHFS_OPTIONS}"
@@ -419,6 +440,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
;; ;;
none) none)
# shellcheck disable=SC2292
if [ -d binary ] if [ -d binary ]
then then
rm -rf binary rm -rf binary
@@ -444,6 +466,7 @@ then
mkdir -p cache/binary_rootfs mkdir -p cache/binary_rootfs
# shellcheck disable=SC2292
if [ "${LB_CHROOT_FILESYSTEM}" != "none" ] if [ "${LB_CHROOT_FILESYSTEM}" != "none" ]
then then
cp -a binary/"${INITFS}"/filesystem.* cache/binary_rootfs cp -a binary/"${INITFS}"/filesystem.* cache/binary_rootfs