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

Separate option for file ownership preservation #111

Draft
wants to merge 8 commits into
base: nodyhub/invent-option-preserver-attributes
Choose a base branch
from

Conversation

samsalisbury
Copy link
Contributor

This separates out the configuration for preserving file ownership vs other attributes. Preserving ownership requires root permissions, and attempting to do that without root permissions now fails instead of just warning. The rationale for separating the options rather than just requiring root to preserve any of the attributes is that there are many use cases where the file mode and modification times are important, but where file ownership is not. This way users can benefit from these attributes without needing root privileges.

- Not just when targetting main.
@samsalisbury
Copy link
Contributor Author

The test for preserving UID/GID for rar archives is failing, it would also fail in #106 if it wasn't being skipped there. See https://github.com/hashicorp/go-extract/pull/106/files#r1881972392.

I will pause on this for now @NodyHub as I think I'll need your help with setting up the rar test data to check it is preserving the UID/GID during packing.

@NodyHub
Copy link
Collaborator

NodyHub commented Dec 16, 2024

The test for preserving UID/GID for rar archives is failing, it would also fail in #106 if it wasn't being skipped there. See https://github.com/hashicorp/go-extract/pull/106/files#r1881972392.

I will pause on this for now @NodyHub as I think I'll need your help with setting up the rar test data to check it is preserving the UID/GID during packing.

As mentioned in #106 (comment) the rar library has currently no support to extract the uid/gid from the file, so the test case is expected to fail 🙈

@NodyHub
Copy link
Collaborator

NodyHub commented Dec 16, 2024

I upstreamed your idea of splitting the option in 00f38eb

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.

2 participants