[strongswan] Make initscript patch more distro-neutral, add links to bugreports
Pavel Šimerda
pavlix at fedoraproject.org
Tue Jun 19 12:52:34 UTC 2012
commit 4c9b59d15ebc04a39596d38663610bdd90aed329
Author: Pavel Šimerda <psimerda at redhat.com>
Date: Tue Jun 19 14:51:37 2012 +0200
Make initscript patch more distro-neutral, add links to bugreports
strongswan-init.patch | 36 +++++++++++++++++-------------------
strongswan.spec | 8 +++++++-
2 files changed, 24 insertions(+), 20 deletions(-)
---
diff --git a/strongswan-init.patch b/strongswan-init.patch
index b0bc994..ce6d8b1 100644
--- a/strongswan-init.patch
+++ b/strongswan-init.patch
@@ -1,7 +1,7 @@
-Index: strongswan-4.6.0/init/systemd/strongswan.service.in
+Index: strongswan-4.6.4/init/systemd/strongswan.service.in
===================================================================
---- strongswan-4.6.0.orig/init/systemd/strongswan.service.in
-+++ strongswan-4.6.0/init/systemd/strongswan.service.in
+--- strongswan-4.6.4.orig/init/systemd/strongswan.service.in
++++ strongswan-4.6.4/init/systemd/strongswan.service.in
@@ -3,7 +3,7 @@ Description=strongSwan IPsec
After=syslog.target
@@ -11,11 +11,11 @@ Index: strongswan-4.6.0/init/systemd/strongswan.service.in
StandardOutput=syslog
[Install]
-Index: strongswan-4.6.1/init/sysvinit/strongswan
+Index: strongswan-4.6.4/init/sysvinit/strongswan
===================================================================
--- /dev/null
-+++ strongswan-4.6.1/init/sysvinit/strongswan
-@@ -0,0 +1,102 @@
++++ strongswan-4.6.4/init/sysvinit/strongswan
+@@ -0,0 +1,100 @@
+#!/bin/sh
+#
+# strongswan An implementation of key management system for IPsec
@@ -37,10 +37,8 @@ Index: strongswan-4.6.1/init/sysvinit/strongswan
+
+exec="/usr/sbin/strongswan"
+prog="strongswan"
-+prog1="starter"
-+config="/etc/racoon2/racoon2.conf"
-+
-+[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
++status_prog="starter"
++config="/etc/strongswan/strongswan.conf"
+
+lockfile=/var/lock/subsys/$prog
+
@@ -77,40 +75,40 @@ Index: strongswan-4.6.1/init/sysvinit/strongswan
+ restart
+}
+
-+rh_status() {
++_status() {
+ # run checks to determine if the service is running or use generic status
-+ status $prog1
++ status $status_prog
+}
+
-+rh_status_q() {
-+ rh_status >/dev/null 2>&1
++_status_q() {
++ _status >/dev/null 2>&1
+}
+
+
+case "$1" in
+ start)
-+ rh_status_q && exit 0
++ _status_q && exit 0
+ $1
+ ;;
+ stop)
-+ rh_status_q || exit 0
++ _status_q || exit 0
+ $1
+ ;;
+ restart)
+ $1
+ ;;
+ reload)
-+ rh_status_q || exit 7
++ _status_q || exit 7
+ $1
+ ;;
+ force-reload)
+ force_reload
+ ;;
+ status)
-+ rh_status
++ _status
+ ;;
+ condrestart|try-restart)
-+ rh_status_q || exit 0
++ _status_q || exit 0
+ restart
+ ;;
+ *)
diff --git a/strongswan.spec b/strongswan.spec
index 66c89ef..c7b7e61 100644
--- a/strongswan.spec
+++ b/strongswan.spec
@@ -1,12 +1,14 @@
Name: strongswan
Version: 4.6.4
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: An OpenSource IPsec-based VPN Solution
Group: System Environment/Daemons
License: GPLv2+
URL: http://www.strongswan.org/
Source0: http://download.strongswan.org/%{name}-%{version}.tar.bz2
+# http://wiki.strongswan.org/issues/195
Patch0: %{name}-init.patch
+# http://wiki.strongswan.org/issues/194
Patch1: %{name}-rename.patch
BuildRequires: gmp-devel
BuildRequires: libcurl-devel
@@ -201,6 +203,10 @@ fi
#TODO manpages
%changelog
+* Tue Jun 19 2012 Pavel Šimerda - 4.6.4-2
+- Make initscript patch more distro-neutral
+- Add links to bugreports for patches
+
* Fri Jun 01 2012 Pavel Šimerda <pavlix at pavlix.net> - 4.6.4-1
- New upstream version (CVE-2012-2388)
More information about the scm-commits
mailing list