-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is a refactor of a big chunk of the unpacker. It adds proper selinux labeling support to the unpack_to_dfd path and also solves a number of subtle issues. The biggest issue solved is proper hardlink handling. We previously assumed that the data payload was attached to the first entry in a series of hardlinks. In fact, the payload is in the *last* entry. This resulted in any multilinked files all having size 0. In the unpack_to_dfd path, this works great since we can just re-open the file at the last hardlink entry to write the actual data. I also tried implementing this for the unpack_to_ostree path, which was more complicated since we have to defer imports until we hit the final hardlink (which requires heuristics to detect). In the end, I switch the unpack_to_ostree path to simply use a tmprootfs and then make it call out to unpack_to_dfd. This is less efficient, but greatly simplifies the whole unpacker code, as well as allowing us to get rid of the copynpaste stuff. Eventually, we should probably solve this properly upstream in ostree_repo_write_archive_to_mtree() and then switch the unpack_to_ostree codepath to use that.
- Loading branch information
Showing
4 changed files
with
502 additions
and
578 deletions.
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.