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

virtualgl-lib: fix broken startup script #49185

Merged
merged 1 commit into from Oct 30, 2018
Merged

Conversation

markuskowa
Copy link
Member

Motivation for this change

Replace /bin/sh for bash in vglrun.
The script uses exec, which fails with /bin/sh

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option 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/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

postPatch = ''
# script calls exec, which fails with plain sh
substituteInPlace ./server/vglrun.in \
--replace '#!/bin/sh' '#!${stdenv.shell}'
Copy link
Member

Choose a reason for hiding this comment

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

Can this be also fixed by the patchShebangs script?

Copy link
Member Author

Choose a reason for hiding this comment

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

That won't give me a bash but the path to a sh (I tried).

Copy link
Member

Choose a reason for hiding this comment

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

Also reported here: VirtualGL/virtualgl#87

Replace /bin/sh with bash in vglrun.
'exec' fails with /bin/sh
@markuskowa
Copy link
Member Author

This fix also needs a backport to 18.09

@xeji
Copy link
Contributor

xeji commented Oct 30, 2018

@GrahamcOfBorg build virtualglLib

@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: virtualglLib

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 aarch64-linux (full log)

Attempted: virtualglLib

Partial log (click to expand)

strip is /nix/store/p9akxn2sfy4wkhqdqa3li97pc6jaz3r1-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/zkhlykr5y22h3qh0fv7bl8xj4pzz3nl2-virtualgl-lib-2.5.2/lib  /nix/store/zkhlykr5y22h3qh0fv7bl8xj4pzz3nl2-virtualgl-lib-2.5.2/bin
patching script interpreter paths in /nix/store/zkhlykr5y22h3qh0fv7bl8xj4pzz3nl2-virtualgl-lib-2.5.2
/nix/store/zkhlykr5y22h3qh0fv7bl8xj4pzz3nl2-virtualgl-lib-2.5.2/bin/vglconnect: interpreter directive changed from "/bin/sh" to "/nix/store/dsyc1z7ck08ga7l0b1jcxx35wj69qcii-bash-4.4-p23/bin/sh"
/nix/store/zkhlykr5y22h3qh0fv7bl8xj4pzz3nl2-virtualgl-lib-2.5.2/bin/vglrun: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/dsyc1z7ck08ga7l0b1jcxx35wj69qcii-bash-4.4-p23/bin/bash"
/nix/store/zkhlykr5y22h3qh0fv7bl8xj4pzz3nl2-virtualgl-lib-2.5.2/bin/vglserver_config: interpreter directive changed from "/bin/sh" to "/nix/store/dsyc1z7ck08ga7l0b1jcxx35wj69qcii-bash-4.4-p23/bin/sh"
/nix/store/zkhlykr5y22h3qh0fv7bl8xj4pzz3nl2-virtualgl-lib-2.5.2/bin/vgllogin: interpreter directive changed from "/bin/sh" to "/nix/store/dsyc1z7ck08ga7l0b1jcxx35wj69qcii-bash-4.4-p23/bin/sh"
/nix/store/zkhlykr5y22h3qh0fv7bl8xj4pzz3nl2-virtualgl-lib-2.5.2/bin/vglgenkey: interpreter directive changed from "/bin/sh" to "/nix/store/dsyc1z7ck08ga7l0b1jcxx35wj69qcii-bash-4.4-p23/bin/sh"
checking for references to /build in /nix/store/zkhlykr5y22h3qh0fv7bl8xj4pzz3nl2-virtualgl-lib-2.5.2...
/nix/store/zkhlykr5y22h3qh0fv7bl8xj4pzz3nl2-virtualgl-lib-2.5.2

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: virtualglLib

Partial log (click to expand)

strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/i4jsnzwdsqk0zzbh9clv0kw01xnzjniv-virtualgl-lib-2.5.2/lib  /nix/store/i4jsnzwdsqk0zzbh9clv0kw01xnzjniv-virtualgl-lib-2.5.2/bin
patching script interpreter paths in /nix/store/i4jsnzwdsqk0zzbh9clv0kw01xnzjniv-virtualgl-lib-2.5.2
/nix/store/i4jsnzwdsqk0zzbh9clv0kw01xnzjniv-virtualgl-lib-2.5.2/bin/vglserver_config: interpreter directive changed from "/bin/sh" to "/nix/store/r47p5pzx52m3n34vdgqpk5rvqgm0m24m-bash-4.4-p23/bin/sh"
/nix/store/i4jsnzwdsqk0zzbh9clv0kw01xnzjniv-virtualgl-lib-2.5.2/bin/vglgenkey: interpreter directive changed from "/bin/sh" to "/nix/store/r47p5pzx52m3n34vdgqpk5rvqgm0m24m-bash-4.4-p23/bin/sh"
/nix/store/i4jsnzwdsqk0zzbh9clv0kw01xnzjniv-virtualgl-lib-2.5.2/bin/vglrun: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/r47p5pzx52m3n34vdgqpk5rvqgm0m24m-bash-4.4-p23/bin/bash"
/nix/store/i4jsnzwdsqk0zzbh9clv0kw01xnzjniv-virtualgl-lib-2.5.2/bin/vgllogin: interpreter directive changed from "/bin/sh" to "/nix/store/r47p5pzx52m3n34vdgqpk5rvqgm0m24m-bash-4.4-p23/bin/sh"
/nix/store/i4jsnzwdsqk0zzbh9clv0kw01xnzjniv-virtualgl-lib-2.5.2/bin/vglconnect: interpreter directive changed from "/bin/sh" to "/nix/store/r47p5pzx52m3n34vdgqpk5rvqgm0m24m-bash-4.4-p23/bin/sh"
checking for references to /build in /nix/store/i4jsnzwdsqk0zzbh9clv0kw01xnzjniv-virtualgl-lib-2.5.2...
/nix/store/i4jsnzwdsqk0zzbh9clv0kw01xnzjniv-virtualgl-lib-2.5.2

@xeji
Copy link
Contributor

xeji commented Oct 30, 2018

@GrahamcOfBorg build virtualgl bumblebee

@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: virtualgl, bumblebee

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 aarch64-linux (full log)

Attempted: virtualgl

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

Partial log (click to expand)


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


these derivations will be built:
  /nix/store/k886nw0bqxxs21n3l2fhlgg0nfv9cfwp-virtualgl-2.5.2.drv
building '/nix/store/k886nw0bqxxs21n3l2fhlgg0nfv9cfwp-virtualgl-2.5.2.drv'...
/nix/store/h5d9y3g8kamgsxawrg9rwml6zblx8zhz-virtualgl-2.5.2

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: virtualgl

The following builds were skipped because they don't evaluate on x86_64-linux: bumblebee

Partial log (click to expand)

stripping (with command strip and flags -S) in /nix/store/i4qxmp8zagklbrwa3g9c5qc9vxr1j092-virtualgl-lib-2.5.2/lib  /nix/store/i4qxmp8zagklbrwa3g9c5qc9vxr1j092-virtualgl-lib-2.5.2/bin
patching script interpreter paths in /nix/store/i4qxmp8zagklbrwa3g9c5qc9vxr1j092-virtualgl-lib-2.5.2
/nix/store/i4qxmp8zagklbrwa3g9c5qc9vxr1j092-virtualgl-lib-2.5.2/bin/vglserver_config: interpreter directive changed from "/bin/sh" to "/nix/store/9141n7v9la8kk8flzsnkzsvqlsd8wxia-bash-4.4-p23/bin/sh"
/nix/store/i4qxmp8zagklbrwa3g9c5qc9vxr1j092-virtualgl-lib-2.5.2/bin/vglgenkey: interpreter directive changed from "/bin/sh" to "/nix/store/9141n7v9la8kk8flzsnkzsvqlsd8wxia-bash-4.4-p23/bin/sh"
/nix/store/i4qxmp8zagklbrwa3g9c5qc9vxr1j092-virtualgl-lib-2.5.2/bin/vglrun: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/9141n7v9la8kk8flzsnkzsvqlsd8wxia-bash-4.4-p23/bin/bash"
/nix/store/i4qxmp8zagklbrwa3g9c5qc9vxr1j092-virtualgl-lib-2.5.2/bin/vgllogin: interpreter directive changed from "/bin/sh" to "/nix/store/9141n7v9la8kk8flzsnkzsvqlsd8wxia-bash-4.4-p23/bin/sh"
/nix/store/i4qxmp8zagklbrwa3g9c5qc9vxr1j092-virtualgl-lib-2.5.2/bin/vglconnect: interpreter directive changed from "/bin/sh" to "/nix/store/9141n7v9la8kk8flzsnkzsvqlsd8wxia-bash-4.4-p23/bin/sh"
checking for references to /build in /nix/store/i4qxmp8zagklbrwa3g9c5qc9vxr1j092-virtualgl-lib-2.5.2...
building '/nix/store/2m3d17mimkrfvdmjyamvbbz5wh64c3lk-virtualgl-2.5.2.drv'...
/nix/store/n37jmykx5dfds9sjaynqx7n3c5b98lq3-virtualgl-2.5.2

@xeji xeji merged commit efd3f8b into NixOS:master Oct 30, 2018
xeji pushed a commit that referenced this pull request Oct 30, 2018
Replace /bin/sh with bash in vglrun.
'exec' fails with /bin/sh

(cherry picked from commit efd3f8b)
@xeji
Copy link
Contributor

xeji commented Oct 30, 2018

backported in c341f56.

@markuskowa markuskowa mentioned this pull request Nov 1, 2018
9 tasks
markuskowa added a commit to markuskowa/nixpkgs that referenced this pull request Nov 1, 2018
xeji added a commit that referenced this pull request Nov 1, 2018
xeji added a commit that referenced this pull request Nov 1, 2018
@markuskowa markuskowa deleted the fix-virtualgl branch November 7, 2018 19:39
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