Bug#741656: grub-common: grub-mkrescue lost its -J flag, d-i now FTBFS on kfreebsd-*

Thomas Schmitt scdbackup at gmx.net
Sun Mar 16 09:01:30 UTC 2014


Hi,

Steven Chamberlain:
> I'm unfamiliar with xorriso but the man page mentions "-joliet on"

The problem is that argument "--" marks the end of the parameter
list of xorriso command "-as mkisofs".
Both versions of grub-mkrescue start xorriso with that command and
use mkisofs-ish options to define the job.

The old (bash) one does not interpret "--" by itself, but appends
it to the xorriso arguments. So xorriso leaves mkisofs emulation
and does not understand mkisofs option -J any more.

The new (C language) grub-mkrescue takes "--" as reason to append
all following arguments to the xorriso argument list. It consumes
this first "--". So xorriso stays in mkisofs emulation and
understands -J.


Cyril Brulebois:
> | grub-mkrescue: invalid option -- 'J'

This is the new grub-mkresue. It complains because there is no "--"
which indicates the start of options to be forwarded to xorriso.

> | xorriso : FAILURE : Not a known command:  '-J'

This is when the old one fowarded both "--" and "-J".


Colin Watson:
> (We've talked about changing the
> behaviour back upstream, but the thread petered out a bit and I don't
> believe it's done yet.)

We seem to wait for Vladimir Serbinenko to decide whether he wants
to unify the CLIs of some tools and thus really break the CLI of
grub-mkrescue.

If the decision is made in favor of CLI change, then the new
grub-mkrescue should get means to tell its boss scripts that the
new behavior is active.
Again, it would be up to Vladimir to officially define that indicator.


Currently i see no fully satisfying way to consistently use both
grub-mkrescue versions by the same shell command line.

At most one could ensure that xorriso interprets all its user
provided arguments as native commands. This would be achieved by
prepending "--" "--" to the user arguments:

  grub-mkrescue ... -- -- -joliet on ...

Old grub-mkrescue would execute:

  xorriso -as mkisofs ...args.from.mkrescue... -- -- -joliet on ...

The orphan "--" will be silently ignored by xorriso.

New grub-mkrescue would execute:

  xorriso -as mkisofs ...args.from.mkrescue... -- -joliet on ...

xorriso commands are documented in man xorriso. If you want to
stay with man xorrisofs, you may run a second "-as mkisofs"
command to enable interpretation of mkisofs-ish options:

  grub-mkrescue ... -- -- -as mkisofs -J ...

Nevertheless, the end of the first "-as mkisofs" triggers some
processing of its mkisofs options. This can create interesting
stumblestones.
Enabling Joliet production is not such a stumblestone, though.
Adding a few files should be ok too. (In native mode, use -add.)


Have a nice day :)

Thomas



More information about the Pkg-grub-devel mailing list