Use > Server patching > Patch management for Red Hat Linux Enterprise > Import patches for Red Hat platforms

Import patches for Red Hat platforms

A Red Hat patch in the HPE Server Automation terminology is equivalent to an RPM package. This means that you can have your own custom packages imported in HPE Server Automation that can be found applicable to a set of managed servers. The import process uploads the RPM patches into the SA Library and, since they are treated as normal RPM packages, you can use them in operations like Software Installation, Software Policy creation and remediation, Software Compliance, and so on.

Currently, there are three ways to import Red Hat patches into HPE Server Automation. The first one will be to upload the RPM packages into SA Library using the HPE Server Automation Command Line Interface.

The second way of importing Red Hat packages into HPE Server Automation is through SA Client built in importer. This tool allows importing of multiple RPM packages simultaneously. If a RPM package that is being uploaded already exists in the SA Library, you can replace (overwrite) the contents of the existing package, skip the package import (useful when importing multiple packages), or cancel the import in progress. When overwriting an existing software package, SA preserves any reboot options or flags previously set for the package.

The first two approaches work best for scenarios where custom patches must be imported into SA. To import the official patches issued by Red Hat you have to use the HPE Server Automation Red Hat Importer tool which comes preinstalled with the slice component. You can find the binaries for this tool in /opt/opsware/rhn_import/bin.

Importing Red Hat Errata and channels in SA using SA Red Hat Importer tool

Red Hat publishes Errata which contains information describing security patches, bug fixes, and package updates for Red Hat Enterprise Linux. To install the packages in the Errata, the Errata must be downloaded from the Red Hat web site and imported into HPE Server Automation. Using HPE Server Automation you can automatically download the Errata released by Red Hat, convert them to policies, and store the policy in a folder in the SA Library. Also, Red Hat publishes channels which contain packages from a particular repository. Using HPE Server Automation you can automatically download the packages in a channel, convert them to policies, and store the policy in a folder in the HPE SA Library.

The redhat_import CLI program provided by HPE Server Automation enable you to create policies which correspond to Red Hat errata and channels. Using the CLI programs, you can create the following types of policies:

  • Channel-based software policy: A Red Hat Network channel contains a list of packages. A channel allows you group packages as per your organizational requirements. For example, a channel may contain packages for a particular Red Hat operating system version or architecture. A channel may contain other child channels. When you run the importer, HPE Server Automation downloads the latest packages from the Red Hat Network channel, imports the packages to the HPE Server Automation Library and creates a channel based software policy.

    Thus, a channel based policy reflects a particular channel. In the SA Client, you can view the name, description, location, availability, and the operating system version of the channel based policy in the Library.
  • Errata based software policy: Red Hat Network Errata contains information on a particular problem and the associated packages to resolve the problem. An Errata based policy contains all the individual Erratum-based policies for a given channel. HPE Server Automation downloads the latest packages from the Red Hat Network errata and then imports the packages to the HPE Server Automation Library and creates an errata based software policy. There are three types of Red Hat Network Errata: Bug Fix Advisories, Product Enhancement Advisories, and Security Advisories. The importer allows you to create errata policies for Bug Fix Advisories, Product Enhancement Advisories, and Security Advisories in the SA Client. In the SA Client, you can view the name, description, location, availability, and the operating system version of the errata based policy in the Library.

  • Erratum-based software policy: Erratum-based policies contain packages associated with a particular erratum. When you run the redhat_import program, HPE Server Automation downloads the latest packages from the Red Hat Network erratum and then imports the packages to the HPE Server Automation Library and creates an Erratum-based software policy.

To create and maintain policies from the Red Hat Linux errata, erratum, and channels, log into the core server running the Software Repository component (part of the Slice Component bundle) and run the redhat_import program located in the /opt/opsware/rhn_import/bin/redhat_import directory.

The software policies created by redhat_import will, by default, have an empty uninstall sequence. This setting prevents the inadvertent uninstall of the RPMs in the policy when it is detached.

Importing RPM packages from the Red Hat Network to HPE Server Automation requires a large amount of disk space. Over a period of time, the amount of disk space required increases as new versions of packages are released by Red Hat. HPE recommend having at least 5 GB of disk space available in Software Repository for every Red Hat channel you enable using the importer.

To view the complete documentation run the program with the following option:

/opt/opsware/rhn_import/bin/redhat_import --manual

When you run the importer you can specify the options listed in the documentation provided by the tool or use the Configuration File provided by HPE Server Automation. This is located in the /etc/opt/opsware/rhn_import/redhat_import.conf file.

Users of redhat_import should notice improved performance when importing from Red Hat Subscription Management (RHSM) compared to importing the same content from Red Hat Network Classic (RHN).

Red Hat Subscription Management overview

RHSM is the primary subscription management service provided by Red Hat and is the replacement for Red Hat Network Classic (RHN). RHSM is an end-to-end solution with status, inventory, organization, and reporting for Red Hat subscriptions via a hosted web-interface accessed from the Red Hat Customer Portal.

Although subscription management was primarily established on Red Hat Enterprise Linux, all Red Hat products are expected to be integrated with Red Hat Subscription Management. Red Hat Subscription Services are available for systems running Red Hat Enterprise Linux 5 (5.7 or later), 6 (6.1 or later) and 7.

Systems running RHEL 5 (5.7+) and 6 (6.1+) can subscribe to both RHN and RHSM. However, RHEL 7 systems can only subscribe to RHSM, unless using Red Hat Satellite 5.6 or above. The RHEL 7 channels are only available when using Satellite 5.6 or above. A direct consequence of this is that the RHEL 7 channels are not available in RHN which means that the the redhat_import tool configured to import from RHN cannot be used to import RHEL 7 content into the SA Library. The RHEL 7 channels are only available when using Satellite 5.6 or above. The redhat_import tool configured to import from RHN can only be used to import RHEL 7 content when used behind a Satellite 5.6 or Satellite 5.7.

Note More details about the specific supported versions can be found in the SA Support and Compatibility Matrix associated with your SA version.