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

racket: use proper uname, allow for unix sockets #41219

Merged
merged 1 commit into from May 29, 2018

Conversation

tilpner
Copy link
Member

@tilpner tilpner commented May 29, 2018

Motivation for this change

Racket checks the current platform via uname, then disallows
unix domain socket usage based on the result. Previously, it could not
successfully call uname at all, so it fell back to denying UDS.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

cc @henrytill

Racket checks the current platform via uname, then disallows
unix domain socket usage based on the result. Previously, it could not
successfully call uname at all, so it fell back to denying UDS.
@flokli
Copy link
Contributor

flokli commented May 29, 2018

@GrahamcOfBorg build racket

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: racket

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: racket

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: racket

Partial log (click to expand)

/nix/store/p8gnf8wcdlsj0wk7j05vfsgszria7agh-racket-6.12/bin/.plt-web-server-wrapped: interpreter directive changed from "/bin/sh" to "/nix/store/m47apl3hq3i52fzy2cz24378p0xn4lyx-bash-4.4-p19/bin/sh"
/nix/store/p8gnf8wcdlsj0wk7j05vfsgszria7agh-racket-6.12/bin/.raco-wrapped: interpreter directive changed from "/bin/sh" to "/nix/store/m47apl3hq3i52fzy2cz24378p0xn4lyx-bash-4.4-p19/bin/sh"
/nix/store/p8gnf8wcdlsj0wk7j05vfsgszria7agh-racket-6.12/bin/.scribble-wrapped: interpreter directive changed from "/bin/sh" to "/nix/store/m47apl3hq3i52fzy2cz24378p0xn4lyx-bash-4.4-p19/bin/sh"
/nix/store/p8gnf8wcdlsj0wk7j05vfsgszria7agh-racket-6.12/bin/.setup-plt-wrapped: interpreter directive changed from "/bin/sh" to "/nix/store/m47apl3hq3i52fzy2cz24378p0xn4lyx-bash-4.4-p19/bin/sh"
/nix/store/p8gnf8wcdlsj0wk7j05vfsgszria7agh-racket-6.12/bin/.slatex-wrapped: interpreter directive changed from "/bin/sh" to "/nix/store/m47apl3hq3i52fzy2cz24378p0xn4lyx-bash-4.4-p19/bin/sh"
/nix/store/p8gnf8wcdlsj0wk7j05vfsgszria7agh-racket-6.12/bin/.slideshow-wrapped: interpreter directive changed from "/bin/sh" to "/nix/store/m47apl3hq3i52fzy2cz24378p0xn4lyx-bash-4.4-p19/bin/sh"
/nix/store/p8gnf8wcdlsj0wk7j05vfsgszria7agh-racket-6.12/bin/.swindle-wrapped: interpreter directive changed from "/bin/sh" to "/nix/store/m47apl3hq3i52fzy2cz24378p0xn4lyx-bash-4.4-p19/bin/sh"
checking for references to /build in /nix/store/p8gnf8wcdlsj0wk7j05vfsgszria7agh-racket-6.12...
wrong ELF type
/nix/store/p8gnf8wcdlsj0wk7j05vfsgszria7agh-racket-6.12

@flokli
Copy link
Contributor

flokli commented May 29, 2018

@clacke reading on fdbc744, what's missing to get racket (non-minimal) to build on darwin and aarch64 as well?

Is just the testsuite broken? Or some functionality as well?

@Mic92 Mic92 merged commit b438709 into NixOS:master May 29, 2018
@clacke
Copy link
Contributor

clacke commented May 30, 2018

Thank you for asking, I've been meaning to gather the energy to push things through.

The test suite indicates that ffi is broken, but I haven't checked whether it's broken in sandbox only, or also in reality. Let me get back to you after building full racket locally.

@clacke
Copy link
Contributor

clacke commented May 30, 2018

Re: aarch64 I wouldn't know.

@clacke
Copy link
Contributor

clacke commented May 30, 2018

However, disentangling testing and building is non-trivial. It's not as easy as doCheck = false, as what really happens is that the documentation contains tests, or at least triggers errors, and the documentation is built during buildPhase.

@tilpner tilpner deleted the racket-uname branch July 10, 2018 10:21
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

5 participants