Downloading CentOS patch repositories


CentOS patch repositories must always be entirely downloaded before performing patch analysis because the metadata required for analysis is stored in the patch files themselves.  

Downloading the patches

BMC does not currently provide any downloaders for CentOS patches. However, many third-party utilities are available for this purpose.

  • Reposync is a tool available in the yum-utils package.
  • mrepo is a community-supported tool that uses a variety of download methods to maintain yum repositories.
  • A scripted solution that uses rsync, ftp, wget, or any other command line utility. 

BMC does not specifically endorse any of these utilities or have any affiliation with them. Other tools might be available to perform the download actions for CentOS patches.

Organize your directory structure in such a way that patches for a particular distribution and architecture are downloaded into a unique directory. For example, on your patch helper server, you might create the following directories:

  • /patch
  • /patch/cos5x86
  • /patch/cos5x86_64
  • /patch/cos6x86
  • /patch/cos6x86_64
  • /patch/cos7x86_64

Generating metadata

After the patches are downloaded, you must generate the metadata using the createrepo utility.

For createrepo version 0.9.8 or earlier run the following command:

createrepo --no-database /patch/cos5x86

For createrepo version 0.9.9 or later run the following command:

createrepo --no-database --simple-md-filenames /patch/cos5x86

Then zip up the generated repodata directory so that a repodata.zip is stored in /patch/cos5x86 along with the generated repodata directory:

cd /patch/cos5x86;zip -r repodata.zip repodata

Defining the repository

After generating metadata for each repository, you must define the repository in the <install dir>/patch/linuxpu/Work/linuxrepo.conf file.  In this file, use the following format:

<User-defined tag>,<NSH path to repository>,<Platform identity>

For the example directories listed in Downloading the patches above, the linuxrepo.conf file would contain the following lines:

cos5x86=//server1/patch/cos5x86,COS5x86
cos5x86_64=//server1/patch/cos5x86_64,COS5x86_64
cos6x86=//server1/patch/cos6x86,COS6x86
cos6x86_64=//server1/patch/cos6x86,COS6x86_64
cos7x86_64=//server1/patch/cos7x86_64,COS7x86_64

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*