Language and Page Formatting Options
Chapter 6. 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 RHN Proxy Server use the RHN Package Manager application, which sends package header information to the central Red Hat Network Servers and places the package itself into the local repository of the Proxy that invoked RHN Package Manager.
Customers of RHN Satellite Server use the RHN Push application, which sends package header information to the local RHN Satellite Server and places the package into the local repository of the Satellite that invoked RHN Push.
This chapter discusses both of these tools in detail.
If you use both RHN Proxy Server and RHN Satellite Server, use only RHN 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.
6.1. Uploading Packages to RHN Proxy Server
RHN Package Manager allows an organization to serve custom packages associated with a private RHN channel through the RHN Proxy Server. If the organization wants the RHN Proxy Server to serve only official Red Hat Enterprise Linux packages, do not install the RHN Package Manager.
To use the RHN Package Manager, install the
rhns-proxy-package-managerRPM package and its dependencies. This package is available to registered RHN Proxy Server systems and is installed by running
Only the header information for the packages is uploaded to the RHN Servers. The headers are required so that RHN can resolve package dependencies for the client systems. The actual package files (
*.rpm) are stored on the RHN Proxy Server. For this reason, custom packages cannot be downloaded through the RHN website, although they are listed. They must be retrieved by the client system using
6.1.1. Configuring and Using the RHN Package Manager
Before using RHN Package Manager to upload packages into RHN , 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 RHN Package Manager to upload the packages into Red Hat Network, 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 Network, since a channel is required for systems to obtain the packages.
The following command uploads the package headers to the RHN Servers and copies the packages to the RHN Proxy Server repository:
rhn_package_manager -c label_of_private_channelpkg-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. Refer to Section 4.6, “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. RHN 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 Network 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 RHN 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 RHN 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 RHN Server but not present in the local directory. You must be an Organization Administrator to use this option. The application prompts you for your RHN 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 RHN 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 RHN Package Manager to retrieve a list of packages in a channel, as they are stored by the RHN 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). Refer to Table 6.1, “
rhn_package_manageroptions” for additional options.
Table 6.1, “
rhn_package_manageroptions” is a summary of all the command line options for RHN 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 RHN Package Manager and just a source package does upload the package, but the source package does not appear in the RHN 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 RHN username. If the username is not provided, you will be prompted for the username of a valid Channel Administrator.|
| ||Specify the RHN 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