Need to edit katello-rhsm-consumer

Trying to provision a new Rocky 9.1 system. System installs but doesnt install consumer certs and therefore no subscription-manager or updates or any of our required packages are installed.
I’ve found the issue, which is that the katello-rhsm-consumer script wants to put the scripts in /etc/rhsm/ca/katello-server-ca.crt, but the /etc/rhsm/ca directory doesn’t exist.
Creating the ca directory under /etc/rhsm and manually running the script works fine.

As a quick fix, i was hoping to be able to add a “if directory does not exist: Create it” but i’m not sure where i can make these changes so that they get implented into the consumer rpm package

Expected outcome:
katello-ca-consumer.rpm gets installed properly

Foreman and Proxy versions:
foreman 3.4
katello 4.6
Latest updates installed

Foreman and Proxy plugin versions:

Distribution and version:

Other relevant data:

The directory should be created as part of the subscription-manager installation which should be automatically installed during the post installation. Thus, you should find out why subscription-manager hasn’t been installed…

hmm, perhaps either Rocky did something on their side or RHEL messed up the original package

Subscription-manager is installed but no /etc/rhsm/ca directory exists

Interesting. On AlmaLinux 9 I have subscription-manager-rhsm-certificates which creates the directory.

# rpm -qa *subscription*

And subscription-manager requires the rpm:

# dnf repoquery --requires subscription-manager

Rocky seems to be missing that…

In case anyone wanders in here with the same or similar issue:

Posted in Rocky’s forums and they’ve fixed it