Skip to content

Conditionally preserve file permissions when archiving through pkg_tar#951

Merged
aiuto merged 11 commits intobazelbuild:mainfrom
ronodnn:main
Apr 30, 2025
Merged

Conditionally preserve file permissions when archiving through pkg_tar#951
aiuto merged 11 commits intobazelbuild:mainfrom
ronodnn:main

Conversation

@ronodnn
Copy link
Contributor

@ronodnn ronodnn commented Apr 25, 2025

If the new preserve_mode flag is enabled, set mode by extracting the permission bits from the file's mode attribute. The preserve_mode flag is disabled by default.

This is related to Issue bazelbuild/bazel#2925.
This is based on bazelbuild/bazel#3585, except this work hides the feature under a disabled flag, to avoid changing the default behavior.

The feature was tested successfully on Linux and MacOS.

@ronodnn ronodnn marked this pull request as ready for review April 28, 2025 20:32
@ronodnn ronodnn requested review from aiuto and cgrindel as code owners April 28, 2025 20:32
Copy link
Collaborator

@cgrindel cgrindel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than a code suggestion, LGTM.

Co-authored-by: Chuck Grindel <[email protected]>
Copy link
Collaborator

@aiuto aiuto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm rerunning CI in the hope it passes this time.

@aiuto
Copy link
Collaborator

aiuto commented Apr 29, 2025

Can you run buildifier on the code.

@ronodnn
Copy link
Contributor Author

ronodnn commented Apr 29, 2025

Can you run buildifier on the code.

Done.

@aiuto aiuto merged commit c590e61 into bazelbuild:main Apr 30, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants