From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1OF25S-0005kU-G2 for mharc-grub-devel@gnu.org; Thu, 20 May 2010 05:30:42 -0400 Received: from [140.186.70.92] (port=47086 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OF25P-0005kO-KL for grub-devel@gnu.org; Thu, 20 May 2010 05:30:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OF25N-00035w-Gv for grub-devel@gnu.org; Thu, 20 May 2010 05:30:39 -0400 Received: from mail.gmx.net ([213.165.64.20]:36728) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OF25N-00035Y-6J for grub-devel@gnu.org; Thu, 20 May 2010 05:30:37 -0400 Received: (qmail 17770 invoked by uid 0); 20 May 2010 09:30:35 -0000 Received: from 212.46.126.165 by www061.gmx.net with HTTP; Thu, 20 May 2010 11:30:33 +0200 (CEST) Content-Type: multipart/mixed; boundary="========GMX88111274347833133980" Date: Thu, 20 May 2010 11:30:33 +0200 From: "Thomas Schmitt" Message-ID: <20100520093033.88110@gmx.net> MIME-Version: 1.0 To: grub-devel@gnu.org X-Authenticated: #2145628 X-Flags: 0001 X-Mailer: WWW-Mail 6100 (Global Message Exchange) X-Priority: 3 X-Provags-ID: V01U2FsdGVkX1/4nHgMLOH4YEXj9E/gK5TDJrZr7pg3lXpCJEqbZ0 ycZI4Se8xe9OWZmg9hNWA9S5wUSSh86rC9tA== X-GMX-UID: CzjGc14WMmA6XjfRS2FnyGE5MjQ1N52t X-FuHaFi: 0.56000000000000005 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Subject: Re: Migrations to xorriso X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2010 09:30:41 -0000 --========GMX88111274347833133980 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Hi, attached is an updated patch to summarize my current proposal for grub-mkrescue. My reply to mails of Vladimir and Seth seems still stuck in eggs.gnu.org. (At least that was the culprit last time.) The current proposal follows Vladimir's idea: > I'm thinking to allow passing arbitrary options to xorriso by just > putting it on command line. It would give the user control over option -no-pad (saves 300 kB) and allow to switch from mkisofs emulation to the native xorriso command set. ----------------------------------------------- New ponderings: ----------------------------------------------- The following statement in the proposed help text is due to the way how extra arguments are handled via variable $source: "Be aware that source paths must be single words. Quotation marks will not work." If grub-mkrescue options would be prescribed to precede any source paths or xorriso options, then we could use a while loop, shift and "$@", rather than a for loop and ${source}. while test -n "$1"; do case "$1" in ... --modules=*) modules=`echo "$1" | sed 's/--modules=//'` shift ;; ... *) break ;; esac done ... ${xorriso} ... "$@" This would be safe for nearly all filenames. (Newlines are still not allowed then.) Question is whether support for apple-ish file names is worth a change in the rules for grub-mkrescue. Have a nice day :) Thomas -- GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 --========GMX88111274347833133980 Content-Type: text/x-patch; charset="iso-8859-15"; name="grub-mkrescue.in.ts2.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="grub-mkrescue.in.ts2.patch" --- grub-mkrescue.in 2010-05-18 10:02:06.000000000 +0200 +++ grub-mkrescue.in.ts2 2010-05-20 09:34:56.000000000 +0200 @@ -38,6 +38,8 @@ efi32_dir=${libdir}/$(echo ${PACKAGE_TAR efi64_dir=${libdir}/$(echo ${PACKAGE_TARNAME} | sed ${transform})/x86_64-efi rom_directory= +xorriso=xorriso + # Usage: usage # Print the usage. usage () { @@ -50,10 +52,15 @@ Make GRUB rescue image. --output=FILE save output in FILE [required] --modules=MODULES pre-load specified modules MODULES --rom-directory=DIR save rom images in DIR [optional] + --xorriso=PROGFILE use PROGFILE as xorriso program [optional] -$0 generates a bootable rescue image with specified source files or directories. +$0 generates a bootable rescue image with specified source files, source +directories, or mkisofs options listed by: xorriso -as mkisofs -help +Option -- switches to native xorriso command mode. +Be aware that source paths must be single words. Quotation marks will not work. Report bugs to . +Mail xorriso support requests to . EOF } @@ -78,11 +85,8 @@ for option in "$@"; do PATH=${override_dir}:$PATH export PATH ;; - -*) - echo "Unrecognized option \`$option'" 1>&2 - usage - exit 1 - ;; + --xorriso=*) + xorriso=`echo "${option}/" | sed 's/--xorriso=//'` ;; *) source="${source} ${option}" ;; esac @@ -254,7 +258,12 @@ if [ -e "${iso9660_dir}/boot/coreboot.el fi # build iso image -xorriso -pathspecs on -as mkisofs ${grub_mkisofs_arguments} --protective-msdos-label -o ${output_image} -r ${iso9660_dir} ${source} +"${xorriso}" -report_about HINT -as mkisofs -graft-points \ + ${grub_mkisofs_arguments} --protective-msdos-label -r \ + --sort-weight 0 / --sort-weight 1 /boot \ + -o "${output_image}" \ + ${iso9660_dir} ${source} + rm -rf ${iso9660_dir} rm -f ${embed_img} --========GMX88111274347833133980--