lol

Merge pull request #41466 from andir/haproxy-1.8.9

Haproxy 1.8.9

authored by

Andreas Rammhold and committed by
GitHub
0decee48 5e89ea75

+57 -3
+1
nixos/release.nix
··· 300 tests.grafana = callTest tests/grafana.nix {}; 301 tests.graphite = callTest tests/graphite.nix {}; 302 tests.hardened = callTest tests/hardened.nix { }; 303 tests.hibernate = callTest tests/hibernate.nix {}; 304 tests.hitch = callTest tests/hitch {}; 305 tests.home-assistant = callTest tests/home-assistant.nix { };
··· 300 tests.grafana = callTest tests/grafana.nix {}; 301 tests.graphite = callTest tests/graphite.nix {}; 302 tests.hardened = callTest tests/hardened.nix { }; 303 + tests.haproxy = callTest tests/haproxy.nix {}; 304 tests.hibernate = callTest tests/hibernate.nix {}; 305 tests.hitch = callTest tests/hitch {}; 306 tests.home-assistant = callTest tests/home-assistant.nix { };
+41
nixos/tests/haproxy.nix
···
··· 1 + import ./make-test.nix ({ pkgs, ...}: { 2 + name = "haproxy"; 3 + nodes = { 4 + machine = { config, ...}: { 5 + imports = [ ../modules/profiles/minimal.nix ]; 6 + services.haproxy = { 7 + enable = true; 8 + config = '' 9 + defaults 10 + timeout connect 10s 11 + 12 + backend http_server 13 + mode http 14 + server httpd [::1]:8000 15 + 16 + frontend http 17 + bind *:80 18 + mode http 19 + use_backend http_server 20 + ''; 21 + }; 22 + services.httpd = { 23 + enable = true; 24 + documentRoot = pkgs.writeTextDir "index.txt" "We are all good!"; 25 + adminAddr = "notme@yourhost.local"; 26 + listen = [{ 27 + ip = "::1"; 28 + port = 8000; 29 + }]; 30 + }; 31 + }; 32 + }; 33 + testScript = '' 34 + startAll; 35 + $machine->waitForUnit('multi-user.target'); 36 + $machine->waitForUnit('haproxy.service'); 37 + $machine->waitForUnit('httpd.service'); 38 + $machine->succeed('curl -k http://localhost:80/index.txt | grep "We are all good!"'); 39 + 40 + ''; 41 + })
+15 -3
pkgs/tools/networking/haproxy/default.nix
··· 1 { useLua ? !stdenv.isDarwin 2 , usePcre ? true 3 - , stdenv, fetchurl 4 , openssl, zlib, lua5_3 ? null, pcre ? null 5 }: 6 ··· 9 10 stdenv.mkDerivation rec { 11 pname = "haproxy"; 12 - version = "1.8.4"; 13 name = "${pname}-${version}"; 14 15 src = fetchurl { 16 url = "https://www.haproxy.org/download/${stdenv.lib.versions.majorMinor version}/src/${name}.tar.gz"; 17 - sha256 = "19l4i0p92ahm3vaw42gz3rmmidfivk36mvqyhir81h6ywyjb01g3"; 18 }; 19 20 buildInputs = [ openssl zlib ] 21 ++ stdenv.lib.optional useLua lua5_3
··· 1 { useLua ? !stdenv.isDarwin 2 , usePcre ? true 3 + , stdenv, fetchurl, fetchpatch 4 , openssl, zlib, lua5_3 ? null, pcre ? null 5 }: 6 ··· 9 10 stdenv.mkDerivation rec { 11 pname = "haproxy"; 12 + version = "1.8.9"; 13 name = "${pname}-${version}"; 14 15 src = fetchurl { 16 url = "https://www.haproxy.org/download/${stdenv.lib.versions.majorMinor version}/src/${name}.tar.gz"; 17 + sha256 = "00miblgwll3mycsgmp3gd3cn4lwsagxzgjxk5i6csnyqgj97fss3"; 18 }; 19 + 20 + patches = [ 21 + (fetchpatch { 22 + name = "CVE-2018-11469.patch"; 23 + url = "https://git.haproxy.org/?p=haproxy-1.8.git;a=patch;h=17514045e5d934dede62116216c1b016fe23dd06"; 24 + sha256 = "0hzcvghg8qz45n3mrcgsjgvrvicvbvm52cc4hs5jbk1yb50qvls7"; 25 + }) 26 + ] ++ stdenv.lib.optional stdenv.isDarwin (fetchpatch { 27 + name = "fix-darwin-no-threads-build.patch"; 28 + url = "https://git.haproxy.org/?p=haproxy-1.8.git;a=patch;h=fbf09c441a4e72c4a690bc7ef25d3374767fe5c5;hp=3157ef219c493f3b01192f1b809a086a5b119a1e"; 29 + sha256 = "16ckzb160anf7xih7mmqy59pfz8sdywmyblxnr7lz9xix3jwk55r"; 30 + }); 31 32 buildInputs = [ openssl zlib ] 33 ++ stdenv.lib.optional useLua lua5_3