diff options
author | David P <megver83@parabola.nu> | 2021-12-28 18:00:18 -0300 |
---|---|---|
committer | David P <megver83@parabola.nu> | 2021-12-28 18:00:18 -0300 |
commit | 3a96fc770d96c548540768bcd062260db675eb9c (patch) | |
tree | fe3edc0fc191c9bcc8787a89bf9e4d7f654acbde /parabolaiso/mkparabolaiso | |
parent | 6d86add71432f5ecbdb65e13b652417cef752447 (diff) |
sync with archiso v59v59
archiso:
b8c9b9b (tag: v59) Merge remote-tracking branch 'origin/changelog/59'
12b31c8 Add changelog for v59
5476786 Merge remote-tracking branch 'deimosian/deimosian-master-patch-67154'
679bfc8 Fixes failure to retry script download. Tested and verified the issue is resolved.
2cbf5ab Merge remote-tracking branch 'tomty89/grub_refind'
2f88ba3 Add grub and refind back
6cd4a64 Merge remote-tracking branch 'nl6720/more-quiet'
a7f879f mkarchiso: use mkfs.erofs --quiet in quiet mode
8cfe290 mkarchiso: use mksquashfs -quiet instead of redirecting its stdout to /dev/null
009140b mkarchiso: do not show subdirectory sizes in netboot mode
5738f40 mkarchiso: redirect command -v output to /dev/null
ad6d65a mkarchiso: silence xorriso's note about SOURCE_DATE_EPOCH
d2addb2 mkarchiso: silence mkfs.fat in quiet mode
Signed-off-by: David P <megver83@parabola.nu>
Diffstat (limited to 'parabolaiso/mkparabolaiso')
-rwxr-xr-x | parabolaiso/mkparabolaiso | 38 |
1 files changed, 24 insertions, 14 deletions
diff --git a/parabolaiso/mkparabolaiso b/parabolaiso/mkparabolaiso index 38a5c6f..1c332ae 100755 --- a/parabolaiso/mkparabolaiso +++ b/parabolaiso/mkparabolaiso @@ -169,13 +169,10 @@ _cleanup_pacstrap_dir() { # Create a squashfs image and place it in the ISO 9660 file system. # $@: options to pass to mksquashfs _run_mksquashfs() { - local image_path="${isofs_dir}/${install_dir}/${arch}/airootfs.sfs" + local mksquashfs_options=() image_path="${isofs_dir}/${install_dir}/${arch}/airootfs.sfs" rm -f -- "${image_path}" - if [[ "${quiet}" == "y" ]]; then - mksquashfs "$@" "${image_path}" -noappend "${airootfs_image_tool_options[@]}" -no-progress > /dev/null - else - mksquashfs "$@" "${image_path}" -noappend "${airootfs_image_tool_options[@]}" - fi + [[ ! "${quiet}" == "y" ]] || mksquashfs_options+=('-no-progress' '-quiet') + mksquashfs "$@" "${image_path}" -noappend "${airootfs_image_tool_options[@]}" "${mksquashfs_options[@]}" } # Create an ext4 image containing the root file system and pack it inside a squashfs image. @@ -220,16 +217,18 @@ _mkairootfs_squashfs() { # Create an EROFS image containing the root file system and saves it on the ISO 9660 file system. _mkairootfs_erofs() { - local fsuuid + local fsuuid mkfs_erofs_options=() [[ -e "${pacstrap_dir}" ]] || _msg_error "The path '${pacstrap_dir}' does not exist" 1 install -d -m 0755 -- "${isofs_dir}/${install_dir}/${arch}" local image_path="${isofs_dir}/${install_dir}/${arch}/airootfs.erofs" rm -f -- "${image_path}" + [[ ! "${quiet}" == "y" ]] || mkfs_erofs_options+=('--quiet') # Generate reproducible file system UUID from SOURCE_DATE_EPOCH fsuuid="$(uuidgen --sha1 --namespace 93a870ff-8565-4cf3-a67b-f47299271a96 --name "${SOURCE_DATE_EPOCH}")" + mkfs_erofs_options+=('-U' "${fsuuid}" "${airootfs_image_tool_options[@]}") _msg_info "Creating EROFS image, this may take some time..." - mkfs.erofs -U "${fsuuid}" "${airootfs_image_tool_options[@]}" -- "${image_path}" "${pacstrap_dir}" + mkfs.erofs "${mkfs_erofs_options[@]}" -- "${image_path}" "${pacstrap_dir}" _msg_info "Done!" } @@ -524,7 +523,13 @@ _make_efibootimg() { # https://lists.gnu.org/archive/html/grub-devel/2019-04/msg00099.html rm -f -- "${work_dir}/efiboot.img" _msg_info "Creating FAT image of size: ${imgsize} KiB..." - mkfs.fat -C -n PARAISO_EFI "${work_dir}/efiboot.img" "${imgsize}" + if [[ "${quiet}" == "y" ]]; then + # mkfs.fat does not have a -q/--quiet option, so redirect stdout to /dev/null instead + # https://github.com/dosfstools/dosfstools/issues/103 + mkfs.fat -C -n PARAISO_EFI "${work_dir}/efiboot.img" "${imgsize}" > /dev/null + else + mkfs.fat -C -n PARAISO_EFI "${work_dir}/efiboot.img" "${imgsize}" + fi # Create the default/fallback boot path in which a boot loaders will be placed later. mmd -i "${work_dir}/efiboot.img" ::/EFI ::/EFI/BOOT @@ -843,7 +848,7 @@ _export_netboot_artifacts() { install -d -m 0755 "${out_dir}" cp -a -- "${isofs_dir}/${install_dir}/" "${out_dir}/" _msg_info "Done!" - du -h -- "${out_dir}/${install_dir}" + du -hs -- "${out_dir}/${install_dir}" } # sign build artifacts for netboot @@ -882,7 +887,7 @@ _validate_requirements_airootfs_image_type_ext4+squashfs() { } _validate_requirements_airootfs_image_type_erofs() { - if ! command -v mkfs.erofs; then + if ! command -v mkfs.erofs &> /dev/nul; then (( validation_error=validation_error+1 )) _msg_error "Validating '${airootfs_image_type}': mkfs.erofs is not available on this host. Install 'erofs-utils'!" 0 fi @@ -1243,12 +1248,17 @@ _build_bootstrap_image() { # Build ISO _build_iso_image() { - local xorrisofs_options=() + local xorriso_options=() xorrisofs_options=() local bootmode [[ -d "${out_dir}" ]] || install -d -- "${out_dir}" - [[ "${quiet}" == "y" ]] && xorrisofs_options+=('-quiet') + if [[ "${quiet}" == "y" ]]; then + # The when xorriso is run in mkisofs compatibility mode (xorrisofs), the mkisofs option -quiet is interpreted + # too late (e.g. messages about SOURCE_DATE_EPOCH still get shown). + # Instead use native xorriso option to silence the output. + xorriso_options=('-report_about' 'SORRY' "${xorriso_options[@]}") + fi # Add required xorrisofs options for each boot mode for bootmode in "${bootmodes[@]}"; do @@ -1257,7 +1267,7 @@ _build_iso_image() { rm -f -- "${out_dir}/${image_name}" _msg_info "Creating ISO image..." - xorriso -as mkisofs \ + xorriso "${xorriso_options[@]}" -as mkisofs \ -iso-level 3 \ -full-iso9660-filenames \ -joliet \ |