This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
src/tools/rust-installer/src Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,12 @@ actor! {
5555 /// The formats used to compress the tarball
5656 #[ arg( value_name = "FORMAT" , default_value_t) ]
5757 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 ,
5864 }
5965}
6066
@@ -145,7 +151,8 @@ impl Combiner {
145151 . input ( self . package_name )
146152 . output ( path_to_str ( & output) ?. into ( ) )
147153 . 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 ) ;
149156 tarballer. run ( ) ?;
150157
151158 Ok ( ( ) )
Original file line number Diff line number Diff line change @@ -61,6 +61,12 @@ actor! {
6161 /// The formats used to compress the tarball
6262 #[ arg( value_name = "FORMAT" , default_value_t) ]
6363 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 ,
6470 }
6571}
6672
@@ -114,7 +120,8 @@ impl Generator {
114120 . input ( self . package_name )
115121 . output ( path_to_str ( & output) ?. into ( ) )
116122 . 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 ) ;
118125 tarballer. run ( ) ?;
119126
120127 Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments