git.iko.soy/typeable/nixpkgs
on master help sign in
Strongswan: use full path to ipsec

This fixes issue: ... charon[6135]: 11[CHD] updown: /bin/sh: ipsec: command not found

commit9bbe674927a307f02d32834c9a39f49c8be476e7 authorIgor Pashev <pashev.igor@gmail.com> dateMon 22 Dec 2014, 18:24 (12 years ago) parentd579277
2 files changed+38−2
pkgs/tools/networking/strongswan/default.nix+6−2 pkgs/tools/networking/strongswan/firewall_defaults.patch+32
pkgs/tools/networking/strongswan/default.nix+6−2
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, gmp, pkgconfig, python }:
1+{ stdenv, fetchurl, gmp, pkgconfig, python, autoreconfHook }:
22
33stdenv.mkDerivation rec {
44 name = "strongswan-5.2.1";
@@ -10,7 +10,11 @@ stdenv.mkDerivation rec {
1010
1111 dontPatchELF = true;
1212
13− buildInputs = [ gmp pkgconfig python ];
13+ buildInputs = [ gmp pkgconfig python autoreconfHook ];
14+
15+ patches = [
16+ ./firewall_defaults.patch
17+ ];
1418
1519 configureFlags = [ "--enable-swanctl" "--enable-cmd" ];
1620
pkgs/tools/networking/strongswan/firewall_defaults.patchnew file+32
@@ -0,0 +1,32 @@
1+Index: strongswan-5.2.1/src/starter/confread.c
2+===================================================================
3+--- strongswan-5.2.1.orig/src/starter/confread.c
4++++ strongswan-5.2.1/src/starter/confread.c
5+@@ -43,7 +43,7 @@
6+ static const char ike_defaults[] = "aes128-sha1-modp2048,3des-sha1-modp1536";
7+ static const char esp_defaults[] = "aes128-sha1,3des-sha1";
8+
9+-static const char firewall_defaults[] = IPSEC_SCRIPT " _updown iptables";
10++static const char firewall_defaults[] = IPSEC_SBINDIR "/" IPSEC_SCRIPT " _updown iptables";
11+
12+ /**
13+ * Provided by GPERF
14+Index: strongswan-5.2.1/src/starter/Makefile.am
15+===================================================================
16+--- strongswan-5.2.1.orig/src/starter/Makefile.am
17++++ strongswan-5.2.1/src/starter/Makefile.am
18+@@ -18,10 +18,12 @@ AM_CPPFLAGS = \
19+ -I$(top_srcdir)/src/libhydra \
20+ -I$(top_srcdir)/src/starter \
21+ -I$(top_srcdir)/src/stroke \
22+- -DIPSEC_DIR=\"${ipsecdir}\" \
23++ -DIPSEC_BINDIR=\"${bindir}\" \
24+ -DIPSEC_CONFDIR=\"${sysconfdir}\" \
25+- -DIPSEC_PIDDIR=\"${piddir}\" \
26++ -DIPSEC_DIR=\"${ipsecdir}\" \
27+ -DIPSEC_EAPDIR=\"${eapdir}\" \
28++ -DIPSEC_PIDDIR=\"${piddir}\" \
29++ -DIPSEC_SBINDIR=\"${sbindir}\" \
30+ -DIPSEC_SCRIPT=\"${ipsec_script}\" \
31+ -DDEV_RANDOM=\"${random_device}\" \
32+ -DDEV_URANDOM=\"${urandom_device}\" \