Disable Modular Filtering in Kickstart Repos
Hello,
I'm running into an issue while trying to create a Kickstart ISO with custom content. As described by the MySQL documentation[0], the AppStream mysql module prevents installation of commercial MySQL RPMs and must be disabled. Without disabling it, Kickstart fails with an error like this:
-
package mysql-commercial-server-8.0.19-1.1.el8.x86_64 is filtered out by modular filtering
I want this process to be automated through Kickstart so the resulting system has the correct version of MySQL installed. The only way I can make it work is by extracting the module metadata from the AppStream repo, deleting the mysql module, and then repacking it. It's a very ugly solution and I'm looking for something a little cleaner. Here's what I've tried so far:
-
When specifying the custom repo in the Kickstart file, add --excludepkgs=@mysql to try and disable the module
- In the Kickstart %pre script, disable the module manually like so:
dnf --repofrompath AppStream,/run/install/repo/AppStream --nogpgcheck module disable -y mysql
Is there a way to do this through Kickstart?
[0] - https://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/
Responses
If the "Kickstart ISO with custom content" includes a repository for the commercial MySQL RPMs, then modules can be disabled in %post
:
%post
# GPG key
/usr/bin/rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
# presumes install ISO is mounted at '/media/dvd'
/usr/bin/dnf -y --refresh --disablerepo='*' \
--repofrompath ks-baseos,file:///media/dvd/BaseOS \
--repofrompath ks-appstream,file:///media/dvd/AppStream \
--repofrompath ks-codeready,file:///media/dvd/CodeReady \
--enablerepo='ks-*' \
module disable mysql
%end
A similar dnf
command, with the commercial MySQL repository enabled, can then be used to attempt installation. (I haven't tested this, so I'm not certain it will succeed.)