From bdecee05c1d2886e192430dfb94654c97e772bb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20=C5=A0imerda?= Date: Tue, 18 Mar 2014 13:45:15 +0100 Subject: [PATCH] fixed el6 initscript --- strongswan-5.1.2-libexec.patch | 25 +++++++++++++++++++++++++ strongswan.spec | 12 +++++++++--- strongswan.sysvinit | 2 +- 3 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 strongswan-5.1.2-libexec.patch diff --git a/strongswan-5.1.2-libexec.patch b/strongswan-5.1.2-libexec.patch new file mode 100644 index 0000000..6512a3c --- /dev/null +++ b/strongswan-5.1.2-libexec.patch @@ -0,0 +1,25 @@ +Index: strongswan-5.1.2/src/checksum/Makefile.am +=================================================================== +--- strongswan-5.1.2.orig/src/checksum/Makefile.am ++++ strongswan-5.1.2/src/checksum/Makefile.am +@@ -102,7 +102,7 @@ endif + if USE_TOOLS + exes += $(DESTDIR)$(ipsecdir)/openac + exes += $(DESTDIR)$(ipsecdir)/scepclient +- exes += $(DESTDIR)$(bindir)/pki ++ exes += $(DESTDIR)$(ipsecdir)/pki + endif + + if USE_ATTR_SQL +Index: strongswan-5.1.2/src/pki/Makefile.am +=================================================================== +--- strongswan-5.1.2.orig/src/pki/Makefile.am ++++ strongswan-5.1.2/src/pki/Makefile.am +@@ -1,6 +1,6 @@ + SUBDIRS = man + +-bin_PROGRAMS = pki ++ipsec_PROGRAMS = pki + + pki_SOURCES = pki.c pki.h command.c command.h \ + commands/gen.c \ diff --git a/strongswan.spec b/strongswan.spec index 0891e37..16a8624 100644 --- a/strongswan.spec +++ b/strongswan.spec @@ -2,7 +2,7 @@ Name: strongswan Version: 5.1.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: An OpenSource IPsec-based VPN Solution Group: System Environment/Daemons License: GPLv2+ @@ -28,6 +28,9 @@ Patch6: strongswan-5.1.1-selinux.patch # Fix configure.ac to build for epel6 # http://wiki.strongswan.org/issues/536 Patch7: strongswan-5.1.2-autoconf.patch +# Fix pki utility location +# TBD +Patch8: strongswan-5.1.2-libexec.patch BuildRequires: gmp-devel autoconf automake BuildRequires: libcurl-devel BuildRequires: openldap-devel @@ -88,6 +91,7 @@ PT-TLS to support TNC over TLS. %patch4 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 echo "For migration from 4.6 to 5.0 see http://wiki.strongswan.org/projects/strongswan/wiki/CharonPlutoIKEv1" > README.Fedora @@ -155,8 +159,6 @@ find %{buildroot} -type f -name '*.la' -delete chmod 644 %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf # protect configuration from ordinary user's eyes chmod 700 %{buildroot}%{_sysconfdir}/%{name} -# move stuff to libexec -mv %{buildroot}%{_bindir}/pki %{buildroot}%{_libexecdir}/%{name}/pki # Create ipsec.d directory tree. install -d -m 700 %{buildroot}%{_sysconfdir}/%{name}/ipsec.d for i in aacerts acerts certs cacerts crls ocspcerts private reqs; do @@ -471,6 +473,10 @@ fi %endif %changelog +* Tue Mar 18 2014 Pavel Šimerda - 5.1.2-3 +- fixed el6 initscript +- fixed pki directory location + * Fri Mar 14 2014 Pavel Šimerda - 5.1.2-2 - clean up the specfile a bit - replace the initscript patch with an individual initscript diff --git a/strongswan.sysvinit b/strongswan.sysvinit index 2ca7ee4..3608626 100644 --- a/strongswan.sysvinit +++ b/strongswan.sysvinit @@ -17,7 +17,7 @@ # Source function library. . /etc/rc.d/init.d/functions -exec="@SBINDIR@/@IPSEC_SCRIPT@" +exec="/usr/sbin/strongswan" prog="strongswan" status_prog="starter" config="/etc/strongswan/strongswan.conf"