-
Notifications
You must be signed in to change notification settings - Fork 3.8k
nginx: fix provides #28155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
nginx: fix provides #28155
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nginx modules must not provide nginx which causes them to not be able to be installed alongside nginx due to the new apk provide fixes. Remove PROVIDES from modules. Remove nginx-ssl from PROVIDES as there is no non-ssl variant, i.e. all version provide ssl. Set nginx-ssl as the default variant. Remove non-existent config value. Signed-off-by: George Sapkin <george@sapk.in>
All nginx variants provide ssl so switch from nginx-ssl to nginx. Signed-off-by: George Sapkin <george@sapk.in>
GeorgeSapkin
referenced
this pull request
in openwrt/openwrt
Dec 23, 2025
The updated logic for the APK dependencies and provides is as follows:
- If ABI version is defined:
- package is named `package_name-ABI_version`
- package implicitly provides
`package_name-ABI_version=package_version`
this implies that only one version of a package per ABI can be
installed at the same time
- additionally provide `package_name` so multiple packages can be
looked up by its base name
- for each `provides`, provide `provide-ABI_version=package_version`
this implies that only one version of a provide can be installed at
the same time
- else if ABI version is _not_ defined
- package is named `package_name`
- package implicitly provides `package_name=package_version`
this implies that only one version of a package can be installed at
the same time
- if `alternatives` is defined
- for each `provides`, provide `provide`
this implies that multiple versions of a provide can be installed
at the same time
- else if `alternatives` is _not_ defined
- for each `provides`, provide `provide=package_version`
this implies that only one version of a provide can be installed
at the same time
Both cases a package can be looked up by its base name.
ABI version `alternatives`, `conffiles`, `conffiles_static`, `list` and
`rusers` files so multiple versions of the same ABI package can be
installed side by side, and so they don't overwrite each other's
packaging files.
ABI version `EXTRA_DEPENDS` so dependencies can be correctly looked up
using the existing OpenWrt semantics without the ABI specified. This is
needed since ABI-versioned libraries no longer provide
`package_name=package_version`, so that they can be installed side by
side.
Remove duplicate dependencies when `EXTRA_DEPENDS` specifies a versioned
one that is already in `DEPENDS`.
ABI is defined
------------------------------------------------------------------------
`libsqlite3` has `PROVIDES` set to `libfake` and has two different ABI
versions installed. `libfake` is just an example to demonstrate the
mechanics, as the library can already be depended upon using e.g.
`libsqlite3-0=3.51.0-r1`. Note the ABI-versioned lists.
```
root@OpenWrt:/tmp# apk add --allow-untrusted ./libsqlite3-0-3.51.0-r1.apk
(1/1) Installing libsqlite3-0 (3.51.0-r1)
libsqlite3-0-3.51.0-r1.post-install: Executing script...
OK: 22 MiB in 157 packages
root@OpenWrt:/tmp# apk add --allow-untrusted ./libsqlite3-1-4.00.0-r1.apk
(1/1) Installing libsqlite3-1 (4.00.0-r1)
libsqlite3-1-4.00.0-r1.post-install: Executing script...
OK: 23 MiB in 158 packages
root@OpenWrt:/tmp# apk query --fields name,version,contents,provides libsqlite3-0 libsqlite3-1
Name: libsqlite3-0
Version: 3.51.0-r2
Provides: libfake-0=3.51.0-r2 libsqlite3
Contents:
lib/apk/packages/libsqlite3-0.list
usr/lib/libsqlite3.so.0
usr/lib/libsqlite3.so.3.51.0
Name: libsqlite3-1
Version: 4.00.0-r1
Provides: libfake-1=4.00.0-r1 libsqlite3
Contents:
lib/apk/packages/libsqlite3-1.list
usr/lib/libsqlite3.so.1
usr/lib/libsqlite3.so.4.00.0
root@OpenWrt:/tmp# ls -lh /usr/lib/libsqlite3.so.*
lrwxrwxrwx 1 root root 20 Nov 20 00:23 /usr/lib/libsqlite3.so.0 -> libsqlite3.so.3.51.0
lrwxrwxrwx 1 root root 20 Nov 20 00:27 /usr/lib/libsqlite3.so.1 -> libsqlite3.so.4.00.0
-rwxr-xr-x 1 root root 1.0M Nov 6 18:19 /usr/lib/libsqlite3.so.3.51.0
-rwxr-xr-x 1 root root 1.0M Nov 6 18:19 /usr/lib/libsqlite3.so.4.00.0
```
ABI is not defined
------------------------------------------------------------------------
Both `avahi-dbus-daemon` and `avahi-nodbus-daemon` provide `avahi-daemon`,
but have no ABI specified. This results in `avahi-daemon=0.8-r11` provides
for both packages and only one being able to be installed at the same time:
```
root@OpenWrt:/tmp# apk add --allow-untrusted ./avahi-nodbus-daemon-0.8-r11.apk
(1/4) Installing libavahi-nodbus-support (0.8-r10)
libavahi-nodbus-support-0.8-r10.post-install: Executing script...
(2/4) Installing libdaemon (0.14-r5)
libdaemon-0.14-r5.post-install: Executing script...
(3/4) Installing libexpat (2.7.3-r1)
libexpat-2.7.3-r1.post-install: Executing script...
(4/4) Installing avahi-nodbus-daemon (0.8-r11)
avahi-nodbus-daemon-0.8-r11.post-install: Executing script...
23 MiB in 160 packages
root@OpenWrt:/tmp# apk query --fields provides avahi-nodbus-daemon
Provides: avahi-daemon=0.8-r11
root@OpenWrt:/tmp# apk add --allow-untrusted ./avahi-dbus-daemon-0.8-r11.apk
ERROR: unable to select packages:
avahi-dbus-daemon-0.8-r11:
conflicts: avahi-nodbus-daemon-0.8-r11[avahi-daemon=0.8-r11]
satisfies: world[avahi-dbus-daemon><Q1R111s+ke9Vf+eCxDHX2BZVUK54Q=]
avahi-nodbus-daemon-0.8-r11:
conflicts: avahi-dbus-daemon-0.8-r11[avahi-daemon=0.8-r11]
satisfies: world[avahi-nodbus-daemon><Q1BAu7nLI2MgRabpveLTGO2ksQz7E=]
```
Provides and alternatives
------------------------------------------------------------------------
Both `uclient-fetch` and `wget-nossl` provide `wget` and specify
alternatives, so provides are not versioned and both packages can be
installed at the same time:
```
root@OpenWrt:/tmp# apk query --fields name,version,contents,provides uclient-fetch wget-nossl
Name: uclient-fetch
Version: 2025.10.03~dc909ca7-r1
Provides: wget
Contents:
bin/uclient-fetch
lib/apk/packages/uclient-fetch.alternatives
lib/apk/packages/uclient-fetch.list
Name: wget-nossl
Version: 1.25.0-r1
Provides: gnu-wget wget
Contents:
lib/apk/packages/wget-nossl.alternatives
lib/apk/packages/wget-nossl.list
usr/libexec/wget-nossl
```
Fixes: #20582
Fixes: #20802
Signed-off-by: George Sapkin <george@sapk.in>
Link: #20819
Signed-off-by: Robert Marko <robimarko@gmail.com>
Contributor
|
tested, and fixed |
|
@GeorgeSapkin Just wondering if this fix has anything to do with the recently increased image size for |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📦 Package Details
Maintainer: @Ansuel, @heil cc: @ptpt52
Description:
PROVIDESfrom modules.PROVIDESas there is no non-ssl variant, i.e. all version provide ssl.There's an unrelated issues (as far as I can tell) with nginx Kconfig recursive dependency that happens on 25.12-rc1 without the apk fix. This PR doesn't cover that.
Related:
🧪 Run Testing Details
nginx and modules can be installed side-by-side and modules don't provide nginx anymore:
nginx-full correctly conflicts with nginx-ssl on the basis of both of them providing nginx:
luci-nginx still installs on top of this PR's changes.
etebase builds and installs, but the package is broken due to some Python dependencies, even without this PR's changes.
@ptpt52 can you test on your end?
✅ Formalities