Files
renovate/lib/modules/manager
Jamie Tanna 426bf15b26 feat(manager/dockerfile): update APK packages pinned with a fuzzy constraint (#45693)
In the Wolfi undistribution, which Chainguard Images are built upon,
it is common to use a fuzzy constraint rather than exact versions[0]:

    RUN apk update && apk add --no-cache libcurl-openssl4=~8.12.1
          curl=~8.12.1 make

which we previously skipped as `unsupported-version` when we started
extracting `apk add` packages.

As the `apk` version resolves these, we should extract the constraint as
the `currentValue`, and let the lookup evaluate it.

A constraint of `~8.12.1` matches every `8.12.1-rN` version, so we don't
need to update these constraints.

However, when the `newVersion` is i.e. `8.13.0-r0`, the constraint is
rewritten to `curl=~8.13.0`.

If using an exact pin, the version is upgraded with the same precision
i.e. `curl=8.12.1` -> `curl=8.13.0`.

We still skip constraints we can't handle with i.e. `contains-variable`
or `unsupported-version`.

[0]: https://github.com/elastic/crawler/blob/bc15328fb808affd00dff0cd92527bbe402f5ded/Dockerfile.wolfi#L7

Co-authored-by: Claude Opus 5 <jamie.tanna+claude-code@mend.io>
2026-09-18 07:06:55 +00:00
..