git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #155535 from risicle/ris-libreswan-4.6

libreswan: 4.5 -> 4.6

commit2da332aa2d5f0458a51aa8df5a70ae53cc2fe507 authorMichele Guerini Rocco <rnhmjoj@users.noreply.github.com> dateWed 19 Jan 2022, 22:42 (5 years ago) parent5c89b034db154c
2 files changed+10−7
nixos/tests/libreswan.nix+2−2 pkgs/tools/networking/libreswan/default.nix+8−5
nixos/tests/libreswan.nix+2−2
@@ -89,7 +89,7 @@ in
8989 """
9090 Sends a message as Alice to Bob
9191 """
92− bob.execute("nc -lu ::0 1234 >/tmp/msg >&2 &")
92+ bob.execute("nc -lu ::0 1234 >/tmp/msg &")
9393 alice.sleep(1)
9494 alice.succeed(f"echo '{msg}' | nc -uw 0 bob 1234")
9595 bob.succeed(f"grep '{msg}' /tmp/msg")
@@ -100,7 +100,7 @@ in
100100 Starts eavesdropping on Alice and Bob
101101 """
102102 match = "src host alice and dst host bob"
103− eve.execute(f"tcpdump -i br0 -c 1 -Avv {match} >/tmp/log >&2 &")
103+ eve.execute(f"tcpdump -i br0 -c 1 -Avv {match} >/tmp/log &")
104104
105105
106106 start_all()
pkgs/tools/networking/libreswan/default.nix+8−5
@@ -42,11 +42,11 @@ in
4242
4343stdenv.mkDerivation rec {
4444 pname = "libreswan";
45− version = "4.5";
45+ version = "4.6";
4646
4747 src = fetchurl {
4848 url = "https://download.libreswan.org/${pname}-${version}.tar.gz";
49− sha256 = "18whvmaxqfmaqbmq72calyzk21wyvxa0idddcsxd8x36vhdza0q7";
49+ sha256 = "1zsnsfx18pf5dy1p4jva2sfl0bdfx5y9ls54f9bp70m64r46yf96";
5050 };
5151
5252 strictDeps = true;
@@ -70,11 +70,14 @@ stdenv.mkDerivation rec {
7070 ] ++ lib.optional stdenv.isLinux libselinux;
7171
7272 prePatch = ''
73− # Correct iproute2 path
74− sed -e 's|"/sbin/ip"|"${iproute2}/bin/ip"|' \
75− -e 's|"/sbin/iptables"|"${iptables}/bin/iptables"|' \
73+ # Correct iproute2 and iptables path
74+ sed -e 's|/sbin/ip|${iproute2}/bin/ip|' \
75+ -e 's|/sbin/\(ip6\?tables\)|${iptables}/bin/\1|' \
7676 -i initsystems/systemd/ipsec.service.in \
77+ programs/barf/barf.in \
7778 programs/verify/verify.in
79+ sed -e 's|\([[:blank:]]\)\(ip6\?tables\(-save\)\? -\)|\1${iptables}/bin/\2|' \
80+ -i programs/verify/verify.in
7881
7982 # Prevent the makefile from trying to
8083 # reload the systemd daemon or create tmpfiles