New -as mkisofs option --set_all_file_dates

This commit is contained in:
Thomas Schmitt 2016-08-06 13:23:00 +00:00
parent f52bf78d5a
commit e51b181fb8
5 changed files with 136 additions and 67 deletions

View File

@ -664,7 +664,7 @@ int Xorriso_genisofs_count_args(struct XorrisO *xorriso, int argc, char **argv,
"-rr_reloc_dir", "-hfsplus-serial-no", "-prep-boot-part", "-efi-boot-part",
"-hfsplus-block-size", "-apm-block-size", "--grub2-mbr",
"--grub2-sparc-core", "--sort-weight-list", "--sort-weight-patterns",
"-hppa-hdrversion","-file_name_limit",
"-hppa-hdrversion", "-file_name_limit", "--set_all_file_dates",
""
};
static char arg2_options[][41]= {
@ -905,6 +905,7 @@ int Xorriso_genisofs_help(struct XorrisO *xorriso, int flag)
" -appended_part_as_apm mark appended partitions in APM.",
" --modification-date=YYYYMMDDhhmmsscc",
" Override date of creation and modification",
" --set_all_file_dates TIME Override mtime, atime, ctime in all files",
" -isohybrid-mbr FILE Set SYSLINUX mbr/isohdp[fp]x*.bin for isohybrid",
" --grub2-mbr FILE Set GRUB2 MBR for boot image address patching",
#ifdef Xorriso_with_isohybriD
@ -1281,6 +1282,7 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
int *delay_opt_list= NULL, delay_opt_count= 0;
char *sfe= NULL, *adr= NULL, ra_text[80], *pathspec= NULL, *sort_file= NULL;
char *ept, *add_pt, *eff_path= NULL, *indev= NULL, msc[80], *cpt;
char *all_file_dates= NULL;
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], *rr_reloc_dir_pt= NULL;
@ -1918,6 +1920,16 @@ not_enough_args:;
if(ret <= 0)
goto problem_handler_2;
} else if(strcmp(argpt, "--set_all_file_dates") == 0) {
if(i+1>=argc)
goto not_enough_args;
i++;
if(all_file_dates != NULL)
Xorriso_free_meM(all_file_dates);
all_file_dates= NULL;
Xorriso_alloc_meM(all_file_dates, char, strlen(argv[i]) + 1);
strcpy(all_file_dates, argv[i]);
} else if(strcmp(argpt, "-input-charset")==0) {
i++;
/* was already handled in first argument scan */;
@ -2610,6 +2622,21 @@ problem_handler_boot:;
if(xorriso->no_emul_toc & 1)
xorriso->do_padding_by_libisofs= 1;
if(all_file_dates != NULL) if(all_file_dates[0] != 0) {
hargv[0]= "/";
idx= 0;
ret= Xorriso_option_alter_date(xorriso, "b", all_file_dates, 1, hargv,
&idx, 1);
if(ret <= 0)
was_failure= 1;
idx= 0;
ret= Xorriso_option_alter_date(xorriso, "c", all_file_dates, 1, hargv,
&idx, 1);
if(ret <= 0)
was_failure= 1;
Xorriso_relax_compliance(xorriso, "always_gmt", 0);
}
if(do_print_size) {
ret= Xorriso_option_print_size(xorriso, 1);
goto ex;
@ -2626,6 +2653,7 @@ ex:;
free(weight_list);
if(delay_opt_list != NULL)
free(delay_opt_list);
Xorriso_free_meM(all_file_dates);
Xorriso_free_meM(sort_file);
Xorriso_free_meM(sfe);
Xorriso_free_meM(adr);

View File

@ -1 +1 @@
#define Xorriso_timestamP "2016.08.06.111650"
#define Xorriso_timestamP "2016.08.06.132358"

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.4.5, Aug 05, 2016"
.TH XORRISOFS 1 "Version 1.4.5, Aug 06, 2016"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@ -558,6 +558,19 @@ discouraged to disable it by this option, except for the special use case
to revoke the effect of \-r by:
\-\-norock \-R
.TP
\fB--set_all_file_dates\fR timestring
Set mtime, atime, and ctime of all files and directories to the given time.
.br
Valid timestring formats are: 'Nov 8 14:51:13 CET 2007', 110814512007.13,
2007110814511300. See also \-\-modification\-date= and man xorriso,
Examples of input timestrings.
.br
This action stays delayed until mkisofs emulation ends. Up to then it can be
revoked by \-\-set_all_file_dates with empty timestring.
In any case files which get into the ISO after mkisofs emulation ended
will not be affected, unless another mkisofs emulation
applies \-\-set_all_file_date again.
.TP
\fB\-file_name_limit\fR number
Set the maximum permissible length for file names in the range of 64 to 255.
Path components which are longer than the given number will get truncated

View File

@ -521,6 +521,17 @@ File: xorrisofs.info, Node: SetExtras, Next: SetHide, Prev: SetCompl, Up: Op
'xorrisofs' depend much on the naming fidelity of Rock Ridge. So
it is strongly discouraged to disable it by this option, except for
the special use case to revoke the effect of -r by: --norock -R
--set_all_file_dates timestring
Set mtime, atime, and ctime of all files and directories to the
given time.
Valid timestring formats are: 'Nov 8 14:51:13 CET 2007',
110814512007.13, 2007110814511300. See also --modification-date=
and man xorriso, Examples of input timestrings.
This action stays delayed until mkisofs emulation ends. Up to then
it can be revoked by --set_all_file_dates with empty timestring.
In any case files which get into the ISO after mkisofs emulation
ended will not be affected, unless another mkisofs emulation
applies --set_all_file_date again.
-file_name_limit number
Set the maximum permissible length for file names in the range of
64 to 255. Path components which are longer than the given number
@ -1824,20 +1835,20 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
[index]
* Menu:
* --acl Recording of ACLs: SetExtras. (line 81)
* --acl Recording of ACLs: SetExtras. (line 92)
* --application_use set Application Use field: ImageId. (line 77)
* --boot-catalog-hide Hide El Torito boot catalog: Bootable. (line 101)
* --efi-boot El Torito EFI boot image: Bootable. (line 53)
* --embedded-boot Fill System Area e.g. by MBR: SystemArea. (line 75)
* --emul-toc enable table-of-content emulation: SetProduct. (line 33)
* --for_backup Enable backup fidelity: SetExtras. (line 78)
* --for_backup Enable backup fidelity: SetExtras. (line 89)
* --grub2-boot-info Patch El Torito boot image: Bootable. (line 89)
* --grub2-mbr Install modern GRUB2 MBR: SystemArea. (line 77)
* --grub2-sparc-core SUN SPARC core file: SystemArea. (line 258)
* --hardlinks Recording of hardlink relations: SetExtras. (line 102)
* --hardlinks Recording of hardlink relations: SetExtras. (line 113)
* --mbr-force-bootable Enforce MBR bootable/active flag: SystemArea.
(line 127)
* --md5 Recording of MD5 checksums: SetExtras. (line 94)
* --md5 Recording of MD5 checksums: SetExtras. (line 105)
* --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)
@ -1853,7 +1864,8 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
(line 123)
* --quoted_path_list read pathspecs from disk file: SetInsert.
(line 12)
* --scdbackup_tag Recording of MD5 checksum: SetExtras. (line 110)
* --scdbackup_tag Recording of MD5 checksum: SetExtras. (line 121)
* --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.
(line 56)
@ -1861,7 +1873,7 @@ 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 87)
* --xattr Recording of xattr: SetExtras. (line 98)
* -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)
@ -1888,12 +1900,12 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* -chrp-boot CHRP partition: SystemArea. (line 225)
* -chrp-boot-part CHRP partition: SystemArea. (line 216)
* -copyright set Copyright File path: ImageId. (line 66)
* -D allow deep directory hierachies: SetExtras. (line 46)
* -D allow deep directory hierachies: SetExtras. (line 57)
* -d omit trailing dot in ISO file names: SetCompl. (line 50)
* -dev set path for loading existing ISO image: Loading. (line 23)
* -dir-mode permissions for all directories: SetProduct. (line 79)
* -disable-deep-relocation allow deep directory hierachies: SetExtras.
(line 58)
(line 69)
* -disallow_dir_id_ext enforce ISO level 1 directory names: SetCompl.
(line 23)
* -e El Torito EFI boot image: Bootable. (line 47)
@ -1908,7 +1920,7 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* -exclude-list exclude disk files from inserting: SetInsert. (line 44)
* -f follow symbolic links on disk: SetInsert. (line 22)
* -file-mode permissions for all data files: SetProduct. (line 84)
* -file_name_limit curbs length of file names: SetExtras. (line 35)
* -file_name_limit curbs length of file names: SetExtras. (line 46)
* -follow-links follow symbolic links on disk: SetInsert. (line 26)
* -full-iso9660-filenames allow 31 characters in ISO file names: SetCompl.
(line 59)
@ -1919,15 +1931,15 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
(line 29)
* -hard-disk-boot El Torito boot image emulation: Bootable. (line 63)
* -help list supported options: Miscellaneous. (line 21)
* -hfs-bless HFS+ blessing ppc_bootdir: SetExtras. (line 187)
* -hfs-bless-by HFS+ blessing: SetExtras. (line 177)
* -hfsplus enable production of HFS+ partition: SetExtras. (line 136)
* -hfsplus-block-size set APM block size: SetExtras. (line 167)
* -hfs-bless HFS+ blessing ppc_bootdir: SetExtras. (line 198)
* -hfs-bless-by HFS+ blessing: SetExtras. (line 188)
* -hfsplus enable production of HFS+ partition: SetExtras. (line 147)
* -hfsplus-block-size set APM block size: SetExtras. (line 178)
* -hfsplus-block-size set HFS+ allocation block size: SetExtras.
(line 163)
* -hfsplus-file-creator-type HFS+ creator-type attribute: SetExtras.
(line 174)
* -hfsplus-serial-no set HFS+ serial number: SetExtras. (line 159)
* -hfsplus-file-creator-type HFS+ creator-type attribute: SetExtras.
(line 185)
* -hfsplus-serial-no set HFS+ serial number: SetExtras. (line 170)
* -hide keep matching files invisible in ISO tree: SetHide. (line 8)
* -hide-hfsplus keep matching files invisible in HFS+ tree: SetHide.
(line 25)
@ -1940,7 +1952,7 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* -hide-list keep matching files invisible in ISO tree: SetHide.
(line 15)
* -hide-rr-moved set deep directory relocation target: SetExtras.
(line 76)
(line 87)
* -hppa-bootloader HP-PA bootloader file: SystemArea. (line 270)
* -hppa-cmdline HP-PA PALO command line: SystemArea. (line 264)
* -hppa-hdrversion HP-PA PALO header version: SystemArea. (line 278)
@ -1955,7 +1967,7 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* -isohybrid-gpt-basdat Mark boot image in GPT: SystemArea. (line 94)
* -isohybrid-gpt-hfsplus Mark boot image in GPT: SystemArea. (line 104)
* -isohybrid-mbr Install ISOLINUX isohybrid MBR: SystemArea. (line 83)
* -J enable production of Joliet directory tree: SetExtras. (line 119)
* -J enable production of Joliet directory tree: SetExtras. (line 130)
* -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)
@ -1965,9 +1977,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 123)
* -joliet-long allow longer Joliet names: SetExtras. (line 125)
* -joliet-utf16 use UTF-16 with Joliet names: SetExtras. (line 131)
(line 134)
* -joliet-long allow longer Joliet names: SetExtras. (line 136)
* -joliet-utf16 use UTF-16 with Joliet names: SetExtras. (line 142)
* -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)
@ -2016,7 +2028,7 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* -rock Rock Ridge (is enabled by default): SetExtras. (line 13)
* -root redirect ISO root directory: SetInsert. (line 55)
* -rr_reloc_dir set deep directory relocation target: SetExtras.
(line 60)
(line 71)
* -sparc-boot SUN SPARC boot images: SystemArea. (line 254)
* -sparc-label SUN Disk Label text: SystemArea. (line 256)
* -sysid set System Id: ImageId. (line 43)
@ -2045,12 +2057,12 @@ 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 81)
* ACL, record and load, --acl: SetExtras. (line 92)
* APM, mark appended partitions, -appended_part_as_apm: SystemArea.
(line 200)
* APM, _definition: SystemArea. (line 16)
* Application Id, set, -A, -appid: ImageId. (line 34)
* Backup, enable fidelity, --for_backup: SetExtras. (line 78)
* Backup, enable fidelity, --for_backup: SetExtras. (line 89)
* Biblio File, set path, -biblio: ImageId. (line 62)
* Block address, set sorting weight, --sort-weight: SetProduct.
(line 45)
@ -2121,11 +2133,11 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Character sets, _definition: Charset. (line 6)
* Copyright File, set path, -copyright: ImageId. (line 66)
* Deep directories, allow, -D, -disable-deep-relocation: SetExtras.
(line 46)
(line 57)
* Deep directories, relocation target, -hide-rr-moved: SetExtras.
(line 76)
(line 87)
* Deep directories, relocation target, -rr_reloc_dir: SetExtras.
(line 60)
(line 71)
* Disk files, exclude, -hide-list: SetInsert. (line 44)
* Disk files, exclude, -m, -exclude, -x, -old-exclude: SetInsert.
(line 31)
@ -2133,19 +2145,20 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* ECMA-119, _definition: Standards. (line 6)
* El Torito, _definition: Bootable. (line 13)
* Examples: Examples. (line 6)
* File names, curb length, -file_name_limit: SetExtras. (line 35)
* File names, curb length, -file_name_limit: SetExtras. (line 46)
* File timestamps, set all, --set_all_file_dates: SetExtras. (line 35)
* Forced output, control, --stdio_sync: SetProduct. (line 23)
* GPT, mark appended partitions, -appended_part_as_gpt: SystemArea.
(line 194)
* GPT, _definition: SystemArea. (line 13)
* HFS+, enables production: SetExtras. (line 136)
* HFS+, issue blessing ppc_bootdir, -hfs-bless: SetExtras. (line 187)
* HFS+, issue blessing, -hfs-bless-by: SetExtras. (line 177)
* HFS+, set allocation block size: SetExtras. (line 163)
* HFS+, set APM block size: SetExtras. (line 167)
* HFS+, enables production: SetExtras. (line 147)
* HFS+, issue blessing ppc_bootdir, -hfs-bless: SetExtras. (line 198)
* HFS+, issue blessing, -hfs-bless-by: SetExtras. (line 188)
* HFS+, set allocation block size: SetExtras. (line 174)
* HFS+, set APM block size: SetExtras. (line 178)
* HFS+, set creator and type of file, -hfsplus-file-creator-type: SetExtras.
(line 174)
* HFS+, set serial number: SetExtras. (line 159)
(line 185)
* HFS+, set serial number: SetExtras. (line 170)
* HFS+, _definition: Standards. (line 32)
* Hiding, from HFS+, -hide-hfsplus: SetHide. (line 25)
* Hiding, from HFS+, -hide-hfsplus-list: SetHide. (line 28)
@ -2202,16 +2215,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 125)
* Joliet, enable, -J, -joliet: SetExtras. (line 119)
* Joliet, allows longer names, -joliet-long: SetExtras. (line 136)
* Joliet, enable, -J, -joliet: SetExtras. (line 130)
* Joliet, _definition: Standards. (line 21)
* Links, follow on disk, -f, -follow-links: SetInsert. (line 22)
* Links, record and load hard links, --hardlinks: SetExtras. (line 102)
* Links, record and load hard links, --hardlinks: SetExtras. (line 113)
* MBR, GPT, append partition, -append_partition: SystemArea. (line 174)
* MBR, sectors per head, -partition_sec_hd: SystemArea. (line 146)
* MBR, sectors per head, -partition_sec_hd <1>: SystemArea. (line 149)
* MBR, _definition: SystemArea. (line 9)
* MD5, record and load, --md5: SetExtras. (line 94)
* MD5, record and load, --md5: SetExtras. (line 105)
* Message output, increase frequency, -gui: Miscellaneous. (line 29)
* Message output, redirect stderr, -log-file: Miscellaneous. (line 33)
* Message output, suppress, -quiet: Miscellaneous. (line 25)
@ -2237,7 +2250,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 110)
* scdbackup, record checksum tag, --scdbackup_tag: SetExtras. (line 121)
* Session, select path, -M, -prev-session, -dev: Loading. (line 11)
* Session, set load and write address, -C, -cdrecord-params: Loading.
(line 25)
@ -2246,11 +2259,11 @@ 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 131)
* UTF-16, for Joliet paths, -joliet-utf16: SetExtras. (line 142)
* 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 87)
* xattr, record and load, --xattr: SetExtras. (line 98)
* xorriso, mkisofs emulation: Xorriso. (line 6)
* xorriso, options: Options. (line 6)
* zisofs file, enable recognition, -z, -transparent-compression: SetInsert.
@ -2270,26 +2283,26 @@ Node: SetInsert9753
Node: SetProduct14162
Node: SetCompl19338
Node: SetExtras21930
Node: SetHide31722
Node: ImageId33026
Node: Bootable37197
Node: SystemArea42365
Node: Charset58070
Node: Jigdo59095
Node: Miscellaneous63372
Node: Examples65017
Node: ExSimple65511
Node: ExGraft65994
Node: ExMkisofs67294
Node: ExGrowisofs68560
Node: ExIncBackup69750
Node: ExIncBckAcc72911
Node: ExBootable74600
Node: Files78782
Node: Seealso79877
Node: Bugreport80526
Node: Legal81117
Node: CommandIdx82014
Node: ConceptIdx97306
Node: SetHide32345
Node: ImageId33649
Node: Bootable37820
Node: SystemArea42988
Node: Charset58693
Node: Jigdo59718
Node: Miscellaneous63995
Node: Examples65640
Node: ExSimple66134
Node: ExGraft66617
Node: ExMkisofs67917
Node: ExGrowisofs69183
Node: ExIncBackup70373
Node: ExIncBckAcc73534
Node: ExBootable75223
Node: Files79405
Node: Seealso80500
Node: Bugreport81149
Node: Legal81740
Node: CommandIdx82637
Node: ConceptIdx98002

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.4.5, Aug 05, 2016"
@c man .TH XORRISOFS 1 "Version 1.4.5, Aug 06, 2016"
@c man .\" Please adjust this date whenever revising the manpage.
@c man .\"
@c man .\" Some roff macros, for reference:
@ -799,6 +799,21 @@ discouraged to disable it by this option, except for the special use case
to revoke the effect of -r by:
@minus{}@minus{}norock -R
@c man .TP
@item @minus{}@minus{}set_all_file_dates timestring
@kindex @minus{}@minus{}set_all_file_dates set all file timestamps
@cindex File timestamps, set all, @minus{}@minus{}set_all_file_dates
Set mtime, atime, and ctime of all files and directories to the given time.
@*
Valid timestring formats are: 'Nov 8 14:51:13 CET 2007', 110814512007.13,
2007110814511300. See also @minus{}@minus{}modification-date= and man xorriso,
Examples of input timestrings.
@*
This action stays delayed until mkisofs emulation ends. Up to then it can be
revoked by @minus{}@minus{}set_all_file_dates with empty timestring.
In any case files which get into the ISO after mkisofs emulation ended
will not be affected, unless another mkisofs emulation
applies @minus{}@minus{}set_all_file_date again.
@c man .TP
@item -file_name_limit number
@kindex -file_name_limit curbs length of file names
@cindex File names, curb length, -file_name_limit