-
Notifications
You must be signed in to change notification settings - Fork 26
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 handling of content paths #225
Conversation
df98de8
to
fb77f55
Compare
Archives and ready-to-use content use paths differently. Archives get unpacked into a directory, where they need to be unpacked, analyzed, and cross-checked with e.g. the supplied content path, whereas ready-to-use content can be used directly. As the current codebase doesn't untangle all possible ways how to obtain existing content in a way of decomposing those into layers, this change just makes the current code working at the expense of making it worse to maintain.
fb77f55
to
08d3da5
Compare
not according their arbitrary string form
The inspection completed: 4 new issues, 3 updated code elements |
I was testing this by creating an update image from the branch of this PR and using it on the top of the RHEL 8.7 installation. I was using kickstart installation.
There is the kickstart below that I use:
The text variant that worked fine differed only by adding |
so when using a full profile ID in the profile key in the kickstart it works, and see the comment above for other scenarios that I tried |
Description:
Archives and ready-to-use content use paths differently.
Archives get unpacked into a directory, where they need to be unpacked, analyzed, and cross-checked with e.g. the supplied content path, whereas ready-to-use content can be used directly.
As the current codebase doesn't untangle all possible ways how to obtain existing content in a way of decomposing those into layers, this change just makes the current code working at the expense of making it worse to maintain.
Rationale:
Before this PR, the simple use case of hardening a system with the system content was not working.
Fixes rhel-8 tests massively timeout on OSCAP spoke failure rhinstaller/kickstart-tests#827
Review Hints:
The PR makes use of the
preinst_content_path
that refers to absolute filepaths.content_path
was supplied by users in case of archives, and represented the relative path to the content file in the context of the archive. In order to make it work, conversion of absolute filenames to relative filenames in the dictionary holding file labels has been dropped, and a subsequent "absolutization" of paths could be dropped too.However, as the code assumes that the contents of
content_path
is always relative in case of archives and RPMs, this had to be moved to the methoduse_downloaded_content
.