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

enlightenment: remove bashism from patch #40311

Merged
merged 1 commit into from May 11, 2018
Merged

enlightenment: remove bashism from patch #40311

merged 1 commit into from May 11, 2018

Conversation

romildo
Copy link
Contributor

@romildo romildo commented May 11, 2018

Motivation for this change

The mv -v "$f"{,.orig} command is not working in the machine where the binary cache is built.

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.

@romildo
Copy link
Contributor Author

romildo commented May 11, 2018

@GrahamcOfBorg build enlightenment.enlightenment

@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: enlightenment.enlightenment

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: enlightenment.enlightenment

Partial log (click to expand)

shrinking /nix/store/9v8fya58vknqm321w9wq0a0hb6c3q82n-enlightenment-0.22.3/lib/enlightenment/modules/conf_theme/linux-gnu-x86_64-0.22/module.so
shrinking /nix/store/9v8fya58vknqm321w9wq0a0hb6c3q82n-enlightenment-0.22.3/lib/enlightenment/modules/conf_intl/linux-gnu-x86_64-0.22/module.so
shrinking /nix/store/9v8fya58vknqm321w9wq0a0hb6c3q82n-enlightenment-0.22.3/lib/enlightenment/modules/conf_display/linux-gnu-x86_64-0.22/module.so
shrinking /nix/store/9v8fya58vknqm321w9wq0a0hb6c3q82n-enlightenment-0.22.3/lib/enlightenment/modules/conf_bindings/linux-gnu-x86_64-0.22/module.so
shrinking /nix/store/9v8fya58vknqm321w9wq0a0hb6c3q82n-enlightenment-0.22.3/lib/enlightenment/modules/lokker/linux-gnu-x86_64-0.22/module.so
strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/9v8fya58vknqm321w9wq0a0hb6c3q82n-enlightenment-0.22.3/lib  /nix/store/9v8fya58vknqm321w9wq0a0hb6c3q82n-enlightenment-0.22.3/bin
patching script interpreter paths in /nix/store/9v8fya58vknqm321w9wq0a0hb6c3q82n-enlightenment-0.22.3
/nix/store/9v8fya58vknqm321w9wq0a0hb6c3q82n-enlightenment-0.22.3/bin/enlightenment_remote: interpreter directive changed from "/bin/sh" to "/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/sh"
checking for references to /build in /nix/store/9v8fya58vknqm321w9wq0a0hb6c3q82n-enlightenment-0.22.3...

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: enlightenment.enlightenment

Partial log (click to expand)

make[4]: *** [Makefile:54389: lib/efl/interfaces/efl_player.eo.lua] Error 1
make[4]: *** [Makefile:54389: lib/ecore_con/efl_net_server_udp_client.eo.lua] Error 1
make[4]: *** [Makefile:54389: lib/ecore/efl_loop_fd.eo.lua] Error 1
make[3]: *** [Makefile:51883: all-recursive] Error 1
make[2]: *** [Makefile:17421: all] Error 2
make[1]: *** [Makefile:2971: all-recursive] Error 1
make: *** [Makefile:2066: all] Error 2
builder for '/nix/store/6r1f7wxlkmrraa862klca9lamppi9yf9-efl-1.20.7.drv' failed with exit code 2
cannot build derivation '/nix/store/q6275chw5qsmvw6h2zcm2czn9g2ricn4-enlightenment-0.22.3.drv': 1 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/q6275chw5qsmvw6h2zcm2czn9g2ricn4-enlightenment-0.22.3.drv' failed

@xeji
Copy link
Contributor

xeji commented May 11, 2018

$ cat e-wrappers.nix 
# Wrappers for programs installed by enlightenment that should be setuid
{
  security.wrappers = {
    "enlightenment_backlight.orig".source = "/nix/store/9v8fya58vknqm321w9wq0a0hb6c3q82n-enlightenment-0.22.3/lib/enlightenment/utils/enlightenment_backlight.orig";
    "enlightenment_sys.orig".source = "/nix/store/9v8fya58vknqm321w9wq0a0hb6c3q82n-enlightenment-0.22.3/lib/enlightenment/utils/enlightenment_sys.orig";
...

I don't understand why the wrappers created in /run/wrappers/bin/ are suffixed *.orig.
Is this correct?

@romildo
Copy link
Contributor Author

romildo commented May 11, 2018

I don't understand why the wrappers created in /run/wrappers/bin/ are suffixed *.orig.

Because it seems that enlightenment looks for the executables at an absolute path starting at ${enlightenment.enlightenment}/lib. Therefore it does not use the wrapper in /run/wrappers/bin/ directly. So the original executable is renamed (by adding a .orig suffix) and wrapped. The original name (without the .orig) extension is then a symbolic link to the wrapper. This way enlightenment is able to run the wrapper (via the symbolic link) using an absolute path that it knows a priory.

@xeji
Copy link
Contributor

xeji commented May 11, 2018

Thank you for explaining.

@xeji xeji merged commit 2f6ac31 into NixOS:master May 11, 2018
@romildo romildo deleted the fix.enlightenment branch May 11, 2018 11:08
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

3 participants