4 Replies Latest reply: Mar 23, 2012 10:31 AM by supriyashivkumar RSS

Update repo process

supriyashivkumar Newbie

Hi,

 

I have a repository set up which is mirrored from the centos repo using rsync. It has the os and the updates sections.

Now in the base.appl file i can specify the default repo for the OS section. Is there a way that I can enforce even the updates to be applied whne the appliance is built.

Currently, I am doing a yum update in my post install step. However, this is a real slow process and there are a lot of side effects of this process.

 

 

Thanks,

Supriya Shivkumar

  • 1. Re: Update repo process
    Marek Goldmann Master

    We enable both base and updates repos by default. You can disable them by specifyig default_repos to false and add additional repos at your own. Read more.

     

    Please paste your.appl file so I can help you further.

     

    --Marek

  • 2. Re: Update repo process
    supriyashivkumar Newbie

    name: c57-test

    summary: test-22nd Mar

    os:

      name: centos

      version: 5

      password:

    hardware:

      partitions:

        "/":

            size: 5

    default_repos: false

    repos:

      - name: "CentOS"

        baseurl: "http:/test.domain.com/centos/5.7/os/x86_64/" # This is my mirrored repo.

    packages:

      - @base

      - @core

      - @editors

    files:

      "/tmp":

           - "setup.sh"

    post:

      base:

        - "bash /tmp/setup.sh"

     

     

    I have certain packages which are present in the update repo.. the url is "http:/test.domain.com/centos/5.7/updates/x86_64/RPMS/"

     

     

    By default I want the build process to run the yum update command to update any package being installed in the process to pick the latest package form the updates section.

  • 3. Re: Update repo process
    Marek Goldmann Master

    It depends what is the content of your repo. Normally you should have mirrored both base and updates repos locally. Afterwards adding two repositories in repos section should give you desired behavior.

     

    Don't use arch-specific path, like x86_64, replace it with #BASE_ARCH# - this will give you more flexibility.

     

    --Marek

  • 4. Re: Update repo process
    supriyashivkumar Newbie

    Oh. Is it possible to add two repos? I was not aware of that..

    So does this look rite for the repos section of the base file.

     

    repos:

      - name: "CentOS"

        baseurl: "http:/test.domain.com/centos/5.7/os/x86_64/" # This is my mirrored repo.

      - name: "CentOSUpdate"

        baseurl: "http:/test.domain.com/centos/5.7/updates/RPMS/"  # Update Repo

     

    Thanks for the suggestion of the  BASE ARCh.