nginx packages do not provide nginx-r1.x.y

Asked by Jose Luis

Is there a particular reason why official nginx.org packages provide nginx-r1.x.y (e.g. nginx-r1.18.0) but official Ubuntu packages don't? I'm using pkg-oss to compile a dynamic module and it creates a dependency on nginx-r1.x.y instead of nginx with a version.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu nginx Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Thomas Ward (teward) said :
#1

The NGINX upstream packages and the Ubuntu packages are of differing origin. This is why the different versions are present, as they are fed by the version number in the changelog which does not have an 'r' at the beginning of the version strings, which was Debian's choice, which Ubuntu inherited. That is why there is no r1.X.Y version in Ubuntu.

Revision history for this message
Jose Luis (jp2masa) said :
#2

The problem is not the version itself, it's the "Provides" section.

From the nginx.org packages list for Ubuntu 21.10:

    Package: nginx
    Version: 1.20.1-1~impish
    ...
    Provides: httpd, nginx, nginx-r1.20.1
    ...

So running for example "apt install nginx-r1.20.1" will work. The official Ubuntu package does not have this "Provides", so packages which have the dependency in this format will fail to install.

Would it be possible to match this "Provides" or would that break something?

Revision history for this message
Thomas Ward (teward) said :
#3

Jose: "Provides" only affects `apt` and `dpkg`. It does *not* affect the NGINX-level version/coding that is inherently required for your compiled modules to match the proper version strings.

This issue will continue to crop up as long as Debian/Ubuntu do not use r1.X.Y version strings, there's part of this information stored in the compiled module what 'nginx version' was used to compile it. There's no way to specify an ABI compatibility layer independent of the compiled in version string, which is what is needed here.

Therefore, a module compiled under r1.20.1 which *would work* for 1.20.1 code won't work because the 'compiled version' data is r1.20.1 and not 1.20.1. This is a problem with how the packages are compiled.

HOWEVER, there's no information here about your NGINX - was this compiled by yourself or compiled by nginx.org and in their repositories? Because I'm looking at the nginx.org repositories in a container and their version codes read 1.20.1 and not r1.20.1.

Revision history for this message
Jose Luis (jp2masa) said :
#4

Exactly, just like the manifest I quoted in the previous message, the version is "1.20.1-1~impish", but I'm asking about the "Provides" section, which has the "nginx-r1.20.1" name.

I understand that it's not a good practice to have the version in 2 places, but nginx.org's Ubuntu apt repository does this and some packages use this convention and it's a nightmare because apt then fails the dependency check, because the dependency is "nginx-r1.20.1" instead of "nginx" with version "1.20.1". So I end up having to install nginx from their repository just to meet this dependency.

Revision history for this message
Thomas Ward (teward) said :
#5

Such a change requires discussion with the Ubuntu Server Team as the Server Team maintains the NGINX packaging.

Unfortunately, it is the holidays and the time period when everyone on that team (who is normally paid) is probably off until after the New Year's, so we can discuss this at that point, however it may take a while to get an answer or a decision.

Can you help with this problem?

Provide an answer of your own, or ask Jose Luis for more information if necessary.

To post a message you must log in.