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

Cannot set mode for executable files via mode on pkg_tar #822

Open
Strum355 opened this issue Feb 14, 2024 · 2 comments
Open

Cannot set mode for executable files via mode on pkg_tar #822

Strum355 opened this issue Feb 14, 2024 · 2 comments
Labels
bug p4 An idea that we are not considering working on at this time.

Comments

@Strum355
Copy link

Noticed after updating from 0.8.1 to 0.10.1, and narrowed down to most likely being as a result of #756, specifically the following line, https://github.com/bazelbuild/rules_pkg/blob/main/pkg/private/pkg_files.bzl#L411, its no longer possible to set a mode for executable files via the mode attribute on pkg_tar, as it gets forced to 0o755.

Non-executable files can still be set, as their values don't end up in the manifest (and the manifest takes preference over flags to build_tar.py) due to the default_mode being set to None.

This makes it impossible for us to set a more restrictive mode of 0o555 on executable files.

@aiuto aiuto added bug p4 An idea that we are not considering working on at this time. labels Mar 15, 2024
@aiuto
Copy link
Collaborator

aiuto commented Mar 15, 2024

Does setting the mode work with pkg_files | pkg_tar?

@Strum355
Copy link
Author

Strum355 commented Apr 8, 2024

Does setting the mode work with pkg_files | pkg_tar?

Im presuming this means passing a pkg_files target to a pkg_tar's srcs, and setting the attributes in pkg_files instead. I can confirm that does indeed seem to work 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug p4 An idea that we are not considering working on at this time.
Projects
None yet
Development

No branches or pull requests

2 participants