Fix handling of Oracle OVA files with normalized paths and SHA checksums - #192
Closed
lotfihamid wants to merge 1 commit into
Closed
lotfihamid wants to merge 1 commit into
lotfihamid wants to merge 1 commit into
Conversation
Fix handling of Oracle OVA files with normalized paths and SHA checksums
This patch addresses two specific issues that prevented virt-v2v from
processing OVA files exported from Oracle OLVM (Oracle Linux Virtualization
Manager):
1. Path normalization in TarOptimized mode
- Oracle OVFs often reference disk files with a "./" prefix (e.g.,
"ovf:disk/./disk.vmdk" or href="./disk.vmdk").
- The resolve_href function would construct filenames like
"subdir/./disk.vmdk" which did not match the actual tar entry
"subdir/disk.vmdk", causing get_tar_offset_and_size to raise Not_found.
- Added a normalize_path helper to remove "." and ".." components before
looking up files in the tarball.
2. Manifest checksum regex support for SHA-1/SHA-256 with hyphen
- Oracle manifest files use "SHA-1" and "SHA-256" (with a hyphen)
instead of "SHA1" and "SHA256".
- Updated the regular expression to accept both forms:
^(SHA-?1|SHA-?256)[[:space:]]*\((.*)\)[[:space:]]*= ([0-9a-fA-F]+)\r?$
These changes make virt-v2v compatible with OVA files generated by
Oracle OLVM without requiring external preprocessing.
Signed-off-by: Hamid Lotfi <hamid.lotfi@gmail.com>
Member
|
First thing is: two changes need to be two commits. |
Member
|
I don't see how the checksum change can possibly work. Did you actually test it? |
Member
|
Actually it's 3 changes, so should be 3 commits. |
Author
|
Please let me to check it. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fix handling of Oracle OVA files with normalized paths and SHA checksums
This patch addresses two specific issues that prevented virt-v2v from processing OVA files exported from Oracle OLVM (Oracle Linux Virtualization Manager):
Path normalization in TarOptimized mode
Manifest checksum regex support for SHA-1/SHA-256 with hyphen
These changes make virt-v2v compatible with OVA files generated by Oracle OLVM without requiring external preprocessing.