Skip to content

pkgs/ceph: move to by-name#455186

Merged
nh2 merged 4 commits intoNixOS:masterfrom
benaryorg:ceph-by-name
Oct 24, 2025
Merged

pkgs/ceph: move to by-name#455186
nh2 merged 4 commits intoNixOS:masterfrom
benaryorg:ceph-by-name

Conversation

@benaryorg
Copy link
Contributor

@benaryorg benaryorg commented Oct 24, 2025

Three commits as follows (chronologically):

  • self-contained package: move the vast majority of logic from all-packages to the ceph files
  • client as output: refactor the client to be a separate output (getting rid of the multiple packages within the file), potentially allowing users to move from ceph-client to ceph.client
  • move to by-name: the actual move

The two earlier commits serve to minify the last one.

I held off on this PR until the package itself was fixed so we'd be able to ensure the package and tests still build.
This conflicts directly with several PRs to the package, however I believe that moving this over now reduces maintenance burden in the future.

Big thanks to #443671 which I used as a rough reference.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

Moving all of the custom dependency magic into the package allows us to move it to the by-name hierarchy a lot easier.

This however also means breaking any overrides used downstream for the affected dependencies:

- fmt
- lua
- arrow-cpp

The last one is now also exposed via passthru for overriding purposes.
All expressions evaluate to the same values though.

Signed-off-by: benaryorg <[email protected]>
Moving the ceph client to a separate output allows moving the entire package to the by-name structure more easily.

Signed-off-by: benaryorg <[email protected]>
@benaryorg
Copy link
Contributor Author

Tests are currently running.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. labels Oct 24, 2025
@benaryorg benaryorg marked this pull request as ready for review October 24, 2025 10:17
@benaryorg
Copy link
Contributor Author

Tests are happy.
Please do not ask me why GitHub decides to show the package.nix/default.nix as deleted and added with different line count, git shows it as:

diff --git a/pkgs/tools/filesystems/ceph/default.nix b/pkgs/by-name/ce/ceph/package.nix
similarity index 100%
rename from pkgs/tools/filesystems/ceph/default.nix
rename to pkgs/by-name/ce/ceph/package.nix

Does this need a changelog entry?
The only thing affected by this change at large are users with overrides for lua/fmt/arrow-cpp, so I'm not sure.

cc @nh2

@nix-owners nix-owners bot requested review from adevress, johanot, krav and nh2 October 24, 2025 10:18
Copy link
Contributor

@nh2 nh2 left a comment

Choose a reason for hiding this comment

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

Looks good to me, I left 2 minor comments, and will push a fix for them on top of this PR (that does not change the eval).

From my perspective this can me merged independent of whteher @benaryorg wants to implement those.

I built it and tests pass.


This PR indeed greatly reduces the diff to #443671, so it will make that one easier to review.


Side remark: I noticed this output:

/nix/store/av6vjncjgylmdakdxgf2ni91vqmnd34z-wrap-python-hook/nix-support/setup-hook: line 84: warning: command substitution: ignored null byte in input
Rewriting ELF>0Y@���@8@$#@@PPPSSH�>H�>�>�>�>q�q�@A@A@A..@ho@ho@ho���2h�sh�sh�s��\o�\o�\o@�\o�\o�\o  @ho@ho@hS�td�\o�\o�\o@P�td�OK�OK�OK��Q�tdR�td@ho@ho@ho�w�w/nix/store/daamdpmaz2vjvna55ccrc30qw3qb8h6d-glibc-2.40-66/lib/ld-linux-x86-64.so.2�h#!WKF!X�A�F7m`��\�H
         Vz  M�M�]��7�R+BQ$y         3�J~�8�! to #!/nix/store/sm8xkb2i0b6dbsll92iyfavy0b0cw0p6-python3-3.11.14

That's independent from this PR, but might be good to understand why such binary gets rewritten to a text hashbang, or if this is due to my terminal, how that comes to be.

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Oct 24, 2025
@nh2
Copy link
Contributor

nh2 commented Oct 24, 2025

Does this need a changelog entry?
The only thing affected by this change at large are users with _override_s for lua/fmt/arrow-cpp, so I'm not sure.

I think that's fine without, any such breakage will be at eval time and those things are a hack anyway; if somebody overrides those, they know exactly what they are doing and which package is involved.

@nh2
Copy link
Contributor

nh2 commented Oct 24, 2025

This conflicts directly with several PRs to the package, however I believe that moving this over now reduces maintenance burden in the future.

@benaryorg Which ones (beyond #443671) does it conflict with? Just we we know what we need to ping / clean up.

@nh2
Copy link
Contributor

nh2 commented Oct 24, 2025

I click "Merge when ready". If something blocks the automerge (e.g. ofborg not being able to build it due to resource use, or it taking long on Darwin), any committer please merge, or ping me here and I will force-merge.

@nh2 nh2 added this pull request to the merge queue Oct 24, 2025
Merged via the queue into NixOS:master with commit 6d20f51 Oct 24, 2025
28 of 32 checks passed
@dotlambda
Copy link
Member

Why was this merged with these commit messages???

@nh2
Copy link
Contributor

nh2 commented Oct 24, 2025

Why was this merged with these commit messages???

@dotlambda Do you mean that they start with pkgs/? I yes sorry, that was my mistake; I had not noticed the pkgs/ prefix (and the Github Actions runner correctly extracted ceph, ceph.passthru.tests, pkgs/ceph, pkgs/ceph.passthru.tests for ofborg as usual, so it looked correct).

The rest of the commit messages looks correct to me (they describe what they do, and the commits are correctly split into the independent refactorings we desired to be extracted from #443671).

@dotlambda
Copy link
Member

Do you mean that they start with pkgs/?

Yes.

@benaryorg
Copy link
Contributor Author

@benaryorg Which ones (beyond #443671) does it conflict with? Just we we know what we need to ping / clean up.

Potential conflicts I was aware of:

Unless I missed some it seems nothing unexpected had any conflicts then.

Do you mean that they start with pkgs/?

Yes.

I apologise for that (and at least this embarrassment will serve to help me remember the correct commit message conventions).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants