Content labels

When importing from RHSM, redhat_import uses content labels to identify the CDN content to import. The format of the content label is the following:

<entitlement_content_label>{<releasever>-<basearch>}

where:

  • <entitlement_content_label> is the content label as specified in the entitlement certificate
  • <releasever> is the release version of Red Hat Enterprise Linux. This has the same value as the $releasever yum variable
  • <basearch> is the base architecture of the system. This has the same value as the $basearch yum variable

<releasever> is not required for all contents; when it is not used, the format of the content label becomes <entitlement_content_label>{<basearch>}

To determine the label of the CDN content to import, the following steps can be performed:

  • If the content to import belongs to one of the SA-supported platforms then the content label to use can be found by running:
    redhat_import --show_labels
  • If the content to import belongs to any other Red Hat product that is not listed by --show_labels, the content label to use can be determined as follows:

For example, to import content for RHEL Server 6.4 from Red Hat Extended Update Support, the content in the example below needs to be located in the entitlement certificate.

Content for RHEL Server 6.4 from Red Hat extended update support

Content:
	Type: yum
	Name: Red Hat Enterprise Linux 6 Server - Extended Update Support (RPMs)
	Label: rhel-6-server-eus-rpms
	Vendor: Red Hat
	URL: /content/eus/rhel/server/6/$releasever/$basearch/os
	GPG: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
	Enabled: True
	Expires: 86400
	Required Tags: rhel-6-server
	Arches: x86_64, x86

The entitlement content label is “rhel-6-server-eus-rpms”. To import version 6.4 for x86_64, the content label needs to be specified as:

rhel-6-server-eus-rpms{6.4-x86_64}

As another example, to import content from RHEL 7 Server Extras repository, the content in the example below needs to be located in the entitlement certificate.

Content for RHEL 7 Server Extras Repository

Content:
	Type: yum
	Name: Red Hat Enterprise Linux 7 Server - Extras (RPMs)
	Label: rhel-7-server-extras-rpms
	Vendor: Red Hat
	URL: /content/dist/rhel/server/7/7Server/$basearch/extras/os
	GPG: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
	Enabled: False
	Expires: 86400
	Required Tags: rhel-7-server
	Arches: x86_64

The entitlement content label is “rhel-7-server-extras-rpms”. In this case, the content URL does not contain the <releasever> variable so this should not be included in the redhat_import content label. To import the packages for x86_64 architecture, the content label needs to be specified as:

rhel-7-server-extras-rpms{x86_64}