Foreman or Pulp adds "dists" to the R repo URL

Problem:
I added a R repo to Forman with the following URL:https://cloud.r-project.org/bin/linux/ubuntu/
and release: bionic-cran40

After trying to sync the R repo, I get the error “No valid Release file found for ‘bionic-cran40’.”
Since I did setup a gpg key pair, that works fine directly from an Ubuntu server, I dove in the logs on the Foreman server and found this in /var/log/messages:

Feb 17 14:39:18 servernaam pulpcore-worker-3: pulp [7773962a-7206-4e55-84ed-77021d7ec2b5]: backoff:ERROR: Giving up download_wrapper(…) after 1 tries (aiohttp.client_exceptions.ClientResponseError: 404, message=‘Not Found’, url=URL(‘https://cloud.r-project.org/bin/linux/ubuntu/dists/bionic-cran40/Release.gpg’))

As you can see. There is een extra “dists” added to the URL.
Is that something I can bypass myself?

Expected outcome:
Not adding a “dists” to the URL so that the R repo finds the release.gpg and completes the sync

Foreman and Proxy versions:
foreman-2.5.4-1.el7.noarch
katello-4.1.4-1.el7.noarch

Foreman and Proxy plugin versions:

Distribution and version:
CentOS 7.9

Other relevant data:

The answer is yes and no.

The repository you are trying to sync is using “flat repository format”.
While pulp_deb has had experimental support for this format, for some time, the implementation was not very robust until a major overhaul was released with pulp_deb 2.16.
Unfortunately, Katello 4.1 (which you are using) still uses pulp_deb 2.14.

Starting with Katello 4.3 (which uses pulp_deb 2.16) what you are seeking is definitely possible.
Using Katello 4.1 there is a small chance, it might be possible for the repo you want…

Flat repo usage instructions

To make Katello/Pulp interpret your “Release” as a flat repo, the value you enter for the release must end in a /. Thats it. If you enter:

Upstream URL: https://cloud.r-project.org/bin/linux/ubuntu/
Release: bionic-cran40/

There should not be any /dists/ part in the URL where pulp_deb will look for the Release file.
However, like I said above, there is still a chance the sync will not work properly until you update to Katello 4.3.

You can also try using the following combination:

Upstream URL: https://cloud.r-project.org/bin/linux/ubuntu/bionic-cran40/
Release: /

Both the above Upstream URL/Release combinations should work equally well on Katello 4.3 (and may or may not make a difference on Katello 4.1).

Additional info

Note that we have recently added significantly more UI hints, sanity checking, examples, and documentation on the Katello page for creating deb repositories. (I don’t remember the exact version that was released with). Hopefully this will help users with understanding what to place in the Releases field going forwards.

Edit: Looks like the GUI improvements also are part of Katello 4.3: Bug #33702: Fix Katello GUI issues and add debian constraints - Katello - Foreman

Thank you very much for your quick response.
Both versions with the “/” at the end, worked on this version of Katello (4.1).
All packages are sync’d now.
Also, I added an update to Foreman 3 in our planning.