How to upgrade a system with "leapp" while also upgrading EPEL or Puppet Labs packages

Solution Verified - Updated

Environment

  • Red Hat Enterprise Linux 7 and later
    • leapp

Issue

  • My RHEL system is having EPEL packages that need to be upgraded as well, how do I do this?
  • My RHEL system is having Puppet Labs packages that need to be upgraded as well, how do I do this?

Resolution

The generic method is described in the following document:

Customizing your Red Hat Enterprise Linux in-place upgrade

Please note that the solution is not supported per se, we cannot guarantee that it will work since EPEL and Puppet Labs are 3rd party vendors.


EPEL

The following procedure is known to work, as reported by one of Red Hat customers, at least when upgrading from RHEL7 to RHEL8.

  1. Add the next-release EPEL repository to leapp repository configuration file

        # cat /etc/leapp/files/leapp_upgrade_repositories.repo
    
        [epel8]
        name=Extra Packages for Enterprise Linux 8 - $basearch
        metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-8&arch=$basearch&infra=$infra&content=$contentdir
        gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8
        enabled=1
        gpgcheck=1
    

    The above snippet can be copied from a RHEL8 system having EPEL installed.
    Note that the repository ID must be different from "epel", which is the repository ID for current OS release, as specified in /etc/yum.repos.d/epel.repo. Here above, we chose "epel8".

  2. Copy the GPG key

    Copy the EPEL GPG key from a RHEL8 system having EPEL installed to /etc/leapp/repos.d/system_upgrade/common/files/rpm-gpg/8/

    # scp <rhel8_epel_system>:/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 /etc/leapp/repos.d/system_upgrade/common/files/rpm-gpg/8/
    

Puppet Labs

The following procedure is known to work, as reported by one of Red Hat customers, at least when upgrading from RHEL7 to RHEL8.
In the example below, the Puppet Labs repository file on the system is containing the following:

[puppet]
name=Puppet Labs Products El 7 - $basearch
baseurl=http://yum.puppetlabs.com/el/7/products/$basearch
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppet-release
enabled=1
gpgcheck=1
  1. Add the repository to leapp repository configuration file

        # cat /etc/leapp/files/leapp_upgrade_repositories.repo
    
        [puppet8]
        name=Puppet Labs Products El 7 - $basearch
        baseurl=http://yum.puppetlabs.com/el/8/products/$basearch
        gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppet-release
        enabled=1
        gpgcheck=1
    

    Here above the baseurl property has been modified to match RHEL8 directory.
    If unsure, ask Puppet Labs vendor.

    Note that the repository ID must be different from "puppet", which is the repository ID for current OS release, as specified in /etc/yum.repos.d/puppetlabs.repo. Here above, we chose "puppet8".


Once the procedure has been followed, execute leapp upgrade again.

Finally, before rebooting, make sure that no packages from EPEL and/or Puppet Labs will be removed by the DNF transaction.
You may check the DNF transaction content through extracting the log:

# grep -w "leapp.workflow.InterimPreparation.dnf_dry_run" /var/log/leapp/leapp-upgrade.log
[...]
[...] leapp.workflow.InterimPreparation.dnf_dry_run: ======================================================================================================================================================
[...] leapp.workflow.InterimPreparation.dnf_dry_run:  Package                                          Arch    Version                                      Repository                                 Size
[...] leapp.workflow.InterimPreparation.dnf_dry_run: ======================================================================================================================================================
[...] leapp.workflow.InterimPreparation.dnf_dry_run: Installing:
[...]
[...] leapp.workflow.InterimPreparation.dnf_dry_run:  nagios                                           x86_64  4.4.14-3.el8                                 epel8                                     1.9 M
[...] leapp.workflow.InterimPreparation.dnf_dry_run:  nagios-common                                    x86_64  4.4.14-3.el8                                 epel8                                      31 k
[...]
SBR
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.