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

Fix several issues and improve performance #22

Merged
merged 7 commits into from
Jan 9, 2024

Conversation

alexmohr
Copy link
Contributor

@alexmohr alexmohr commented Aug 25, 2023

  • properly handle files which change in size during archiving
  • deal with symlinks properly by not making their destination relative
  • increase performance by factor 3
  • handle blocks with size 0 properly
  • thread safety: use thread safe posix functions

fixes #21

Alexander Mohr, [email protected], Mercedes-Benz Tech Innovation GmbH, imprint

@alexmohr alexmohr force-pushed the fixing-stuff branch 6 times, most recently from d11b3b5 to 68df5f0 Compare August 29, 2023 08:06
Copy link
Owner

@thilo-schmitt thilo-schmitt left a comment

Choose a reason for hiding this comment

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

Thank you for submitting the PR. I'm sincerely sorry that I didn't get to review it earlier.
I commented a few small things. Let me know what you think.

@alexmohr alexmohr force-pushed the fixing-stuff branch 2 times, most recently from ab6075b to b1ec308 Compare January 7, 2024 17:24
alexmohr and others added 7 commits January 8, 2024 21:15
files which grow or shrink are now supported properly
if output mode is file, the header will be patched
according to the actual amount of read data.
This mode also supports reading files from /proc/.
In streaming mode, the size will be fixed at the start of reading the
input. Files which change in size are handled properly here as well,
but due streaming output does not support reading files from /proc/
properly as it depends on a known size before reading which
is not possible with the virtual filesytem in /proc

Signed-off-by: Alexander Mohr <[email protected]>
this commit fixes how symlinks are handled.
tarxx now behaves like gnu tar in this regard
and the path of link is not converted
into a relative format.

Signed-off-by: Alexander Mohr <[email protected]>
this commit improves the runtime without
compression to only a third compared to the
previous result.

Signed-off-by: Alexander Mohr <[email protected]>
this commit fixes handling of blocks
with size 0

Signed-off-by: Alexander Mohr <[email protected]>
posix function to get groups and users are not
thread safe.
Some operating system implement them more or less thread
safe but others don't.
Refactor to use the thread safe api to prevent
segmentation faults

Signed-off-by: Alexander Mohr <[email protected]>
Signed-off-by: Alexander Mohr <[email protected]>
@thilo-schmitt
Copy link
Owner

Thank you for bearing with me. Looks good now. Will merge.

@thilo-schmitt thilo-schmitt merged commit da62dd6 into thilo-schmitt:main Jan 9, 2024
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.

Growing files break tar files
2 participants