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

[staging-next] shadow: only use tcb where available #210259

Merged
merged 2 commits into from Jan 13, 2023

Conversation

alyssais
Copy link
Member

Description of changes

Fixes pkgsMusl.shadow. tcb requires NSS, which e.g. musl and uclibc don't have.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

musl and UClibc, the other Linux libcs supported in Nixpkgs, don't
have NSS, so tcb can't be built for them.
Fixes pkgsMusl.shadow.

Fixes: 0e32191 ("shadow: add tcb support")
@alyssais alyssais added the 6.topic: musl Running or building packages with musl libc label Jan 11, 2023
@alyssais alyssais changed the title shadow: only use tcb where available [staging-next] shadow: only use tcb where available Jan 11, 2023
@alyssais alyssais merged commit 0debb0b into NixOS:staging-next Jan 13, 2023
@alyssais alyssais deleted the shadow-musl branch January 13, 2023 04:19
@@ -6,7 +6,7 @@
, libxcrypt
, glibcCross ? null
, pam ? null
, withTcb ? stdenv.isLinux, tcb
, withTcb ? lib.meta.availableOn stdenv.hostPlatform tcb, tcb
Copy link
Member

Choose a reason for hiding this comment

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

The problem with this is, that when we change the platform of tcb for some reason, we could trigger a mass rebuild or silently disable a feature without realizing it. Using isGnu here would duplicate code but IMO I would prefer it.

platforms = platforms.linux;
platforms = systems.inspect.patterns.isGnu;
Copy link
Member

@ncfavier ncfavier Jan 24, 2023

Choose a reason for hiding this comment

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

Heads up: this broke the https://search.nixos.org import (so it hasn't updated in a week). I made a PR with a quick fix: NixOS/nixos-search#602. Eventually we should figure out how to display patterns properly.

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

Successfully merging this pull request may close these issues.

None yet

4 participants