Description of problem: In /opt/theforeman/tfm/root/usr/share/gems/gems empty folders of older versions of gems are left after upgrades. In some cases it may happen, that older rubygem is not cleaned up and may cause issues. Add step for foreman-maintain, to "health check" this directory and ask user if he wants to cleanup old unused gems or not. (yes/no input) Version-Release number of selected component (if applicable): How reproducible: 100% Steps to Reproduce: 1. Install satellite 6.5 2. upgrade to 6.6 3. ls /opt/theforeman/tfm/root/usr/share/gems/gems Actual results: Old directories are left and not deleted. Expected results: Implement check, which will identify folders/rubygems which are not owned by any package. Additional info: To identify such gems #cd /opt/theforeman/tfm/root/usr/share/gems/gems #ls | xargs rpm -qf * | grep -i 'not owned by any package'
Created redmine issue https://projects.theforeman.org/issues/29739 from this bug
Moving to packaging and updating the request to address this within packaging so this gets handled properly.
Example from a 6.8 machine (but the problem is not version specific): # ls -R foreman_templates-7.0.7/public/ foreman_templates-7.0.7/public/: apipie-cache assets webpack foreman_templates-7.0.7/public/apipie-cache: plugin foreman_templates-7.0.7/public/apipie-cache/plugin: foreman_templates-7.0.7/public/assets: foreman_templates-7.0.7/public/webpack: # ls -R katello-3.14.0.32/public/ katello-3.14.0.32/public/: apipie-cache assets webpack katello-3.14.0.32/public/apipie-cache: plugin katello-3.14.0.32/public/apipie-cache/plugin: katello-3.14.0.32/public/assets: katello-3.14.0.32/public/webpack:
Upstream bug assigned to supatil