New -as mkisofs option -rr_reloc, implemented option -hide-rr-moved

This commit is contained in:
Thomas Schmitt 2012-03-12 18:09:25 +00:00
parent 6f82a11e6f
commit f58cad95de
5 changed files with 211 additions and 44 deletions

View File

@ -598,6 +598,7 @@ int Xorriso_genisofs_count_args(struct XorrisO *xorriso, int argc, char **argv,
"--stdio_sync", "--quoted_path_list", "--efi-boot", "--embedded-boot",
"-isohybrid-mbr", "-e", "-partition_offset", "-partition_hd_cyl",
"-partition_sec_hd", "-partition_cyl_align", "-untranslated_name_len",
"-rr_reloc_dir",
""
};
static char arg2_options[][41]= {
@ -650,8 +651,8 @@ int Xorriso_genisofs_ignore(struct XorrisO *xorriso, char *whom,
/* mkisofs 2.01 options which are not scheduled for implementation, yet */
static char ignored_arg0_options[][41]= {
"-allow-leading-dots", "-ldots", "-allow-multidot",
"-cache-inodes", "-no-cache-inodes", "-check-oldnames", "-D",
"-disable-deep-relocation", "-hide-rr-moved",
"-cache-inodes", "-no-cache-inodes", "-check-oldnames",
"-disable-deep-relocation",
"-L", "-nobak",
"-no-bak", "-force-rr", "-relaxed-filenames", "-T",
"-no-iso-translate",
@ -726,6 +727,10 @@ int Xorriso_genisofs_help(struct XorrisO *xorriso, int flag)
" -l, -full-iso9660-filenames Allow full 31 character filenames for ISO9660 names",
" -max-iso9660-filenames Allow 37 character filenames for ISO9660 names (violates ISO9660)",
" -N, -omit-version-number Omit version number from ISO9660 filename (violates ISO9660)",
" -D, -disable-deep-relocation",
" Disable deep directory relocation (violates ISO9660)",
" -hide-rr-moved Relocate deep directories to /.rr_moved",
" -rr_reloc_dir NAME Set deep directory relocation target in root",
" -o FILE, -output FILE Set output file name",
" -m GLOBFILE, -exclude GLOBFILE",
" Exclude file name",
@ -956,7 +961,7 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
char *ept, *add_pt, *eff_path= NULL, *indev= NULL, msc[80], *cpt;
char *old_root= NULL, *argpt, *hargv[1];
char *boot_path, partno_text[8], *iso_rr_pt, *disk_pt, *rpt, *wpt;
char *rm_merge_args[3];
char *rm_merge_args[3], *rr_reloc_dir_pt= NULL;
/* >>> This should not be static. Why is it ? */
static char *sort_weight_args[4]= {"", "-exec", "sort_weight", ""};
@ -1626,6 +1631,35 @@ not_enough_args:;
} else if(strcmp(argpt, "--no_rc")==0) {
/* was already handled in Xorriso_prescan_args */;
} else if(strcmp(argpt, "-D") == 0 ||
strcmp(argpt, "-disable-deep-relocation") == 0) {
ret= Xorriso_option_compliance(xorriso, "deep_paths", 0);
if(ret <= 0)
goto problem_handler_2;
} else if(strcmp(argpt, "-hide-rr-moved") == 0) {
rr_reloc_dir_pt= ".rr_moved";
goto rr_reloc_dir;
} else if(strcmp(argpt, "-rr_reloc_dir") == 0) {
i++;
rr_reloc_dir_pt= argv[i];
rr_reloc_dir:;
if(rr_reloc_dir_pt[0] == '/')
rr_reloc_dir_pt++;
if(strchr(rr_reloc_dir_pt, '/') != NULL) {
sprintf(xorriso->info_text,
"-as %s -rr_reloc_dir %s : May only use directories in root directory",
whom, Text_shellsafe(argv[i], sfe, 0));
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE",0);
}
ret= Xorriso_option_rr_reloc_dir(xorriso, rr_reloc_dir_pt, 0);
if(ret <= 0)
goto problem_handler_2;
ret= Xorriso_option_compliance(xorriso, "deep_paths_off", 0);
if(ret <= 0)
goto problem_handler_2;
} else if(argpt[0]=='-' && argpt[1]!=0) {
hargv[0]= argpt;
ret= Xorriso_genisofs_count_args(xorriso, argc - i, hargv, &count, 1);

View File

@ -1 +1 @@
#define Xorriso_timestamP "2012.03.11.164130"
#define Xorriso_timestamP "2012.03.12.180937"

View File

@ -9,7 +9,7 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH XORRISOFS 1 "Version 1.2.1, Jan 27, 2012"
.TH XORRISOFS 1 "Version 1.2.1, Mar 12, 2012"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@ -492,6 +492,45 @@ Remove s\-bit and t\-bit.
\fB\-rational-rock\fR
Alias of \-r.
.TP
\fB\-D\fR
The standard ECMA\-119 demands that no path in the image shall have more
than 8 name components. Therefore it would be necessary to move deeper
directory trees to a higher directory. Rock Ridge offers an opportunity to
let these relocated directories appear at their orginal deep position, but
this feature might not be implemented properly by operating systems which
mount the image.
.br
Option \-D disables this deep directory relocation, and thus violates
ISO 9660 specs.
.br
xorrisofs has \-D set by default. It may get overridden by option \-rr_reloc_dir
or by option \-hide\-rr\-moved, and it may override said options. The last one
in the option list wins.
.TP
\fB\-disable-deep-relocation\fR
Alias of \-D.
.TP
\fB\-rr_reloc_dir\fR name
Enable the relocation of deep directories and thus avoid ECMA\-119 file paths
of more than 8 name components. Directories of depth 8 will get moved to a
directory in the root directory of the image. Its name gets set by this option.
It is permissible to use the root directory itself.
.br
The overall directory tree will appear originally deep when interpreted as
Rock Ridge tree. It will appear as re\-arranged if only ECMA\-119 information
is considered.
.br
If the given relocation target directory does not already exist when image
production begins, then it will get created and marked for Rock Ridge as
relocation artefact. At least on GNU/Linux it will not be displayed in
mounted Rock Ridge images.
.br
The name must not contain a '/' character after its first character and it
must not be longer than 255 bytes.
.TP
\fB\-hide-rr-moved\fR
Alias of \-rr_reloc_dir "/.rr_moved"
.TP
\fB--for_backup\fR
Enable options which improve backup fidelity:
\-\-acl, \-\-xattr, \-\-md5,

View File

@ -506,6 +506,41 @@ File: xorrisofs.info, Node: SetExtras, Next: SetHide, Prev: SetCompl, Up: Op
-rational-rock
Alias of -r.
-D
The standard ECMA-119 demands that no path in the image shall have
more than 8 name components. Therefore it would be necessary to
move deeper directory trees to a higher directory. Rock Ridge
offers an opportunity to let these relocated directories appear at
their orginal deep position, but this feature might not be
implemented properly by operating systems which mount the image.
Option -D disables this deep directory relocation, and thus
violates ISO 9660 specs.
xorrisofs has -D set by default. It may get overridden by option
-rr_reloc_dir or by option -hide-rr-moved, and it may override
said options. The last one in the option list wins.
-disable-deep-relocation
Alias of -D.
-rr_reloc_dir name
Enable the relocation of deep directories and thus avoid ECMA-119
file paths of more than 8 name components. Directories of depth 8
will get moved to a directory in the root directory of the image.
Its name gets set by this option. It is permissible to use the
root directory itself.
The overall directory tree will appear originally deep when
interpreted as Rock Ridge tree. It will appear as re-arranged if
only ECMA-119 information is considered.
If the given relocation target directory does not already exist
when image production begins, then it will get created and marked
for Rock Ridge as relocation artefact. At least on GNU/Linux it
will not be displayed in mounted Rock Ridge images.
The name must not contain a '/' character after its first
character and it must not be longer than 255 bytes.
-hide-rr-moved
Alias of -rr_reloc_dir "/.rr_moved"
--for_backup
Enable options which improve backup fidelity: --acl, --xattr,
--md5, --hardlinks.
@ -1499,15 +1534,15 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
[index]
* Menu:
* --acl Recording of ACLs: SetExtras. (line 28)
* --acl Recording of ACLs: SetExtras. (line 63)
* --boot-catalog-hide Hide El Torito boot catalog: Bootable.
(line 95)
* --efi-boot El Torito EFI boot image: Bootable. (line 58)
* --embedded-boot Fill System Area e.g. by MBR: SystemArea. (line 27)
* --emul-toc enable table-of-content emulation: SetProduct. (line 35)
* --for_backup Enable backup fidelity: SetExtras. (line 24)
* --hardlinks Recording of hardlink relations: SetExtras. (line 49)
* --md5 Recording of MD5 checksums: SetExtras. (line 41)
* --for_backup Enable backup fidelity: SetExtras. (line 59)
* --hardlinks Recording of hardlink relations: SetExtras. (line 84)
* --md5 Recording of MD5 checksums: SetExtras. (line 76)
* --modification-date set ISO image timestamps: ImageId. (line 82)
* --no-emul-toc no table-of-content emulation: SetProduct. (line 44)
* --no_rc do not execute startup files: Miscellaneous. (line 16)
@ -1522,11 +1557,11 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
(line 41)
* --quoted_path_list read pathspecs from disk file: SetInsert.
(line 13)
* --scdbackup_tag Recording of MD5 checksum: SetExtras. (line 58)
* --scdbackup_tag Recording of MD5 checksum: SetExtras. (line 93)
* --sort-weight set output file address: SetProduct. (line 49)
* --stdio_sync control forced output to disk files: SetProduct.
(line 25)
* --xattr Recording of xattr: SetExtras. (line 34)
* --xattr Recording of xattr: SetExtras. (line 69)
* -A set Application Id: ImageId. (line 38)
* -abstract set Abstract File path: ImageId. (line 66)
* -allow-lowercase lowercase in ISO file names: SetCompl. (line 46)
@ -1546,9 +1581,12 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* -checksum_algorithm_template choose .template checksums: Jigdo.
(line 87)
* -copyright set Copyright File path: ImageId. (line 77)
* -D allow deep directory hierachies: SetExtras. (line 24)
* -d omit trailing dot in ISO file names: SetCompl. (line 50)
* -dev set path for loading existing ISO image: Loading. (line 25)
* -dir-mode permissions for all directories: SetProduct. (line 60)
* -disable-deep-relocation allow deep directory hierachies: SetExtras.
(line 37)
* -disallow_dir_id_ext enforce ISO level 1 directory names: SetCompl.
(line 24)
* -e El Torito EFI boot image: Bootable. (line 50)
@ -1576,12 +1614,14 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
(line 25)
* -hide-list keep matching files invisible in ISO tree: SetHide.
(line 16)
* -hide-rr-moved set deep directory relocation target: SetExtras.
(line 56)
* -input-charset set character set of disk file names: Charset.
(line 17)
* -iso-level define ISO 9660 limitations: SetCompl. (line 7)
* -isohybrid-mbr Install ISOLINUX isohybrid MBR: SystemArea.
(line 30)
* -J enable production of Joliet directory tree: SetExtras. (line 67)
* -J enable production of Joliet directory tree: SetExtras. (line 102)
* -jigdo-exclude add exclusion pattern for .md5: Jigdo. (line 59)
* -jigdo-force-md5 add check pattern for .md5: Jigdo. (line 52)
* -jigdo-jigdo set name of .jigdo file: Jigdo. (line 38)
@ -1591,8 +1631,8 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* -jigdo-template-compress choose compression algorithm: Jigdo.
(line 76)
* -joliet enable production of Joliet directory tree: SetExtras.
(line 71)
* -joliet-long allow longer Joliet names: SetExtras. (line 74)
(line 106)
* -joliet-long allow longer Joliet names: SetExtras. (line 109)
* -l allow 37 characters in ISO file names: SetCompl. (line 57)
* -m exclude disk files from inserting: SetInsert. (line 35)
* -M set path for loading existing ISO image: Loading. (line 11)
@ -1637,6 +1677,8 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
(line 21)
* -rock Rock Ridge (is always enabled): SetExtras. (line 12)
* -root redirect ISO root directory: SetInsert. (line 64)
* -rr_reloc_dir set deep directory relocation target: SetExtras.
(line 40)
* -sparc-boot SUN SPARC boot images: SystemArea. (line 128)
* -sparc-label SUN Disk Label text: SystemArea. (line 131)
* -sysid set System Id: ImageId. (line 49)
@ -1665,9 +1707,9 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Menu:
* Abstract File, set path, -abstract: ImageId. (line 66)
* ACL, record and load, --acl: SetExtras. (line 28)
* ACL, record and load, --acl: SetExtras. (line 63)
* Application Id, set, -A, -appid: ImageId. (line 38)
* Backup, enable fidelity, --for_backup: SetExtras. (line 24)
* Backup, enable fidelity, --for_backup: SetExtras. (line 59)
* Biblio File, set path, -biblio: ImageId. (line 72)
* Block address, set sort weight, --sort-weight: SetProduct. (line 49)
* Bootability, boot catalog hidden, --boot-catalog-hide: Bootable.
@ -1703,6 +1745,12 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
(line 21)
* Character sets, _definition: Charset. (line 6)
* Copyright File, set path, -copyright: ImageId. (line 77)
* Deep directories, allow, -D, -disable-deep-relocation: SetExtras.
(line 24)
* Deep directories, relocation target, -hide-rr-moved: SetExtras.
(line 56)
* Deep directories, relocation target, -rr_reloc_dir: SetExtras.
(line 40)
* Disk files, exclude, -hide-list: SetInsert. (line 51)
* Disk files, exclude, -m, -exclude, -x, -old-exclude: SetInsert.
(line 35)
@ -1757,14 +1805,14 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Jigdo Template Extraction, -md5-list: Jigdo. (line 73)
* Jigdo Template Extraction, _definition: Jigdo. (line 6)
* Joliet, _definiton: Standards. (line 21)
* Joliet, allows longer names, -joliet-long: SetExtras. (line 74)
* Joliet, enable, -J, -joliet: SetExtras. (line 67)
* Joliet, allows longer names, -joliet-long: SetExtras. (line 109)
* Joliet, enable, -J, -joliet: SetExtras. (line 102)
* Links, follow on disk, -f, -follow-links: SetInsert. (line 24)
* Links, record and load hard links, --hardlinks: SetExtras. (line 49)
* Links, record and load hard links, --hardlinks: SetExtras. (line 84)
* MBR, _definiton: SystemArea. (line 10)
* MBR, append partition, -append_partition: SystemArea. (line 86)
* MBR, sectors per head, -partition_sec_hd: SystemArea. (line 58)
* MD5, record and load, --md5: SetExtras. (line 41)
* MD5, record and load, --md5: SetExtras. (line 76)
* Message output, suppress, -quiet: Miscellaneous. (line 24)
* Mountability, by non-trivial partition 1, -partition_offset: SystemArea.
(line 46)
@ -1787,7 +1835,7 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Rock Ridge, _definiton: Standards. (line 14)
* Rock Ridge, altered owner and permission, -r, -rational-rock: SetExtras.
(line 15)
* scdbackup, record checksum tag, --scdbackup_tag: SetExtras. (line 58)
* scdbackup, record checksum tag, --scdbackup_tag: SetExtras. (line 93)
* Session, select path, -M, -prev-session, -dev: Loading. (line 11)
* Session, set load and write address, -C, -cdrecord-params: Loading.
(line 28)
@ -1799,7 +1847,7 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Verbosity, high, -v, -verbose: Miscellaneous. (line 28)
* Volume Id, set, -V, -volid: ImageId. (line 13)
* Volume Set Id, set, -volset: ImageId. (line 26)
* xattr, record and load, --xattr: SetExtras. (line 34)
* xattr, record and load, --xattr: SetExtras. (line 69)
* xorriso, mkisofs emulation: Xorriso. (line 6)
* xorriso, options: Options. (line 6)
* zisofs file, enable recognition, -z, -transparent-compression: SetInsert.
@ -1819,26 +1867,26 @@ Node: SetInsert9142
Node: SetProduct13558
Node: SetCompl17265
Node: SetExtras19584
Node: SetHide22561
Node: ImageId23560
Node: Bootable27065
Node: SystemArea31130
Node: Charset37464
Node: Jigdo38490
Node: Miscellaneous42757
Node: Examples43921
Node: ExSimple44407
Node: ExGraft44886
Node: ExMkisofs46133
Node: ExGrowisofs47386
Node: ExIncBackup48558
Node: ExIncBckAcc51666
Node: ExBootable53342
Node: Files55434
Node: Seealso56508
Node: Bugreport57164
Node: Legal57745
Node: CommandIdx58560
Node: ConceptIdx69893
Node: SetHide24267
Node: ImageId25266
Node: Bootable28771
Node: SystemArea32836
Node: Charset39170
Node: Jigdo40196
Node: Miscellaneous44463
Node: Examples45627
Node: ExSimple46113
Node: ExGraft46592
Node: ExMkisofs47839
Node: ExGrowisofs49092
Node: ExIncBackup50264
Node: ExIncBckAcc53372
Node: ExBootable55048
Node: Files57140
Node: Seealso58214
Node: Bugreport58870
Node: Legal59451
Node: CommandIdx60266
Node: ConceptIdx72099

End Tag Table

View File

@ -50,7 +50,7 @@
@c man .\" First parameter, NAME, should be all caps
@c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
@c man .\" other parameters are allowed: see man(7), man(1)
@c man .TH XORRISOFS 1 "Version 1.2.1, Jan 27, 2012"
@c man .TH XORRISOFS 1 "Version 1.2.1, Mar 12, 2012"
@c man .\" Please adjust this date whenever revising the manpage.
@c man .\"
@c man .\" Some roff macros, for reference:
@ -723,6 +723,52 @@ Remove s-bit and t-bit.
@kindex -rational-rock Rock Ridge with altered owner and permission
Alias of -r.
@c man .TP
@item -D
@kindex -D allow deep directory hierachies
@cindex Deep directories, allow, -D, -disable-deep-relocation
The standard ECMA-119 demands that no path in the image shall have more
than 8 name components. Therefore it would be necessary to move deeper
directory trees to a higher directory. Rock Ridge offers an opportunity to
let these relocated directories appear at their orginal deep position, but
this feature might not be implemented properly by operating systems which
mount the image.
@*
Option -D disables this deep directory relocation, and thus violates
ISO 9660 specs.
@*
xorrisofs has -D set by default. It may get overridden by option -rr_reloc_dir
or by option -hide-rr-moved, and it may override said options. The last one
in the option list wins.
@c man .TP
@item -disable-deep-relocation
@kindex -disable-deep-relocation allow deep directory hierachies
Alias of -D.
@c man .TP
@item -rr_reloc_dir name
@kindex -rr_reloc_dir set deep directory relocation target
@cindex Deep directories, relocation target, -rr_reloc_dir
Enable the relocation of deep directories and thus avoid ECMA-119 file paths
of more than 8 name components. Directories of depth 8 will get moved to a
directory in the root directory of the image. Its name gets set by this option.
It is permissible to use the root directory itself.
@*
The overall directory tree will appear originally deep when interpreted as
Rock Ridge tree. It will appear as re-arranged if only ECMA-119 information
is considered.
@*
If the given relocation target directory does not already exist when image
production begins, then it will get created and marked for Rock Ridge as
relocation artefact. At least on GNU/Linux it will not be displayed in
mounted Rock Ridge images.
@*
The name must not contain a '/' character after its first character and it
must not be longer than 255 bytes.
@c man .TP
@item -hide-rr-moved
@kindex -hide-rr-moved set deep directory relocation target
@cindex Deep directories, relocation target, -hide-rr-moved
Alias of -rr_reloc_dir "/.rr_moved"
@c man .TP
@item @minus{}@minus{}for_backup
@kindex @minus{}@minus{}for_backup Enable backup fidelity
@cindex Backup, enable fidelity, @minus{}@minus{}for_backup