{"id":16792045,"url":"https://github.com/djelibeybi/oraclelinux-reposync","last_synced_at":"2026-04-29T00:03:53.174Z","repository":{"id":45057056,"uuid":"446997391","full_name":"Djelibeybi/oraclelinux-reposync","owner":"Djelibeybi","description":"Container image that syncs content and layout from both yum.oracle.com or Oracle ULN. It also mirrors the structure of yum.oracle.com.","archived":false,"fork":false,"pushed_at":"2023-10-18T11:21:03.000Z","size":42,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-23T12:09:32.829Z","etag":null,"topics":["container","dnf","docker","mirror","oraclelinux","reposync","uln","yum"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"upl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Djelibeybi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-11T22:13:10.000Z","updated_at":"2023-09-13T17:09:44.000Z","dependencies_parsed_at":"2024-11-23T06:31:25.271Z","dependency_job_id":null,"html_url":"https://github.com/Djelibeybi/oraclelinux-reposync","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Djelibeybi%2Foraclelinux-reposync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Djelibeybi%2Foraclelinux-reposync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Djelibeybi%2Foraclelinux-reposync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Djelibeybi%2Foraclelinux-reposync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Djelibeybi","download_url":"https://codeload.github.com/Djelibeybi/oraclelinux-reposync/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243960667,"owners_count":20375105,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["container","dnf","docker","mirror","oraclelinux","reposync","uln","yum"],"created_at":"2024-10-13T08:44:04.955Z","updated_at":"2026-04-29T00:03:53.133Z","avatar_url":"https://github.com/Djelibeybi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sync Oracle Linux yum repos from ULN or yum.oracle.com\n\nThe `Dockerfile` and scripts in this repo create a container image that is able to sync content from both the [Unbreakable Linux Network][ULN] (ULN) and the [Oracle Linux yum server][YUM] to local repos with URL paths that match the ones on \u003chttps://yum.oracle.com\u003e.\n\n## Build the `ol-repo-sync` image (optional)\n\nTo build the `ol-repo-sync` image, clone this repo then run:\n\n```bash\ndocker build -t ol-repo-sync .\n```\n\nTo use the local image, remove `ghcr.io/djelibeybi` from each of the `docker run` commands provided below.\n\n## Initial setup\n\nAn Oracle Linux support subscription is **required** to sync from ULN. If you do not have a support subscription, remove the `uln` array completely from the `config/repos.json` file.\n\nNote that some repos are only available via ULN, including repos that contain the word `patch`, `ksplice`, `JavaSE` and `Exadata`.\n\nFor the best sync performance, add repos from the Oracle Linux yum server wherever possible, instead of the equivalent channel on ULN. The Oracle Linux yum server is cached by the Akamai CDN and generally provides a significantly greater download speed than ULN.\n\n### Register with ULN (optional)\n\nBefore content can be synced from ULN, the container has to be registered. First, create a directory named `rhn` then run the following command. \n\nThis command maps the `rhn/` directory to `/etc/sysconfig/rhn/` inside the container then automatically registers the container using the ULN credentials provided in `config/uln.conf` (check the section on [storing ULN credentials](#store-uln-credentials) for more detail):\n\n```bash\ndocker run --rm -it \\\n  --name ol-repo-sync-register \\\n  -v \"$PWD/rhn:/etc/sysconfig/rhn\" \\\n  -v \"$PWD/config:/config\" \\\n  ghcr.io/djelibeybi/ol-repo-sync register\n```\n\nThis will take a few minutes with no output to the terminal but should return to the command prompt when completed. \n\n\u003e If you don't sync from ULN, remove `-v \"$PWD/rhn:/etc/sysconfig/rhn\" \\` from the command.\n\nIf you mount a local directory to `/etc/sysconfig/rhn` each time you start a container, you should only have to register with ULN once, as the registration details are stored inside this directory.\n\n\u003e You can skip manual registration by running the container on an Oracle Linux host that is already registered with ULN and mounting the local `/etc/sysconfig/rhn` directory to the container.\n\nSource packages are not synced by default. To include source packages, set the `SYNC_SRC` environment variable to `1` by passing `-e SYNC_SRC=1` as an argument to `docker run`.\n\n### Store ULN credentials\n\nTo enable the automatic subscription and unsubscription of ULN channels, the sync process needs access to ULN credentials with permission to change channel subscriptions.\n\nCopy [`config/uln.sample.conf`](./config/uln.sample.conf) to `config/uln.conf` and replace the placeholders with Oracle SSO credentials and an active CSI. To protect the content of this file, run `chmod 400 config/uln.conf` to prevent others from being able to see the credentials.\n\n### Update map of available repos\n\nThe `config/repo-map.json` file contains a map of repo ID and URL for each repo available on the Oracle public yum server with the appropriate local file system path to ensure the same path structure is maintained locally.\n\nTo create or update the `config/repo-map.json` file, run:\n\n```bash\ndocker run --rm -it \\\n  --name ol-repo-sync-update \\\n  -v \"$PWD/config:/config\" \\\n  ghcr.io/djelibeybi/ol-repo-sync update\n```\n\nThis should be run regularly or at least whenever a new version of Oracle Linux is released to update the `config/repo-map.json` file.\n\n### Configure the repos to sync\n\nCopy [`config/repos.sample.json`](./config/repos.sample.json) to `config/repos.json` and add all the repos you want to sync to either the `uln` or `yum` array.\n\n## Syncing repos\n\nThe following command will sync the content of the repos configured in `config/repos.json` to the `$PWD/repo` directory which is mounted at `/repo` inside the container.\n\n```bash\ndocker run --rm -it \\\n  --name ol-repo-sync \\\n  -v \"$PWD/rhn:/etc/sysconfig/rhn\" \\  # only required for ULN\n  -v \"$PWD/config:/config\" \\\n  -v \"$PWD/repo:/repo\" \\\n  ghcr.io/djelibeybi/ol-repo-sync\n```\n\n\u003e If you are not syncing from ULN, remove `-v \"$PWD/rhn:/etc/sysconfig/rhn\" \\` from the command.\n\nFor each `yum` or `uln` source configured in `config/repos.json`, the sync process will:\n\n  1. Enable the repo (`yum`) or subscribe to the channel (`uln`).\n  2. Check if there are any new packages available in the repo\n  3. Download all new packages\n  4. Disable the repo or unsubscribe from the channel\n\nOnly one source is synced at a time. To run multiple syncs concurrently, create multiple configurations, each with a _unique_ set of sources.\n\nEnsuring that each sync process has a different set of sources allows you to run them in parallel, all mounting the the same local `$PWD/repo` directory, without worrying about conflicts or file collisions.\n\nConfigure regular updates by running the container using either `cron` or a `systemd` timer.\n\n## Accessing the synced repos\n\nA web server is required to make the synced content available to local clients. The `Dockerfile.nginx` and `Dockerfile.httpd` images can be used to create containers running either NGINX or Apache for this purpose.\n\nTo use NGINX as the web server, run:\n\n```bash\ndocker build -t ol-repo-webserver -f Dockerfile.nginx .\n```\n\nOr to use Apache as the web server, run:\n\n```bash\ndocker build -t ol-repo-webserver -f Dockerfile.httpd .\n```\n\n\u003e The `ghcr.io/djelibeybi/ol-repo-webserver` image uses NGINX which is the recommended option.\n\nThe `repo/` directory is mounted read-only into the `ol-repo-webserver` container. This allows the web server to continue running and serving clients while repo syncs are active.\n\n### Configuring Oracle Linux clients\n\nThe default configuration on a fresh install of Oracle Linux uses `yum$ociregion.$ocidomain`\nas the host name for each repo provided by Oracle. The values for `$ociregion`\nand `$ocidomain` are set via files in `/etc/yum/vars`.\n\nTo use these variables to point to your local repo mirror, ensure the host name for\nyour mirror starts with `yum`. Then, add any host name suffix to `ociregion` and\nthe domain name (and port) to `/etc/yum/vars/ocidomain`.\n\nFor example, if the URL for your mirror is `yum-mirror.example.com:8080`:\n\n```bash\n$ echo \"-mirror\" | tee /etc/yum/vars/ociregion\n-mirror\n$ echo \".example.com:8080\" | tee /etc/yum/vars/ocidomain\n.example.com:8080\n```\n\nThis enables the use of the Oracle Linux release RPMs, e.g. `oracle-epel-release-el8` or `oraclelinux-developer-release-el8` without the need to modify individual files.\n\n## Contributing\n\nThis project welcomes contributions from the community. Before submitting a pull\nrequest, please [review our contribution guide](./CONTRIBUTING.md).\n\n## License\n\nCopyright (c) 2020, 2022 Avi Miller.\n\nReleased under the Universal Permissive License v1.0 as shown at \u003chttps://oss.oracle.com/licenses/upl/\u003e.\n\n[ULN]: https://linux.oracle.com\n[YUM]: https://yum.oracle.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjelibeybi%2Foraclelinux-reposync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdjelibeybi%2Foraclelinux-reposync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjelibeybi%2Foraclelinux-reposync/lists"}