voxpupuli / puppet-yum

Puppet module for Yum
https://forge.puppet.com/puppet/yum
MIT License
16 stars 101 forks source link

Centos 7 - Bad yumrepo file names #224

Open oniGino opened 2 years ago

oniGino commented 2 years ago

When working with Centos 7 and the latest stable of this module it installs for example base-debuginfo.repo however this breaks yum as it is a duplicate of a different builtin file in Centos which is named CentOS-Debuginfo.repo

Here are the correct repo files names from upstream centos

ViaWest/gino.mccarty@fordmariadb1-3:/etc/yum.repos.d$ rpm -ql centos-release
/etc/centos-release
/etc/centos-release-upstream
/etc/issue
/etc/issue.net
/etc/os-release
/etc/pki/rpm-gpg
/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-Debug-7
/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-Testing-7
/etc/redhat-release
/etc/rpm/macros.dist
/etc/system-release
/etc/system-release-cpe
/etc/yum.repos.d/CentOS-Base.repo
/etc/yum.repos.d/CentOS-CR.repo
/etc/yum.repos.d/CentOS-Debuginfo.repo
/etc/yum.repos.d/CentOS-Media.repo
/etc/yum.repos.d/CentOS-Sources.repo
/etc/yum.repos.d/CentOS-Vault.repo
/etc/yum.repos.d/CentOS-fasttrack.repo
/etc/yum.repos.d/CentOS-x86_64-kernel.repo
/etc/yum/vars/contentdir
/etc/yum/vars/infra
/usr/lib/os-release
/usr/lib/systemd/system-preset/85-display-manager.preset
/usr/lib/systemd/system-preset/90-default.preset
/usr/share/centos-release/EULA
/usr/share/doc/centos-release/Contributors
/usr/share/doc/centos-release/GPL
/usr/share/doc/redhat-release
/usr/share/redhat-release

Please adjust your module to install the same file names so it doesn't break yum with duplicate repos.

bastelfreak commented 2 years ago

I think that's solved with https://github.com/voxpupuli/puppet-yum/pull/225. please let me know if it's still an issue.

oniGino commented 2 years ago

Confirmed, thank you for your quick response!

Yes this repos work is done, sadly upstream is still broken and ignores the target value

see

  newparam(:target) do
    desc 'The target parameter will be enabled in a future release and should not be used.'

    defaultto :absent
  end

In https://github.com/puppetlabs/puppetlabs-yumrepo_core/blob/main/lib/puppet/type/yumrepo.rb

So until target is honored the bug persists as the incorrect file is created for each repository

oniGino commented 2 years ago

Reference: https://tickets.puppetlabs.com/browse/MODULES-7422