[Pkg-swan-devel] [strongswan] 01/01: Fix handling of ipsec name under systemd (#781209)

Romain Francoise rfrancoise at moszumanska.debian.org
Sat Apr 4 16:08:41 UTC 2015


This is an automated email from the git hooks/post-receive script.

rfrancoise pushed a commit to branch master
in repository strongswan.

commit 1b7c683a32c62b6e08ad7bf5af39b9f4edd634f3
Author: Romain Francoise <rfrancoise at debian.org>
Date:   Sat Apr 4 18:01:26 2015 +0200

    Fix handling of ipsec name under systemd (#781209)
    
    We used to make the old ipsec name, which corresponds to the sysvinit
    init script, available via an Alias directive in the systemd service
    file (which follows upstream and is named strongswan.service).
    
    Unfortunately this results in a situation where the strongswan-starter
    postinst calls invoke-rc.d using the ipsec name before the service has
    been installed, and thus uses the sysvinit script instead of systemd's
    native unit. This results in some confusion later when the unit gets
    installed.
    
    To avoid this, ship a symlink in the package, this way the ipsec name is
    available as soon as the package has been unpacked. Thanks to Michael
    Biebl for the suggestion.
---
 debian/changelog                        | 10 ++++++++++
 debian/patches/03_systemd-service.patch |  4 +---
 debian/strongswan-starter.links         |  1 +
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index ab83fba..71c11f4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+strongswan (5.2.1-6) unstable; urgency=medium
+
+  * Ship /lib/systemd/system/ipsec.service as a symlink to
+    strongswan.service in strongswan-starter instead of using Alias= in
+    the service file. This makes the ipsec name available to invoke-rc.d
+    before the service gets actually enabled, which avoids some confusion
+    (closes: #781209).
+
+ -- Romain Francoise <rfrancoise at debian.org>  Sat, 04 Apr 2015 17:55:38 +0200
+
 strongswan (5.2.1-5) unstable; urgency=high
 
   * debian/patches:
diff --git a/debian/patches/03_systemd-service.patch b/debian/patches/03_systemd-service.patch
index 6609542..b1d1c87 100644
--- a/debian/patches/03_systemd-service.patch
+++ b/debian/patches/03_systemd-service.patch
@@ -1,6 +1,6 @@
 --- a/init/systemd/strongswan.service.in
 +++ b/init/systemd/strongswan.service.in
-@@ -1,10 +1,12 @@
+@@ -1,9 +1,10 @@
  [Unit]
  Description=strongSwan IPsec IKEv1/IKEv2 daemon using ipsec.conf
 -After=syslog.target
@@ -12,5 +12,3 @@
  StandardOutput=syslog
  
  [Install]
- WantedBy=multi-user.target
-+Alias=ipsec.service
diff --git a/debian/strongswan-starter.links b/debian/strongswan-starter.links
new file mode 100644
index 0000000..cf397ab
--- /dev/null
+++ b/debian/strongswan-starter.links
@@ -0,0 +1 @@
+lib/systemd/system/strongswan.service lib/systemd/system/ipsec.service

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-swan/strongswan.git



More information about the Pkg-swan-devel mailing list