Skip to content

Commit 9a49a18

Browse files
committed
isoBuilder: put installer-requestable packages on the media
Two gaps in how the download list is built. 1. The STIG menu offers "Apply STIG hardening", which makes the installer request KS_STIG_PACKAGES at install time. Those names were never added to the ISO's own RPMS/, so on a minimal ISO - where downloadPkgs() resolves a closure rather than copying every rpm - the packages simply were not there and the install failed with "Error(1011) : No matching packages". Import the list from stigenable rather than restating the names in a package list file; restating them is exactly how the media and the installer drifted apart. Imported locally because stigenable pulls in the curses UI modules, which need not be a module-level dependency of the ISO builder. 2. Packages named via --initrd-pkgs never reached this list either. Only the list *file* was parsed, so a package requested on the command line could not be installed into the initrd from the ISO's own RPMS/. Both extend self.pkg_list only, so they land in the ISO's RPMS/ and the initrd does not grow. Verified end to end: a minimal ISO built with this carries 290 rpms instead of 254, including selinux-policy, libselinux-utils, rsyslog, aide, openssl-fips-provider and ntpsec; the UI wizard's STIG option completes; and the installed system comes up SELinux Enforcing with 0 failed ansible tasks. Signed-off-by: Daniel Casota <dcasota@gmail.com>
1 parent c5116e8 commit 9a49a18

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

photon_installer/isoBuilder.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,22 @@ def downloadPkgs(self):
195195
# Add installer initrd and custom packages to package list..
196196
self.addPkgsToList(self.initrd_pkg_list_file)
197197
self.addPkgsToList(self.packageslist_file)
198+
# The media must be able to satisfy what the installer can request at
199+
# install time. KS_STIG_PACKAGES is the installer's own declaration of
200+
# what "Apply STIG hardening" installs, so import it rather than
201+
# restating those names in a package list file -- restating them is how
202+
# the media and the installer drifted apart, leaving the STIG menu
203+
# offering an option the media could not honour ("Error(1011) : No
204+
# matching packages"). Imported locally: stigenable pulls in the curses
205+
# UI modules, which need not be a module-level dependency of the ISO
206+
# builder. These go to the ISO's RPMS/ only, not into self.initrd_pkgs,
207+
# so the initrd does not grow.
208+
from stigenable import KS_STIG_PACKAGES
209+
self.pkg_list.extend(KS_STIG_PACKAGES)
210+
# Packages named via --initrd-pkgs never reached this download list
211+
# (only the list *file* was parsed above), so they could not be
212+
# installed into the initrd from the ISO's own RPMS/ either.
213+
self.pkg_list.extend(self.initrd_pkgs)
198214

199215
linux_flavors = [
200216
"linux",

0 commit comments

Comments
 (0)