diff options
author | Shea Levy <shea@shealevy.com> | 2014-09-19 15:12:11 -0400 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2014-09-19 15:12:20 -0400 |
commit | e4cf05a3a0bba0f1158f7221a1f16573a112b5b3 (patch) | |
tree | 3e4e82b9dc16470ad5fe930a409ea3da19cfa999 /pkgs/tools | |
parent | cb4d686b1df0493b3fa4d5fb862ae3d634d5586b (diff) | |
download | nixlib-e4cf05a3a0bba0f1158f7221a1f16573a112b5b3.tar nixlib-e4cf05a3a0bba0f1158f7221a1f16573a112b5b3.tar.gz nixlib-e4cf05a3a0bba0f1158f7221a1f16573a112b5b3.tar.bz2 nixlib-e4cf05a3a0bba0f1158f7221a1f16573a112b5b3.tar.lz nixlib-e4cf05a3a0bba0f1158f7221a1f16573a112b5b3.tar.xz nixlib-e4cf05a3a0bba0f1158f7221a1f16573a112b5b3.tar.zst nixlib-e4cf05a3a0bba0f1158f7221a1f16573a112b5b3.zip |
strongswan: Properly handle sysconfdir, build swanctl
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/networking/strongswan/default.nix | 9 | ||||
-rw-r--r-- | pkgs/tools/networking/strongswan/no-sysconfdir-write.patch | 36 |
2 files changed, 40 insertions, 5 deletions
diff --git a/pkgs/tools/networking/strongswan/default.nix b/pkgs/tools/networking/strongswan/default.nix index 960da95120ef..56ecdb904e29 100644 --- a/pkgs/tools/networking/strongswan/default.nix +++ b/pkgs/tools/networking/strongswan/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, gmp }: +{ stdenv, fetchurl, gmp, autoreconfHook, gettext, pkgconfig }: stdenv.mkDerivation rec { name = "strongswan-5.2.0"; @@ -8,12 +8,11 @@ stdenv.mkDerivation rec { sha256 = "1ki6v9c54ykppqnj3prgh62na97yajnvnm2zr1gjxzv05syk035h"; }; - patches = [ ./respect-path.patch ]; + patches = [ ./respect-path.patch ./no-sysconfdir-write.patch ]; - # --sysconfdir=/etc makes the build try to write to /etc... - NIX_CFLAGS_COMPILE = "-DIPSEC_CONFDIR=\"/etc\""; + buildInputs = [ gmp autoreconfHook gettext pkgconfig ]; - buildInputs = [ gmp ]; + configureFlags = [ "--enable-swanctl" "--sysconfdir=/etc" ]; meta = { maintainers = [ stdenv.lib.maintainers.shlevy ]; diff --git a/pkgs/tools/networking/strongswan/no-sysconfdir-write.patch b/pkgs/tools/networking/strongswan/no-sysconfdir-write.patch new file mode 100644 index 000000000000..afa85ce1d751 --- /dev/null +++ b/pkgs/tools/networking/strongswan/no-sysconfdir-write.patch @@ -0,0 +1,36 @@ +commit 0de10fe4950672053fe2b242bcec064e9e88c880 +Author: Shea Levy <shea@shealevy.com> +Date: Fri Sep 19 14:32:22 2014 -0400 + + Don't fail to install if sysconfdir isn't writable + +diff --git a/conf/Makefile.am b/conf/Makefile.am +index 373be16..85b7b0e 100644 +--- a/conf/Makefile.am ++++ b/conf/Makefile.am +@@ -152,9 +152,9 @@ maintainer-clean-local: + rm -f $(confsnippets) default.conf plugins/*.conf plugins/*.tmp + + install-data-local: $(plugins_install_src) +- test -e "$(DESTDIR)${strongswanconfdir}" || $(INSTALL) -d "$(DESTDIR)$(strongswanconfdir)" +- test -e "$(DESTDIR)${strongswanddir}" || $(INSTALL) -d "$(DESTDIR)$(strongswanddir)" +- test -e "$(DESTDIR)${charonconfdir}" || $(INSTALL) -d "$(DESTDIR)$(charonconfdir)" ++ test -e "$(DESTDIR)${strongswanconfdir}" || $(INSTALL) -d "$(DESTDIR)$(strongswanconfdir)" || true ++ test -e "$(DESTDIR)${strongswanddir}" || $(INSTALL) -d "$(DESTDIR)$(strongswanddir)" || true ++ test -e "$(DESTDIR)${charonconfdir}" || $(INSTALL) -d "$(DESTDIR)$(charonconfdir)" || true + test -e "$(DESTDIR)$(strongswanconfdir)/strongswan.conf" || $(INSTALL) -m 644 $(srcdir)/strongswan.conf $(DESTDIR)$(strongswanconfdir)/strongswan.conf || true + for f in $(options_install_src); do \ + name=`basename $$f`; \ +diff --git a/src/swanctl/Makefile.am b/src/swanctl/Makefile.am +index 385737a..912fdf8 100644 +--- a/src/swanctl/Makefile.am ++++ b/src/swanctl/Makefile.am +@@ -54,7 +54,7 @@ maintainer-clean-local: + cd $(srcdir) && rm -f swanctl.conf swanctl.conf.5.main + + install-data-local: swanctl.conf +- test -e "$(DESTDIR)$(swanctldir)" || $(INSTALL) -d "$(DESTDIR)$(swanctldir)" ++ test -e "$(DESTDIR)$(swanctldir)" || $(INSTALL) -d "$(DESTDIR)$(swanctldir)" || true + test -e "$(DESTDIR)$(swanctldir)/x509" || $(INSTALL) -d "$(DESTDIR)$(swanctldir)/x509" || true + test -e "$(DESTDIR)$(swanctldir)/x509ca" || $(INSTALL) -d "$(DESTDIR)$(swanctldir)/x509ca" || true + test -e "$(DESTDIR)$(swanctldir)/x509aa" || $(INSTALL) -d "$(DESTDIR)$(swanctldir)/x509aa" || true |