Repository navigation
ceph: Fix build by fully vendoring old cryptography version nix files. - #334286
Conversation
|
No clue yet if it builds, still building. |
|
We'll have to check in the VM tests for these errors -- they should be absent: |
Tests are passing without the |
|
I'm not planning to implemented this It's formatting it like this, which looks like the most diff-unfriendly way of doing things, and I'm not planning to take on that maintenance burden that will make backports and other cherry-picks left and right: -{ lib
-, stdenv
-, callPackage
-, buildPythonPackage
-, fetchPypi
-, rustPlatform
-, cargo
-, rustc
-, setuptoolsRustBuildHook
-, openssl
-, Security
-, isPyPy
-, cffi
-, pkg-config
-, pytestCheckHook
-, pytest-subtests
-, pythonOlder
-, pretend
-, libiconv
-, libxcrypt
-, iso8601
-, py
-, pytz
-, hypothesis
-}:
+{ lib, stdenv, callPackage, buildPythonPackage, fetchPypi, rustPlatform, cargo
+, rustc, setuptoolsRustBuildHook, openssl, Security, isPyPy, cffi, pkg-config
+, pytestCheckHook, pytest-subtests, pythonOlder, pretend, libiconv, libxcrypt
+, iso8601, py, pytz, hypothesis }:This seems more wrong than makes sense to me -- does |
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
|
@nh2 It looks like you're using nixfmt classic, not the RFC styled one. If you enter the |
|
FYI: This version has at least two known security vulnerabilities around creating PKCS#12 bundles (CVE-2024-26130) and when loading PKCS#7 bundles (CVE-2023-49083). |
|
Maybe we should slap |
|
Or migrate to Ceph 19.1.x (19.2.0 would be the final release), as Ubuntu and Fedora have done it. |
|
If Ubuntu and Fedora are fine with a pre‐release that seems better than bringing back an outdated version of a security library. |
@infinisil Ah indeed, that fixed it. The new formatting is good! I had run NIX_PATH=nixpkgs=. nix-shell -p nixfmtwhich brought me in the top-level of nixpkgs. I didn't get that means to literally run It might make sense to make that message even clearer to avoid the confusion. |
3edeb6d to
892dd6b
Compare
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
892dd6b to
2373da6
Compare
The commit I pushed (and the code in nixpkgs before this PR) already has a backported fix for one of them: patches = [
# Fix https://nvd.nist.gov/vuln/detail/CVE-2023-49083 which has no upstream backport.
# See https://github.com/pyca/cryptography/commit/f09c261ca10a31fe41b1262306db7f8f1da0e48a#diff-f5134bf8f3cf0a5cc8601df55e50697acc866c603a38caff98802bd8e17976c5R1893
./python-cryptography-Cherry-pick-fix-for-CVE-2023-49083-on-cryptography-40.patch
];I will try to patch the other one also.
These sounds like good alternative options in case the fix can't be backported.
That would be way above my (and my org's) risk tolerance -- I imagine it is the same for many other industrial Ceph users (as loss of data in our Ceph storage cluster would be devastating). I would only upgrade to a new Ceph version when it's fully released and the release and upgrade notes are certain to contain all important points. |
2373da6 to
acd6f8d
Compare
Done, that was easy the patch applied cleanly. Ready for another round of review now. |
|
Would you be comfortable with vendoring the Python libraries under the Ceph directory and importing them in a |
8dbaf0b to
6a42d58
Compare
There was a problem hiding this comment.
It seems like it’d be better to do this in the actual fastapi if we want to do it, rather than hacking around it for a specific downstream package?
There was a problem hiding this comment.
I do not know whether it's flaky in general or only in this overridden package set. I've added a comment for that now.
I only observed it in this package set, not sure whether that justifies disabling tests also for normal fastapi.
6a42d58 to
b0b9078
Compare
aac007d to
cc6a7b1
Compare
emilazy
left a comment
There was a problem hiding this comment.
This looks good to me; I think the old cryptography version is sufficiently hidden away and we should be able to get rid of it on the next major Ceph release. I’m going to merge to unblock qemu-full and if we have further nitpicks about the Python packaging we can always adjust later. Thanks for this!
cc6a7b1 to
16e1c4b
Compare
|
Oops, I forgot to check on the build and merge… Will do so after @dotlambda’s review comments are addressed and I double‐check the build. |
With cryptography 42 we can no longer just override the `src`,
because the derivation for 42 can no longer build version 40.
So revive the old version based on:
git show d74195b~:pkgs/development/python-modules/cryptography/default.nix > pkgs/development/python-modules/cryptography/40.nix
git show d74195b~:pkgs/development/python-modules/cryptography/vectors.nix > pkgs/development/python-modules/cryptography/vectors-40.nix │
Also:
* Include a patch for CVE-2024-26130
* Run `nixfmt` on them.
* `Securiy` -> `Security ? null` because in the local override
it doesn't seem to pass that Darwin-specific package on Linux;
avoids error:
Function called without required argument "Security"
16e1c4b to
36459ca
Compare
|
Fixed the comments, and I checked the build again with the rebase. Merging. |
|
Next Ceph PR is at: #335684 |
As [suggested](#334286 (comment)) by @nh2
|
Follow-up to #334286 (comment):
Looks like Ubuntu's Upgrade to Ceph 19 screwed multiple users, see https://old.reddit.com/r/ceph/comments/1f2osic/whats_going_on_with_ceph_v19_squid/:
and
So I'm happy to be conservative here and backport fixes to dependencies of less essential components. |
Fixes
cephbuild failure onstaging-next: https://hydra.nixos.org/build/269104111With cryptography 42 we can no longer just override the
src, because the derivation for 42 can no longer build version 40.So revive the old version based on:
Description of changes
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.