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

Add flag to allow "immutable" files to be overwritten #109

Merged
merged 2 commits into from Jul 26, 2015

Conversation

brooksdavis
Copy link
Contributor

These changes add a libarchive and tar flag to allow "immutable" files to be overwritten by removing the flags before deleting the files. This is useful for situations such as recovering a corrupted FreeBSD system from release tar files.

…LAGS

that clears platform-specific file flags that might prevent the removal
of a file system object before attempting to remove it.

Sponsored by:	DARPA, AFRL
flags which might prevent the removal or modifiction of files to
be cleared before attempting to remove them.

Sponsored by: DARPA, AFRL
@brooksdavis
Copy link
Contributor Author

@kientzle Any feedback on this? I need something like it to allow me to replace installworld with a tar invocation (with an mtree file and stage directory as input)

kientzle added a commit that referenced this pull request Jul 26, 2015
Add flag to allow "immutable" files to be overwritten
@kientzle kientzle merged commit aadd5c4 into libarchive:master Jul 26, 2015
@kientzle
Copy link
Contributor

Merged. Apologies for the delay.

Note there was a big effort in the libarchive 2.0 timeframe to reduce the total number of sys calls made on the restore path. I expect that in the normal case, flags reset is only needed on a handful of items which implies we might be able to optimize this by only trying the flags reset if the initial unlink attempt fails.

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.

None yet

2 participants