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

nghttp2: 1.19.0 -> 1.20.0 #23944

Merged
merged 1 commit into from Mar 19, 2017
Merged

nghttp2: 1.19.0 -> 1.20.0 #23944

merged 1 commit into from Mar 19, 2017

Conversation

c0bw3b
Copy link
Contributor

@c0bw3b c0bw3b commented Mar 15, 2017

Motivation for this change

Package update. This PR is targeted at staging because a mass-rebuild is expected.

Full changelog : https://nghttp2.org/blog/2017/02/26/nghttp2-v1-20-0/

Corrected c-ares attribute name
Patching shebang in fetch-ocsp-response [REMOVED]
Adding SystemD support for nghttpx [REMOVED]

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
    • Linux
  • 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.

@mention-bot
Copy link

@c0bw3b, thanks for your PR! By analyzing the history of the files in this pull request, we identified @wkennington, @edolstra and @domenkozar to be potential reviewers.

@c0bw3b c0bw3b mentioned this pull request Mar 16, 2017
7 tasks
++ optional enableAsioLib "--enable-asio-lib --with-boost-libdir=${boost}/lib";

preInstall = ''
substituteInPlace script/fetch-ocsp-response --replace '#!/usr/bin/env' '#!/run/current-system/sw/bin/env'
Copy link
Member

Choose a reason for hiding this comment

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

what is the difference between the two?

Copy link
Member

Choose a reason for hiding this comment

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

The difference is that the latter won’t work on non-nixos, right? I thought, we were not doing this kind of things.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, please don't use global paths like that. There are very few guarantees about what will be in /sw/bin/ anyway, and even NixOS has /usr/bin/env. If you must patch it to something else, make it use an explicit full path from coreutils.

Copy link
Contributor Author

@c0bw3b c0bw3b Mar 16, 2017

Choose a reason for hiding this comment

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

Yes my bad, this is not right outside NixOS. I will correct.

};

outputs = [ "out" "dev" "lib" ];

nativeBuildInputs = [ pkgconfig ];
buildInputs = [ openssl libev zlib libcares ]
buildInputs = [ openssl libev zlib c-ares systemd.dev ]
Copy link
Member

Choose a reason for hiding this comment

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

Adding systemd, causes an infinite recursion.

Copy link
Member

Choose a reason for hiding this comment

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

From my understanding systemd is only used for the server component, maybe this could be a different derivation.

Copy link
Member

Choose a reason for hiding this comment

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

It is probably a good idea to avoid systemd as much as possible, as it is Linux-only.

Copy link
Member

Choose a reason for hiding this comment

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

Or make it conditional on stdenv.isLinux

Copy link
Contributor Author

Choose a reason for hiding this comment

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

SystemD is useful for nghttpx binary to support being instrumented with a unit service, which would open the door to a future service module.
But I agree it should be conditional on stdenv.isLinux. I will correct that.

@Mic92 : having two derivation would not be much more practical and it was already reversed in the past by edolstra in favor of a single multi-output derivation.

Copy link
Member

@Mic92 Mic92 Mar 16, 2017

Choose a reason for hiding this comment

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

@c0bw3b conditional inclusion still leads to a dependency cycle on linux:

nix-shell -p nghttp2 --show-trace                                           
error: while evaluating the attribute ‘nativeBuildInputs’ of the derivation ‘shell’ at /etc/nixos/nixpkgs/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating the attribute ‘nativeBuildInputs’ of the derivation ‘nghttp2-1.20.0’ at /etc/nixos/nixpkgs/pkgs/development/libraries/nghttp2/default.nix:19:3:
while evaluating the attribute ‘configureFlags’ of the derivation ‘systemd-232’ at /etc/nixos/nixpkgs/pkgs/os-specific/linux/systemd/default.nix:13:3:
while evaluating the attribute ‘nativeBuildInputs’ of the derivation ‘kbd-2.0.3’ at /etc/nixos/nixpkgs/pkgs/os-specific/linux/kbd/default.nix:4:3:
while evaluating the attribute ‘autoconf’ of the derivation ‘hook’ at /etc/nixos/nixpkgs/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating the attribute ‘nativeBuildInputs’ of the derivation ‘autoconf-2.69’ at /etc/nixos/nixpkgs/pkgs/development/tools/misc/autoconf/default.nix:4:3:
while evaluating the attribute ‘src’ of the derivation ‘gnum4-1.4.18’ at /etc/nixos/nixpkgs/pkgs/development/tools/misc/gnum4/default.nix:4:3:
while evaluating the attribute ‘nativeBuildInputs’ of the derivation ‘m4-1.4.18.tar.bz2’ at /etc/nixos/nixpkgs/pkgs/build-support/fetchurl/default.nix:96:3:
while evaluating the attribute ‘propagatedNativeBuildInputs’ of the derivation ‘curl-7.53.1’ at /etc/nixos/nixpkgs/pkgs/tools/networking/curl/default.nix:24:3:
infinite recursion encountered, at undefined position

@c0bw3b
Copy link
Contributor Author

c0bw3b commented Mar 16, 2017

Removed entirely the systemd dependency. It would require splitting libnghttp2 and nghttp2 binaries into two separate derivations to be able to build nghttpx with systemd support.

Also removed the shebang correction in fetch-ocsp-response because it does not prevent this python script to run and there is no need to add a dependency to coreutils for that.

@Mic92 Mic92 merged commit 48a7bfa into NixOS:staging Mar 19, 2017
@c0bw3b c0bw3b deleted the pkg/nghttp2 branch October 8, 2017 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

7 participants