Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds functionality to copy configuration files and packages to ISO images during the ISO creation process. The changes introduce two new methods for managing ISO contents and refactor an existing configuration saving function to be a method on the ImageTemplate struct.
Key changes:
- New
copyConfigFilesToIsomethod handles copying general config, OSV config, additional files, and template dumps to the ISO - New
copyImagePkgsToIsomethod copies package files from the chroot cache to the ISO's cache-repo directory - Refactored
SaveUpdatedConfigFilefrom a standalone function to anImageTemplatemethod with proper implementation - Updated SBOM copy operation to use the
file.CopyFileutility - Added essential packages (dosfstools, mmdebstrap, cryptsetup) to the default initrd configuration
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| internal/image/isomaker/isomaker.go | Adds two new methods for copying config files and packages to ISO, integrates them into the ISO creation workflow |
| internal/config/config.go | Converts SaveUpdatedConfigFile to an ImageTemplate method with full YAML marshaling and file writing implementation |
| internal/config/config_test.go | Updates test calls to use the new method signature |
| internal/config/manifest/manifest.go | Simplifies SBOM copy operation by using file.CopyFile utility and removes unused security import |
| config/osv/wind-river-elxr/elxr12/imageconfigs/defaultconfigs/default-initrd-x86_64.yml | Adds three new packages to the system configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Replaced manual file operations in CopySBOMToChroot with file.CopyFile utility, removing redundant directory creation and security checks. This makes the code more concise while maintaining functionality through the utility's built-in safety features, also address the access permission issue when non root user execute the os-image-composer tool. Signed-off-by: Yu, Fei <fei.yu@intel.com>
The method now includes proper error handling, directory creation, and safe file writing with symlink protection, ensuring atomic writes and basic security checks. Tests have been updated to use the new method signature. Signed-off-by: Yu, Fei <fei.yu@intel.com>
- Implement copyConfigFilesToIso to copy general and OSV config files - Handle additional files with path updates in template - Add copyImagePkgsToIso to copy package files to ISO cache - Integrate both functions into the main ISO creation flow - Include error handling and logging for all operations Signed-off-by: Yu, Fei <fei.yu@intel.com>
Added dosfstools, mmdebstrap, and cryptsetup packages to support package based iso installer. Signed-off-by: Yu, Fei <fei.yu@intel.com>
bb01625 to
5b4c2a6
Compare
arodage
reviewed
Oct 28, 2025
Contributor
arodage
left a comment
There was a problem hiding this comment.
Reviewed config changes. LGTM.
yockgen
approved these changes
Oct 29, 2025
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.
Merge Checklist
All boxes should be checked before merging the PR
Description
Any Newly Introduced Dependencies
How Has This Been Tested?