1 2 Previous Next 18 Replies Latest reply on May 8, 2013 12:49 AM by alvaromiranda Go to original post
      • 15. Re: Oracle Public Yum problems today (23/01/13)
        Hello there

        First of all, thanks for giving a try to the script.

        Script can be located at:


        Direct RAW access:

        Download as

        # wget https://raw.github.com/kikitux/public-yum-downloader/master/public-yum-downloader.sh

        If you want to use /var/www/html you are correct

        The hierarchy is 100% the same as what is on public-yum

        however, the script take 2 arguments, one is -P for the OS directory, and --url for where the same path will be public, so you can put the mirror in a different path

        example, I have my own repo in /u02/stage/ and is shared like mirandaa00/stage

        on my apache I have

        Alias /stage "/u02/stage/"

        <Directory "/u02/stage/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all

        In that way, I have everything I want in my own path.

        When you use the url, the script will create a local-yum-ol6.repo file with the url you gave, with GPG enabled, so you can be sure nothing wrong will happen in the middle

        I use this script it this way

        as root, i have /root/bin/dl.sh with this content

        ~/bin/public-yum-downloader.sh -P /u02/stage/ -p http://proxy:3128 -R 6.latest --url http://mirandaa00/stage -l /u02/stage/repo/OracleLinux/OL6/
        ~/bin/public-yum-downloader.sh -P /u02/stage/ -p http://proxy:3128 -R 5.latest --url http://mirandaa00/stage -l /u02/stage/repo/OracleLinux/OL5/
        ~/bin/public-yum-downloader.sh -P /u02/stage/ -p http://proxy:3128 -R 4.latest --url http://mirandaa00/stage -l /u02/stage/repo/EnterpriseLinux/EL4/
        ~/bin/public-yum-downloader.sh -P /u02/stage/ -p http://proxy:3128 -R 6.4 --url http://mirandaa00/stage -l /u02/stage/repo/OracleLinux/OL6/
        ~/bin/public-yum-downloader.sh -P /u02/stage/ -p http://proxy:3128 -R 5.9 --url http://mirandaa00/stage -l /u02/stage/repo/OracleLinux/OL5/
        ~/bin/public-yum-downloader.sh -P /u02/stage/ -p http://proxy:3128 -R 4.9 --url http://mirandaa00/stage -l /u02/stage/repo/EnterpriseLinux/EL4/
        ~/bin/public-yum-downloader.sh -P /u02/stage/ -p http://proxy:3128 -R 4.8 --url http://mirandaa00/stage -l /u02/stage/repo/EnterpriseLinux/EL4/
        ~/bin/public-yum-downloader.sh -P /u02/stage/ -p http://proxy:3128 -R 6.UEK --url http://mirandaa00/stage
        ~/bin/public-yum-downloader.sh -P /u02/stage/ -p http://proxy:3128 -R 5.UEK --url http://mirandaa00/stage
        ~/bin/public-yum-downloader.sh -P /u02/stage/ -p http://proxy:3128 -r ol6_addons --url http://mirandaa00/stage
        ~/bin/public-yum-downloader.sh -P /u02/stage/ -p http://proxy:3128 -r el5_addons --url http://mirandaa00/stage
        ~/bin/public-yum-downloader.sh -P /u02/stage/ -p http://proxy:3128 -r el5_oracle_addons --url http://mirandaa00/stage
        ~/bin/public-yum-downloader.sh -P /u02/stage/ -p http://proxy:3128 -r ol6_playground_latest

        the -l will look on that path to find the rpm, useful for example if you have a dvd and you want to use as initial cache

        I do run my commands in that way as when 5.9 came out, I had a lot of those rpms in 5.8 or 5 latest, rite?
        Worst thing that could happen, is the rpm is not there, and will have to download, but if it's there will copy it

        for UEK and addons those are unique rpm, so I don't use -l

        for the playground, that are the new kernel based on 3.x directly, i don't use --url, as I don't wat the script to enable that repo, but I do want to download what that channel have

        so, for known versions 6.0 to 6.4 you can use -R 6.n or even -R 6.UEK

        for other repos you can pass the name as -r repo

        Regarding the OVM3, the OVM3 is not on the repo, so I don't use my script for that, however, you can use the tools your self

        mkdir -p /u02/stage/repo/OracleVM/OVM3/latest/x86_64/repodata/.cache

        and create a repo file

        cat /u02/stage/public-yum-ovm3.repo

        name=Oracle Linux $releasever Latest (x86_64)

        Then, you can download what is there as:

        http_proxy=http://proxy:3128 yumdownloader -c /u02/stage/public-yum-ovm3.repo --destdir=/u02/stage/repo/OracleVM/OVM3/latest/x86_64/ '*'
        createrepo -v -c /u02/stage/repo/OracleVM/OVM3/latest/x86_64/repodata/.cache /u02/stage/repo/OracleVM/OVM3/latest/x86_64

        Please, take note the yumdownloader use --destdir=/path  then SPACE, then what you want to download, as we want a mirror, space '*'

        any question, here, or feel free to mailme at kikitux.net@gmail.com

        if you have time, check http://kikitux.net


        Edited by: Alvaro Miranda on Apr 18, 2013 4:43 PM
        • 16. Re: Oracle Public Yum problems today (23/01/13)
          Updated the script so now it included the errata on the created mirror.

          Script can be located at:


          Direct RAW access:
          • 17. Re: Oracle Public Yum problems today (23/01/13)
            Avi Miller-Oracle
            Alvaro Miranda wrote:
            I wrote an script to download and create a local mirror from public-yum
            Your script should be using the modifyrepo command to add the updateinfo.xml.gz file into the repomd.xml, and not do it manually. We have released a new createrepo RPM that contains an updated version of modifyrepo that accepts the checksum and simple-md-filenames parameters.
            • 18. Re: Oracle Public Yum problems today (23/01/13)
              Thanks for the tip Avi.

              I did in that ugly way in the meantime I did figure how to leave something that worked OL6->OL5 and OL5->OL5

              I did update and works perfect.

              When the host is OL6, I end using:

              modifyrepo checksum sha simple-md-filenames "$container_rootfs/$basepath/repodata/updateinfo.xml"

              Thanks again,
              1 2 Previous Next