[oe] [meta-oe][PATCH 1/2] dlt-daemon: add initial recipe based on meta-ivi branch (with lots of changes)

Khem Raj raj.khem at gmail.com
Fri Jan 24 17:24:41 UTC 2020


On 1/24/20 5:43 AM, Gianfranco Costamagna wrote:
> From: Gianfranco Costamagna <gianfranco.costamagna at abinsula.com>
> 
> dlt-daemon is useful on embedded systems as a logging system
> 

fails to build with musl [1], perhaps its missing including pthread.h

[1] https://errors.yoctoproject.org/Errors/Details/308000/

> Signed-off-by: Gianfranco Costamagna <costamagnagianfranco at yahoo.it>
> Signed-off-by: Gianfranco Costamagna <gianfranco.costamagna at abinsula.com>
> Signed-off-by: Gianfranco Costamagna <locutusofborg at debian.org>
> ---
>   ...execute-processes-as-a-specific-user.patch | 95 +++++++++++++++++++
>   ...0004-Modify-systemd-config-directory.patch | 25 +++++
>   .../dlt-daemon/dlt-daemon_2.18.4.bb           | 48 ++++++++++
>   3 files changed, 168 insertions(+)
>   create mode 100644 meta-oe/recipes-devtools/dlt-daemon/dlt-daemon/0002-Don-t-execute-processes-as-a-specific-user.patch
>   create mode 100644 meta-oe/recipes-devtools/dlt-daemon/dlt-daemon/0004-Modify-systemd-config-directory.patch
>   create mode 100644 meta-oe/recipes-devtools/dlt-daemon/dlt-daemon_2.18.4.bb
> 
> diff --git a/meta-oe/recipes-devtools/dlt-daemon/dlt-daemon/0002-Don-t-execute-processes-as-a-specific-user.patch b/meta-oe/recipes-devtools/dlt-daemon/dlt-daemon/0002-Don-t-execute-processes-as-a-specific-user.patch
> new file mode 100644
> index 000000000..7c082297e
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/dlt-daemon/dlt-daemon/0002-Don-t-execute-processes-as-a-specific-user.patch
> @@ -0,0 +1,95 @@
> +From 24204fefec474ef001599a14ad669f41b6f28061 Mon Sep 17 00:00:00 2001
> +From: Andrei Gherzan <andrei.gherzan at windriver.com>
> +Date: Tue, 18 Nov 2014 15:47:22 +0100
> +Subject: [PATCH] Don't execute processes as a specific user.
> +
> +Upstream-Status: Inappropriate [Configuration Specific]
> +Signed-off-by: Andrei Gherzan <andrei.gherzan at windriver.com>
> +
> +---
> + systemd/dlt-adaptor-udp.service.cmake  | 3 +--
> + systemd/dlt-dbus.service.cmake         | 1 -
> + systemd/dlt-example-user.service.cmake | 3 +--
> + systemd/dlt-receive.service.cmake      | 3 +--
> + systemd/dlt-system.service.cmake       | 1 -
> + systemd/dlt.service.cmake              | 1 -
> + 6 files changed, 3 insertions(+), 9 deletions(-)
> +
> +diff --git a/systemd/dlt-adaptor-udp.service.cmake b/systemd/dlt-adaptor-udp.service.cmake
> +index e06330c..ebf0594 100644
> +--- a/systemd/dlt-adaptor-udp.service.cmake
> ++++ b/systemd/dlt-adaptor-udp.service.cmake
> +@@ -19,9 +19,8 @@ Wants=dlt.service
> +
> + [Service]
> + Type=simple
> +-User=@DLT_USER@
> + ExecStart=@CMAKE_INSTALL_PREFIX@/bin/dlt-adaptor-udp -a @DLT_ADAPTOR_UDP_APPID@ -c @DLT_ADAPTOR_UDP_CTID@ -p @DLT_ADAPTOR_UDP_PORT@
> + LimitCORE=infinity
> +
> + [Install]
> +-WantedBy=multi-user.target
> +\ No newline at end of file
> ++WantedBy=multi-user.target
> +diff --git a/systemd/dlt-dbus.service.cmake b/systemd/dlt-dbus.service.cmake
> +index 9baf3e9..74a7eac 100644
> +--- a/systemd/dlt-dbus.service.cmake
> ++++ b/systemd/dlt-dbus.service.cmake
> +@@ -20,7 +20,6 @@ Wants=dlt.service
> +
> + [Service]
> + Type=simple
> +-User=@DLT_USER@
> + ExecStart=@CMAKE_INSTALL_PREFIX@/bin/dlt-dbus
> + WatchdogSec=@DLT_WatchdogSec@
> + NotifyAccess=main
> +diff --git a/systemd/dlt-example-user.service.cmake b/systemd/dlt-example-user.service.cmake
> +index 2f300ec..b1aef07 100644
> +--- a/systemd/dlt-example-user.service.cmake
> ++++ b/systemd/dlt-example-user.service.cmake
> +@@ -19,6 +19,5 @@ Wants=dlt.service
> +
> + [Service]
> + Type=simple
> +-User=@DLT_USER@
> + ExecStart=@CMAKE_INSTALL_PREFIX@/bin/dlt-example-user "Hallo from GENIVI DLT example user application"
> +-LimitCORE=infinity
> +\ No newline at end of file
> ++LimitCORE=infinity
> +diff --git a/systemd/dlt-receive.service.cmake b/systemd/dlt-receive.service.cmake
> +index dd53ab7..a68aad2 100644
> +--- a/systemd/dlt-receive.service.cmake
> ++++ b/systemd/dlt-receive.service.cmake
> +@@ -20,6 +20,5 @@ Wants=dlt.service
> +
> + [Service]
> + Type=simple
> +-User=@DLT_USER@
> + ExecStart=@CMAKE_INSTALL_PREFIX@/bin/dlt-receive -o /tmp/dlt_receive_log.dlt localhost
> +-LimitCORE=infinity
> +\ No newline at end of file
> ++LimitCORE=infinity
> +diff --git a/systemd/dlt-system.service.cmake b/systemd/dlt-system.service.cmake
> +index 7dfada0..ef6e319 100755
> +--- a/systemd/dlt-system.service.cmake
> ++++ b/systemd/dlt-system.service.cmake
> +@@ -20,7 +20,6 @@ Wants=dlt.service
> +
> + [Service]
> + Type=simple
> +-User=@DLT_USER@
> + ExecStart=@CMAKE_INSTALL_PREFIX@/bin/dlt-system
> + WatchdogSec=@DLT_WatchdogSec@
> + NotifyAccess=main
> +diff --git a/systemd/dlt.service.cmake b/systemd/dlt.service.cmake
> +index 920c81f..5480cbe 100755
> +--- a/systemd/dlt.service.cmake
> ++++ b/systemd/dlt.service.cmake
> +@@ -19,7 +19,6 @@ Documentation=man:dlt-daemon(1) man:dlt.conf(5)
> +
> + [Service]
> + Type=simple
> +-User=@DLT_USER@
> + ExecStart=@CMAKE_INSTALL_PREFIX@/bin/dlt-daemon
> + WatchdogSec=@DLT_WatchdogSec@
> + NotifyAccess=main
> diff --git a/meta-oe/recipes-devtools/dlt-daemon/dlt-daemon/0004-Modify-systemd-config-directory.patch b/meta-oe/recipes-devtools/dlt-daemon/dlt-daemon/0004-Modify-systemd-config-directory.patch
> new file mode 100644
> index 000000000..4e9e3ce43
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/dlt-daemon/dlt-daemon/0004-Modify-systemd-config-directory.patch
> @@ -0,0 +1,25 @@
> +From 859e566b0ce6f791629704a5786be23489dc573f Mon Sep 17 00:00:00 2001
> +From: Andrei Gherzan <andrei.gherzan at windriver.com>
> +Date: Tue, 18 Nov 2014 15:51:30 +0100
> +Subject: [PATCH] Modify systemd config directory
> +
> +Upstream-Status: Inappropriate [Configuration Specific]
> +Signed-off-by: Andrei Gherzan <andrei.gherzan at windriver.com>
> +
> +---
> + CMakeLists.txt | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/CMakeLists.txt b/CMakeLists.txt
> +index 845d269..52a00ed 100644
> +--- a/CMakeLists.txt
> ++++ b/CMakeLists.txt
> +@@ -200,7 +200,7 @@ if(WITH_SYSTEMD OR WITH_SYSTEMD_WATCHDOG OR WITH_SYSTEMD_JOURNAL)
> +
> +     set(systemd_SRCS ${PROJECT_SOURCE_DIR}/systemd/3rdparty/sd-daemon.c)
> +
> +-    set(SYSTEMD_UNITDIR "${CMAKE_INSTALL_PREFIX}/lib/systemd/system" CACHE PATH
> ++    set(SYSTEMD_UNITDIR "/lib/systemd/system" CACHE PATH
> +         "Set directory to install systemd unit files")
> +
> +     add_subdirectory(systemd)
> diff --git a/meta-oe/recipes-devtools/dlt-daemon/dlt-daemon_2.18.4.bb b/meta-oe/recipes-devtools/dlt-daemon/dlt-daemon_2.18.4.bb
> new file mode 100644
> index 000000000..de97ad28a
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/dlt-daemon/dlt-daemon_2.18.4.bb
> @@ -0,0 +1,48 @@
> +SUMMARY = "Diagnostic Log and Trace"
> +DESCRIPTION = "This component provides a standardised log and trace interface, \
> +based on the standardised protocol specified in the AUTOSAR standard 4.0 DLT. \
> +This component can be used by GENIVI components and other applications as \
> +logging facility providing: \
> +- the DLT shared library \
> +- the DLT daemon, including startup scripts \
> +- the DLT daemon adaptors- the DLT client console utilities \
> +- the DLT test applications"
> +HOMEPAGE = "https://www.genivi.org/"
> +SECTION = "console/utils"
> +LICENSE = "MPLv2"
> +LIC_FILES_CHKSUM = "file://LICENSE;md5=8184208060df880fe3137b93eb88aeea"
> +
> +PR = "r2"

drop PR here

> +
> +DEPENDS = "dbus zlib gzip-native"
> +
> +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES','systemd', d)}"
> +PACKAGECONFIG[systemd] = "-DWITH_SYSTEMD=ON,-DWITH_SYSTEMD=OFF,systemd"
> +
> +
> +SRCREV = "14ea971be7e808b9c5099c7f404ed3cf341873c4"
> +SRC_URI = "git://github.com/GENIVI/${BPN}.git;protocol=https \
> +    file://0002-Don-t-execute-processes-as-a-specific-user.patch \
> +    file://0004-Modify-systemd-config-directory.patch \
> +    "
> +S = "${WORKDIR}/git"
> +
> +inherit autotools gettext cmake systemd
> +
> +PACKAGES += "${PN}-systemd"
> +SYSTEMD_PACKAGES = "${PN} ${PN}-systemd"
> +SYSTEMD_SERVICE_${PN} = "dlt-system.service dlt.service"
> +SYSTEMD_AUTO_ENABLE_${PN} = "enable"
> +SYSTEMD_SERVICE_${PN}-systemd = "dlt-example-user.service \
> +    dlt-dbus.service \
> +    dlt-adaptor-udp.service \
> +    dlt-receive.service"
> +SYSTEMD_AUTO_ENABLE_${PN}-systemd = "disable"
> +
> +EXTRA_OECMAKE += "-DWITH_DLT_DBUS=ON -DWITH_DLT_SYSTEM=ON -DWITH_DLT_ADAPTOR=ON"
> +
> +FILES_${PN}-doc += "/usr/share/dlt-filetransfer"
> +
> +do_install_append() {
> +   rm -f ${D}${bindir}/dlt-test-*
> +}
> 



More information about the Openembedded-devel mailing list