Skip to content

openssh: Fix cross-compile regression from c99c499#117053

Merged
SuperSandro2000 merged 2 commits intoNixOS:staging-nextfrom
matthewmazzanti:fix-openssh-cross
Mar 21, 2021
Merged

openssh: Fix cross-compile regression from c99c499#117053
SuperSandro2000 merged 2 commits intoNixOS:staging-nextfrom
matthewmazzanti:fix-openssh-cross

Conversation

@matthewmazzanti
Copy link
Contributor

Motivation for this change

Recent refactoring from c99c499 into a "common.nix" dropped some unusual details that allowed cross-compilation. See #107606 for more details on the original patch.

Things done

This patch reinstates those, and adds comments for posterity linking to cross compilation discussion.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@matthewmazzanti matthewmazzanti changed the title openssh: Fix cross-compile regression from #c99c499 openssh: Fix cross-compile regression from c99c499 Mar 20, 2021
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Mar 20, 2021
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# pacakge without splicing See: https://github.com/NixOS/nixpkgs/pull/107606
# package without splicing See: https://github.com/NixOS/nixpkgs/pull/107606

Good idea to add a comment. Could we use target or buildPackages to make it even clearer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure - I replicated what was there before since that was "known good" and the original PR mentioned it was a correct use-case, but I'll give it a shot with buildPackages

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Running with "buildPackages" instead of "pkgs" fails with the same error as the unpatched version. I'll admit that I'm new to the whole cross compiling on nix business, so I don't quite understand why.

Copy link
Member

Choose a reason for hiding this comment

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

mmm. I think this fix is fine for now and we maybe investigate that later.

@SuperSandro2000
Copy link
Member

/rebase staging-next

matthewmazzanti and others added 2 commits March 20, 2021 23:38
Recent refactoring from c99c499 into a "common.nix" dropped some unusual
details that allowed cross-compilation. This patch reinstates those, and
adds comments for posterity linking to cross compilation discussion.
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
@github-actions github-actions bot changed the base branch from staging to staging-next March 20, 2021 23:38
@github-actions github-actions bot force-pushed the fix-openssh-cross branch from 6270890 to 97d662c Compare March 20, 2021 23:38
@github-actions
Copy link
Contributor

Rebased, please reopen the pull request to restart CI

@github-actions github-actions bot closed this Mar 20, 2021
@SuperSandro2000 SuperSandro2000 merged commit b1b48e1 into NixOS:staging-next Mar 21, 2021
@matthewmazzanti matthewmazzanti deleted the fix-openssh-cross branch March 21, 2021 01:39
@symphorien symphorien mentioned this pull request Apr 19, 2021
10 tasks
@Ericson2314
Copy link
Member

openssh/openssh-portable@32dd2da the underlying issue is now fixed, so we can depend on kerberos normally next release.

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: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants