Repository navigation
Requiring OpenSSL 3.0.0 should be a breaking change #678
Replies: 10 comments
|
This crate is basically just following upstream in terms of versioning. Given that it might be better to raise this with upstream. |
|
It seems to me that upstream DO NOT follow semver, but cargo do. |
|
Exactly, because Cargo trusts that crate versioning follows semver, curl crate versions above 0.4.9 can't be used on systems with openssl v1.x now, whereas they could before curl-sys 0.4.85. Yes, I don't think curl follow semver - I'm pretty sure they've been releasing curl versions since before the semver specification was defined in any case. They say "The main version number is bumped when really big, world colliding changes are made" https://curl.se/docs/versions.html. So it sounds like they can make breaking changes in a release that only bumps the semver "minor" version number. |
|
Summarizing, please, correct me if I'm wrong. There won't be new version of curl crate? And there are only 2 solutions to fix build for curl 0.4.49 with openssl-1.x:
Are there any other possibilities? |
|
Yes I think that's right in terms of that's the only way for downstream consumers on openssl 1.x to adapt. My suggestion for curl-rust maintainers is:
Then anyone who's on OpenSSL < 3 can just pin to the previous curl crate version 0.4.49 which will pull in (working) curl-sys 0.4.84, if 0.4.85 is yanked. I don't know how feasible it is to yank a version of the crate but I think that would be the "correct" thing to do since a breaking change was mistakenly released as a patch version. |
I don't know that it is a mistake. The minimum required version of libraries expected to be installed on the host system is continually a moving target in general, and particularly for curl-rust. Multiple times we've released an update in which the minimum Honestly, SemVer is not equipped to deal with the scenario that curl-rust is in. Conventionally speaking, SemVer declares the library API as the thing in question breaking or not, to decide whether a major version bump is required. Quoting SemVer:
and
In other words, the way I read SemVer, requiring your build environment or system libraries to be updated is not something that mandates a major version bump, as that is not related to the API. It just isn't information that SemVer intends to communicate, and I think people are expecting it to do something that it just doesn't. The concept of Minimum Supported Rust Version (MSRV) is a similar problem, and given that
It is worth remembering that Cargo does not strictly follow SemVer, but instead uses its own flavor of SemVer that provides a more strict definition about major version So in SemVer parlance, moving from version 0.4.84 to version 0.4.85 is semantically a minor version bump, not a patch version bump, since the syntax is
A good guideline that is often used by the community is looking at Debian versions and what Debian supports to get an idea of how old or new something is, and what minimum version of system dependencies are reasonable to expect. For OpenSSL, we can see that all currently-supported Debian versions have been upgraded to OpenSSL 3+, except for Debian 11 ("oldoldstable"). 45 And the normal support cycle for Debian 11 ended already, and LTS support is about to end this year. 6 So while I suppose an argument could be made that we should not require OpenSSL 3+ in a minor version bump until August 31st, 2026 (end of Debian 11 LTS), but I don't know that it is necessary to be that strict. Even this is pretty generous, and I don't know that it is the job of curl-rust to be even more generous than upstream libcurl is. Now, even having said all that, it still should be possible to use curl-rust on older versions, using one of two methods:
Footnotes |
|
Sounds great! But why not curl 0.5 with curl-sys 0.5.x? Or why not curl v0.4.50 with curl-sys 0.5.x? |
|
I take your point @sagebind that the curl-sys versioning was not unambiguously wrong according to Cargo's semver definition, but it is quite annoying that it has made the crate very difficult to use for anyone stuck on OpenSSL 1.1. Simply bumping to 0.5.0 would have avoided this pain for consumers of the crate, and it would definitely not be "wrong" to do that, since as you point out, the Cargo docs say this kind of change is "possibly breaking". Obviously now it has already been released, I understand if it's not possible to yank the crate when the OpenSSL requirement won't be an issue for most users of the crate. For extra context RHEL 8 end-of-life is May 2029 and I expect that RedHat won't update OpenSSL until then, they'll probably just patch any CVEs. |
|
The reason why we do not "simply" bump to 0.5 is that such a change has the potential to be incredibly disruptive to the Crates ecosystem, as curl-rust is a dependency of a lot of projects. And because curl-sys For this reason, we've been very hesitant to release a 0.5 version unless we're absolutely sure that it is necessary and the benefit of doing so is overwhelmingly worth the pain we might cause; instead we prefer to avoid that if we can. |
|
Just to close the loop on this thread (which is old now, I know), I've written a page documenting the current versioning process of curl-rust which will hopefully at least reduce some frustration so that our process is clearly explained: https://github.com/sagebind/curl-rust/wiki/Crate-versioning-strategy |
Uh oh!
There was an error while loading. Please reload this page.
curl-sys 0.4.85 switched to require OpenSSL 3.0.0 or greater. This should be a breaking change not a patch change. It means if you have an older version of OpenSSL, you can't use the
curlcrate with any version above 0.4.9 (which is when the crate switched to requirecurl-sys^0.4) as cargo will select versioncurl-sys0.4.85 which fails to build.RHEL 8 images are pinned to the 1.1.1 version of OpenSSL and this won't ever be updated so effectively having the 3.0.0 requirement as a patch change means if you're on RHEL 8 you have to pin to
curl0.4.9 which was released 9 years ago - unless I'm missing something.Would it be possible to yank the 0.4.85 release and re-release as 0.5.0? Then you could pin to a more recent downlevel version of
curlon RHEL 8 and any other OSes which have older OpenSSL.All reactions