Skip to content
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

curl: Add versioned-dep on libcurl-openssl4 #41405

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dannf
Copy link
Member

@dannf dannf commented Feb 5, 2025

Use a versioned dependency to make sure curl and
libcurl-openssl4 are always the same version.

It should technically be more correct for curl
to allow for newer libcurl-openssl4 versions,
but this likely to avoid more problems.

Example use case:

2bda4b8f8b0b:/work/packages# grep curl /etc/apk/world libcurl-openssl4=8.12.0-r0
2bda4b8f8b0b:/work/packages# apk add curl
(1/1) Installing curl (8.12.0-r0)
Executing glibc-2.40-r8.trigger
Executing busybox-1.37.0-r0.trigger
OK: 34 MiB in 37 packages
2bda4b8f8b0b:/work/packages# apk add curl=8.12.0-r1 ERROR: unable to select packages:
libcurl-openssl4-8.12.0-r0:
breaks: curl-8.12.0-r1[libcurl-openssl4=8.12.0-r1] satisfies: world[libcurl-openssl4=8.12.0-r0] curl-8.12.0-r1[so:libcurl.so.4] 2bda4b8f8b0b:/work/packages# apk add curl=8.12.0-r1 libcurl-openssl4=8.12.0-r1 (1/2) Upgrading libcurl-openssl4 (8.12.0-r0 -> 8.12.0-r1) (2/2) Upgrading curl (8.12.0-r0 -> 8.12.0-r1)
Executing glibc-2.40-r8.trigger
Executing busybox-1.37.0-r0.trigger
OK: 34 MiB in 37 packages

Use a versioned dependency to make sure curl and
libcurl-openssl4 are always the same version.

It should technically be more correct for curl
to allow for newer libcurl-openssl4 versions,
but this likely to avoid more problems.

Example use case:

2bda4b8f8b0b:/work/packages# grep curl /etc/apk/world
libcurl-openssl4=8.12.0-r0
2bda4b8f8b0b:/work/packages# apk add curl
(1/1) Installing curl (8.12.0-r0)
Executing glibc-2.40-r8.trigger
Executing busybox-1.37.0-r0.trigger
OK: 34 MiB in 37 packages
2bda4b8f8b0b:/work/packages# apk add curl=8.12.0-r1
ERROR: unable to select packages:
libcurl-openssl4-8.12.0-r0:
breaks: curl-8.12.0-r1[libcurl-openssl4=8.12.0-r1]
satisfies: world[libcurl-openssl4=8.12.0-r0] curl-8.12.0-r1[so:libcurl.so.4]
2bda4b8f8b0b:/work/packages# apk add curl=8.12.0-r1 libcurl-openssl4=8.12.0-r1
(1/2) Upgrading libcurl-openssl4 (8.12.0-r0 -> 8.12.0-r1)
(2/2) Upgrading curl (8.12.0-r0 -> 8.12.0-r1)
Executing glibc-2.40-r8.trigger
Executing busybox-1.37.0-r0.trigger
OK: 34 MiB in 37 packages

Signed-off-by: dann frazier <dann.frazier@chainguard.dev>
@octo-sts octo-sts bot added the bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages. label Feb 5, 2025
Copy link
Member

@xnox xnox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would break using alternative RustTLS library provider.

@xnox
Copy link
Member

xnox commented Feb 5, 2025

I don't know how conflicts are processed, and if something like

- !curl>=8.13 # where 8.13 is package.version + 1

would work.

@dannf
Copy link
Member Author

dannf commented Feb 5, 2025

This would break using alternative RustTLS library provider.

Good catch. Could we just build them both from the same YAML? They appear to originate from the same source tree/tag.

@xnox
Copy link
Member

xnox commented Feb 5, 2025

This would break using alternative RustTLS library provider.

Good catch. Could we just build them both from the same YAML? They appear to originate from the same source tree/tag.

no, as it will cause bootstrap cycle. Also they sometimes are broken with new versions of rust/rustls/rustls-ffi/curl.

xnox referenced this pull request in jamonation/wolfi-os Feb 6, 2025
@jamonation
Copy link
Member

main...jamonation:wolfi-os:libcurl-depends-provides is my approach adding the virtual libcurl provides, and forcing package.full-version depends across both curl/curl-rustls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants