File tree 2 files changed +16
-2
lines changed
src/tools/rust-installer/src
2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,12 @@ actor! {
55
55
/// The formats used to compress the tarball
56
56
#[ arg( value_name = "FORMAT" , default_value_t) ]
57
57
compression_formats: CompressionFormats ,
58
+
59
+ /// Modification time that will be set for all files added to the archive.
60
+ /// The default is the date of the first Rust commit from 2006.
61
+ /// This serves for better reproducibility of the archives.
62
+ #[ arg( value_name = "FILE_MTIME" , default_value_t = 1153704088 ) ]
63
+ override_file_mtime: u64 ,
58
64
}
59
65
}
60
66
@@ -145,7 +151,8 @@ impl Combiner {
145
151
. input ( self . package_name )
146
152
. output ( path_to_str ( & output) ?. into ( ) )
147
153
. compression_profile ( self . compression_profile )
148
- . compression_formats ( self . compression_formats ) ;
154
+ . compression_formats ( self . compression_formats )
155
+ . override_file_mtime ( self . override_file_mtime ) ;
149
156
tarballer. run ( ) ?;
150
157
151
158
Ok ( ( ) )
Original file line number Diff line number Diff line change @@ -61,6 +61,12 @@ actor! {
61
61
/// The formats used to compress the tarball
62
62
#[ arg( value_name = "FORMAT" , default_value_t) ]
63
63
compression_formats: CompressionFormats ,
64
+
65
+ /// Modification time that will be set for all files added to the archive.
66
+ /// The default is the date of the first Rust commit from 2006.
67
+ /// This serves for better reproducibility of the archives.
68
+ #[ arg( value_name = "FILE_MTIME" , default_value_t = 1153704088 ) ]
69
+ override_file_mtime: u64 ,
64
70
}
65
71
}
66
72
@@ -114,7 +120,8 @@ impl Generator {
114
120
. input ( self . package_name )
115
121
. output ( path_to_str ( & output) ?. into ( ) )
116
122
. compression_profile ( self . compression_profile )
117
- . compression_formats ( self . compression_formats ) ;
123
+ . compression_formats ( self . compression_formats )
124
+ . override_file_mtime ( self . override_file_mtime ) ;
118
125
tarballer. run ( ) ?;
119
126
120
127
Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments