diff -ru grub-2.02~beta2.orig/docs/grub.texi grub-2.02~beta2/docs/grub.texi --- grub-2.02~beta2.orig/docs/grub.texi 2013-12-24 11:40:31.000000000 -0500 +++ grub-2.02~beta2/docs/grub.texi 2016-04-27 09:54:30.509534095 -0400 @@ -6145,6 +6145,12 @@ @item address@hidden Use @var{file} as the @command{grub-mkimage} program, rather than the built-in default. + address@hidden --no-xorrisofs-r +Do not silently pass a -r flag to the @command{xorrisofs} program by +default. Instead, allow the Rock Ridge features of the ISO image to +be determined entirely by user-specified arguments explictly passed to +the @command{xorrisofs} program on the command line. @end table diff -ru grub-2.02~beta2.orig/util/grub-mkrescue.c grub-2.02~beta2/util/grub-mkrescue.c --- grub-2.02~beta2.orig/util/grub-mkrescue.c 2013-12-24 11:40:31.000000000 -0500 +++ grub-2.02~beta2/util/grub-mkrescue.c 2016-04-27 09:42:13.557879749 -0400 @@ -51,6 +52,7 @@ static char **xorriso_argv; static char *iso_uuid; static char *iso9660_dir; +static int no_xorrisofs_r = 0; static void xorriso_push (const char *val) @@ -88,7 +90,8 @@ OPTION_PRODUCT_NAME, OPTION_PRODUCT_VERSION, OPTION_SPARC_BOOT, - OPTION_ARCS_BOOT + OPTION_ARCS_BOOT, + OPTION_ROCK_RIDGE_MODE }; static struct argp_option options[] = { @@ -102,6 +105,7 @@ 0, N_("use FILE as xorriso [optional]"), 2}, {"grub-glue-efi", OPTION_GLUE_EFI, N_("FILE"), OPTION_HIDDEN, 0, 2}, {"grub-render-label", OPTION_RENDER_LABEL, N_("FILE"), OPTION_HIDDEN, 0, 2}, + {"no-xorrisofs-r", OPTION_ROCK_RIDGE_MODE, 0, 0, N_("omit default -r flag to xorriso"), 2}, {"label-font", OPTION_LABEL_FONT, N_("FILE"), 0, N_("use FILE as font for label"), 2}, {"label-color", OPTION_LABEL_COLOR, N_("COLOR"), 0, N_("use COLOR for label"), 2}, {"label-bgcolor", OPTION_LABEL_BGCOLOR, N_("COLOR"), 0, N_("use COLOR for label background"), 2}, @@ -156,6 +160,9 @@ return 0; switch (key) { + case OPTION_ROCK_RIDGE_MODE: + no_xorrisofs_r = 1; + return 0; case OPTION_OUTPUT: free (output_image); output_image = xstrdup (arg); @@ -843,7 +850,13 @@ xorriso_push ("--protective-msdos-label"); xorriso_push ("-o"); xorriso_push (output_image); - xorriso_push ("-r"); + if (! no_xorrisofs_r) { + /* Do not gratuitously suppress full Rock Ridge ownership and + permission information in the final ISO image. If the + --no-xorrisofs-r option is set, then do not pass a lowercase + "-r" flag to xorriso by default. */ + xorriso_push ("-r"); + } xorriso_push (iso9660_dir); xorriso_push ("--sort-weight"); xorriso_push ("0");