lttng-tools: add systemd support
PATCH 1/1 lttng-tools: add systemd support
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
And disable the 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
meta/recipes-kernel/lttng/lttng-tools/lttng-sessiond.service new file +9 -0
@@ -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
meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb +11 -1
@@ -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"
Signature · 1 line
2.11.0
Quoted 6 lines · Kai Kang
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
And disable the service by default.
s/And disable the service by default./
but disable the service by default since lttng is a heavy-weight debugging tool./
This is what we did when adding the service file to a *released* product but one could argue that if you add lttng-tools to your image then you really do want it to be enabled.
It's a small thing but could be important to someone so speak up if it is. I think that it's better to enable it by default for oe-core-2.6.
../Randy
Quoted 59 lines
Signed-off-by Kai Kang <[email protected]>--- 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
meta/recipes-kernel/lttng/lttng-tools/lttng-sessiond.service new file +9
-0@@ -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.targetmeta/recipes-kernel/lttng/lttng-tools_2.9.5.bb +11
-1@@ -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"
Signature · 2 lines
# Randy MacLeod # Wind River Linux