From 761ff8fc06be5875c860f01e1ac445c8adbadc64 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Mon, 23 Oct 2017 12:12:12 +0200 Subject: [PATCH] New -as mkisofs option --xattr-any --- xorriso/emulators.c | 6 +- xorriso/xorriso_timestamp.h | 2 +- xorriso/xorrisofs.1 | 22 ++++++- xorriso/xorrisofs.info | 126 ++++++++++++++++++++---------------- xorriso/xorrisofs.texi | 26 ++++++-- 5 files changed, 118 insertions(+), 64 deletions(-) diff --git a/xorriso/emulators.c b/xorriso/emulators.c index 06289ec7..9bd4d704 100644 --- a/xorriso/emulators.c +++ b/xorriso/emulators.c @@ -617,7 +617,7 @@ int Xorriso_genisofs_count_args(struct XorrisO *xorriso, int argc, char **argv, "-omit-version-number", "-rational-rock", "-rock", "-translation-table", "-untranslated-filenames", "-verbose", "-version", "-g", "-h", "-no-mac-files", "-chrp-boot", - "--hardlinks", "--acl", "--xattr", "--md5", "--for_backup", + "--hardlinks", "--acl", "--xattr", "--xattr-any", "--md5", "--for_backup", "--protective-msdos-label", "--boot-catalog-hide", "--no-emul-toc", "--emul-toc", "-disallow_dir_id_ext", "--old-empty", "--old-root-no-md5", "--old-root-devno", "--old-root-no-ino", @@ -830,6 +830,7 @@ int Xorriso_genisofs_help(struct XorrisO *xorriso, int flag) " --hardlinks Record eventual hard link relations of files", " --acl Record eventual ACLs of files", " --xattr Record eventual user space xattr of files", +" --xattr-any Record xattr of any namespace, not only user.", " --md5 Compute and record MD5 checksums of data files", " --scdbackup_tag PATH NAME With --md5 record a scdbackup checksum tag", " --for_backup Use all options which improve backup fidelity", @@ -1552,6 +1553,8 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom, Xorriso_option_acl(xorriso, "on", 0); } else if(strcmp(argpt, "--xattr")==0) { Xorriso_option_xattr(xorriso, "on", 0); + } else if(strcmp(argpt, "--xattr-any")==0) { + Xorriso_option_xattr(xorriso, "any", 0); } else if(strcmp(argpt, "--md5")==0) { Xorriso_option_md5(xorriso, "on", 0); } else if(strcmp(argpt, "--scdbackup_tag")==0) { @@ -1982,6 +1985,7 @@ not_enough_args:; } else if(strcmp(argpt, "--hardlinks")==0 || strcmp(argpt, "--acl")==0 || strcmp(argpt, "--xattr")==0 || + strcmp(argpt, "--xattr-any")==0 || strcmp(argpt, "--md5")==0 || strcmp(argpt, "--for_backup")==0) { /* was already handled in first argument scan */; diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index 5b2ae19f..aaa809e9 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2017.10.23.100749" +#define Xorriso_timestamP "2017.10.23.101135" diff --git a/xorriso/xorrisofs.1 b/xorriso/xorrisofs.1 index 93565084..30ccfa19 100644 --- a/xorriso/xorrisofs.1 +++ b/xorriso/xorrisofs.1 @@ -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.4.9, Sep 16, 2017" +.TH XORRISOFS 1 "Version 1.4.9, Oct 10, 2017" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: @@ -630,9 +630,19 @@ This option has no effect if option \-D is present. Alias of \-rr_reloc_dir "/.rr_moved" .TP \fB--for_backup\fR -Enable options which improve backup fidelity: -\-\-acl, \-\-xattr, \-\-md5, +Enable all options which improve backup fidelity: +.br +\-\-acl, \-\-xattr\-any, \-\-md5, \-\-hardlinks. +.br +If you later restore a backup with xattr from non\-user namespaces, then make +sure that the target operating system and filesystem know what these attributes +mean. Possibly you will need administrator privileges to record or restore +such attributes. At recording time, xorriso will try to tolerate missing +privileges and just record what is readable. +.br +Option \-xattr after option \-for_backup excludes non\-user attributes +from being recorded. .TP \fB--acl\fR .br @@ -649,6 +659,12 @@ man getextattr and man 9 extattr, respectively). They will not be in effect with mounted ISO images. But xorriso can restore them on the same systems when extracting files from the ISO image. .TP +\fB--xattr-any\fR +.br +Enable recording and loading of GNU/Linux or FreeBSD extended attributes in +all namespaces. This might need adminstrator privileges, even if the owner +of the disk file tries to read the attributes. +.TP \fB--md5\fR .br Enable recording of MD5 checksums for the overall ISO image and for each diff --git a/xorriso/xorrisofs.info b/xorriso/xorrisofs.info index 006149a9..bf8eb03b 100644 --- a/xorriso/xorrisofs.info +++ b/xorriso/xorrisofs.info @@ -580,8 +580,16 @@ File: xorrisofs.info, Node: SetExtras, Next: SetHide, Prev: SetCompl, Up: Op -hide-rr-moved Alias of -rr_reloc_dir "/.rr_moved" --for_backup - Enable options which improve backup fidelity: --acl, --xattr, - --md5, --hardlinks. + Enable all options which improve backup fidelity: + --acl, --xattr-any, --md5, --hardlinks. + If you later restore a backup with xattr from non-user namespaces, + then make sure that the target operating system and filesystem know + what these attributes mean. Possibly you will need administrator + privileges to record or restore such attributes. At recording + time, xorriso will try to tolerate missing privileges and just + record what is readable. + Option -xattr after option -for_backup excludes non-user attributes + from being recorded. --acl Enable recording and loading of ACLs from GNU/Linux or FreeBSD (see @@ -595,6 +603,12 @@ File: xorrisofs.info, Node: SetExtras, Next: SetHide, Prev: SetCompl, Up: Op getextattr and man 9 extattr, respectively). They will not be in effect with mounted ISO images. But xorriso can restore them on the same systems when extracting files from the ISO image. +--xattr-any + + Enable recording and loading of GNU/Linux or FreeBSD extended + attributes in all namespaces. This might need adminstrator + privileges, even if the owner of the disk file tries to read the + attributes. --md5 Enable recording of MD5 checksums for the overall ISO image and for @@ -1907,7 +1921,7 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T [index] * Menu: -* --acl Recording of ACLs: SetExtras. (line 95) +* --acl Recording of ACLs: SetExtras. (line 103) * --application_use set Application Use field: ImageId. (line 79) * --boot-catalog-hide Hide El Torito boot catalog: Bootable. (line 121) * --efi-boot El Torito EFI boot image: Bootable. (line 59) @@ -1918,10 +1932,10 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T * --grub2-boot-info Patch El Torito boot image: Bootable. (line 109) * --grub2-mbr Install modern GRUB2 MBR: SystemArea. (line 81) * --grub2-sparc-core SUN SPARC core file: SystemArea. (line 286) -* --hardlinks Recording of hardlink relations: SetExtras. (line 116) +* --hardlinks Recording of hardlink relations: SetExtras. (line 130) * --mbr-force-bootable Enforce MBR bootable/active flag: SystemArea. (line 139) -* --md5 Recording of MD5 checksums: SetExtras. (line 108) +* --md5 Recording of MD5 checksums: SetExtras. (line 122) * --modification-date set ISO image timestamps: ImageId. (line 70) * --no-emul-toc no table-of-content emulation: SetProduct. (line 41) * --norock disable Rock Ridge production: SetExtras. (line 28) @@ -1937,7 +1951,7 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T (line 135) * --quoted_path_list read pathspecs from disk file: SetInsert. (line 12) -* --scdbackup_tag Recording of MD5 checksum: SetExtras. (line 124) +* --scdbackup_tag Recording of MD5 checksum: SetExtras. (line 138) * --set_all_file_dates set all file timestamps: SetExtras. (line 35) * --sort-weight set block address sorting weight: SetProduct. (line 45) * --sort-weight-list set block address sorting weight: SetProduct. @@ -1946,7 +1960,8 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T (line 76) * --stdio_sync control forced output to disk files: SetProduct. (line 23) -* --xattr Recording of xattr: SetExtras. (line 101) +* --xattr Recording of any xattr: SetExtras. (line 116) +* --xattr Recording of user xattr: SetExtras. (line 109) * -A set Application Id: ImageId. (line 34) * -abstract set Abstract File path: ImageId. (line 57) * -allow-lowercase lowercase in ISO file names: SetCompl. (line 42) @@ -2005,15 +2020,15 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T (line 29) * -hard-disk-boot El Torito boot image emulation: Bootable. (line 83) * -help list supported options: Miscellaneous. (line 21) -* -hfs-bless HFS+ blessing ppc_bootdir: SetExtras. (line 201) -* -hfs-bless-by HFS+ blessing: SetExtras. (line 191) -* -hfsplus enable production of HFS+ partition: SetExtras. (line 150) -* -hfsplus-block-size set APM block size: SetExtras. (line 181) +* -hfs-bless HFS+ blessing ppc_bootdir: SetExtras. (line 215) +* -hfs-bless-by HFS+ blessing: SetExtras. (line 205) +* -hfsplus enable production of HFS+ partition: SetExtras. (line 164) +* -hfsplus-block-size set APM block size: SetExtras. (line 195) * -hfsplus-block-size set HFS+ allocation block size: SetExtras. - (line 177) + (line 191) * -hfsplus-file-creator-type HFS+ creator-type attribute: SetExtras. - (line 188) -* -hfsplus-serial-no set HFS+ serial number: SetExtras. (line 173) + (line 202) +* -hfsplus-serial-no set HFS+ serial number: SetExtras. (line 187) * -hide keep matching files invisible in ISO tree: SetHide. (line 8) * -hide-hfsplus keep matching files invisible in HFS+ tree: SetHide. (line 25) @@ -2043,7 +2058,7 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T * -isohybrid-mbr Install ISOLINUX isohybrid MBR: SystemArea. (line 87) * -iso_mbr_part_type Set type of ISO MBR partition: SystemArea. (line 127) -* -J enable production of Joliet directory tree: SetExtras. (line 133) +* -J enable production of Joliet directory tree: SetExtras. (line 147) * -jigdo-exclude add exclusion pattern for .md5: Jigdo. (line 55) * -jigdo-force-md5 add check pattern for .md5: Jigdo. (line 49) * -jigdo-jigdo set name of .jigdo file: Jigdo. (line 38) @@ -2053,9 +2068,9 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T * -jigdo-template-compress choose compression algorithm: Jigdo. (line 69) * -joliet enable production of Joliet directory tree: SetExtras. - (line 137) -* -joliet-long allow longer Joliet names: SetExtras. (line 139) -* -joliet-utf16 use UTF-16 with Joliet names: SetExtras. (line 145) + (line 151) +* -joliet-long allow longer Joliet names: SetExtras. (line 153) +* -joliet-utf16 use UTF-16 with Joliet names: SetExtras. (line 159) * -l allow 31 characters in ISO file names: SetCompl. (line 56) * -log-file redirect stderr messages: Miscellaneous. (line 33) * -m exclude disk files from inserting: SetInsert. (line 31) @@ -2133,7 +2148,7 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Menu: * Abstract File, set path, -abstract: ImageId. (line 57) -* ACL, record and load, --acl: SetExtras. (line 95) +* ACL, record and load, --acl: SetExtras. (line 103) * APM, mark appended partitions, -appended_part_as_apm: SystemArea. (line 215) * APM, _definition: SystemArea. (line 16) @@ -2231,14 +2246,14 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * GPT, mark appended partitions, -appended_part_as_gpt: SystemArea. (line 209) * GPT, _definition: SystemArea. (line 13) -* HFS+, enables production: SetExtras. (line 150) -* HFS+, issue blessing ppc_bootdir, -hfs-bless: SetExtras. (line 201) -* HFS+, issue blessing, -hfs-bless-by: SetExtras. (line 191) -* HFS+, set allocation block size: SetExtras. (line 177) -* HFS+, set APM block size: SetExtras. (line 181) +* HFS+, enables production: SetExtras. (line 164) +* HFS+, issue blessing ppc_bootdir, -hfs-bless: SetExtras. (line 215) +* HFS+, issue blessing, -hfs-bless-by: SetExtras. (line 205) +* HFS+, set allocation block size: SetExtras. (line 191) +* HFS+, set APM block size: SetExtras. (line 195) * HFS+, set creator and type of file, -hfsplus-file-creator-type: SetExtras. - (line 188) -* HFS+, set serial number: SetExtras. (line 173) + (line 202) +* HFS+, set serial number: SetExtras. (line 187) * HFS+, _definition: Standards. (line 32) * Hiding, from HFS+, -hide-hfsplus: SetHide. (line 25) * Hiding, from HFS+, -hide-hfsplus-list: SetHide. (line 28) @@ -2295,16 +2310,16 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Jigdo Template Extraction, -jigdo-template-compress: Jigdo. (line 69) * Jigdo Template Extraction, -md5-list: Jigdo. (line 67) * Jigdo Template Extraction, _definition: Jigdo. (line 6) -* Joliet, allows longer names, -joliet-long: SetExtras. (line 139) -* Joliet, enable, -J, -joliet: SetExtras. (line 133) +* Joliet, allows longer names, -joliet-long: SetExtras. (line 153) +* Joliet, enable, -J, -joliet: SetExtras. (line 147) * Joliet, _definition: Standards. (line 21) * Links, follow on disk, -f, -follow-links: SetInsert. (line 22) -* Links, record and load hard links, --hardlinks: SetExtras. (line 116) +* Links, record and load hard links, --hardlinks: SetExtras. (line 130) * MBR, GPT, append partition, -append_partition: SystemArea. (line 189) * MBR, sectors per head, -partition_sec_hd: SystemArea. (line 161) * MBR, sectors per head, -partition_sec_hd <1>: SystemArea. (line 164) * MBR, _definition: SystemArea. (line 9) -* MD5, record and load, --md5: SetExtras. (line 108) +* MD5, record and load, --md5: SetExtras. (line 122) * Message output, increase frequency, -gui: Miscellaneous. (line 29) * Message output, redirect stderr, -log-file: Miscellaneous. (line 33) * Message output, suppress, -quiet: Miscellaneous. (line 25) @@ -2330,7 +2345,7 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top (line 16) * Rock Ridge, disable production, --norock: SetExtras. (line 28) * Rock Ridge, _definition: Standards. (line 14) -* scdbackup, record checksum tag, --scdbackup_tag: SetExtras. (line 124) +* scdbackup, record checksum tag, --scdbackup_tag: SetExtras. (line 138) * Session, select path, -M, -prev-session, -dev: Loading. (line 11) * Session, set load and write address, -C, -cdrecord-params: Loading. (line 25) @@ -2339,11 +2354,12 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * System Id, set, -sysid: ImageId. (line 43) * Table-of-content, emulation off, --no-emul-toc: SetProduct. (line 41) * Table-of-content, emulation, --emul-toc: SetProduct. (line 33) -* UTF-16, for Joliet paths, -joliet-utf16: SetExtras. (line 145) +* UTF-16, for Joliet paths, -joliet-utf16: SetExtras. (line 159) * Verbosity, high, -v, -verbose: Miscellaneous. (line 38) * Volume Id, set, -V, -volid: ImageId. (line 13) * Volume Set Id, set, -volset: ImageId. (line 25) -* xattr, record and load, --xattr: SetExtras. (line 101) +* xattr, record and load, --xattr: SetExtras. (line 109) +* xattr, record and load, --xattr-any: SetExtras. (line 116) * xorriso, mkisofs emulation: Xorriso. (line 6) * xorriso, options: Options. (line 6) * zisofs file, enable recognition, -z, -transparent-compression: SetInsert. @@ -2363,27 +2379,27 @@ Node: SetInsert9789 Node: SetProduct14198 Node: SetCompl19374 Node: SetExtras21966 -Node: SetHide32539 -Node: ImageId33843 -Node: Bootable38125 -Node: SystemArea44411 -Node: Charset61777 -Node: Jigdo62802 -Node: Miscellaneous67079 -Node: Examples68724 -Node: ExSimple69218 -Node: ExGraft69701 -Node: ExMkisofs71001 -Node: ExGrowisofs72267 -Node: ExIncBackup73457 -Node: ExIncBckAcc76618 -Node: ExBootable78307 -Node: Files82489 -Node: Environ83584 -Node: Seealso84355 -Node: Bugreport85006 -Node: Legal85599 -Node: CommandIdx86496 -Node: ConceptIdx102144 +Node: SetHide33260 +Node: ImageId34564 +Node: Bootable38846 +Node: SystemArea45132 +Node: Charset62498 +Node: Jigdo63523 +Node: Miscellaneous67800 +Node: Examples69445 +Node: ExSimple69939 +Node: ExGraft70422 +Node: ExMkisofs71722 +Node: ExGrowisofs72988 +Node: ExIncBackup74178 +Node: ExIncBckAcc77339 +Node: ExBootable79028 +Node: Files83210 +Node: Environ84305 +Node: Seealso85076 +Node: Bugreport85727 +Node: Legal86320 +Node: CommandIdx87217 +Node: ConceptIdx102938  End Tag Table diff --git a/xorriso/xorrisofs.texi b/xorriso/xorrisofs.texi index c239103f..3e797ba2 100644 --- a/xorriso/xorrisofs.texi +++ b/xorriso/xorrisofs.texi @@ -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.4.9, Sep 16, 2017" +@c man .TH XORRISOFS 1 "Version 1.4.9, Oct 10, 2017" @c man .\" Please adjust this date whenever revising the manpage. @c man .\" @c man .\" Some roff macros, for reference: @@ -885,9 +885,19 @@ Alias of -rr_reloc_dir "/.rr_moved" @item @minus{}@minus{}for_backup @kindex @minus{}@minus{}for_backup Enable backup fidelity @cindex Backup, enable fidelity, @minus{}@minus{}for_backup -Enable options which improve backup fidelity: -@minus{}@minus{}acl, @minus{}@minus{}xattr, @minus{}@minus{}md5, +Enable all options which improve backup fidelity: +@* +@minus{}@minus{}acl, @minus{}@minus{}xattr-any, @minus{}@minus{}md5, @minus{}@minus{}hardlinks. +@* +If you later restore a backup with xattr from non-user namespaces, then make +sure that the target operating system and filesystem know what these attributes +mean. Possibly you will need administrator privileges to record or restore +such attributes. At recording time, xorriso will try to tolerate missing +privileges and just record what is readable. +@* +Option -xattr after option -for_backup excludes non-user attributes +from being recorded. @c man .TP @item @minus{}@minus{}acl @kindex @minus{}@minus{}acl Recording of ACLs @@ -899,7 +909,7 @@ They will not be in effect with mounted ISO images. But xorriso can restore them on the same systems when extracting files from the ISO image. @c man .TP @item @minus{}@minus{}xattr -@kindex @minus{}@minus{}xattr Recording of xattr +@kindex @minus{}@minus{}xattr Recording of user xattr @cindex xattr, record and load, @minus{}@minus{}xattr @* Enable recording and loading of GNU/Linux or FreeBSD extended attributes in @@ -908,6 +918,14 @@ man getextattr and man 9 extattr, respectively). They will not be in effect with mounted ISO images. But xorriso can restore them on the same systems when extracting files from the ISO image. @c man .TP +@item @minus{}@minus{}xattr-any +@kindex @minus{}@minus{}xattr Recording of any xattr +@cindex xattr, record and load, @minus{}@minus{}xattr-any +@* +Enable recording and loading of GNU/Linux or FreeBSD extended attributes in +all namespaces. This might need adminstrator privileges, even if the owner +of the disk file tries to read the attributes. +@c man .TP @item @minus{}@minus{}md5 @kindex @minus{}@minus{}md5 Recording of MD5 checksums @cindex MD5, record and load, @minus{}@minus{}md5