The yum client commands and yum configuration files support dynamic variables:
This is replaced with the package's version, as listed in distroverpkg. This defaults to the version of the redhat-release package.
This is replaced with your system's architecture, as listed by os.uname() in Python.
This is replaced with your base architecture. For example, if $arch=i686 then $basearch=i386.
The yum client can use these variables to dynamically construct the final URL of the repository from which to download yum metadata - for example in yum.conf:
The advantage from a client perspective is a more flexible configuration.
Using Nexus 2.x Yum support or Nexus 3.5.0 Yum Proxy support, a Nexus administrator needs to create a single Yum repository for every combination of dynamic variable. This is because Nexus will only expect repodata at the root of the remote URL value of a proxy repo or at the base of a hosted repo.
This is not ideal since repositories are heavyweight and the management of these many repositories is not scalable if a repository is made for every unique variable combination.
Instead it should be possible to create a single Nexus repository that supports any unique combination of URL form used by the client at a specific depth. The base URL from the Nexus administrator perspective would be simply http://nexus:8081/repository/yum-proxy/ and the administrator would configure a depth at which they expect the metadata about what is in the repository will be stored/calculated.
Client configures baseurl=http://nexus:8081/repository/yum-proxy/$releasever/os/$basearch/
Nexus has single yum proxy repo at http://nexus:8081/repository/yum-proxy/ with a repodata metadata depth of '3' ( 3 path parts ). So metadata will be accessible under http://nexus:8081/repository/yum-proxy/$releasever/os/$basearch/repodata/*
Client configures baseurl=http://nexus:8081/repository/yum-proxy/$basearch/$releasever
Nexus has single yum proxy repo at http://nexus:8081/repository/yum-proxy/ with a repodata metadata depth of '2'. ( 2 path parts ). So metadata will be accessible under http://nexus:8081/repository/yum-proxy/$basearch/$releasever/repodata/*
Note: this scheme does not mean repodata within a single Nexus repository can be at multiple depths - you would still need to create more than one repository per depth
- Support repos at a configurable depth inside a single aggregating repo
- When we generate metadata, it's at the correct depth
- Ensure we're only invalidating the appropriate metadata when content changes