Red Hat Training

A Red Hat training course is available for Red Hat Satellite

Chapter 4. Custom Channel Package Manager

This is a section on using Red Hat Satellite Proxy with the Custom Channel Package Manager.

4.1. Using the Custom Channel Package Manager and Serving Local Packages through the Red Hat Network Proxy

The Custom Channel Package Manager is a command line tool that allows an organization to serve local packages associated with a private Red Hat Satellite channel through the Red Hat Satellite Proxy Server. To update only official Red Hat packages for the Red Hat Satellite Proxy Server, do not install the Custom Channel Package Manager.
To use the Custom Channel Package Manager, install the spacewalk-proxy-package-manager package and its dependencies.
Only the header information for packages is uploaded to the Red Hat Satellite Servers. The headers are required so that Red Hat Satellite can resolve package dependencies for the client systems. The actual package files (*.rpm) are stored on the Red Hat Satellite Proxy Server.
The Custom Channel Package Manager uses the same settings as the Proxy, defined in the /etc/rhn/rhn.conf configuration file. See the rhn_package_manager manual page for more information.
In order for Custom Channel Package Manager to be able to serve the local packages, the following steps need to be followed:
  1. Create a private channel.
  2. Upload the local packages into the channel.
The steps will be further discussed in the next sections.

4.1.1. Creating a Private Channel

Before local packages can be provided through the Red Hat Satellite Proxy Server, a private channel is needed to store them. Perform the following steps to create a private channel:
  1. Log in to your local Red Hat Satellite server in the network.
  2. Click Channels on the top navigation bar. If the Manage Channels option is not present in the left navigation bar, ensure that this user has channel editing permissions set. Do this through the Users category accessible through the top navigation bar.
  3. In the left navigation bar, click Manage Software Channels and then the create new channel button at the top-right corner of the page.
  4. Select a parent channel and base channel architecture, then enter a name, label, summary, and description for the new private channel. The channel label must: be at least six characters long, begin with a letter, and contain only lowercase letters, digits, dashes (-), and periods(.). Also enter the URL of the channel's GPG key. Although this field is not required, it is recommended to enhance security.
  5. Click Create Channel.

4.1.2. Uploading Packages

Note

Only Organization Administrators can upload packages to private Red Hat Satellite channels. The script will prompt you for your Red Hat Satellite credentials.
After creating the private channel, upload the package headers for the binary and source RPMs to the Red Hat Satellite Server and copy the packages to the Red Hat Satellite Proxy Broker Server. To upload the package headers for the binary RPMs, issue the following command:
 rhn_package_manager -c "label_of_private_channel" pkg-list
This command will upload the header of the package to the channel name specified, and the package itself to /var/spool/rhn-proxy/rhn.
pkg-list is the list of packages to be uploaded. Alternatively, use the -d option to specify the local directory that contains the packages to add to the channel. Ensure that the directory contains only the packages to be included and no other files. Custom Channel Package Manager can also read the list of packages from standard input (using --stdin).
To upload the package headers for the source RPMs:
 rhn_package_manager -c "label_of_private_channel" --source pkg-list
If you have more than one channel specified (using -c or --channel), the uploaded package headers will be linked to all the channels listed.

Note

If a channel name is not specified, the packages are not added to any channel. The packages can then be added to a channel using the Red Hat Satellite web interface. The interface can also be used to modify existing private channels.
After uploading the packages, you can immediately check the Red Hat Satellite Web interface to verify their presence. Click Channels in the top navigation bar, Manage Software Channels in the left navigation bar, and then the name of the custom channel. Then click the Packages subtab. Each RPM should be listed.
Also check to see if the local directory is in sync with the Red Hat Satellite Server's image of the channels at the command line:
 rhn_package_manager -s -c "label_of_private_channel" 
The -s option will list all the missing packages (packages uploaded to the Red Hat Satellite Server not present in the local directory). You must be an Organization Administrator to use this command. The script will prompt you for your Red Hat Satellite username and password.
If you are using the Custom Channel Package Manager to update local packages, you must go to the Red Hat Satellite website to subscribe the system to the private channel.