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

nginxModules.brotli: fix build #103489

Closed
wants to merge 1 commit into from

Conversation

vincentbernat
Copy link
Member

Motivation for this change

For some reason, substituteInPlace needs more than the write
permission to the target file (which it already sets itself) to work.
Just add write permission to anything in the target directory to do
the substitution.

Things done
  • 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.

For some reason, substituteInPlace needs more than the write
permission to the target file (which it already sets itself) to work.
Just add write permission to anything in the target directory to do
the substitution.
@vincentbernat
Copy link
Member Author

This also fixes part of #90702.

@ajs124
Copy link
Member

ajs124 commented Nov 12, 2020

This seems to build fine for me, as is. How can I reproduce this?

I'm building this to test: pkgs.nginx.override { modules = with pkgs.nginxModules; [ brotli ]; }

@vincentbernat
Copy link
Member Author

NIX_PATH=nixpkgs=$PWD nix-build -E '{ pkgs ? import <nixpkgs> {} }: pkgs.nginx.override { modules = [ pkgs.nginxModules.brotli ]; }'

Do you have the sandbox ?

@ajs124
Copy link
Member

ajs124 commented Nov 12, 2020

I'm running on NixOS with the sandbox enabled, yes.

@vincentbernat
Copy link
Member Author

I am only using Nix, so maybe there is a difference. Note there is a similar report in #90702.

@7c6f434c
Copy link
Member

I wonder if the same underlying filesystem is used for build directories…

@SuperSandro2000
Copy link
Member

Can't reproduce either with nix and sandbox. The issue is very likely on your end, not the package. Closing for that reason.

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