How to handle $basesearch in a Nexus Proxy Repo

We are using Oracle Linux 9 and are introducing Nexus as a local proxy repo for the yum/dnf repos. Idea is to proxy those we need then combine them to a single group repo that we use from the servers.

When creating the proxy repos, how should I handle the variables. For example, the default repo definition for the Oracle AppStream Repo specifies the URL as

baseurl=https://yum$ociregion.$ocidomain/repo/OracleLinux/OL9/appstream/$basearch/

When defining my proxy repo, should I substitute values for the variables or not? I.e. should I point my proxy at a source of http://yum.oracle.com/repo/OracleLinux/OL9/appstream/x86_64 or just http://yum.oracle.com/repo/OracleLinux/OL9/appstream/ ?

I was thinking that if I do the first I would then not include the $basearch in the definition for my Nexus group repo but in the latter case I should - is that correct? Is there an advantage to or the other? What is the best practice here?

You should be able to omit that segment in the proxy configuration in Nexus and allow Nexus to proxy all the architectures if you need more than one. Nexus should handle metadata at multiple depths - metadata does however need to be at the same path (depth) in order to merge with a group repository.

OK, so omit it in Nexus but do i then include it in the .repo file on my Linux machine (which points to my group repo?

With my current setup it finds things, but then fails to install all their dependencies…

Yes I’d expect you’d use something like: http://nexus/repository/my-repo/$basearch/