Retain old deb package versions on Nexus APT proxy repo

Hello All,

I am trying to setup ubuntu deb repo proxy for internal use.

Our main requirement is to retain old version of deb packages mirrored from ubuntu public repo so that our builds can use old version of packages which are removed from ubuntu public repo.

In the proxy repo setting, I have set ‘How long (in minutes) to cache artifacts before rechecking the remote repository’ to ‘-1’. Will that suffice?

Please let me know what is the optimal workflow/setting for our requirement.

Thanks in advance for your replies.

-Kiruba

By default all the repositories keep items they proxy.
Unless your proxy is overwriting versions (for example, 1.0 deployed in January, then 1.0 deployed in March) you shouldn’t need to change anything, just download them through NXRM.
If they are overwriting versions, then you have a quandry, because setting a cache setting means you’ll never get the new thing. Which may be what you want, but seems tough to say that’s NEVER what you want.
Without knowing the scale, what I’d recommend in this scenario, is have the old versions you are dependant on pushed to a hosted repo. That way no matter what the proxy does, you have them.
That may be unnecessary depending on what I said above already tho.
2 cents,
Joe

Bringing up this old conversation since I want to achieve the same functionality but I’m hitting an issue:

The metadata which Nexus APT proxy exposes seems to ignore the removed packages from the remote repository

In practice in my APT proxy :

  • dists/focal/main/binary-amd64/Packages.gz only mentions one package version (package_1=1.3)
  • package_1 has 2 version in the packages folder : 1.3 and 1.2
  • so on the APT client side, I can only install version 1.3, package_1=1.2 is not found anymore

Is there any way to handle the Packages.gz listing differently ? For example, regenerating it to contain the whole list of cached packages instead of the remote ones ?