diff options
-rwxr-xr-x | functions/defaults.sh | 2 | ||||
-rwxr-xr-x | functions/help.sh | 2 | ||||
-rwxr-xr-x | scripts/build/binary_grub-efi | 33 | ||||
-rwxr-xr-x | scripts/build/binary_grub-legacy | 2 | ||||
-rwxr-xr-x | scripts/build/binary_grub-pc | 2 | ||||
-rwxr-xr-x | scripts/build/binary_loopback_cfg | 12 | ||||
-rwxr-xr-x | scripts/build/binary_onie | 76 | ||||
-rwxr-xr-x | scripts/build/binary_package-lists | 15 | ||||
-rwxr-xr-x | scripts/build/binary_syslinux | 2 | ||||
-rwxr-xr-x | scripts/build/bootstrap_archives | 4 | ||||
-rwxr-xr-x | scripts/build/chroot_archives | 10 | ||||
-rwxr-xr-x | scripts/build/chroot_package-lists | 4 | ||||
-rwxr-xr-x | scripts/build/efi-image | 2 | ||||
-rwxr-xr-x | scripts/build/grub-cpmodules | 24 | ||||
-rwxr-xr-x | scripts/build/installer_debian-installer | 6 |
15 files changed, 98 insertions, 98 deletions
diff --git a/functions/defaults.sh b/functions/defaults.sh index 91350ab43..8c91d3b38 100755 --- a/functions/defaults.sh +++ b/functions/defaults.sh @@ -433,7 +433,7 @@ Set_defaults () ;; i386) - LB_LINUX_FLAVOURS_WITH_ARCH="${LB_LINUX_FLAVOURS_WITH_ARCH:-686-pae}" + LB_LINUX_FLAVOURS_WITH_ARCH="${LB_LINUX_FLAVOURS_WITH_ARCH:-686-pae}" ;; ia64) diff --git a/functions/help.sh b/functions/help.sh index acd9d04dd..b6bc683c9 100755 --- a/functions/help.sh +++ b/functions/help.sh @@ -10,7 +10,7 @@ Help () { - Echo "%s - %s" "${PROGRAM}" "${DESCRIPTION}" + Echo "%s - %s" "${PROGRAM}" "${DESCRIPTION}" echo Echo "Usage:" echo diff --git a/scripts/build/binary_grub-efi b/scripts/build/binary_grub-efi index 7afa07eb7..057db6bd6 100755 --- a/scripts/build/binary_grub-efi +++ b/scripts/build/binary_grub-efi @@ -49,10 +49,10 @@ case "${LB_ARCHITECTURES}" in amd64|i386) Check_package chroot /usr/lib/grub/x86_64-efi/configfile.mod grub-efi-amd64-bin Check_package chroot /usr/lib/grub/i386-efi/configfile.mod grub-efi-ia32-bin - ;; + ;; arm64) Check_package chroot /usr/lib/grub/arm64-efi/configfile.mod grub-efi-arm64-bin - ;; + ;; esac Check_package chroot /usr/bin/grub-mkimage grub-common Check_package chroot /usr/bin/mcopy mtools @@ -66,12 +66,12 @@ case "${LB_ARCHITECTURES}" in _SB_EFI_PLATFORM="x86_64" _SB_EFI_NAME="x64" _SB_EFI_DEB="amd64" - ;; + ;; arm64) _SB_EFI_PLATFORM="arm64" _SB_EFI_NAME="aa64" _SB_EFI_DEB="arm64" - ;; + ;; esac _PRE_SB_PACKAGES="${_LB_PACKAGES}" @@ -94,7 +94,7 @@ case "${LB_UEFI_SECURE_BOOT}" in else Echo_message "UEFI Secure Boot support enabled." fi - ;; + ;; enable) Check_package chroot /usr/lib/grub/${_SB_EFI_PLATFORM}-efi-signed/gcd${_SB_EFI_NAME}.efi.signed \ grub-efi-${_SB_EFI_DEB}-signed @@ -102,10 +102,10 @@ case "${LB_UEFI_SECURE_BOOT}" in shim-signed Install_package Echo_message "UEFI Secure Boot support enabled." - ;; + ;; disable) Echo_message "UEFI Secure Boot support disabled." - ;; + ;; esac _LB_PACKAGES="${_PRE_SB_PACKAGES}" @@ -115,7 +115,7 @@ case "${LIVE_IMAGE_TYPE}" in Echo_warning "Bootloader in this image type not yet supported by live-build." Echo_warning "This would produce a not bootable image, aborting (FIXME)." exit 1 - ;; + ;; esac # Restoring cache @@ -129,7 +129,7 @@ rm -rf binary/boot/efi.img binary/boot/grub/i386-efi/ binary/boot/grub/x86_64-ef # This is workaround till both efi-image and grub-cpmodules are put into a binary package case "${LB_BUILD_WITH_CHROOT}" in - true) + true) if [ ! -e "${LIVE_BUILD}" ] ; then LIVE_BUILD_PATH="/usr/lib/live/build" else @@ -140,10 +140,11 @@ case "${LB_BUILD_WITH_CHROOT}" in cp "${LIVE_BUILD_PATH}/grub-cpmodules" "chroot/${LIVE_BUILD_PATH}" _CHROOT_DIR="" - ;; + ;; + false) _CHROOT_DIR="chroot" - ;; + ;; esac ##### cat >binary.sh <<END @@ -174,10 +175,10 @@ gen_efi_boot_img(){ # and grub-efi-amd64-signed, currently in Ubuntu: # https://packages.ubuntu.com/xenial/amd64/grub-efi-amd64-signed/filelist # https://packages.ubuntu.com/bionic/arm64/grub-efi-arm64-signed/filelist - # E.g., gcdx64.efi.signed is the boot loader for removable device, like CD or - # USB flash drive, while grubx64.efi.signed is for hard drive. - # Therefore here gcdx64.efi.signed is used for amd64 and gcdaa64.efi.signed is - # for arm64. + # E.g., gcdx64.efi.signed is the boot loader for removable device, like CD or + # USB flash drive, while grubx64.efi.signed is for hard drive. + # Therefore here gcdx64.efi.signed is used for amd64 and gcdaa64.efi.signed is + # for arm64. if [ -r ${_CHROOT_DIR}/usr/lib/grub/\$platform-signed/gcd\$efi_name.efi.signed -a \ -r ${_CHROOT_DIR}/usr/lib/shim/shim\$efi_name.efi.signed -a \ "${LB_UEFI_SECURE_BOOT}" != "disable" ]; then @@ -259,7 +260,7 @@ mcopy -o -i "${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img" ${_CHROOT_DIR}/grub END case "${LB_BUILD_WITH_CHROOT}" in - true) + true) mv binary.sh chroot/ Chroot chroot "sh binary.sh" rm -f chroot/binary.sh diff --git a/scripts/build/binary_grub-legacy b/scripts/build/binary_grub-legacy index 181e68ada..749db8bb3 100755 --- a/scripts/build/binary_grub-legacy +++ b/scripts/build/binary_grub-legacy @@ -155,7 +155,7 @@ case "${LIVE_IMAGE_TYPE}" in Echo_warning "Bootloader in this image type not yet supported by live-build." Echo_warning "This would produce a not bootable image, aborting (FIXME)." exit 1 - ;; + ;; esac Check_multiarchitectures diff --git a/scripts/build/binary_grub-pc b/scripts/build/binary_grub-pc index 6d111a7d0..174a6c3e1 100755 --- a/scripts/build/binary_grub-pc +++ b/scripts/build/binary_grub-pc @@ -59,7 +59,7 @@ case "${LIVE_IMAGE_TYPE}" in Echo_warning "Bootloader in this image type not yet supported by live-build." Echo_warning "This would produce a not bootable image, aborting (FIXME)." exit 1 - ;; + ;; esac Check_multiarchitectures diff --git a/scripts/build/binary_loopback_cfg b/scripts/build/binary_loopback_cfg index a049b6480..a31cc857e 100755 --- a/scripts/build/binary_loopback_cfg +++ b/scripts/build/binary_loopback_cfg @@ -82,15 +82,15 @@ Grub_install_entry () case $TYPE in rescue|rescuegui) APPEND=$(echo "$APPEND" | sed -e 's/ quiet//') - ;; + ;; esac if [ -z "$LINUX_INSTALL" ]; then - # First entry recorded in LINUX_INSTALL - LINUX_INSTALL="$(Grub_menu_entry "$LABEL" "$KERNEL" "$INITRD" "$APPEND")$NL" + # First entry recorded in LINUX_INSTALL + LINUX_INSTALL="$(Grub_menu_entry "$LABEL" "$KERNEL" "$INITRD" "$APPEND")$NL" else - # Remaining entries recorded in LINUX_ADVANCED_INSTALL - LINUX_ADVANCED_INSTALL="$LINUX_ADVANCED_INSTALL$(Grub_menu_entry "$LABEL" "$KERNEL" "$INITRD" "$APPEND")$NL" + # Remaining entries recorded in LINUX_ADVANCED_INSTALL + LINUX_ADVANCED_INSTALL="$LINUX_ADVANCED_INSTALL$(Grub_menu_entry "$LABEL" "$KERNEL" "$INITRD" "$APPEND")$NL" fi } @@ -270,7 +270,7 @@ mkdir -p binary/boot/grub cp -a "${_SOURCE}"/* binary/boot/grub/ escape_for_sed() { - echo -n "$1" | perl -npe 's/\n/\\n/gm' + echo -n "$1" | perl -npe 's/\n/\\n/gm' } sed -i \ diff --git a/scripts/build/binary_onie b/scripts/build/binary_onie index 45700d4d5..7f1ba7337 100755 --- a/scripts/build/binary_onie +++ b/scripts/build/binary_onie @@ -89,22 +89,22 @@ sha1=\$(sed -e '1,/^exit_marker$/d' "\$0" | sha1sum | awk '{ print \$1 }') payload_sha1=%%IMAGE_SHA1%% if [ "\$sha1" != "\$payload_sha1" ] ; then - echo - echo "ERROR: Unable to verify archive checksum" - echo "Expected: \$payload_sha1" - echo "Found : \$sha1" - exit 1 + echo + echo "ERROR: Unable to verify archive checksum" + echo "Expected: \$payload_sha1" + echo "Found : \$sha1" + exit 1 fi echo " OK." tmp_dir= clean_up() { - if [ "\$(id -u)" = "0" ] ; then - umount \$tmp_dir > /dev/null 2>&1 - fi - rm -rf \$tmp_dir - exit \$1 + if [ "\$(id -u)" = "0" ] ; then + umount \$tmp_dir > /dev/null 2>&1 + fi + rm -rf \$tmp_dir + exit \$1 } # Untar and launch install script in a tmpfs @@ -112,7 +112,7 @@ cur_wd=\$(pwd) archive_path=\$(realpath "\$0") tmp_dir=\$(mktemp -d) if [ "\$(id -u)" = "0" ] ; then - mount -t tmpfs tmpfs-installer \$tmp_dir || clean_up 1 + mount -t tmpfs tmpfs-installer \$tmp_dir || clean_up 1 fi cd \$tmp_dir echo -n "Preparing image archive ..." @@ -123,22 +123,22 @@ cd \$cur_wd extract=no args=":x" while getopts "\$args" a ; do - case \$a in - x) - extract=yes - ;; - *) - ;; - esac + case \$a in + x) + extract=yes + ;; + *) + ;; + esac done if [ "\$extract" = "yes" ] ; then - # stop here - echo "Image extracted to: \$tmp_dir" - if [ "\$(id -u)" = "0" ] ; then - echo "To un-mount the tmpfs when finished type: umount \$tmp_dir" - fi - exit 0 + # stop here + echo "Image extracted to: \$tmp_dir" + if [ "\$(id -u)" = "0" ] ; then + echo "To un-mount the tmpfs when finished type: umount \$tmp_dir" + fi + exit 0 fi \$tmp_dir/installer/install.sh "\$@" @@ -227,14 +227,14 @@ echo -n "." KERNEL='vmlinuz' IN_KERNEL=$EXTRACTDIR/live/$KERNEL [ -r $IN_KERNEL ] || { - echo "ERROR: Unable to find kernel in ISO: $IN_KERNEL" - exit 1 + echo "ERROR: Unable to find kernel in ISO: $IN_KERNEL" + exit 1 } INITRD='initrd.img' IN_INITRD=$WORKDIR/$INITRD [ -r $IN_INITRD ] || { - echo "ERROR: Unable to find initrd in ISO: $IN_INITRD" - exit 1 + echo "ERROR: Unable to find initrd in ISO: $IN_INITRD" + exit 1 } # Note: specify kernel args you want the Debian installer to @@ -265,7 +265,7 @@ cd \$(dirname \$0) # remove old partitions for p in \$(seq 3 9) ; do - sgdisk -d \$p /dev/vda > /dev/null 2&>1 + sgdisk -d \$p /dev/vda > /dev/null 2&>1 done # bonk out on errors @@ -279,9 +279,9 @@ bits=\$(echo \$bits | grep -o [5-8]) con='' if [ -n "\$speed" ]; then - con="console=\$tty,\${speed}n\${bits}" + con="console=\$tty,\${speed}n\${bits}" else - con="console=\$tty" + con="console=\$tty" fi echo "using \$con" @@ -290,7 +290,7 @@ kcmd_console=\$(cat /proc/cmdline | grep -o 'console=.* ') kcmd_console=\$(echo \$kcmd_console | cut -d' ' -f2) # remove tty0 if [ \${kcmd_console}x != \${con}x ]; then - echo "WARNING: Detected console does not match boot console: \$kcmd_console != \$con" + echo "WARNING: Detected console does not match boot console: \$kcmd_console != \$con" fi echo "Loading new kernel ..." @@ -305,13 +305,13 @@ echo -n "." # Repackage $INSTALLDIR into a self-extracting installer image sharch="$WORKDIR/sharch.tar" tar -C $WORKDIR -cf $sharch installer || { - echo "Error: Problems creating $sharch archive" - exit 1 + echo "Error: Problems creating $sharch archive" + exit 1 } [ -f "$sharch" ] || { - echo "Error: $sharch not found" - exit 1 + echo "Error: $sharch not found" + exit 1 } echo -n "." @@ -319,8 +319,8 @@ sha1=$(cat $sharch | sha1sum | awk '{print $1}') echo -n "." cp sharch_body.sh $output_file || { - echo "Error: Problems copying sharch_body.sh" - exit 1 + echo "Error: Problems copying sharch_body.sh" + exit 1 } # Replace variables in the sharch template diff --git a/scripts/build/binary_package-lists b/scripts/build/binary_package-lists index 599ab884a..46879ed35 100755 --- a/scripts/build/binary_package-lists +++ b/scripts/build/binary_package-lists @@ -129,14 +129,13 @@ then mv "${FILE}" binary/${POOL}/${SECTION}/"${LETTER}"/"${SOURCE}" done - if [ -e chroot/etc/os-release ] - then - _VERSION="$(. chroot/etc/os-release && echo ${VERSION_ID})" - fi - - if [ -n "${_VERSION}" ]; then - _LB_APT_VERSION_OPT='-o APT::FTPArchive::Release::Version="'"${_VERSION}"'"' - fi + if [ -e chroot/etc/os-release ]; then + _VERSION="$(. chroot/etc/os-release && echo ${VERSION_ID})" + fi + + if [ -n "${_VERSION}" ]; then + _LB_APT_VERSION_OPT='-o APT::FTPArchive::Release::Version="'"${_VERSION}"'"' + fi cd binary diff --git a/scripts/build/binary_syslinux b/scripts/build/binary_syslinux index 713573a4e..49aa6eb79 100755 --- a/scripts/build/binary_syslinux +++ b/scripts/build/binary_syslinux @@ -284,7 +284,7 @@ fi # Tweak the grub theme to reuse the syslinux background image if [ -e binary/boot/grub/live-theme/theme.txt ]; then - sed -i -e 's|^desktop-image:.*|desktop-image: "/isolinux/splash.png"|' \ + sed -i -e 's|^desktop-image:.*|desktop-image: "/isolinux/splash.png"|' \ -e 's|^title-text:.*|title-text: ""|' \ binary/boot/grub/live-theme/theme.txt fi diff --git a/scripts/build/bootstrap_archives b/scripts/build/bootstrap_archives index 27a92f02f..0545f58f5 100755 --- a/scripts/build/bootstrap_archives +++ b/scripts/build/bootstrap_archives @@ -37,7 +37,7 @@ Require_stagefile .build/config .build/bootstrap case "${LB_DERIVATIVE}" in true) _PARENT_FILE="sources.list.d/debian.list" - ;; + ;; false) _PARENT_FILE="sources.list" @@ -62,7 +62,7 @@ Restore_cache cache/packages.chroot if echo "${LB_PARENT_MIRROR_CHROOT}" | grep -q '^file:/' then - Chroot_bind_path chroot "$(echo ${LB_PARENT_MIRROR_CHROOT} | sed -e 's|file:||')" + Chroot_bind_path chroot "$(echo ${LB_PARENT_MIRROR_CHROOT} | sed -e 's|file:||')" fi cat > chroot/etc/apt/${_PARENT_FILE} << EOF diff --git a/scripts/build/chroot_archives b/scripts/build/chroot_archives index 5d005b23c..fc5cc78d6 100755 --- a/scripts/build/chroot_archives +++ b/scripts/build/chroot_archives @@ -37,7 +37,7 @@ Require_stagefile .build/config .build/bootstrap case "${LB_DERIVATIVE}" in true) _PARENT_FILE="sources.list.d/debian.list" - ;; + ;; false) _PARENT_FILE="sources.list" @@ -62,10 +62,10 @@ case "${1}" in # Configure custom sources.list -if echo "${LB_PARENT_MIRROR_CHROOT}" | grep -q '^file:/' -then - Chroot_bind_path chroot "$(echo ${LB_PARENT_MIRROR_CHROOT} | sed -e 's|file:||')" -fi + if echo "${LB_PARENT_MIRROR_CHROOT}" | grep -q '^file:/' + then + Chroot_bind_path chroot "$(echo ${LB_PARENT_MIRROR_CHROOT} | sed -e 's|file:||')" + fi cat > chroot/etc/apt/${_PARENT_FILE} << EOF deb ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION_CHROOT} ${LB_PARENT_ARCHIVE_AREAS} diff --git a/scripts/build/chroot_package-lists b/scripts/build/chroot_package-lists index 26a24061d..202cb5218 100755 --- a/scripts/build/chroot_package-lists +++ b/scripts/build/chroot_package-lists @@ -66,8 +66,8 @@ else fi for LIST in config/package-lists/*.list \ - config/package-lists/*.list.chroot \ - config/package-lists/*.list.chroot_${_PASS} + config/package-lists/*.list.chroot \ + config/package-lists/*.list.chroot_${_PASS} do if [ -e "${LIST}" ] then diff --git a/scripts/build/efi-image b/scripts/build/efi-image index c37232709..2ad3bdb52 100755 --- a/scripts/build/efi-image +++ b/scripts/build/efi-image @@ -55,7 +55,7 @@ EOF mkdir -p "$outdir/boot/grub/$platform" (for i in /usr/lib/grub/$platform/part_*.mod; do - i=`echo $i | sed 's?^.*/??g;s?\.mod$??g;'` + i=`echo $i | sed 's?^.*/??g;s?\.mod$??g;'` echo "insmod $i" done; \ echo "source /boot/grub/grub.cfg") >"$outdir/boot/grub/$platform/grub.cfg" diff --git a/scripts/build/grub-cpmodules b/scripts/build/grub-cpmodules index 437ebdf2b..4f9e26acc 100755 --- a/scripts/build/grub-cpmodules +++ b/scripts/build/grub-cpmodules @@ -37,18 +37,18 @@ for x in "/usr/lib/grub/$platform"/*.mod; do # dependencies. It would be nice to have a way to read the module # list directly out of the image. case $(basename "$x" .mod) in - configfile|fshelp|iso9660|memdisk|search|search_fs_file|search_fs_uuid|search_label|tar) - # included in boot image - ;; - affs|afs|afs_be|befs|befs_be|minix|nilfs2|sfs|zfs|zfsinfo) - # unnecessary filesystem modules - ;; - example_functional_test|functional_test|hello) - # other cruft - ;; - *) - cp -a "$x" "$outdir/boot/grub/$platform/" - ;; + configfile|fshelp|iso9660|memdisk|search|search_fs_file|search_fs_uuid|search_label|tar) + # included in boot image + ;; + affs|afs|afs_be|befs|befs_be|minix|nilfs2|sfs|zfs|zfsinfo) + # unnecessary filesystem modules + ;; + example_functional_test|functional_test|hello) + # other cruft + ;; + *) + cp -a "$x" "$outdir/boot/grub/$platform/" + ;; esac done diff --git a/scripts/build/installer_debian-installer b/scripts/build/installer_debian-installer index a0a3f5f1a..80655e67f 100755 --- a/scripts/build/installer_debian-installer +++ b/scripts/build/installer_debian-installer @@ -284,7 +284,7 @@ Download_file "${DESTDIR}"/"${INITRD_DI}" ${URL}/${DI_REMOTE_BASE}/initrd.gz DOWNLOAD_GTK_INSTALLER=0 if [ "${LB_DEBIAN_INSTALLER_GUI}" = "true" ] then - case "${LB_ARCHITECTURES}" in + case "${LB_ARCHITECTURES}" in amd64|i386) DOWNLOAD_GTK_INSTALLER=1 ;; @@ -598,8 +598,8 @@ then if [ -e "${LOCATION}" ] then grep -v "^#" "${LOCATION}/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/udeb_exclude" > exclude || true - grep -v "^#" "${LOCATION}/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/exclude-udebs" >> exclude || true - grep -v "^#" "${LOCATION}/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/exclude-udebs-${LB_ARCHITECTURES}" >> exclude || true + grep -v "^#" "${LOCATION}/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/exclude-udebs" >> exclude || true + grep -v "^#" "${LOCATION}/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/exclude-udebs-${LB_ARCHITECTURES}" >> exclude || true continue fi |