6 Replies Latest reply on Jun 28, 2012 2:08 PM by Bill Robinson

    How to leverage RHEL Patch Catalog for non-RHN patches

    Vinnie Lima



      There are many threads around rpm dependency hell resolution, but I couldn't find an answer on this one (maybe I missed it).


      How (if at all) can I leverage BBSA's auto-dependency resolution capability inherit to the Patch Catalog feature, for rpm's which are not released as part of RHN or downloadable via the offline patch downloader?


      I find the problem to be the channel XML and metadata. Just placing the RPMs (lets say, opengeo-suite-2.x.x) and re-running catalog update does not incorporate this rpm into the patch catalog.


      Is there any way to add such 3rd party rpms into a native BBSA patch catalog?  This way I can use Patch smart groups instead of having to use BLPackage RPMGroup which requires me to add every single dependency in the group (versus pulling from the Patch catalog).


      BBSA 8.1.2




        • 1. Re: How to leverage RHEL Patch Catalog for non-RHN patches
          Bill Robinson

          You need to use the offline downloader with the createrepo option on the repo dir.  There's a section in the docs about incorporating custom repos.


          That will add the rpms to your repo and the XML meta files

          1 of 1 people found this helpful
          • 2. How to leverage RHEL Patch Catalog for non-RHN patches
            Vinnie Lima

            Thanks, will give this a try.

            • 3. How to leverage RHEL Patch Catalog for non-RHN patches
              Joe Piotrowski

              Some of our documentation can be a bit tedious. If you get this to work and you can sum up the process in a "quick install guide" format and post it here, that would be greatly appreciated. Marking this thread as Answered.

              • 4. How to leverage RHEL Patch Catalog for non-RHN patches

                KA372001 - BBSA Red Hat Linux Patching: How to create a Catalog using custom RPM packages




                1. REQUIREMENTS
                You need a Linux server that will contain:
                a. BladeLogic All-OS-Patch-Downloaders-linux-build-8.X.XX Offline Downloader (stand-alone utility is available on EPD Download site)
                b. Folder(s) with your RPMs (all dependencies should be resolved, otherwise Analysis will fail with missing dependencies)
                c. BladeLogic RSCD Agent installed


                2. PREPARE REPO FOLDER
                From the All-OS-Patch-Downloaders-linux-build-8.X.XX folder run the following command to create the repository folder that will be used later on to create the Catalog:


                # sh redhat_downloader.sh -createRepo -srcLocation <locationOperSysArch> -repoLocation <repositoryPath>
                <locationOperSysArch>: folder path(s) where the custom RPMs are stored. Syntax - /Loc1,OS-Arch;/Loc2,OS-Arch;/Loc3,OS-Arch
                <repositoryPath>: folder where the RPMs will be copied to. This folder will be used for Catalog creation


                # sh redhat_downloader.sh -createRepo -srcLocation /path/to/folder1,RHES5-x64_86 -repoLocation /path/to/repo-folder
                Note: in here we are building a repository by copying the rpms from folder1 to repo-folder, and we will tag this repo-folder as the RHES5 x86_64 repository.


                # sh redhat_downloader.sh -createRepo -srcLocation "/path/to/folder1,RHES5-x86_64;/path/to/folder2,RHES5-x86_64" -repoLocation /path/to/repo-folder
                Note: if you have multiple folders, then separate them by semicolon and put them in double quotes.


                # sh redhat_downloader.sh -createRepo -srcLocation /path/to/rpms-folder,RHES5-x86_64 -repoLocation /path/to/rpms-folder

                Note: in here I used the repoLocation to be the same as the source location. This is fine, and by doing so I'm not creating duplicate RPMs.


                If this step completed correctly, then in your repoLocation folder you will see an additional file: RHES5x86_64.xml. If you do not see this file, then review the error.log (for issues in the error.log that you cannot resolve, search the Knowledge Base)


                3. CREATE CATALOG
                Create an Offline Red Hat Linux Catalog with the following key values:
                - "Payload Source Location" - Point to the <repoLocation> folder generated in previous step (example: //linux-server/path/to/repo-folder)
                - "Repository Location" - This is where the final repository will reside. Feel free to use the same location as in "Payload Source Location" to avoid duplicate RPMs, or chose entirely different server.
                - "Filter" - As a Channel, select the one that matches the OS and Arch that you used to create your custom repo, so in my case I will pick "Red Hat Enterprise Linux (v. 5 for 64-bit x86_64)


                Warning: if the OS and Arch of the Channel you pick does not match the OS-Arch you used when running step 2, you will run into the following error:
                Error while updating feed: Os arhitecture repository xml not found: /path/to/repo-folder/RHAS3x86_64.xml

                Here I intentionally used RH3 64bit Filter, so the Catalog was looking for RHES3x86_64.xml instead of RHES5x86_64.xml that was generated in step 2.



                The Catalog should be created at this point.



                • 5. How to leverage RHEL Patch Catalog for non-RHN patches
                  Vinnie Lima

                  The procedures above seem to work, but for some of the "manual" additions to the repo, I am getting the following Log errors when running an Update on the Offline Patch Catalog:


                  Error while reading metadata xml for offline package - Copy of geos-ruby-3.3.1-1.x86_64.rpm, error: Error occurred while UnMarshalling the xml to LinuxPackageMD object. -Error occurred while UnMarshalling the xml to the LinuxPackageMD object.

                  • 6. Re: How to leverage RHEL Patch Catalog for non-RHN patches
                    Bill Robinson

                    Can you run a rpm verify command against the rpms to make sure they are ok ?