bundler warns /usr/share/foreman is not writable
When running foreman-rake, Bundler complains the home directory is not writable.
Executing: foreman-rake upgrade:run `/usr/share/foreman` is not writable. Bundler will use `/tmp/bundler20210520-43729-pzug1w43729' as your home directory temporarily. 'ErbParser' is ignored. 'RubyParser' is ignored. ============================================= Upgrade Step 1/2: katello:correct_repositories. This may take a long while. ============================================= Upgrade Step 2/2: katello:clean_backend_objects. This may take a long while. Failed upgrade task: katello:clean_backend_objects, see logs for more information.
This is a problem with a recent enough Bundler (as present in rh-ruby27). In particular that contains a fix for https://access.redhat.com/security/cve/CVE-2019-3881 (https://github.com/rubygems/bundler/commit/02e7f67727b45).