Bug 2177071

Summary: [RFE] Requesting a method to exclude packages/ Build a minimal image with image builder
Product: Red Hat Enterprise Linux 8 Reporter: jcastran
Component: osbuild-composerAssignee: Image Builder team <osbuilders>
Status: NEW --- QA Contact: Release Test Team <release-test-team>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.7CC: albert.campanya.soler, gkeegan, sbarcomb, toharris
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 2 jcastran 2023-03-13 12:19:04 UTC
1. Proposed title of this feature request
[RFE] Requesting a method to exclude packages/ Build a minimal image with image builder

3. What is the nature and description of the request?
Currently an image includes the Core group, as well as any additional packages listed here:

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/composing_a_customized_rhel_system_image/index#packages-installed-by-default_creating-system-images-with-composer-command-line-interface

We are looking for a way to build minimal images without excess bloat such as cockpit, subscription-manager, qemu-guest-agent, chrony, subscription-manager-cockpit


4. Why does the customer need this? (List the business requirements here)
To build minimal images.

5. How would the customer like to achieve this? (List the functional requirements here)
Allow package exclusions, or something similar to "%packages --nocore" from kickstart which then requires you add every package needed manually.

Comment 3 Albert CampaƱa 2023-03-14 08:22:37 UTC
I see two issues here. Firstly a bug, when an image with type image-installer (ISO) is built, the Image Builder pre-installs packages that are not needed nor listed in the documentation (https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/composing_a_customized_rhel_system_image/index#packages-installed-by-default_creating-system-images-with-composer-command-line-interface). If you try creating an ISO with no packages specified in the TOML and you install it, the list obtained when executing rpm -qa is way longer than the one obtained when doing the same query in a RHEL installed using the official ISO and selecting just the core group.

Secondly, it would be nice to have a way to exclude packages. I need to be able to exclude packages in the TOML, just like I am when customizing a kickstart installation packages list.