"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "frontend/grub-mkrescue-sed.sh" between
xorriso-1.4.6.tar.gz and xorriso-1.4.8.tar.gz

About: GNU xorriso creates, loads, manipulates and writes ISO 9660 filesystem images with Rock Ridge extensions. It is suitable for incremental data backup and for production of bootable ISO 9660 images. GNU xorriso is a statical compilation of the libraries libburn, libisofs, libisoburn, and libjte.

grub-mkrescue-sed.sh  (xorriso-1.4.6):grub-mkrescue-sed.sh  (xorriso-1.4.8)
skipping to change at line 29 skipping to change at line 29
# It will manipulate the xorriso arguments before they get executed by a # It will manipulate the xorriso arguments before they get executed by a
# xorriso program. Default is the neighboring ../../xorriso/xorriso program or, # xorriso program. Default is the neighboring ../../xorriso/xorriso program or,
# if that neighbor cannot be found, the system-wide installed xorriso. # if that neighbor cannot be found, the system-wide installed xorriso.
# #
# The mode "mjg" implements a layout which resembles Fedora LiveCD and Debian # The mode "mjg" implements a layout which resembles Fedora LiveCD and Debian
# ISOs which are bootable by ISOLINUX for BIOS and GRUB2 for EFI. # ISOs which are bootable by ISOLINUX for BIOS and GRUB2 for EFI.
# Its GPT is considered to be surplus, according to UEFI specs. # Its GPT is considered to be surplus, according to UEFI specs.
# #
# The mode "mbr_only" implements an alternative layout according to UEFI 2.4, # The mode "mbr_only" implements an alternative layout according to UEFI 2.4,
# section 2.5.1 and table 16. No GTP, HFS+, or APM. # section 2.5.1 and table 16. No GTP, HFS+, or APM.
# This mode produces a mountable ISO 9660 partition 1 only if variable
# MKRESCUE_SED_PROTECTIVE is empty or set to "no".
# #
# The mode "mbr_hfs" is like "mbr_only" but with HFS+ mentioned in APM. # The mode "mbr_hfs" is like "mbr_only" but with HFS+ mentioned in APM.
# It is still compliant to UEFI with no potentially deceiving GPT. # It is still compliant to UEFI with no potentially deceiving GPT.
# If you add xorrisofs option -part_like_isohybrid then no gap fillig APM # If you add xorrisofs option -part_like_isohybrid then no gap fillig APM
# partition will emerge. # partition will emerge.
# #
# Mode "gpt_appended" represents the same layout as "mbr_only" by GPT rather
# than by MBR partition table. It differs from "original" by the fact that
# option -partition_offset 16 is implied and that the first partition may
# be used to mount the ISO 9660 filesystem. MKRESCUE_SED_PROTECTIVE is ignored,
# because neat GPT is indicated by the existence of a Protective MBR.
#
# These modes avoid duplicate storing of the EFI system partition "efi.img" # These modes avoid duplicate storing of the EFI system partition "efi.img"
# by xorrisofs option -e "--interval:appended_partition_${partno}:all::" # by xorrisofs option -e "--interval:appended_partition_${partno}:all::"
# which is new to xorriso-1.4.3 with timestamp after 2015.12.30.175951. # which is new to xorriso-1.4.4.
# If "_copy" is appended to the mode name, then the file /efi.img will # If "_copy" is appended to the mode name, then the file /efi.img will
# appear in the ISO 9660 filesystem and traditional -e "/efi.img" is used. # appear in the ISO 9660 filesystem and traditional -e "/efi.img" is used.
# #
# "mbr_only_copy" is supposed to work with unmodified xorriso >= 1.3.2 # "mbr_only_copy" is supposed to work with unmodified xorriso >= 1.3.2
# #
# Variation settings # Variation settings
# #
# The environment variables MKRESCUE_SED_* override the following # The environment variables MKRESCUE_SED_* override the following
# default settings: # default settings:
# Manipulation mode: # Manipulation mode:
# "mjg" = ESP in MBR+GPT+APM, with HFS+ # "mjg" = ESP in MBR+GPT+APM, with HFS+
# "mbr_only" = ESP in MBR, without HFS+ # "mbr_only" = ESP in MBR, without HFS+
# "mbr_hfs" = ESP in MBR, HFS+ in APM # "mbr_hfs" = ESP in MBR, HFS+ in APM
# "gpt_appended" = ESP in GPT, without HFS+
# $mode"_copy" = one of above modes, ESP in ISO and as appended partition # $mode"_copy" = one of above modes, ESP in ISO and as appended partition
# "original" = pass arguments unchanged # "original" = pass arguments unchanged
mode="mjg" mode="mbr_only"
if test -n "$MKRESCUE_SED_MODE" if test -n "$MKRESCUE_SED_MODE"
then then
mode="$MKRESCUE_SED_MODE" mode="$MKRESCUE_SED_MODE"
fi fi
# First argument of -append_partition with mode "mjg". Values: 1 or 2. # First argument of -append_partition with mode "mjg". Values: 1 or 2.
partno=1 partno=1
if test -n "$MKRESCUE_SED_PARTNO" if test -n "$MKRESCUE_SED_PARTNO"
then then
partno="$MKRESCUE_SED_PARTNO" partno="$MKRESCUE_SED_PARTNO"
fi fi
# Replacement for option --protective-msdos-label. Either itself or empty text. # Replacement for option --protective-msdos-label. Either itself or empty text.
# If the environment variable contains the word "no", this means empty. # If the environment variable contains the word "no", this means empty.
protective="--protective-msdos-label" protective=""
if test -n "$MKRESCUE_SED_PROTECTIVE" if test -n "$MKRESCUE_SED_PROTECTIVE"
then then
if test x"$MKRESCUE_SED_PROTECTIVE" = xno if test x"$MKRESCUE_SED_PROTECTIVE" = xno
then then
protective="" protective=""
elif test x"$MKRESCUE_SED_PROTECTIVE" = xyes elif test x"$MKRESCUE_SED_PROTECTIVE" = xyes
then then
protective="--protective-msdos-label" protective="--protective-msdos-label"
else else
protective="$MKRESCUE_SED_PROTECTIVE" protective="$MKRESCUE_SED_PROTECTIVE"
skipping to change at line 138 skipping to change at line 147
echo "##### Begin of received arguments" >&2 echo "##### Begin of received arguments" >&2
echo "$0" >&2 echo "$0" >&2
for i in "$@" for i in "$@"
do do
echo "$i" >&2 echo "$i" >&2
done done
echo "##### End of received arguments" >&2 echo "##### End of received arguments" >&2
echo >&2 echo >&2
fi fi
# Check for option -iso_mbr_part_type which is new in 1.4.8
iso_mbr_part_type=
if "$xorriso" -as mkisofs -help 2>&1 | grep iso_mbr_part_type >/dev/null
then
iso_mbr_part_type="-iso_mbr_part_type 0x00"
fi
# Look for the name of the /tmp directory with the GRUB2 files. # Look for the name of the /tmp directory with the GRUB2 files.
# It is the next argument after -r. But as default accept any /tmp/grub.* # It is the next argument after -r. But as default accept any /tmp/grub.*
next_is_dir=0 next_is_dir=0
dir="." dir="."
for i in "$@" for i in "$@"
do do
if test x"$i" = x"-r" if test x"$i" = x"-r"
then then
next_is_dir=1 next_is_dir=1
elif test $next_is_dir = 1 elif test $next_is_dir = 1
skipping to change at line 196 skipping to change at line 212
-e "s/--efi-boot efi\.img/-eltorito-alt-boot -e efi.img -no-emul-boot -isohy brid-gpt-basdat/" \ -e "s/--efi-boot efi\.img/-eltorito-alt-boot -e efi.img -no-emul-boot -isohy brid-gpt-basdat/" \
-e "s/--protective-msdos-label/$protective -part_like_isohybrid/" \ -e "s/--protective-msdos-label/$protective -part_like_isohybrid/" \
) )
elif test x"$mode" = xmbr_only elif test x"$mode" = xmbr_only
then then
# Exchange arguments for no-HFS MBR-only layout # Exchange arguments for no-HFS MBR-only layout
efi_tmp_name=grub-mkrescue-sed-efi-img.$$ efi_tmp_name=grub-mkrescue-sed-efi-img.$$
mv "$dir"/efi.img /tmp/$efi_tmp_name mv "$dir"/efi.img /tmp/$efi_tmp_name
x=$(echo " $*" | sed \ x=$(echo " $*" | sed \
-e "s/-efi-boot-part --efi-boot-image/-no-pad -append_partition 2 0xef \/tmp \/$efi_tmp_name/" \ -e "s/-efi-boot-part --efi-boot-image/$iso_mbr_part_type -no-pad -append_par tition 2 0xef \/tmp\/$efi_tmp_name/" \
-e "s/--efi-boot efi\.img/-eltorito-alt-boot -e --interval:appended_partitio n_2:all:: -no-emul-boot/" \ -e "s/--efi-boot efi\.img/-eltorito-alt-boot -e --interval:appended_partitio n_2:all:: -no-emul-boot/" \
-e "s/-hfsplus .*CoreServices\/boot.efi//" \ -e "s/-hfsplus .*CoreServices\/boot.efi//" \
-e "s/--protective-msdos-label/$protective/" \ -e "s/--protective-msdos-label/$protective/" \
) )
elif test x"$mode" = xmbr_only_copy elif test x"$mode" = xmbr_only_copy
then then
# Exchange arguments for no-HFS MBR-only layout # Exchange arguments for no-HFS MBR-only layout
x=$(echo " $*" | sed \ x=$(echo " $*" | sed \
-e "s/-efi-boot-part --efi-boot-image/-no-pad -append_partition 2 0xef \/tmp \/$(basename "$dir")\/efi.img/" \ -e "s/-efi-boot-part --efi-boot-image/$iso_mbr_part_type -no-pad -append_par tition 2 0xef \/tmp\/$(basename "$dir")\/efi.img/" \
-e "s/-hfsplus .*CoreServices\/boot.efi//" \ -e "s/-hfsplus .*CoreServices\/boot.efi//" \
-e "s/--protective-msdos-label/$protective/" \ -e "s/--protective-msdos-label/$protective/" \
) )
elif test x"$mode" = xmbr_hfs elif test x"$mode" = xmbr_hfs
then then
# Exchange arguments for MBR and HFS+ layout # Exchange arguments for MBR and HFS+ layout
efi_tmp_name=grub-mkrescue-sed-efi-img.$$ efi_tmp_name=grub-mkrescue-sed-efi-img.$$
mv "$dir"/efi.img /tmp/$efi_tmp_name mv "$dir"/efi.img /tmp/$efi_tmp_name
x=$(echo " $*" | sed \ x=$(echo " $*" | sed \
-e "s/-efi-boot-part --efi-boot-image/-no-pad -append_partition 2 0xef \/tmp \/$efi_tmp_name/" \ -e "s/-efi-boot-part --efi-boot-image/$iso_mbr_part_type -no-pad -append_par tition 2 0xef \/tmp\/$efi_tmp_name/" \
-e "s/--efi-boot efi\.img/-eltorito-alt-boot -e --interval:appended_partitio n_2:all:: -no-emul-boot/" \ -e "s/--efi-boot efi\.img/-eltorito-alt-boot -e --interval:appended_partitio n_2:all:: -no-emul-boot/" \
-e "s/--protective-msdos-label/$protective/" \ -e "s/--protective-msdos-label/$protective/" \
) )
elif test x"$mode" = xmbr_hfs_copy elif test x"$mode" = xmbr_hfs_copy
then then
# Exchange arguments for MBR and HFS+ layout # Exchange arguments for MBR and HFS+ layout
x=$(echo " $*" | sed \ x=$(echo " $*" | sed \
-e "s/-efi-boot-part --efi-boot-image/-no-pad -append_partition 2 0xef \/tmp \/$(basename "$dir")\/efi.img/" \ -e "s/-efi-boot-part --efi-boot-image/$iso_mbr_part_type -no-pad -append_par tition 2 0xef \/tmp\/$(basename "$dir")\/efi.img/" \
-e "s/--protective-msdos-label/$protective/" \ -e "s/--protective-msdos-label/$protective/" \
) )
elif test x"$mode" = xgpt_appended
then
# Exchange arguments for no-HFS MBR-only layout
efi_tmp_name=grub-mkrescue-sed-efi-img.$$
mv "$dir"/efi.img /tmp/$efi_tmp_name
x=$(echo " $*" | sed \
-e "s/-efi-boot-part --efi-boot-image/-no-pad -append_partition 2 0xef \/tmp
\/$efi_tmp_name -appended_part_as_gpt -partition_offset 16/" \
-e "s/--efi-boot efi\.img/-eltorito-alt-boot -e --interval:appended_partitio
n_2:all:: -no-emul-boot/" \
-e "s/-hfsplus .*CoreServices\/boot.efi//" \
)
elif test x"$mode" = xgpt_appended_copy
then
# Exchange arguments for no-HFS MBR-only layout
x=$(echo " $*" | sed \
-e "s/-efi-boot-part --efi-boot-image/-no-pad -append_partition 2 0xef \/tmp
\/$(basename "$dir")\/efi.img -appended_part_as_gpt -partition_offset 16/" \
-e "s/-hfsplus .*CoreServices\/boot.efi//" \
)
elif test x"$mode" = xoriginal elif test x"$mode" = xoriginal
then then
# Pass arguments unchanged # Pass arguments unchanged
x=" $*" x=" $*"
else else
echo >&2 echo >&2
echo "$0 : FATAL : Unknown manipulation mode '$mode'." >&2 echo "$0 : FATAL : Unknown manipulation mode '$mode'." >&2
echo >&2 echo >&2
exit 1 exit 1
 End of changes. 12 change blocks. 
7 lines changed or deleted 45 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)