Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keep file/directory permissions in Reproducible Builds mode #241

Merged
merged 1 commit into from Nov 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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