Preparing the configuration file for Red Hat Enterprise Linux
In the configuration file, you provide information that is used by the Patch Downloader utility. This information includes definition of a proxy server (if one is used), identification of a local, temporary directory on the server that is used by the Patch Downloader utility during download, and download of filter definitions.
This topic contains the following sections:
Before you begin
- Use the following command to encrypt the password supplied to the proxy server by the Patch Downloader utility. You must specify the resulting encrypted password in the
<password></password>
tag in the configuration XML file.
sh redhat_downloader.sh -encode <passwordToEncrypt>
Note the following limitation that apply while creating filters for RHEL 7 patches:
To prepare the configuration file on Red Hat Enterprise Linux
- Edit the sample XML configuration file (sample-redhat-downloader-config.xml) for use as the configuration file.
(Optional) Add proxy information using the following XML tags:
Tag
Description
<port></port>
Port number used to communicate with the proxy server
<host></host>
IP address or host name of the proxy server
<username></username>
User name required for authentication prior to communication with the proxy server
<password></password>
encrypted password for the specified user
<domain-name></domain-name>
Domain name of the proxy server
<proxy-type></proxy-type>
Type of proxy server used
Valid values are:- None — indicates that no proxy server is used
- NTLM
- NTLM-V2
- Squid
Add download information using the following XML tags:
Tag
Description
<temporary-location>
</temporary-location>>Location where files can be stored temporarily during the download process
<payload-repository-location>
</payload-repository-location>Local location of the patch repository where metadata and payload are stored
<download-request-retries>
</download-request-retries>Number of times the download utility attempts to download if the first attempt at downloading a payload fails
<download-request-timeout>
</download-request-timeout>Number of milliseconds that the utility waits for a response before considering the attempt as failed
This parameter is useful if the http response is slow.<downloader-parallel-threads>
</downloader-parallel-threads>Number of downloads that can be performed in parallel
- Modify filters, in the <subscription> tag. These define patches that are included for download:
To create a filter that downloads the latest RPMs by errata type, use the following syntax:
The syntax for the tags are as follows:
Tag | Description |
---|---|
< errata-type-filter repo-type="CDN"></errata-type-filter > | |
<os></os> | OS for the channel label |
<arch></arch> | Architecture for the channel label |
<channel-label> | Channel label to download |
<errata-severity> | Configure filter for metadata download of security advisory errata patches. For each classification, enter
|
<errata-type> | Configure filter for metadata download of errata according to type. For each classification, enter
|
<errata-type-filter>
<os></os>
<arch></arch>
<channel-label></channel-label>
<errata-severity>
<critical></critical>
<important></important>
<moderate></moderate>
<low></low>
</errata-severity>
<errata-type>
<security></security>
<bugfix></bugfix>
<enhancement></enhancement>
</errata-type>
</errata-type-filter>
To create a filter that downloads a specific errata by errata id, use the following syntax:
Tag
Description
<
errata-type-filter></errata-type-filter
>
Tag used to enclose an errata type of filter.<os> </os>
OS for the channel label
<arch> </arch>
Architecture for the channel label
<channel-label>
</channel-label>Channel label that you want to download
<errata-id>
</errata-id>A valid Errata ID for the channel label specified in the filter
Example of tags<errata-ids-filter> <os></os> <arch></arch> <channel-label></channel-label> <errata-ids> <errata-id></errata-id> </errata-ids> </errata-ids-filter>
- (Not applicable for RHEL 7) To create a filter that downloads a specific update level, use the following syntax:
Tag | Description |
---|---|
<update-level-filter repo-type="CDN"> </update-level-filter> | Tag used to enclose a update level filter. Used for rpms that are downloaded from CDN (reposync). |
<os></os> | OS for the channel label |
<arch></arch> | Architecture for the channel label |
<channel-label> | Channel label you want to download |
<update-level> | A valid update level for the channel label specified in the filter Note: The update-level filter works only on Linux computers. It does not work on windows computers. |
<update-level-filter>
<os></os>
<arch></arch>
<channel-label></channel-label>
<update-level></update-level>
</update-level-filter>
Save the file.
The sample-redhat-downloader-config.xml file is shown below, including sample data and parameter descriptions:<redhat-downloader-config> <config> <!--<proxy-settings> <port>8080</port> <host>_IPAddress_</host> <username>patch</username> <password>NWKIPRTPCWEB</password> <domain-name /> <proxy-type>ntlm</proxy-type> </proxy-settings> --> <temporary-location>c:\tmp</temporary-location> <payload-repository-location>/home/repo/</payload-repository-location> <download-request-retries>10</download-request-retries> <download-request-timeout>180000</download-request-timeout> <downloader-parallel-threads>10</downloader-parallel-threads> </config> <subscription> <errata-type-filter> <os>RHES5</os> <arch>x86</arch> <channel-label>rhel-i386-server-5</channel-label> <errata-severity> <critical>true</critical> <important>true</important> <moderate>true</moderate> <low>true</low> </errata-severity> <errata-type> <security>true</security> <bugfix>true</bugfix> <enhancement>true</enhancement> </errata-type> </errata-type-filter> <errata-ids-filter> <os>RHAS4</os> <arch>x86</arch> <channel-label>rhel-i386-as-4</channel-label> <errata-ids> <errata-id>RHSA-2009:0429</errata-id> <errata-id>RHBA-2009:0388</errata-id> </errata-ids> </errata-ids-filter> <!-- This filter should be used only if the downloader is executed on a Linux machine --> <!-- This filter should not be used if the downloader is executed on a Windows machine --> <update-level-filter> <!-- This filter should NOT BE used for RHEL 7 --> <os>RHAS4</os> <arch>x86</arch> <channel-label>rhel-i386-as-4</channel-label> <update-level>5</update-level> </update-level-filter> </subscription> </redhat-downloader-config>
Where to go from here
Use the command in Running the Patch Downloader utility for Red Hat Enterprise Linux and pass the configuration file as a parameter to download the patches.
Comments