summaryrefslogtreecommitdiffstats
path: root/master/debian/mkrescue_diet.patch
diff options
context:
space:
mode:
Diffstat (limited to 'master/debian/mkrescue_diet.patch')
-rw-r--r--master/debian/mkrescue_diet.patch54
1 files changed, 54 insertions, 0 deletions
diff --git a/master/debian/mkrescue_diet.patch b/master/debian/mkrescue_diet.patch
new file mode 100644
index 0000000..57246b2
--- /dev/null
+++ b/master/debian/mkrescue_diet.patch
@@ -0,0 +1,54 @@
+Description: Allow reducing size of xorriso-created rescue images
+ This lets us create smaller images that will fit on floppy disks. It has
+ been approved by the upstream maintainer but has not yet been applied.
+Author: Thomas Schmitt <scdbackup@gmx.net>
+Origin: other, http://lists.gnu.org/archive/html/grub-devel/2010-05/msg00100.html
+Forwarded: yes
+Last-Update: 2010-06-02
+
+Index: b/util/grub-mkrescue.in
+===================================================================
+--- a/util/grub-mkrescue.in
++++ b/util/grub-mkrescue.in
+@@ -44,6 +44,7 @@
+ grub_mkimage=${bindir}/`echo grub-mkimage | sed ${transform}`
+
+ xorriso=xorriso
++diet=no
+
+ # Usage: usage
+ # Print the usage.
+@@ -59,6 +60,7 @@
+ --rom-directory=DIR save rom images in DIR [optional]
+ --xorriso=FILE use FILE as xorriso [optional]
+ --grub-mkimage=FILE use FILE as grub-mkimage
++ --diet apply size reducing measures [optional]
+
+ $self generates a bootable rescue image with specified source files, source
+ directories, or mkisofs options listed by: xorriso -as mkisofs -help
+@@ -133,6 +135,9 @@
+ --xorriso=*)
+ xorriso=`echo "${option}/" | sed 's/--xorriso=//'` ;;
+
++ --diet)
++ diet=yes ;;
++
+ *)
+ source="${source} ${option} $@"; break ;;
+ esac
+@@ -307,7 +312,14 @@
+ fi
+
+ # build iso image
+-"${xorriso}" -as mkisofs -graft-points ${grub_mkisofs_arguments} --protective-msdos-label -o ${output_image} -r ${iso9660_dir} --sort-weight 0 / --sort-weight 1 /boot ${source}
++if [ "${diet}" = yes ]; then
++ if [ -e "${output_image}" ]; then
++ rm "${output_image}" || exit 1
++ fi
++ "${xorriso}" -report_about HINT -as mkisofs -graft-points -no-pad ${grub_mkisofs_arguments} --protective-msdos-label -r ${iso9660_dir} --sort-weight 0 / --sort-weight 1 /boot ${source} | cat >"${output_image}"
++else
++ "${xorriso}" -report_about HINT -as mkisofs -graft-points ${grub_mkisofs_arguments} --protective-msdos-label -o ${output_image} -r ${iso9660_dir} --sort-weight 0 / --sort-weight 1 /boot ${source}
++fi
+ rm -rf ${iso9660_dir}
+
+ rm -f ${embed_img}