All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Thomas Schmitt" <scdbackup@gmx.net>
To: grub-devel@gnu.org
Cc: dietmar@proxmox.com
Subject: Re: grub-mkrescue problems in argp_parse
Date: Tue, 14 Apr 2015 11:16:57 +0200	[thread overview]
Message-ID: <13382562688053446210@scdbackup.webframe.org> (raw)
In-Reply-To: <1020823566.14.1428996206628.JavaMail.open-xchange@ronja.mits.lan>

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



  reply	other threads:[~2015-04-14  9:17 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <2037922098.114.1428942601173.JavaMail.open-xchange@ronja.mits.lan>
2015-04-13 17:06 ` grub-mkrescue problems in argp_parse Andrei Borzenkov
2015-04-13 17:16   ` Dietmar Maurer
2015-04-13 17:49     ` Andrei Borzenkov
2015-04-13 19:10       ` Thomas Schmitt
2015-04-14  7:23         ` Dietmar Maurer
2015-04-14  9:16           ` Thomas Schmitt [this message]
2015-04-14  9:58             ` Dietmar Maurer
2015-04-14 10:07             ` Dietmar Maurer
2015-04-14 10:34               ` Thomas Schmitt
2015-04-24 15:54       ` Vladimir 'φ-coder/phcoder' Serbinenko
2015-04-24 16:31         ` Thomas Schmitt
2015-04-29 14:05           ` Vladimir 'φ-coder/phcoder' Serbinenko
2015-04-29 16:42             ` Andrei Borzenkov
2015-04-29 16:57             ` Thomas Schmitt
2015-05-07 14:40               ` Vladimir 'φ-coder/phcoder' Serbinenko
2015-05-07 17:19                 ` Andrei Borzenkov
2015-05-07 18:41                   ` Thomas Schmitt
2015-05-07 18:19                 ` Thomas Schmitt
2015-04-24 17:14         ` Andrei Borzenkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=13382562688053446210@scdbackup.webframe.org \
    --to=scdbackup@gmx.net \
    --cc=dietmar@proxmox.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.