All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kai Kang <kai.kang@windriver.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH v2] lttng-tools: add systemd support
Date: Sun,  2 Sep 2018 19:20:07 -0700	[thread overview]
Message-ID: <20180903022007.4654-1-kai.kang@windriver.com> (raw)

Add systemd service file of lttng-tools from Fedora

ftp://fr2.rpmfind.net/linux/fedora/linux/development/rawhide
/Everything/source/tree/Packages/l/lttng-tools-2.10.5-1.fc29.src.rpm

It requires kernel configs CONFIG_STAGING and CONFIG_LTTNG2 to be set.
But linux-yocto doesn't meet the requirement. So disable the service by
default.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
v2:
* update commit message that why disable the systemd service by default.


 meta/recipes-kernel/lttng/lttng-tools/lttng-sessiond.service |  9 +++++++++
 meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb               | 12 +++++++++++-
 2 files changed, 20 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-kernel/lttng/lttng-tools/lttng-sessiond.service

diff --git a/meta/recipes-kernel/lttng/lttng-tools/lttng-sessiond.service b/meta/recipes-kernel/lttng/lttng-tools/lttng-sessiond.service
new file mode 100644
index 00000000000..aaf81305923
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-tools/lttng-sessiond.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=LTTng 2.x central tracing registry session daemon
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/lttng-sessiond -d
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb b/meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb
index e4969c30807..0314b536376 100644
--- a/meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb
+++ b/meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb
@@ -31,12 +31,16 @@ SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \
            file://x32.patch \
            file://run-ptest \
            file://0001-Allow-multiple-attempts-to-connect-to-relayd.patch \
+           file://lttng-sessiond.service \
            "
 
 SRC_URI[md5sum] = "051224eb991aee07f8721ff1877d0b96"
 SRC_URI[sha256sum] = "77839eb6fc6c652125f08acfd9369701c2516eb05cc2084160e7efc7a3fb731c"
 
-inherit autotools ptest pkgconfig useradd python3-dir manpages
+inherit autotools ptest pkgconfig useradd python3-dir manpages systemd
+
+SYSTEMD_SERVICE_${PN} = "lttng-sessiond.service"
+SYSTEMD_AUTO_ENABLE = "disable"
 
 USERADD_PACKAGES = "${PN}"
 GROUPADD_PARAM_${PN} = "tracing"
@@ -52,6 +56,12 @@ FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la"
 INSANE_SKIP_${PN} = "libexec dev-so"
 INSANE_SKIP_${PN}-dbg = "libexec"
 
+do_install_append () {
+    # install systemd unit file
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/lttng-sessiond.service ${D}${systemd_unitdir}/system
+}
+
 do_install_ptest () {
     for f in Makefile tests/Makefile tests/utils/utils.sh ; do
         install -D "${B}/$f" "${D}${PTEST_PATH}/$f"
-- 
2.11.0



                 reply	other threads:[~2018-09-03  2:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180903022007.4654-1-kai.kang@windriver.com \
    --to=kai.kang@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.