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:

 Click here to view the limitations for RHEL7

 Click here to view limitations on filters
  • When patching on RHEL7, you cannot create update-level or channel-level filters. You must use errata-level filters instead.
  • When patching on RHEL7, you cannot create channel-level filters. You must use errata-level filters instead.

To prepare the configuration file on Red Hat Enterprise Linux

  1. Edit the sample XML configuration file (sample-redhat-downloader-config.xml) for use as the configuration file.
  2. (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
  3. 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

  4. 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>



 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>

Channel label to download



<errata-severity>
</errata-severity>

Configure filter for metadata download of security advisory errata patches. For each classification, enter True to include patches of that type or False to exclude patches of that type.

  • <critical>



  • <important>
  • <moderate>
  • <low>
<errata-type>
</errata-type>

Configure filter for metadata download of errata according to type. For each classification, enter True to include patches of that type or False to exclude patches of that type.

  • <security></security>
  • <bugfix></bugfix>
  • <enhancement></enhancement>


Example of tags
    • 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


  • (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>

Channel label you want to download



<update-level>
</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.


Example of tags


  1. 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.

Was this page helpful? Yes No Submitting... Thank you

Comments