-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add option to preserve file attributes #106
Open
NodyHub
wants to merge
49
commits into
main
Choose a base branch
from
nodyhub/invent-option-preserver-attributes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,466
−405
Open
Changes from 2 commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
8dbb570
invented option to preserve filemode
NodyHub 49b513b
added support for updating ownership, file permissions and change time
NodyHub 1605a68
code clean up
NodyHub 0405d3f
Further adjustments
NodyHub 576854a
adjusted cli help output
NodyHub 2160ffe
adjusted build tag specification
NodyHub 4c99ad2
corrected mod time adjustment
NodyHub fd3a385
removed code comment and fixed timestamp of archive file
NodyHub 1ded861
rely on built-in unix.Timeval conversion
samsalisbury 593b990
Merge pull request #109 from hashicorp/simplify-unix-time-handling
NodyHub 03a7cb6
unexpose internal functions
NodyHub fb7132a
Update target_memory_test.go
NodyHub f9b2710
check for differences >= 1 micro second
NodyHub 9e69c9d
simplified test print statement
NodyHub 7fa9d28
invent testing as root to adjust ownership
NodyHub 8498e88
transformed canMaintainSymlinkTimestamps into a function and relocate…
NodyHub 900c4d0
skip sudo test on windows
NodyHub 96659b8
added some error handling
NodyHub f4bfff1
adjusted comment that rar does not support uig/gid
NodyHub e9c3941
located chown in platform specific implementation
NodyHub 9ab3635
marked in test case that rar does not support file ownership
NodyHub 00f38eb
separated ownership preservation in an own flag
NodyHub cb45ca4
relocated test data
NodyHub 2e7c380
added copyright header
NodyHub dacbd03
updated comments to remark that ownership is only transported by tar …
NodyHub 3fb2d38
verified overwrite behaviour for double-symlinks in archive
NodyHub 668eb6b
adjusted error handling and wrapping
NodyHub e1ce17d
Return current Uid/Gid if archive does not support carriage of owners…
NodyHub 03a9e84
inverted logic to preserve file attributes (mod/access time and file …
NodyHub f5b7936
removed windows specifc code
NodyHub ccf382e
adjusted test cases file split
NodyHub 111a61f
adjusted test output log
NodyHub b4c67e9
drop write permissions on directory if no access is granted
NodyHub 7671e15
drop permission check for directories on windows, bc/ they create uns…
NodyHub 879edcd
updated test case comment
NodyHub 450aba3
clarified test in comment
NodyHub 3c7c310
updated readme
NodyHub 5ff6279
renamed config.noPreserveFileAttributes to config.dropFileAttributes
NodyHub 668a07e
Update target_disk_unix.go
NodyHub 49171eb
fixed import
NodyHub 9d10a84
adjusted short version of flag PreserveOwner from -o to -p , bc/ it i…
NodyHub 5580e05
adjusted comments
NodyHub bf3804a
removed unused field from test
NodyHub f59ea35
Update unpack_unix_test.go
NodyHub 6c8d47a
dropped uid/gid from upper test case level and aligned the test case
NodyHub edfd38f
simplified chown check
NodyHub 064184a
adjusted the current-user-tar test-case to invalid-uid-tar so that ev…
NodyHub 45cb851
adjusted test for invalid uid/gid
NodyHub 5c74796
adjusted uid casting
NodyHub File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be
!= nil
? As the log message references the error...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is sadly made to an out-of-date state of this PR and already adjusted. The ask for the
err == nil
is addressed in #106 (comment).The check for
tc.doesNotSupportOwner
is moved to the top of the test-case:go-extract/unpack_unix_test.go
Lines 61 to 67 in 5c74796
Background: If an archive format does not contain ownership details, we can skip the archive format, bc/ the test for failing
chown
will never fail, bc/ extracted files will always be theuid
/gid
of the process and the archive entries will for, e.g.zip
(which does not contain file ownership information), will return always the currentuid
/gid
(ref)