From 1f8d9c7a442591a71d6b96013cb03eb60d70db31 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Thu, 18 Apr 2019 11:28:35 +0200 Subject: [PATCH] New command -iso_nowtime to set fixed timestamp for synthetic files --- libisoburn/libisoburn.ver | 1 + xorriso/base_obj.c | 2 + xorriso/lib_mgt.c | 15 +++++ xorriso/opts_d_h.c | 4 ++ xorriso/opts_i_o.c | 31 ++++++++- xorriso/parse_exec.c | 10 ++- xorriso/text_io.c | 8 +++ xorriso/xorriso.1 | 13 +++- xorriso/xorriso.h | 4 ++ xorriso/xorriso.info | 128 +++++++++++++++++++----------------- xorriso/xorriso.texi | 15 ++++- xorriso/xorriso_private.h | 6 ++ xorriso/xorriso_timestamp.h | 2 +- xorriso/xorrisoburn.h | 2 + xorriso/xorrisofs.1 | 4 +- xorriso/xorrisofs.info | 14 ++-- xorriso/xorrisofs.texi | 4 +- 17 files changed, 187 insertions(+), 76 deletions(-) diff --git a/libisoburn/libisoburn.ver b/libisoburn/libisoburn.ver index fe6af148..51f8f484 100644 --- a/libisoburn/libisoburn.ver +++ b/libisoburn/libisoburn.ver @@ -234,6 +234,7 @@ Xorriso_option_help; Xorriso_option_hfsplus; Xorriso_option_hide; Xorriso_option_history; +Xorriso_option_iso_nowtime; Xorriso_option_iso_rr_pattern; Xorriso_option_jigdo; Xorriso_option_joliet; diff --git a/xorriso/base_obj.c b/xorriso/base_obj.c index d5c0cf9d..0a768f08 100644 --- a/xorriso/base_obj.c +++ b/xorriso/base_obj.c @@ -312,6 +312,8 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag) m->vol_effective_time= 0; m->vol_uuid[0]= 0; m->all_file_dates[0]= 0; + m->do_override_now_time= 0; + m->now_time_override= 0; #ifdef Xorriso_with_libjtE m->libjte_handle= NULL; diff --git a/xorriso/lib_mgt.c b/xorriso/lib_mgt.c index a6a11eb4..0dc093ba 100644 --- a/xorriso/lib_mgt.c +++ b/xorriso/lib_mgt.c @@ -1001,3 +1001,18 @@ int Xorriso_make_guid(struct XorrisO *xorriso, char *line, int flag) return(ret); } + +int Xorriso_set_libisofs_now(struct XorrisO *xorriso, int flag) +{ + int ret; + time_t now; + + if(xorriso->do_override_now_time) { + now= xorriso->now_time_override; + ret= iso_nowtime(&now, 1); + } else { + ret= iso_nowtime(&now, 0); + } + return(ret); +} + diff --git a/xorriso/opts_d_h.c b/xorriso/opts_d_h.c index 926e6b1a..b0e88240 100644 --- a/xorriso/opts_d_h.c +++ b/xorriso/opts_d_h.c @@ -1787,6 +1787,10 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag) " -ecma119_map \"unmapped\"|\"stripped\"|\"uppercase\"|\"lowercase\"", " Choose conversion of file names if neither Rock Ridge", " nor Joliet is present in the loaded ISO session.", +" -iso_nowtime \"dynamic\"|timestring", +" Choose use of current time or a fixed point in time for", +" timestamps where libisofs would normally use the current", +" (i.e. dynamic) time.", " -disk_dev_ino \"on\"|\"ino_only\"|\"off\"", " Enable or disable recording of disk file dev_t and ino_t", " and their use in file comparison.", diff --git a/xorriso/opts_i_o.c b/xorriso/opts_i_o.c index c40bdceb..1af9849f 100644 --- a/xorriso/opts_i_o.c +++ b/xorriso/opts_i_o.c @@ -1,7 +1,7 @@ /* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images. - Copyright 2007-2015 Thomas Schmitt, + Copyright 2007-2019 Thomas Schmitt, Provided under GPL version 2 or later. @@ -29,6 +29,35 @@ #include "xorrisoburn.h" +/* Command -iso_nowtime "dynamic"|timespec */ +int Xorriso_option_iso_nowtime(struct XorrisO *xorriso, char *text, int flag) +{ + char *time_type = "m"; + int t_type= 0, ret; + time_t t; + + if(strcmp(text, "dynamic") == 0) { + xorriso->do_override_now_time= 0; + Xorriso_set_libisofs_now(xorriso, 2); + Xorriso_msgs_submit(xorriso, 0, "-iso_nowtime: Set to \"dynamic\"", 0, + "NOTE", 0); + return(1); + } + ret= Xorriso_convert_datestring(xorriso, "-iso_nowtime", time_type, text, + &t_type, &t, 0); + if(ret<=0) + goto ex; + xorriso->do_override_now_time= 1; + xorriso->now_time_override= t; + Xorriso_set_libisofs_now(xorriso, 1); + sprintf(xorriso->info_text, "-iso_nowtime: Set to =%.f", (double) t); + Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0); + ret= 1; +ex:; + return(ret); +} + + /* Option -iso_rr_pattern "on"|"ls"|"off" */ int Xorriso_option_iso_rr_pattern(struct XorrisO *xorriso, char *mode,int flag) { diff --git a/xorriso/parse_exec.c b/xorriso/parse_exec.c index c0a5df4a..456d0b36 100644 --- a/xorriso/parse_exec.c +++ b/xorriso/parse_exec.c @@ -1,7 +1,7 @@ /* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images. - Copyright 2007-2017 Thomas Schmitt, + Copyright 2007-2019 Thomas Schmitt, Provided under GPL version 2 or later. @@ -541,7 +541,7 @@ int Xorriso_count_args(struct XorrisO *xorriso, int argc, char **argv, "commit_eject","compliance","copyright_file", "dev","dialog","disk_dev_ino","disk_pattern","displacement", "dummy","dvd_obs","early_stdio_test","ecma119_map","eject", - "iso_rr_pattern","file_name_limit","follow","format","fs", + "iso_nowtime","iso_rr_pattern","file_name_limit","follow","format","fs", "gid","grow_blindly","hardlinks", "hfsplus","history","indev","in_charset","joliet", "list_delimiter","list_extras","list_profiles","local_charset", @@ -694,7 +694,7 @@ int Xorriso_cmd_sorting_rank(struct XorrisO *xorriso, "ecma119_map", "disk_dev_ino", "rom_toc_scan", "calm_drive", "ban_stdio_write", "early_stdio_test", "data_cache_size", - "scsi_dev_family", + "scsi_dev_family", "iso_nowtime", "* Character sets:", "charset", "local_charset", @@ -1406,6 +1406,10 @@ next_command:; (*idx)++; ret= Xorriso_option_charset(xorriso, arg1, 1); + } else if(strcmp(cmd,"iso_nowtime")==0) { + (*idx)++; + ret= Xorriso_option_iso_nowtime(xorriso, arg1, 0); + } else if(strcmp(cmd,"iso_rr_pattern")==0) { (*idx)++; ret= Xorriso_option_iso_rr_pattern(xorriso, arg1, 0); diff --git a/xorriso/text_io.c b/xorriso/text_io.c index 13499f9e..ffae7fb8 100644 --- a/xorriso/text_io.c +++ b/xorriso/text_io.c @@ -3213,6 +3213,14 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag) if(!(is_default && no_defaults)) Xorriso_status_result(xorriso,filter,fp,flag&2); + is_default= (xorriso->do_override_now_time); + if(xorriso->do_override_now_time) + sprintf(line, "-iso_nowtime =%.f\n", (double) xorriso->now_time_override); + else + sprintf(line, "-iso_nowtime dynamic\n"); + if(!(is_default && no_defaults)) + Xorriso_status_result(xorriso, filter, fp, flag & 2); + is_default= (xorriso->do_iso_rr_pattern==1); sprintf(line,"-iso_rr_pattern %s\n", (xorriso->do_iso_rr_pattern == 1 ? "on" : diff --git a/xorriso/xorriso.1 b/xorriso/xorriso.1 index 43835e15..83af6624 100644 --- a/xorriso/xorriso.1 +++ b/xorriso/xorriso.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 XORRISO 1 "Version 1.5.1, Feb 16, 2019" +.TH XORRISO 1 "Version 1.5.1, Apr 15, 2019" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: @@ -1019,6 +1019,14 @@ lowercase letters. This is compatible to default GNU/Linux mount behavior. Mode "uppercase" is like "stripped" but maps lowercase letters to uppercase, if any occur despite the prescriptions of ECMA\-119. .TP +\fB\-iso_nowtime\fR "dynamic"|timestring +Choose whether to use the current time ("dynamic") or a fixed time point +for timestamps of ISO 9660 nodes without a disk source file and as default +for superblock timestamps. +.br +If a timestring is given, then it is used for such timestamps. For the formats +of time strings see command \fB\-alter_date\fR. +.TP \fB\-disk_dev_ino\fR "on"|"ino_only"|"off" Enable or disable processing of recorded file identification numbers (dev_t and ino_t). If enabled they are stored as xattr and can @@ -6138,7 +6146,8 @@ It is supposed to be either undefined or to contain a decimal number which tells the seconds since january 1st 1970. If it contains a number, then it is used as time value to set the default of \-volume date "uuid", sets \-boot_image "any" "gpt_disk_guid=" to -"volume_date_uuid", and \-volume_date "all_file_dates" to "set_to_mtime", +"volume_date_uuid", \-volume_date "all_file_dates" to "set_to_mtime", +and \-iso_nowtime to "=$SOURCE_DATE_EPOCH". .br Startup files and program options can override the effect of SOURCE_DATE_EPOCH. .br diff --git a/xorriso/xorriso.h b/xorriso/xorriso.h index 3d9e5152..9ba22627 100644 --- a/xorriso/xorriso.h +++ b/xorriso/xorriso.h @@ -1645,6 +1645,10 @@ int Xorriso_option_hide(struct XorrisO *xorriso, char *hide_state, /* @since 0.1.0 */ int Xorriso_option_history(struct XorrisO *xorriso, char *line, int flag); +/* Command -iso_nowtime "dynamic"|timespec */ +/* @since 1.5.2 */ +int Xorriso_option_iso_nowtime(struct XorrisO *xorriso, char *text, int flag); + /* Command -iso_rr_pattern "on"|"ls"|"off" */ /* @since 0.1.0 */ int Xorriso_option_iso_rr_pattern(struct XorrisO *xorriso, char *mode, diff --git a/xorriso/xorriso.info b/xorriso/xorriso.info index e5e99055..623eaadc 100644 --- a/xorriso/xorriso.info +++ b/xorriso/xorriso.info @@ -915,6 +915,12 @@ activate them only after image loading. mount behavior. Mode "uppercase" is like "stripped" but maps lowercase letters to uppercase, if any occur despite the prescriptions of ECMA-119. +-iso_nowtime "dynamic"|timestring + Choose whether to use the current time ("dynamic") or a fixed time + point for timestamps of ISO 9660 nodes without a disk source file + and as default for superblock timestamps. + If a timestring is given, then it is used for such timestamps. For + the formats of time strings see command *-alter_date*. -disk_dev_ino "on"|"ino_only"|"off" Enable or disable processing of recorded file identification numbers (dev_t and ino_t). If enabled they are stored as xattr and @@ -5185,8 +5191,9 @@ SOURCE_DATE_EPOCH belongs to the specs of reproducible-builds.org. It is supposed to be either undefined or to contain a decimal number which tells the seconds since january 1st 1970. If it contains a number, then it is used as time value to set the default of -volume date "uuid", sets --boot_image "any" "gpt_disk_guid=" to "volume_date_uuid", and --volume_date "all_file_dates" to "set_to_mtime", +-boot_image "any" "gpt_disk_guid=" to "volume_date_uuid", -volume_date +"all_file_dates" to "set_to_mtime", and -iso_nowtime to +"=$SOURCE_DATE_EPOCH". Startup files and program options can override the effect of SOURCE_DATE_EPOCH. @@ -5288,11 +5295,11 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -assert_volid rejects undesired images: Loading. (line 113) * -auto_charset learns character set from image: Loading. (line 125) * -backslash_codes enables backslash conversion: Scripting. (line 71) -* -ban_stdio_write demands real drive: Loading. (line 336) +* -ban_stdio_write demands real drive: Loading. (line 342) * -biblio_file sets biblio file name: SetWrite. (line 250) * -blank erases media: Writing. (line 57) * -boot_image controls bootability: Bootable. (line 75) -* -calm_drive reduces drive activity: Loading. (line 326) +* -calm_drive reduces drive activity: Loading. (line 332) * -cd sets working directory in ISO: Navigate. (line 7) * -cdx sets working directory on disk: Navigate. (line 15) * -changes_pending overrides change status: Writing. (line 12) @@ -5326,12 +5333,12 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -cp_rx copies file trees to disk: Restore. (line 103) * -cp_rx copies file trees to disk <1>: Restore. (line 111) * -cut_out inserts piece of data file: Insert. (line 139) -* -data_cache_size adjusts read cache size: Loading. (line 352) +* -data_cache_size adjusts read cache size: Loading. (line 358) * -dev acquires one drive for input and output: AqDrive. (line 12) * -devices gets list of drives: Inquiry. (line 7) * -device_links gets list of drives: Inquiry. (line 17) * -dialog enables dialog mode: DialogCtl. (line 7) -* -disk_dev_ino fast incremental backup: Loading. (line 246) +* -disk_dev_ino fast incremental backup: Loading. (line 252) * -disk_pattern controls pattern expansion: Insert. (line 34) * -displacement compensate altered image start address: Loading. (line 57) @@ -5342,7 +5349,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -dusx show directory size on disk: Navigate. (line 88) * -dux show directory size on disk: Navigate. (line 84) * -dvd_obs set write block size: SetWrite. (line 330) -* -early_stdio_test classifies stdio drives: Loading. (line 340) +* -early_stdio_test classifies stdio drives: Loading. (line 346) * -ecma119_map names w/o Rock Ridge, Joliet: Loading. (line 234) * -eject ejects drive tray: Writing. (line 50) * -end writes pending session and ends program: Scripting. (line 151) @@ -5354,7 +5361,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -extract_cut copies file piece to disk: Restore. (line 80) * -extract_l copies files to disk: Restore. (line 76) * -extract_single copies file to disk: Restore. (line 73) -* -file_name_limit curbs length of file names: Loading. (line 266) +* -file_name_limit curbs length of file names: Loading. (line 272) * -file_size_limit limits data file size: SetInsert. (line 7) * -find traverses and alters ISO tree: CmdFind. (line 7) * -findx traverses disk tree: Navigate. (line 91) @@ -5375,6 +5382,8 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -history brings text into readline history: Scripting. (line 42) * -indev acquires a drive for input: AqDrive. (line 23) * -in_charset sets input character set: Loading. (line 120) +* -iso_nowtime fixed "now" time for ISO 9660 objects: Loading. + (line 246) * -iso_rr_pattern controls pattern expansion: Manip. (line 10) * -jigdo clears JTE or or adds parameter to JTE: Jigdo. (line 33) * -joliet enables production of Joliet tree: SetWrite. (line 10) @@ -5459,7 +5468,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top (line 51) * -rollback discards pending changes: Writing. (line 9) * -rollback_end ends program without writing: Scripting. (line 154) -* -rom_toc_scan searches for sessions: Loading. (line 298) +* -rom_toc_scan searches for sessions: Loading. (line 304) * -rr_reloc_dir sets name of relocation directory: SetWrite. (line 144) * -scdbackup_tag enables scdbackup checksum tag: Emulation. (line 179) * -scsi_dev_family choose Linux device file type: AqDrive. (line 43) @@ -5533,7 +5542,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Appended partition, in MBR or GPT: Bootable. (line 282) * Automatic execution order, of arguments, -x: ArgSort. (line 16) * Backslash Interpretation, _definition: Processing. (line 53) -* Backup, enable fast incremental, -disk_dev_ino: Loading. (line 246) +* Backup, enable fast incremental, -disk_dev_ino: Loading. (line 252) * Backup, enable features, -for_backup: Loading. (line 220) * Backup, scdbackup checksum tag, -scdbackup: Emulation. (line 179) * Blank media, _definition: Media. (line 29) @@ -5572,8 +5581,8 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Directory, delete, -rmdir: Manip. (line 29) * disk_path, _definition: Insert. (line 6) * Drive, accessability, -drive_class: Loading. (line 75) -* Drive, classify stdio, -early_stdio_test: Loading. (line 340) -* Drive, demand real MMC, -ban_stdio_write: Loading. (line 336) +* Drive, classify stdio, -early_stdio_test: Loading. (line 346) +* Drive, demand real MMC, -ban_stdio_write: Loading. (line 342) * Drive, eject tray, -eject: Writing. (line 50) * Drive, for input and output, -dev: AqDrive. (line 12) * Drive, for input, -indev: AqDrive. (line 23) @@ -5581,7 +5590,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Drive, get drive list, -devices: Inquiry. (line 7) * Drive, get drive list, -device_links: Inquiry. (line 17) * Drive, list supported media, -list_profiles: Writing. (line 177) -* Drive, reduce activity, -calm_drive: Loading. (line 326) +* Drive, reduce activity, -calm_drive: Loading. (line 332) * Drive, report SCSI commands, -scsi_log: Scripting. (line 143) * Drive, write and eject, -commit_eject: Writing. (line 53) * Drive, _definition: Drives. (line 6) @@ -5597,7 +5606,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Examples: Examples. (line 6) * extattr, _definition: Extras. (line 66) * File content, copy, -concat: Restore. (line 118) -* File names, curb length, -file_name_limit: Loading. (line 266) +* File names, curb length, -file_name_limit: Loading. (line 272) * File names, if neither Rock Ridge nor Joliet: Loading. (line 234) * Filter, apply to file tree, -set_filter_r: Filter. (line 84) * Filter, apply to file, -set_filter: Filter. (line 58) @@ -5621,7 +5630,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * HFS+ serial number: Bootable. (line 406) * hidden, set in ISO image, -hide: Manip. (line 177) * HP-PA boot sector, production: Bootable. (line 381) -* Image reading, cache size, -data_cache_size: Loading. (line 352) +* Image reading, cache size, -data_cache_size: Loading. (line 358) * Image, demand volume ID, -assert_volid: Loading. (line 113) * Image, discard pending changes, -rollback: Writing. (line 9) * Image, filesystem to load, -read_fs: Loading. (line 104) @@ -5673,6 +5682,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Jigdo Template Extraction, -jigdo: Jigdo. (line 33) * Jigdo Template Extraction, _definition: Jigdo. (line 6) * LBA, _definition: Drives. (line 17) +* libisofs, fixed "now" time: Loading. (line 246) * Linux device type, -scsi_dev_family: AqDrive. (line 43) * List delimiter, _definition: Processing. (line 9) * Local Character Set, _definition: Charset. (line 11) @@ -5783,7 +5793,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * SUN SPARC boot images, activation: Bootable. (line 450) * Symbolic link, create, -lns: Insert. (line 181) * System area, _definition: Bootable. (line 200) -* Table-of-content, search sessions, -rom_toc_scan: Loading. (line 298) +* Table-of-content, search sessions, -rom_toc_scan: Loading. (line 304) * Table-of-content, show, -toc: Inquiry. (line 27) * Timestamps, set in ISO image, -alter_date: Manip. (line 139) * Timestamps, set in ISO image, -alter_date_r: Manip. (line 174) @@ -5841,48 +5851,48 @@ Node: Commands25598 Node: ArgSort27275 Node: AqDrive28769 Node: Loading32883 -Node: Insert54150 -Node: SetInsert65653 -Node: Manip75085 -Node: CmdFind85185 -Node: Filter104114 -Node: Writing108736 -Node: SetWrite118892 -Node: Bootable143651 -Node: Jigdo170608 -Node: Charset174867 -Node: Exception178196 -Node: DialogCtl184325 -Node: Inquiry186927 -Node: Navigate195811 -Node: Verify204268 -Node: Restore214739 -Node: Emulation223352 -Node: Scripting233811 -Node: Frontend241594 -Node: Examples251220 -Node: ExDevices252398 -Node: ExCreate253059 -Node: ExDialog254359 -Node: ExGrowing255630 -Node: ExModifying256439 -Node: ExBootable256949 -Node: ExCharset257504 -Node: ExPseudo258400 -Node: ExCdrecord259327 -Node: ExMkisofs259647 -Node: ExGrowisofs261545 -Node: ExException262699 -Node: ExTime263157 -Node: ExIncBackup263615 -Node: ExRestore267641 -Node: ExRecovery268587 -Node: Files269159 -Node: Environ270493 -Node: Seealso271202 -Node: Bugreport271919 -Node: Legal272510 -Node: CommandIdx273522 -Node: ConceptIdx290856 +Node: Insert54507 +Node: SetInsert66010 +Node: Manip75442 +Node: CmdFind85542 +Node: Filter104471 +Node: Writing109093 +Node: SetWrite119249 +Node: Bootable144008 +Node: Jigdo170965 +Node: Charset175224 +Node: Exception178553 +Node: DialogCtl184682 +Node: Inquiry187284 +Node: Navigate196168 +Node: Verify204625 +Node: Restore215096 +Node: Emulation223709 +Node: Scripting234168 +Node: Frontend241951 +Node: Examples251577 +Node: ExDevices252755 +Node: ExCreate253416 +Node: ExDialog254716 +Node: ExGrowing255987 +Node: ExModifying256796 +Node: ExBootable257306 +Node: ExCharset257861 +Node: ExPseudo258757 +Node: ExCdrecord259684 +Node: ExMkisofs260004 +Node: ExGrowisofs261902 +Node: ExException263056 +Node: ExTime263514 +Node: ExIncBackup263972 +Node: ExRestore267998 +Node: ExRecovery268944 +Node: Files269516 +Node: Environ270850 +Node: Seealso271598 +Node: Bugreport272315 +Node: Legal272906 +Node: CommandIdx273918 +Node: ConceptIdx291388  End Tag Table diff --git a/xorriso/xorriso.texi b/xorriso/xorriso.texi index 6e0c99e4..38ab2f33 100644 --- a/xorriso/xorriso.texi +++ b/xorriso/xorriso.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 XORRISO 1 "Version 1.5.1, Feb 16, 2019" +@c man .TH XORRISO 1 "Version 1.5.1, Apr 15, 2019" @c man .\" Please adjust this date whenever revising the manpage. @c man .\" @c man .\" Some roff macros, for reference: @@ -1269,6 +1269,16 @@ lowercase letters. This is compatible to default GNU/Linux mount behavior. Mode "uppercase" is like "stripped" but maps lowercase letters to uppercase, if any occur despite the prescriptions of ECMA-119. @c man .TP +@item -iso_nowtime "dynamic"|timestring +@kindex -iso_nowtime fixed "now" time for ISO 9660 objects +@cindex libisofs, fixed "now" time +Choose whether to use the current time ("dynamic") or a fixed time point +for timestamps of ISO 9660 nodes without a disk source file and as default +for superblock timestamps. +@* +If a timestring is given, then it is used for such timestamps. For the formats +of time strings see command @strong{-alter_date}. +@c man .TP @item -disk_dev_ino "on"|"ino_only"|"off" @kindex -disk_dev_ino fast incremental backup @cindex Backup, enable fast incremental, -disk_dev_ino @@ -7149,7 +7159,8 @@ It is supposed to be either undefined or to contain a decimal number which tells the seconds since january 1st 1970. If it contains a number, then it is used as time value to set the default of -volume date "uuid", sets -boot_image "any" "gpt_disk_guid=" to -"volume_date_uuid", and -volume_date "all_file_dates" to "set_to_mtime", +"volume_date_uuid", -volume_date "all_file_dates" to "set_to_mtime", +and -iso_nowtime to "=$SOURCE_DATE_EPOCH". @* Startup files and program options can override the effect of SOURCE_DATE_EPOCH. @* diff --git a/xorriso/xorriso_private.h b/xorriso/xorriso_private.h index 79649046..9c908103 100644 --- a/xorriso/xorriso_private.h +++ b/xorriso/xorriso_private.h @@ -554,6 +554,12 @@ struct XorrisO { /* the global context of xorriso */ */ char all_file_dates[80]; + /* Timestamp for ISO files which have no origin file on disk and thus + normally get time(NULL) as timestamps + */ + int do_override_now_time; + time_t now_time_override; + #ifdef Xorriso_with_libjtE /* Parameters and state of Jigdo Template Export environment */ struct libjte_env *libjte_handle; diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index 2c907297..7be81dba 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2019.04.08.115541" +#define Xorriso_timestamP "2019.04.18.092737" diff --git a/xorriso/xorrisoburn.h b/xorriso/xorrisoburn.h index d1324aca..1e92edfd 100644 --- a/xorriso/xorrisoburn.h +++ b/xorriso/xorrisoburn.h @@ -661,5 +661,7 @@ int Xorriso_format_guid(struct XorrisO *xorriso, uint8_t guid[16], char *line, int Xorriso_make_guid(struct XorrisO *xorriso, char *line, int flag); +int Xorriso_set_libisofs_now(struct XorrisO *xorriso, int flag); + #endif /* Xorrisoburn_includeD */ diff --git a/xorriso/xorrisofs.1 b/xorriso/xorrisofs.1 index ed87eff6..5e683716 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.5.1, Feb 16, 2019" +.TH XORRISOFS 1 "Version 1.5.1, Apr 15, 2019" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: @@ -2133,6 +2133,8 @@ then it is used as time value to set the default of \-\-modification\-date=. \-\-gpt_disk_guid defaults to "modification\-date". The default of \-\-set_all_file_dates is then "set_to_mtime". +Further the "now" time for ISO nodes without disk source is then set to +the SOURCE_DATE_EPOCH value. .br Startup files and program options can override the effect of SOURCE_DATE_EPOCH. .SS diff --git a/xorriso/xorrisofs.info b/xorriso/xorrisofs.info index 32a6f4c8..e4856856 100644 --- a/xorriso/xorrisofs.info +++ b/xorriso/xorrisofs.info @@ -1865,7 +1865,9 @@ is supposed to be either undefined or to contain a decimal number which tells the seconds since january 1st 1970. If it contains a number, then it is used as time value to set the default of --modification-date=. --gpt_disk_guid defaults to "modification-date". The default of ---set_all_file_dates is then "set_to_mtime". +--set_all_file_dates is then "set_to_mtime". Further the "now" time for +ISO nodes without disk source is then set to the SOURCE_DATE_EPOCH +value. Startup files and program options can override the effect of SOURCE_DATE_EPOCH. @@ -2427,10 +2429,10 @@ Node: ExIncBckAcc78902 Node: ExBootable80607 Node: Files84789 Node: Environ85884 -Node: Seealso86655 -Node: Bugreport87306 -Node: Legal87899 -Node: CommandIdx88796 -Node: ConceptIdx104663 +Node: Seealso86757 +Node: Bugreport87408 +Node: Legal88001 +Node: CommandIdx88898 +Node: ConceptIdx104765  End Tag Table diff --git a/xorriso/xorrisofs.texi b/xorriso/xorrisofs.texi index e8357299..e3a1fd8b 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.5.1, Feb 16, 2019" +@c man .TH XORRISOFS 1 "Version 1.5.1, Apr 15, 2019" @c man .\" Please adjust this date whenever revising the manpage. @c man .\" @c man .\" Some roff macros, for reference: @@ -2754,6 +2754,8 @@ then it is used as time value to set the default of @minus{}@minus{}modification-date=. @minus{}@minus{}gpt_disk_guid defaults to "modification-date". The default of @minus{}@minus{}set_all_file_dates is then "set_to_mtime". +Further the "now" time for ISO nodes without disk source is then set to +the SOURCE_DATE_EPOCH value. @* Startup files and program options can override the effect of SOURCE_DATE_EPOCH. @c man .SS