Skip to content

Commit

Permalink
live-build
Browse files Browse the repository at this point in the history
  • Loading branch information
adrelanos committed Jul 13, 2023
1 parent 2d97616 commit 776f6b9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
17 changes: 17 additions & 0 deletions build-steps.d/3300_create-iso-chroot
Expand Up @@ -36,6 +36,21 @@ make-live-build-use-mmdebstrap() {
ls -la /usr/sbin/debootstrap
}

etc-mtab-workaround() {
## https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1032408
## https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1040928

local search replace file_name

search='if ! Chroot chroot "test -s /etc/mtab"'
replace='if ! Chroot chroot "test -e /etc/mtab"'
file_name="/usr/lib/live/build/binary_rootfs"

$SUDO_TO_ROOT $str_replace_tool "$search" "$replace" "$file_name"

true
}

create-debian-iso-config() {
$SUDO_TO_ROOT rm --recursive --force "$binary_build_folder_live_build"
mkdir --parents "$binary_build_folder_live_build"
Expand Down Expand Up @@ -141,6 +156,8 @@ create-debian-iso-config() {
create-debian-iso-chroot() {
#make-live-build-use-mmdebstrap

etc-mtab-workaround

if $SUDO_TO_ROOT mount | grep home | grep nosuid | grep nodev ; then
## Required in Qubes and other operating systems that configure nosuid, nodev mount options.
$SUDO_TO_ROOT mount -o remount,suid,dev /home
Expand Down
2 changes: 2 additions & 0 deletions help-steps/variables
Expand Up @@ -77,6 +77,8 @@ export dist_source_parentdir
[ -n "$dist_source_help_steps_folder" ] || dist_source_help_steps_folder="$source_code_folder_dist/help-steps"
export dist_source_help_steps_folder

[ -n "$str_replace_tool" ] || str_replace_tool="LANG=C $source_code_folder_dist/packages/kicksecure/helper-scripts/usr/bin/str_replace"

cd "$source_code_folder_dist"

## TODO: live-build/config/chroot_local-includes/etc/apt/apt.conf.d/30_derivative-maker.conf is currently hardcoded.
Expand Down

0 comments on commit 776f6b9

Please sign in to comment.