...
 
......@@ -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;
......
......@@ -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;
......
......@@ -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);
}
......@@ -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.",
......
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2015 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2019 Thomas Schmitt, <scdbackup@gmx.net>
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)
{
......
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2017 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2019 Thomas Schmitt, <scdbackup@gmx.net>
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);
......@@ -2614,6 +2618,10 @@ malformed:;
strcpy(xorriso->vol_uuid, num_text);
xorriso->gpt_guid_mode= 2; /* Disk GUID from vol_uuid */
strcpy(xorriso->all_file_dates, "set_to_mtime");
xorriso->do_override_now_time= 1;
xorriso->now_time_override= tsec;
Xorriso_set_libisofs_now(xorriso, 0);
sprintf(xorriso->info_text,
"Environment variable SOURCE_DATE_EPOCH encountered with value %s",
sec_text);
......@@ -2626,8 +2634,12 @@ malformed:;
xorriso->all_file_dates);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "DEBUG", 0);
sprintf(xorriso->info_text,
"SOURCE_DATE_EPOCH : -boot_image any volume_date_uuid");
"SOURCE_DATE_EPOCH : -boot_image any gpt_disk_guid=volume_date_uuid");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "DEBUG", 0);
sprintf(xorriso->info_text,
"SOURCE_DATE_EPOCH : -iso_nowtime =%.f", (double) tsec);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "DEBUG", 0);
return(1);
}
......
......@@ -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" :
......
......@@ -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
......
......@@ -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,
......
This diff is collapsed.
......@@ -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.
@*
......
......@@ -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;
......
#define Xorriso_timestamP "2019.04.08.115541"
#define Xorriso_timestamP "2019.04.18.092941"
......@@ -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 */
......@@ -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
......
No preview for this file type
......@@ -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
......