Depending upon which Red Hat Network service is used, there are two different mechanisms for uploading packages to private channels.
Customers of the RHN Proxy Server will 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 RHN Proxy Server from which RHN Package Manager is invoked.
Customers of the RHN Satellite Server will 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 RHN Satellite Server from which RHN Push is invoked.
This chapter discusses both of these tools in detail.
Warning | |
---|---|
Remember, customers using both RHN Proxy Server and RHN Satellite Server should be using only the RHN Push because this combination requires custom packages and channels be uploaded to the Satellite only. From there, the Proxies will obtain the packages and distribute them to client systems. |
The RHN Package Manager allows an organization to serve custom packages associated with a private RHN channel through the RHN Proxy Server. If you want the RHN Proxy Server to update only official Red Hat Enterprise Linux packages, you do not need to install the RHN Package Manager.
To use the RHN Package Manager, install the rhns-proxy-package-manager RPM package and its dependencies. This package is available to registered RHN Proxy Server systems and may be installed by running up2date rhns-proxy-package-manager.
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 up2date.
Note | |
---|---|
It is recommended that at least one private channel be created to receive custom packages prior to upload, 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 Broker Server:
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 you use the precise channel label specified during its creation. If you have one or more channels specified (using -c or --channel), the uploaded package headers will be linked to all the channels identified. If you do not specify a channel, the packages will be 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. Alternatively, use the -d option 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 --stdin).
Other options, such as the Red Hat Network Server URL, the HTTP proxy username and password (if your HTTP proxy requires authentication), and the top directory where packages will live, can be specified in a configuration file. RHN Package Manager will try to read the configuration file specified using the -f or --conffile options, if present.
Parameters not set in this file will be read from .rhn_package_manager in 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, you can 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 |
This -s option will list all the missing packages (packages uploaded to the RHN Server but not present in the local directory). You must be an Organization Administrator to use this option. The script will prompt you for your RHN username and password.
You can also use the RHN Package Manager to retrieve a list of packages in a channel (as stored by the RHN Server):
rhn_package_manager -l -c name_of_private_channel |
The -l option will list the package name, version number, release number, architecture, and channel name for each package in the specified channel(s). Refer to Table 6-1 for additional options.
Here is a summary of all the command line options for RHN Package Manager (rhn_package_manager):
Option | Description |
---|---|
-v, --verbose | Increase verbosity |
-d, --dir DIRECTORY_NAME | Process packages from this directory |
-f, --conffile CONFFILE_NAME | Configuration file. If a configuration file is not given, ~/.rhn_package_manager is used. If ~/.rhn_package_manager is not found, /etc/rhn/rhn_package_manager.conf is used. |
-c, --channel CHANNEL_NAME | Specify the channel to receive packages. Multiple channels may be specified using multiple instances of -c (e.g.: -c channel_one -c channel_two) |
-e, --exclude PACKAGE_NAME | Filter out packages by name. |
-n, --count NUMBER | Process this number of headers per call — the default is 32. |
-l, --list | List the packages in the specified channel(s). |
-s, --sync | Check if local directory is in sync with the server. |
-p, --printconf | Print the current configuration and exit. |
--newest | Only push the packages that are newer than packages already pushed to the server for the specified channel. |
--nosig | Don't fail if packages are unsigned. |
--no-ssl | Turn off SSL (not recommended). |
--stdin | Read the package names from stdin. |
--username USERNAME | Specify RHN username. If not provided, you will be prompted for the username of a valid Channel Administrator. |
--password | Specify RHN password. If not provided, you will be prompted for the password of a valid Channel Administrator. |
--source | Upload the listed packages as source packages instead of binary packages. |
--dontcopy | In the post-upload step, do not copy the packages to their final location in the package tree. |
--test | Only print the packages to be pushed. |
-?, --help | Display the help screen with a list of options. |
--usage | Briefly describe the available options. |
Table 6-1. rhn_package_manager options
Tip | |
---|---|
These command line options are also described in the rhn_package_manager man page: man rhn_package_manager. |