Show Table of Contents
1.2.12. Uploading and Maintaining Custom Packages
Depending upon which Red Hat Network service is used, there are two different mechanisms for uploading packages to private channels.
Customers of Red Hat Satellite Proxy Server use the Red Hat Network Package Manager application, which sends package header information to the central Satellite Server and places the package itself into the local repository of the Proxy that invokes Red Hat Network Package Manager.
Customers of Red Hat Satellite Server use the Red Hat Network Push application, which sends package header information to the local Red Hat Satellite Server and places the package into the local repository of the Satellite that invoked Red Hat Network Push.
This section discusses both of these tools in detail.
If you use both Red Hat Satellite Proxy Server and Red Hat Satellite Server, use only Red Hat Network Push. The Proxy-Satellite combination requires custom packages and channels to be uploaded to the Satellite only. From there, the Proxy servers obtain the packages and distribute them to client systems.
220.127.116.11. Uploading Packages to Red Hat Satellite Proxy Server
Red Hat Network Package Manager allows an organization to serve custom packages associated with a Satellite channel privately through the Red Hat Satellite Proxy Server. Client systems that communicate to the Satellite via the Proxy will be able to download the package if they are subscribed to the channel. Systems that are not communicating to the Satellite via the Proxy, if subscribed to the channel, will only receive yum package meta-data and an error when trying to retrieve the package as the Satellite does not have a copy of the package on its local repository. If the organization wants the Red Hat Satellite Proxy Server to serve only official Red Hat Enterprise Linux packages and Organization owned packages do not install the Red Hat Network Package Manager.
To use the Red Hat Network Package Manager, install the
spacewalk-proxy-package-managerRPM package and its dependencies. This package is available to registered Red Hat Satellite Proxy Server systems and is installed by running
yum install spacewalk-proxy-package-manager.
Only the header information for the packages is uploaded to the Red Hat Satellite Server. The headers are required so that Red Hat Network can resolve package dependencies for the client systems. The actual package files (
*.rpm) are stored on the Red Hat Satellite Proxy Server. For this reason, custom packages cannot be downloaded through the Red Hat Satellite website, although they are listed. They must be retrieved by the client system using
18.104.22.168.1. Configuring and Using the Red Hat Network Package Manager
Before using Red Hat Network Package Manager to upload packages into Red Hat Satellite, manually copy the packages to the Proxy server itself. For example, from a development host, use
# scp foo.rpm email@example.com:/tmp
When using Red Hat Network Package Manager to upload the packages into Red Hat Satellite, point to the files previously copied to the server.
Create at least one private channel to receive custom packages prior to upload into Red Hat Satellite, since a channel is required for systems to obtain the packages.
Run the following command on your Satellite Proxy Server to upload the package headers to the Red Hat Satellite Server and copy the packages to the Satellite Proxy Server repository:
# rhn_package_manager -c label_of_private_channel pkg-list
The label_of_private_channel is the custom channel created to receive these packages. Be sure to use the precise channel label specified during its creation. If one or more channels are specified (using
--channel), the uploaded package headers are linked to all the channels identified. If a channel is not specified, the packages are deposited in the No Channels section of the Package Management page. See Section 1.2.3, “Assigning Packages to Software Channels” for instructions on reassigning packages.
The pkg-list reference represents the list of packages to be uploaded. These packages must already be physically copied to the Proxy host. Alternatively, use the
-doption to specify the local directory that contains the packages to be added to the channel. Red Hat Network Package Manager can also read the list of packages from standard input (using
Other options are specified in a configuration file, such as the Red Hat Satellite Server URL, the HTTP proxy username and password (if the HTTP proxy requires authentication), and the top directory where packages live. This special configuration must not be edited and is located at
/etc/rhn/default/rhn_proxy_package_manager.conf. The choices can be overridden in the default configuration file with settings in the main configuration file
/etc/rhn/rhn.confor via command line options passed to Red Hat Network Package Manager.
Parameters not set in this file are read from
.rhn_package_managerin the home directory of the user currently logged in and finally from
/etc/rhn/rhn_package_manager.conf. Make sure all of these files have the appropriate permissions to prevent others from reading them.
After uploading the packages, check to see if the local directory is in sync with the Red Hat Satellite Server's image of the channels:
# rhn_package_manager -s -c name_of_private_channel
-soption lists all the missing packages, which are packages uploaded to the Red Hat Satellite Server but not present in the local directory. You must be an Organization Administrator to use this option. The application prompts you for your Red Hat Satellite username and password.
--copyonlyoption copies the file listed in the argument into the specified channel without uploading to the Satellite. This is useful when a channel on a Red Hat Satellite Proxy Server is missing a package and you don't want to reimport all of the packages in the channel.
# rhn_package_manager -c channel-name --copyonly /path/to/missing/file
Use Red Hat Network Package Manager to retrieve a list of packages in a channel, as they are stored by the Red Hat Satellite Server:
# rhn_package_manager -l -c name_of_private_channel
-loption lists the package name, version number, release number, architecture, and channel name for each package in the specified channel(s). See Table 1.1, “
rhn_package_manageroptions” for additional options.
Table 1.1, “
rhn_package_manageroptions” is a summary of all the command line options for Red Hat Network Package Manager (
| ||Increase verbosity of standard output messages.|
| ||Process packages from this directory.|
| || Specify the channel to receive packages. Multiple channels may be specified using multiple instances of |
| ||Process this number of headers per call - the default is 32.|
| ||List the packages in the specified channel(s).|
| ||Check if local directory is in sync with the server.|
| ||Print the current configuration and exit.|
| || Push only the packages that are newer than those on the server. Note that source packages are special in that their versions are never compared to each other. Their newness is dependent on their associated binary packages. Using this option with Red Hat Network Package Manager and just a source package does upload the package, but the source package does not appear in the Red Hat Satellite Web interface until the associated binary package has been uploaded. Contrast this with |
| ||Upload the indicated source packages. Doing this treats them as plain, stand-alone packages and not as special source packages associated with another, pre-existing binary package. For example, use this when application sources need to be distributed to developers and testers outside of regular source control management.|
| ||Read the package names from standard input.|
| ||Don't fail if packages are unsigned.|
| ||Turn off SSL (not recommended).|
| ||Read the package names from standard input.|
| ||Specify the Red Hat Satellite username. If the username is not provided, you will be prompted for the username of a valid Channel Administrator.|
| ||Specify the Red Hat Satellite password. If the password is not provided, you will be prompted for the password of a valid Channel Administrator.|
| ||In the post-upload step, do not copy the packages to their final location in the package tree.|
| ||Only copy the packages, do not re-import them.|
| ||Only print a list of the packages to be pushed.|
| ||Display the help screen with a list of options.|
| ||Briefly describe the available options.|
| ||Only copy packages|
These command line options are also described in the