Skip to content

Nix::SSH: Honor NIX_SSHOPTS environment variable. - #302

Closed
aszlig wants to merge 2 commits into
NixOS:masterfrom
aszlig:fix-nix-sshopts
Closed

aszlig wants to merge 2 commits into
NixOS:masterfrom
aszlig:fix-nix-sshopts

Conversation

@aszlig

@aszlig aszlig commented Jul 23, 2014

Copy link
Copy Markdown
Member

This fixes a regression introduced by a5c6347.

NixOps uses NIX_SSHOPTS to pass OpenSSH options to nix-copy-closure and we were using the variable from the local scope in connectToRemoteNix()without concatenating it to/with @sshOpts.

aszlig added 2 commits July 23, 2014 07:49
This fixes a regression from a5c6347.

NixOps uses NIX_SSHOPTS to pass OpenSSH options to nix-copy-closure and
we were using the variable from the local scope in connectToRemoteNix()
without concatenating it to/with @sshOpts.

Signed-off-by: aszlig <[email protected]>
This is necessary in order to support deployments for systems using
pre-1.8 versions of Nix, so we should propagate those options there as
well.

I've duplicated the splitting of the NIX_SSHOPTS environment variable
instead of adding an import referencing SSH::sshOpts because the
function is going to be removed eventually and that way we don't miss
anything.

Signed-off-by: aszlig <[email protected]>
@aszlig

aszlig commented Jul 23, 2014

Copy link
Copy Markdown
Member Author

@edolstra, @rbvermaa <- to ensure it won't go unnoticed :-)

@edolstra edolstra closed this in 17ef234 Jul 24, 2014
@aszlig
aszlig deleted the fix-nix-sshopts branch July 24, 2014 18:15
zolodev pushed a commit to zolodev/nix that referenced this pull request Jan 1, 2024
numinit pushed a commit to numinit/nix that referenced this pull request Feb 12, 2026
Allowing strings with context here is probably a mistake since in a
chroot evaluation, it's ambiguous what filesystem store paths refer
to. Hence the warning.

Fixes NixOS#302.
ConnorBaker added a commit to ConnorBaker/nix that referenced this pull request May 28, 2026
`src/libflake/flake-primops.cc:48`'s `prim_getFlake` previously
called `forceStringNoCtx(*args[0], ...)` which throws on any
context. After Item 1 activation, a flakeref string carrying a
`SourceVirtual` placeholder context would trigger the
`forceStringNoCtx` error with the placeholder wire form
(`~<hash>:<name>`) embedded in the user-visible error message.

DetSys hit this in production (commit bb3846e, "builtins.getFlake:
Devirtualize strings", Feb 2026, fixes NixOS#302).

Cover-fix: switch to `forceString` + explicit context handling.
Resolve `SourceVirtual` placeholders via
`state.resolveSourceVirtualContext`, ensureLazyPathsCopied, and
`rewriteStrings` over the body to produce a clean flakeref string.
Subsequent `parseFlakeRef` then sees a real-storepath body. We do
not accept Built/DrvDeep context — those would be nonsensical for a
flakeref and `parseFlakeRef`'s own validation still rejects them.

Adds `boundary-audit-builtins-getflake.cc`. Test exercises the
cover-fix sequence and asserts no placeholder text in the post-
rewrite flakeref string.

13th audit boundary, all PASS. 406/406 expr unit tests pass. 21/21
flake tests pass. 183/183 functional tests pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
ConnorBaker added a commit to ConnorBaker/nix that referenced this pull request May 29, 2026
…4/§8.6

Folds the two source-verified review findings into the proposal (memories
aren't git-tracked):
- §8.4 CORRECTIONS: `Tree` (detached-tree-by-OID fetch) was wrongly listed
  FULLY obviated — reclassified PARTIAL (substrate built: peelToTreeOrBlob +
  recipe::TreeHandle/sourceViewTreeHandle, but zero production callers and no
  fetchTree surface takes a bare tree OID). Manifest reading: laziness sound
  but no bare-commit-SHA entry point without a flake input (same root cause).
- §8.6: gap 1 (defer-past-mount) de-staled — Item 5 has LANDED so Item 2 is
  unblocked + in-flight; honest scope narrowed (impure/relative/dirty only,
  pure eval rejects unlocked inputs in both forks). Added gap 5 (DetSys async
  .drv writer we lack) + gap 6 (narHashOf linear-scan).
- §8.7 (NEW): the re-verification provenance + verdict — we win perf + soundness
  decisively (DetSys's StorePath::random leak stream NixOS#160/NixOS#302/NixOS#299 vs our
  auditable content-keyed sigil); DetSys wins defer-past-mount + async-drv;
  tecnix obviation scorecard corrected; gap5 independently re-confirmed dormant.
- TOC entry for §8.7.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant