Skip to content

Commit

Permalink
keep file/directory permissions in Reproducible Builds mode
Browse files Browse the repository at this point in the history
  • Loading branch information
hboutemy committed Nov 6, 2022
1 parent 0cffff5 commit 6bd43c3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
Expand Up @@ -1283,12 +1283,7 @@ public void configureReproducibleBuild( FileTime lastModifiedTime )
// 2. sort filenames in each directory when scanning filesystem
setFilenameComparator( String::compareTo );

// 3. ignore file/directory mode from filesystem, since they may vary based on local user umask
// notice: this overrides execute bit on Unix (that is already ignored on Windows)
setFileMode( Archiver.DEFAULT_FILE_MODE );
setDirectoryMode( Archiver.DEFAULT_DIR_MODE );

// 4. ignore uid/gid from filesystem (for tar)
// 3. ignore uid/gid from filesystem (for tar)
setOverrideUid( 0 );
setOverrideUserName( "root" ); // is it possible to avoid this, like "tar --numeric-owner"?
setOverrideGid( 0 );
Expand Down
1 change: 0 additions & 1 deletion src/main/java/org/codehaus/plexus/archiver/Archiver.java
Expand Up @@ -488,7 +488,6 @@ ResourceIterator getResources()
* <ul>
* <li>reproducible archive entries order,</li>
* <li>defined entries timestamp</li>
* <li>and reproducible entries Unix mode.</li>
* </ul>
*
* @param lastModifiedTime The last modification time of the entries
Expand Down

0 comments on commit 6bd43c3

Please sign in to comment.