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

nix repair does not adhere to extra-trusted-substituters #11875

Open
roberth opened this issue Nov 13, 2024 · 0 comments
Open

nix repair does not adhere to extra-trusted-substituters #11875

roberth opened this issue Nov 13, 2024 · 0 comments
Labels

Comments

@roberth
Copy link
Member

roberth commented Nov 13, 2024

Describe the bug

nix repair, and probably other commands do not respect the trusted-substituters setting.
Instead, ?trusted=true must be passed.

This is surprising, and probably a bug.

Steps To Reproduce

There's probably an easier way to trigger this.

  1. Choose or make an unimportant store path <path>
  2. Back up a store path with nix copy --to ~/recoverstore <path>
  3. Corrupt the original store path by mounting the system store file system rw and deleting it from the file system. Do not delete it from the store db; we want that entry to remain.
  4. sudo nix store repair --extra-substituters ~/recoverstore --extra-trusted-substituters ~/recoverstore <path> (the latter option seems to have no effect; need ?trusted=true; different issue)

Observe a message like

warning: ignoring substitute for '/nix/store/nzb7spdhiy30ikv1crnk8dgl0svyjgw4-libunistring-1.2' from 'local', as it's not signed by any of the keys in 'trusted-public-keys'

Expected behavior

No message, and the substitution succeeds because either or both:

  • the substituter is trusted by virtue of trusted-substituters

A valid signature from the original store db is used.
Note that we're not doing a normal substitution here. We may already have a signature, so if the substituter's contents match our metadata, we have all we need, and we should be able to proceed.

nix-env --version output

2.24.10

Additional context

Priorities

Add 👍 to issues you find important.

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

No branches or pull requests

1 participant