Skip to contentSkip to conversation

Bian Naimeng : ipsec-tools: add systemd supported

oe-commits Martin Jansa 2 participants 2 messages Apr 8, 2015 – Apr 9, 2015 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 58 lines · On Mon, Feb 23, 2015 at 07:03:17PM +0000, [email protected] wrote:
Module: meta-openembedded.git
Branch: master
Commit: 1eb5a644459f16219410ee53f47b7d2d082e17a1
URL:    http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=1eb5a644459f16219410ee53f47b7d2d082e17a1
Author: Bian Naimeng <[email protected]>
Date:   Mon Feb 16 11:14:35 2015 +0800

ipsec-tools: add systemd supported

---

 .../recipes-support/ipsec-tools/ipsec-tools/racoon.conf   |  8 ++++++++
 .../ipsec-tools/ipsec-tools/racoon.service                | 11 +++++++++++
 .../recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb      | 15 ++++++++++++++-
 3 files changed, 33 insertions(+), 1 deletion(-)
meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.conf new file +8 -0
new file mode 100644
index 0000000..6b50750
@@ -0,0 +1,8 @@
+# Defaults for racoon service
+# sourced by racoon.service
+# installed at /etc/default/racoon by the maintainer scripts
+#
+# This is a POSIX shell fragment
+#
+# Arguments to pass to racoon
+RACOON_ARGS=""
meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.service new file +11 -0
new file mode 100644
index 0000000..a10e770
@@ -0,0 +1,11 @@
+[Unit]
+Description=Racoon IKEv1 key management daemon for IPSEC
+After=syslog.target network.target
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/racoon
+ExecStart=@SBINDIR@/racoon $RACOON_ARGS
+
+[Install]
+WantedBy=multi-user.target
meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb +0 -0
index 7519d83..9704b13 100644
@@ -16,11 +16,13 @@ SRC_URI = "ftp://ftp.netbsd.org/pub/NetBSD/misc/ipsec-tools/0.8/ipsec-tools-${PV
            file://glibc-2.20.patch \

meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb SRC_URI = "ftp://ftp.netbsd.org/pub/NetBSD/misc/ipsec-tools/0.8/ipsec-tools-${PV · line 25

Quoted 10 lines
meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb +3 -1
            file://racoon-Resend-UPDATE-message-when-received-EINTR-message.patch \
            file://racoon.conf.sample \
+           file://racoon.conf \
+           file://racoon.service \
           "
 SRC_URI[md5sum] = "d53ec14a0a3ece64e09e5e34b3350b41"
 SRC_URI[sha256sum] = "8eb6b38716e2f3a8a72f1f549c9444c2bc28d52c9536792690564c74fe722f2d"
 
-inherit autotools
+inherit autotools systemd

SYSTEMD_SERVICE variable isn't set, so this racoon isn't enabled and packaged, how was this change tested?

Also causes QA warning:
ipsec-tools-0.8.2: ipsec-tools: Files/directories were installed but not shipped
/lib
/lib/systemd
/lib/systemd/system
/lib/systemd/system/racoon.service [installed-vs-shipped]

Quoted 24 lines
meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb +11 -0
 # Options:
 #  --enable-adminport      enable admin port
@@ -68,4 +70,15 @@ PACKAGECONFIG[selinux] = "--enable-security-context,--disable-security-context,l
 do_install_append() {
     install -d ${D}${sysconfdir}/racoon
     install -m 0644 ${WORKDIR}/racoon.conf.sample ${D}${sysconfdir}/racoon/racoon.conf
+
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -d ${D}${systemd_unitdir}/system
+        install -m 0644 ${WORKDIR}/racoon.service ${D}${systemd_unitdir}/system
+
+        sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/racoon.service
+        sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/racoon.service
+
+        install -d ${D}${sysconfdir}/default/
+        install -m 0644 ${WORKDIR}/racoon.conf ${D}${sysconfdir}/default/racoon
+    fi
 }
Signature · 5 lines
-- 
_______________________________________________
Openembedded-commits mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-commits
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#2 lore raw
Quoted 93 lines

-----Original Message-----
From: Martin Jansa [mailto:[email protected]]
Sent: Wednesday, April 08, 2015 8:51 PM
Cc: [email protected]
Subject: Re: [oe-commits] Bian Naimeng : ipsec-tools: add systemd supported

Quoted 4 lines · On Mon, Feb 23, 2015 at 07:03:17PM +0000, [email protected] wrote:

Module: meta-openembedded.git
Branch: master
Commit: 1eb5a644459f16219410ee53f47b7d2d082e17a1
URL:

http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=1eb5a64445
9f16219410ee53f47b7d2d082e17a1

Quoted 6 lines
Author: Bian Naimeng <[email protected]>
Date:   Mon Feb 16 11:14:35 2015 +0800

ipsec-tools: add systemd supported

Quoted 8 lines

---

 .../recipes-support/ipsec-tools/ipsec-tools/racoon.conf   |  8 ++++++++
 .../ipsec-tools/ipsec-tools/racoon.service                | 11

+++++++++++

Quoted 1 line
 .../recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb      | 15

++++++++++++++-

meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb SRC_URI =

Quoted 45 lines
 3 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.conf b/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.conf new file mode 100644
index 0000000..6b50750

meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.c new file +6 -0
+++ onf
@@ -0,0 +1,8 @@
+# Defaults for racoon service
+# sourced by racoon.service
+# installed at /etc/default/racoon by the maintainer scripts # # This
+is a POSIX shell fragment # # Arguments to pass to racoon
+RACOON_ARGS=""

diff --git a/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.servi ce b/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.servi ce
new file mode 100644
index 0000000..a10e770

meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.s new file +12 -0
+++ ervice
@@ -0,0 +1,11 @@
+[Unit]
+Description=Racoon IKEv1 key management daemon for IPSEC
+After=syslog.target network.target
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/racoon
+ExecStart=@SBINDIR@/racoon $RACOON_ARGS
+
+[Install]
+WantedBy=multi-user.target

diff --git a/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb b/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb index 7519d83..9704b13 100644

meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb +0 -0
@@ -16,11 +16,13 @@ SRC_URI =

"ftp://ftp.netbsd.org/pub/NetBSD/misc/ipsec-tools/0.8/ipsec-tools-${PV

meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb SRC_URI = · line 17

Quoted 2 lines
meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb +0 -0
            file://glibc-2.20.patch \
 

file://racoon-Resend-UPDATE-message-when-received-EINTR-message.patch \

meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb SRC_URI = · line 23

Quoted 6 lines
meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb +2 -0
            file://racoon.conf.sample \
+           file://racoon.conf \
+           file://racoon.service \
           "
 SRC_URI[md5sum] = "d53ec14a0a3ece64e09e5e34b3350b41"
 SRC_URI[sha256sum] =

"8eb6b38716e2f3a8a72f1f549c9444c2bc28d52c9536792690564c74fe722f2d"

meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb SRC_URI = · line 24

Quoted 3 lines
meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb +1 -1
-inherit autotools
+inherit autotools systemd

SYSTEMD_SERVICE variable isn't set, so this racoon isn't enabled and packaged, how was this change tested?

Quoted 8 lines

Also causes QA warning:
ipsec-tools-0.8.2: ipsec-tools: Files/directories were installed but not shipped
/lib
/lib/systemd
/lib/systemd/system
/lib/systemd/system/racoon.service [installed-vs-shipped]

Sorry for that. I will send a patch to fix this.

Thanks
Bian

Quoted 34 lines

meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb

Quoted 10 lines
meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb +0 -0
 # Options:
 #  --enable-adminport      enable admin port
@@ -68,4 +70,15 @@ PACKAGECONFIG[selinux] =

"--enable-security-context,--disable-security-context,l

 do_install_append() {
     install -d ${D}${sysconfdir}/racoon
     install -m 0644 ${WORKDIR}/racoon.conf.sample

${D}${sysconfdir}/racoon/racoon.conf

meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb +2 -0
+
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false',

d)}; then

meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb

Quoted 5 lines
meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb +5 -0
+        install -d ${D}${systemd_unitdir}/system
+        install -m 0644 ${WORKDIR}/racoon.service
+ ${D}${systemd_unitdir}/system
+
+        sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g'

${D}${systemd_unitdir}/system/racoon.service

meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb

Quoted 5 lines
meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb +5 -0
+        sed -i -e 's#@SBINDIR@#${sbindir}#g'
+ ${D}${systemd_unitdir}/system/racoon.service
+
+        install -d ${D}${sysconfdir}/default/
+        install -m 0644 ${WORKDIR}/racoon.conf

${D}${sysconfdir}/default/racoon

Quoted 8 lines

+ fi
}

--
_______________________________________________
Openembedded-commits mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-commits

--
Martin 'JaMa' Jansa jabber: [email protected]