BMC Server Automation provides a common Patch Downloader utility for Ubuntu and Debian operating systems. The utility uses a configuration file to download metadata and payload from the third-party websites.
The following steps explain how to build the configuration file and how to use the downloader utility for Ubuntu or Debian:
From the BMC Software Electronic Product Distribution (EPD) website, download and extract the installer package that is appropriate for your operating system. The offline downloader utilities are located in the \files\installers\other_files directory of the BBSA<version>-<platform>64 installer package. For information about downloading files from the EPD website, see Downloading the installation files.
The offline downloader utilities are located inside the All-OS-Patch-Downloaders-<platform>-<build>.<extension> package, where:
For offline patching for Ubuntu or Debian, you must extract the contents of All-OS-Patch-Downloaders-linux-86.tar.gz.
Depending on what version of BMC Server Automation you are using, you will need the following files:
The first step is to prepare the configuration file, which contains information (XML) that is used by the Patch Downloader utility. The configuration file must contain the download settings and patch filter information as show in the image below. You can also enter proxy server information if you are using one.
Edit the sample XML configuration file (sample-debian-downloader-config.xml or sample-ubuntu-downloader-config.xml) provided by BMC, and add the following XML tags based on your requirements:
(Optional) Add proxy information using the following XML tags:
Tag | Description |
---|---|
| The port used for communication with the proxy server. |
| The proxy server's host name or IP address. |
| The user name required for authentication to communicate with the proxy server. |
| An encrypted password for the specified user. The encrypted password is the result of running the For example, |
| The proxy server domain name to be used for authentication. |
| The type of proxy server. Valid values are:
|
<proxy-settings> <port>8080</port> <host>127.0.0.1</host> <username>user</username> <password>password</password> <domain-name></domain-name> <proxy-type>ntlm</proxy-type> <protocol>http</protocol> </proxy-settings>
Define download settings using the following XML tags:
Tag | Description |
---|---|
| Location where files can be stored temporarily during the download process. |
| Local location of the patch repository where metadata and payload are stored. |
| Number of times the download utility attempts to download if the first attempt at downloading a payload fails. |
| 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. |
| Number of downloads that can be performed in parallel. |
<temporary-location>c:\tmp</temporary-location> <payload-repository-location>c:\tmp\Ubuntu</payload-repository-location> <download-request-retries>3</download-request-retries> <download-request-timeout>180000</download-request-timeout> <downloader-parallel-threads>50</downloader-parallel-threads>
Obtain a distribution list for Ubuntu and Debian using the following command. You can use this information when updating the configuration file with patch filter information in the next step.
On a UNIX machine: sh debian_downloader.sh -listDists
On a Windows machine: debian_downloader.bat -listDists
Note
If you are using BMC Server Automation 8.6, the offline downloader is named as ubuntu_downloader.bat
or
.ubuntu_downloader.sh
Specify filters to limit the patches downloaded in the catalog. The same filters entered here must also be entered during catalog creation.
Enter the following command to automatically add the filter information to the configuration file.
If you are running on a UNIX machine:
debian_downloader.sh -addAptRepository -configFile <configFile> -debian <flavor> -osVersion <version> -debArch <arch> -debRepo <baseURL> <Distribution> <Component1> <Component2> ... <Component n>
If you are running on a Windows machine:
debian_downloader.bat -addAptRepository -configFile <configFile> -debian <flavor> -osVersion <version> -debArch <arch> -debRepo <baseURL> <Distribution> <Component1> <Component2> ... <Component n>
Variable | Description |
---|---|
| Name of the configuration file. |
| Flavor of the patch operating system. |
| Version of the patch operating system. |
| Architecture of the patch operating system. |
| Base URL of the required apt-get repository of the patch. For example:
|
Note
If you are using BMC Server Automation 8.6, the offline downloader is named as ubuntu_downloader.bat
or
ubuntu_downloader.sh
Sample command for adding a filter to the configuration file:
debian_downloader.bat
-addAptRepository
-configFile <configFile>
-debian Ubuntu
-osVersion 14.04
-debArch x86
-debRepo http://archive.ubuntu.com/ubuntu/dists/
trusty Main Restricted
<subscriptions> <debian-update arch="x86" version="14.04" os="Ubuntu"> <base-url>http://archive.ubuntu.com/ubuntu/</base-url> <distribution-list> <distribution name="trusty"> <component name="Main" /> <component name="Restricted"> <metadata-url> http://archive.ubuntu.com/ubuntu/dists/trusty/restricted/binaryi386/Packages.gz</metadata-url> <base-payload-url> http://archive.ubuntu.com/ubuntu/ </base-payload-url> </component> </distribution> </distribution-list> </debian-update> </subscriptions>
Save the configuration file. Use the sample configuration file below as a reference:
Next, you need to download patches using the filters you defined in the configuration file. On the command line, enter the following command:
For running on a Windows machine:
debian_downloader.bat -configFile <downloaderConfigurationFilePath>
For running on a UNIX machine:
sh debian_downloader.sh -configFile <downloaderConfigurationFilePath>
Note
ubuntu_downloader.bat
or ubuntu_downloader.sh
This command uses the following variable:
| Enter the location of the configuration file used by the offline downloader. |
From the command line, use any of the following commands to display information on version, available distributions, supported subscriptions and so on. The debian_downloader.bat and debian_downloader.sh executable are located in the folder where you extracted the Patch Downloader utility files, and can be used for either Ubuntu or Debian platforms.
Note
If you are using BMC Server Automation 8.6, the offline downloader is named as ubuntu_downloader.bat
or
ubuntu_downloader.sh
To display the downloader help file, enter the following command:
On a Windows machine: debian_downloader.bat -help
On a UNIX machine:
debian_downloader.sh -help
To display version information for the downloader, enter the following command:
On a Windows machine: debian_downloader.bat -version
On a UNIX machine: debian_downloader.sh -version
To list all available Ubuntu and Debian supported distributions, enter the following command:
On a Windows machine: debian_downloader.bat -listDists
On a UNIX machine: debian_downloader.sh -listDists
To list all available Ubuntu and Debian supported distributions filtered by given configuration file, enter the following command:
On a Windows machine: debian_downloader.bat -listDists <configFile>
On a UNIX machine: debian_downloader.sh -listDists <configFile>
This command uses the following variable:
Variable | Description |
---|---|
<configFile> | Name of the configuration file. |
To add a filter to the configuration file, enter the following command:
debian_downloader.bat -addAptRepository
-configFile <configFile>
-debian <flavor>
-osVersion <version>
-debArch <arch>
-debRepo <apt-get repository>
This command uses the following variable:
Variable | Description |
---|---|
<configFile> | Name of the configuration file. If the configuration file does not exist, a new file will be created. |
<flavor> | Flavor of the OS, either Debian or Ubuntu. |
<version> | Version of OS. For example, 11.10 for Ubuntu, or 6.0 for Debian. |
<arch> | OS architecture type, either x86 or x86_64. If this option is not mentioned, both architectures will be filtered. |
<apt-get repository> | apt-get repository specified in sources.list format: Debian example: Ubuntu example: |
To delete a filter from a given configuration file, enter the following command:
debian_downloader.bat -deleteAptRepository
-configFile <configFile>
-debian <flavor>
-osVersion <version>
-debArch <arch>
-debRepo <apt-get repository>
This command uses the following variables:
Variable | Description |
---|---|
<configFile> | Name of the configuration file. If the configuration file does not exist, a new file will be created. |
<flavor> | Flavor of the OS, either Debian or Ubuntu. |
<version> | Version of OS. For example, 11.10 for Ubuntu, or 6.0 for Debian. |
<arch> | OS architecture type, either 'x86' or 'x86_64'. If this option is not mentioned, both architectures will be filtered. |
<apt-get repository> | apt-get repository specified in sources.list format: Debian example: Ubuntu example: |