From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1YhwyN-0003nJ-Oz for mharc-grub-devel@gnu.org; Tue, 14 Apr 2015 05:17:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50093) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YhwyL-0003nD-LC for grub-devel@gnu.org; Tue, 14 Apr 2015 05:17:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YhwyI-0000HI-FG for grub-devel@gnu.org; Tue, 14 Apr 2015 05:17:33 -0400 Received: from mout.gmx.net ([212.227.15.18]:56244) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YhwyI-0000HB-5E for grub-devel@gnu.org; Tue, 14 Apr 2015 05:17:30 -0400 Received: from scdbackup.webframe.org ([79.192.89.235]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0Lz3rc-1ZU9tx3e5o-0149ZE; Tue, 14 Apr 2015 11:17:22 +0200 Date: Tue, 14 Apr 2015 11:16:57 +0200 From: "Thomas Schmitt" To: grub-devel@gnu.org Subject: Re: grub-mkrescue problems in argp_parse Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit References: <1020823566.14.1428996206628.JavaMail.open-xchange@ronja.mits.lan> In-Reply-To: <1020823566.14.1428996206628.JavaMail.open-xchange@ronja.mits.lan> Message-Id: <13382562688053446210@scdbackup.webframe.org> X-Provags-ID: V03:K0:W1Zf9R4l86LpSKJvrNy5R1CwG7ftv5WKW9quu6Rf5vFyIZfeN80 2LOMRqrAjBDdpQx+i4nGxFFdcjOy4CcDOeFuTKnTo4GA6g8Smyibp0sUXXvvgay9m8vEMpK 7QgI0YuoLr3AK0kIMbGaaI4n9dXeDoTrBY+BpJXK9abLeoLTcbDbZsMJtGrr1MP0QVXizzZ anNXPxLzAWc8tbZlc3J0w== X-UI-Out-Filterresults: notjunk:1; X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 212.227.15.18 Cc: dietmar@proxmox.com X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 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: Tue, 14 Apr 2015 09:17:34 -0000 Hi, Dietmar Maurer wrote: > It is quite easy to detect if there is a '--' in the argument list. > So you could disable magic code if you find '--'? It is about an unintended but actually beneficial change in the syntax of grub-mkrescue arguments. New grub-mkrescue.c interpreted and consumed the word '--', which the old grub-mkrescue just forwarded to xorriso. There it serves the important purpose to end the command -as which performs the mkisofs emulation. grub-mkrescue runs xorriso this way: xorriso -as mkisofs ...grub2.provided.mkisofs-ish.options... \ ...user.provided.arguments... I.e. the first user provided argument will be interpreted by xorriso as parameter of its command -as. The range of -as ends at the first '--' which xorriso encounters. Further arguments are interpreted by xorriso as commands and their parameters. (Which are more expressive and capable than mkisofs emulation.) I understand that Vladimir reverted the behavioral change on march 20, so that your run (without any generic xorriso commands) was intended to work fine by the old style: grub-mkrescue -o pve-cd.iso data-gz -z -r -V 'PVE' -c boot/boot.cat ... But there is another difference to old grub-mkrescue: The option to print the version string changed from -v to -V. With mkisofs (and its emulation), -v is rarely used. So it never mattered that old grub-mkrescue bailed out when seeing it. But -V is a frequently used mkisofs option. So grub-mkrescue.c should either become really compatible to its shell-based predecessor, or it should get a different name and use the new syntax, which clearly distinguishes between own options and xorriso arguments: grub-mkiso -o pve-cd.iso -- data-gz -z -r -V 'PVE' -c boot/boot.cat ... All arguments after the first '--' would get forwarded to xorriso without interpretation by grub-mkiso. The first '--' itself would not get forwarded to xorriso. Have a nice day :) Thomas