summaryrefslogtreecommitdiff
path: root/meta-openembedded/meta-oe/recipes-extended/dlt-daemon
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-extended/dlt-daemon')
-rw-r--r--meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/204.patch148
-rw-r--r--meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/241.patch30
-rw-r--r--meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/245.patch74
-rw-r--r--meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon_2.18.5.bb (renamed from meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon_2.18.4.bb)14
4 files changed, 114 insertions, 152 deletions
diff --git a/meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/204.patch b/meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/204.patch
deleted file mode 100644
index f0fc0bcb2..000000000
--- a/meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/204.patch
+++ /dev/null
@@ -1,148 +0,0 @@
-Upstream-Status: Submitted [https://github.com/GENIVI/dlt-daemon/pull/204]
-From 92830aff6e91041f574753d78da758c62981d9a4 Mon Sep 17 00:00:00 2001
-From: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
-Date: Sat, 25 Jan 2020 09:08:07 +0100
-Subject: [PATCH 1/3] dlt_user.h: fix build when musl is the libc
- implementation, by adding a missing include for pthread_t reference:
-
-see https://errors.yoctoproject.org/Errors/Details/308000/ for details
-
-Thanks Khem Raj <raj.khem@gmail.com> for the report
-
-Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
-Signed-off-by: Gianfranco Costamagna <locutusofborg@debian.org>
----
- include/dlt/dlt_user.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/include/dlt/dlt_user.h b/include/dlt/dlt_user.h
-index 69cb854..766d349 100644
---- a/include/dlt/dlt_user.h
-+++ b/include/dlt/dlt_user.h
-@@ -74,6 +74,7 @@
- \{
- */
- # include <mqueue.h>
-+# include <pthread.h>
-
- # if !defined (__WIN32__)
- # include <semaphore.h>
-
-From 5f67aba02c12b7446e63ccc86285c13bc5c7a432 Mon Sep 17 00:00:00 2001
-From: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
-Date: Sat, 25 Jan 2020 09:16:14 +0100
-Subject: [PATCH 2/3] dlt-test-init-free: fix build failure with strict
- compiler flags, due to uint being undefined. This is actually an "int" type,
- looking at the test implementation
-
-Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
-Signed-off-by: Gianfranco Costamagna <locutusofborg@debian.org>
----
- src/tests/dlt-test-init-free.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/tests/dlt-test-init-free.c b/src/tests/dlt-test-init-free.c
-index 96b5245..35b8803 100644
---- a/src/tests/dlt-test-init-free.c
-+++ b/src/tests/dlt-test-init-free.c
-@@ -32,7 +32,7 @@
-
- void exec(const char *cmd, char *buffer, size_t length);
- void printMemoryUsage();
--char *occupyMemory(uint size);
-+char *occupyMemory(int size);
- void do_example_test();
- void do_dlt_test();
-
-@@ -131,7 +131,7 @@ void printMemoryUsage()
- printf("%s", result);
- }
-
--char *occupyMemory(uint size)
-+char *occupyMemory(int size)
- {
- char *buf = (char *)malloc(size * sizeof(char));
-
-
-From c790d61fad382e5d3e648ee99904087eb9bc4a77 Mon Sep 17 00:00:00 2001
-From: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
-Date: Sat, 25 Jan 2020 09:20:48 +0100
-Subject: [PATCH 3/3] sys/poll.h: deprecate old sys/poll.h include header, now
- glibc/musl wants poll.h being included directly. This fixes a build failure
- on musl systems with strict c hardening flags
-
-Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
-Signed-off-by: Gianfranco Costamagna <locutusofborg@debian.org>
----
- src/console/logstorage/dlt-logstorage-ctrl.c | 2 +-
- src/daemon/dlt_daemon_event_handler.c | 2 +-
- src/daemon/dlt_daemon_event_handler.h | 2 +-
- src/daemon/dlt_daemon_event_handler_types.h | 2 +-
- src/lib/dlt_user.c | 2 +-
- 5 files changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/src/console/logstorage/dlt-logstorage-ctrl.c b/src/console/logstorage/dlt-logstorage-ctrl.c
-index 525c137..6614f44 100644
---- a/src/console/logstorage/dlt-logstorage-ctrl.c
-+++ b/src/console/logstorage/dlt-logstorage-ctrl.c
-@@ -61,7 +61,7 @@
- #include <string.h>
- #include <getopt.h>
-
--#include <sys/poll.h>
-+#include <poll.h>
-
- #if defined(__linux__)
- # include "sd-daemon.h"
-diff --git a/src/daemon/dlt_daemon_event_handler.c b/src/daemon/dlt_daemon_event_handler.c
-index 1611f7b..0d463da 100644
---- a/src/daemon/dlt_daemon_event_handler.c
-+++ b/src/daemon/dlt_daemon_event_handler.c
-@@ -30,7 +30,7 @@
- #include <string.h>
- #include <errno.h>
-
--#include <sys/poll.h>
-+#include <poll.h>
- #include <syslog.h>
-
- #include "dlt_common.h"
-diff --git a/src/daemon/dlt_daemon_event_handler.h b/src/daemon/dlt_daemon_event_handler.h
-index eb96101..bd550d3 100644
---- a/src/daemon/dlt_daemon_event_handler.h
-+++ b/src/daemon/dlt_daemon_event_handler.h
-@@ -25,7 +25,7 @@
- * \file dlt_daemon_event_handler.h
- */
-
--#include <sys/poll.h>
-+#include <poll.h>
-
- #include "dlt_daemon_connection_types.h"
- #include "dlt_daemon_event_handler_types.h"
-diff --git a/src/daemon/dlt_daemon_event_handler_types.h b/src/daemon/dlt_daemon_event_handler_types.h
-index 370e503..0b16d08 100644
---- a/src/daemon/dlt_daemon_event_handler_types.h
-+++ b/src/daemon/dlt_daemon_event_handler_types.h
-@@ -25,7 +25,7 @@
- * \file dlt_daemon_event_handler_types.h
- */
-
--#include <sys/poll.h>
-+#include <poll.h>
-
- #include "dlt_daemon_connection_types.h"
-
-#diff --git a/src/lib/dlt_user.c b/src/lib/dlt_user.c
-#index ffa9b09..511f991 100644
-#--- a/src/lib/dlt_user.c
-#+++ b/src/lib/dlt_user.c
-#@@ -43,7 +43,7 @@
-# #include <errno.h>
-#
-# #include <sys/uio.h> /* writev() */
-#-#include <sys/poll.h>
-#+#include <poll.h>
-#
-# #include <limits.h>
-# #ifdef linux
diff --git a/meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/241.patch b/meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/241.patch
new file mode 100644
index 000000000..7d8f22ec7
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/241.patch
@@ -0,0 +1,30 @@
+From b8f9919f000e642fc8970d0a42c1bdadf5a9d720 Mon Sep 17 00:00:00 2001
+From: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
+Date: Mon, 10 Aug 2020 08:30:34 +0200
+Subject: [PATCH] sd-daemon.c: Fix build with newer glibc and musl libc
+
+Reported by Khem Raj on meta-oe list
+
+TOPDIR/build/tmp/work/armv7vet2hf-neon-yoe-linux-musleabi/dlt-daemon/2.18.5-r0/recipe-sysroot/usr/include/sys/fcntl.h:1:2: error: redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> [-Werror,-W#warnings]
+ ^
+1 error generated.
+
+Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
+Signed-off-by: Gianfranco Costamagna <locutusofborg@debian.org>
+---
+ systemd/3rdparty/sd-daemon.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/systemd/3rdparty/sd-daemon.c b/systemd/3rdparty/sd-daemon.c
+index 88936d2..de3f985 100644
+--- a/systemd/3rdparty/sd-daemon.c
++++ b/systemd/3rdparty/sd-daemon.c
+@@ -35,7 +35,7 @@
+ #ifdef __BIONIC__
+ #include <linux/fcntl.h>
+ #else
+-#include <sys/fcntl.h>
++#include <fcntl.h>
+ #endif
+ #include <netinet/in.h>
+ #include <stdlib.h>
diff --git a/meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/245.patch b/meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/245.patch
new file mode 100644
index 000000000..43057489c
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/245.patch
@@ -0,0 +1,74 @@
+From 57fd61ea5c58a4f9fcd7140b53ac6cd6e971ef47 Mon Sep 17 00:00:00 2001
+From: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
+Date: Fri, 31 Jul 2020 15:16:02 +0200
+Subject: [PATCH] dlt_offline: fix build failures with gcc-10
+
+see bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=957140
+
+/usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_client.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: multiple definition of `g_logstorage_cache_max'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: first defined here
+/usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_common.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:118: multiple definition of `g_logstorage_cache_size'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:118: first defined here
+/usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_common.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: multiple definition of `g_logstorage_cache_max'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: first defined here
+/usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_connection.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:118: multiple definition of `g_logstorage_cache_size'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:118: first defined here
+/usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_connection.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: multiple definition of `g_logstorage_cache_max'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: first defined here
+/usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_event_handler.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:118: multiple definition of `g_logstorage_cache_size'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:118: first defined here
+/usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_event_handler.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: multiple definition of `g_logstorage_cache_max'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: first defined here
+/usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_offline_logstorage.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: multiple definition of `g_logstorage_cache_max'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: first defined here
+---
+ src/daemon/dlt_daemon_offline_logstorage.c | 1 +
+ src/offlinelogstorage/dlt_offline_logstorage.h | 4 ++--
+ src/offlinelogstorage/dlt_offline_logstorage_behavior.c | 1 +
+ tests/gtest_dlt_daemon_offline_log.cpp | 1 +
+ 4 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/src/daemon/dlt_daemon_offline_logstorage.c b/src/daemon/dlt_daemon_offline_logstorage.c
+index 0b3c14f..db9637e 100644
+--- a/src/daemon/dlt_daemon_offline_logstorage.c
++++ b/src/daemon/dlt_daemon_offline_logstorage.c
+@@ -56,6 +56,7 @@ DLT_STATIC DltReturnValue dlt_logstorage_split_ecuid(char *key,
+ return DLT_RETURN_OK;
+ }
+
++unsigned int g_logstorage_cache_max;
+ /**
+ * dlt_logstorage_split_ctid
+ *
+diff --git a/src/offlinelogstorage/dlt_offline_logstorage.h b/src/offlinelogstorage/dlt_offline_logstorage.h
+index b58da70..c9bc93b 100644
+--- a/src/offlinelogstorage/dlt_offline_logstorage.h
++++ b/src/offlinelogstorage/dlt_offline_logstorage.h
+@@ -114,9 +114,9 @@
+ #define DLT_OFFLINE_LOGSTORAGE_IS_STRATEGY_SET(S, s) ((S)&(s))
+
+ /* logstorage max cache */
+-unsigned int g_logstorage_cache_max;
++extern unsigned int g_logstorage_cache_max;
+ /* current logstorage cache size */
+-unsigned int g_logstorage_cache_size;
++extern unsigned int g_logstorage_cache_size;
+
+ typedef struct
+ {
+diff --git a/src/offlinelogstorage/dlt_offline_logstorage_behavior.c b/src/offlinelogstorage/dlt_offline_logstorage_behavior.c
+index afbf8c4..edef482 100644
+--- a/src/offlinelogstorage/dlt_offline_logstorage_behavior.c
++++ b/src/offlinelogstorage/dlt_offline_logstorage_behavior.c
+@@ -32,6 +32,7 @@
+ #include "dlt_offline_logstorage_behavior.h"
+ #include "dlt_offline_logstorage_behavior_internal.h"
+
++unsigned int g_logstorage_cache_size;
+ /**
+ * dlt_logstorage_log_file_name
+ *
+diff --git a/tests/gtest_dlt_daemon_offline_log.cpp b/tests/gtest_dlt_daemon_offline_log.cpp
+index b8965de..0bd4d5e 100644
+--- a/tests/gtest_dlt_daemon_offline_log.cpp
++++ b/tests/gtest_dlt_daemon_offline_log.cpp
+@@ -29,6 +29,7 @@ extern "C"
+ #include <fcntl.h>
+ }
+
++unsigned int g_logstorage_cache_max;
+ /* Begin Method: dlt_logstorage::t_dlt_logstorage_list_add*/
+ TEST(t_dlt_logstorage_list_add, normal)
+ {
diff --git a/meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon_2.18.4.bb b/meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon_2.18.5.bb
index 35c638bc7..f3fcee4d2 100644
--- a/meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon_2.18.4.bb
+++ b/meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon_2.18.5.bb
@@ -17,13 +17,17 @@ DEPENDS = "zlib gzip-native"
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 \
- file://204.patch \
+ file://241.patch \
+ file://245.patch \
"
-SRCREV = "14ea971be7e808b9c5099c7f404ed3cf341873c4"
+SRCREV = "f1ac087c766827b1d0ed9c3a814b3cc052e948f2"
S = "${WORKDIR}/git"
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES','systemd', d)}"
+PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd systemd-watchdog systemd-journal dlt-examples dlt-adaptor dlt-console ', '', d)} \
+ udp-connection dlt-system dlt-filetransfer "
+# dlt-dbus
+
# General options
PACKAGECONFIG[dlt-examples] = "-DWITH_DLT_EXAMPLES=ON,-DWITH_DLT_EXAMPLES=OFF,,dlt-daemon-systemd"
@@ -37,6 +41,7 @@ PACKAGECONFIG[udp-connection] = "-DWITH_UDP_CONNECTION=ON,-DWITH_UDP_CONNECTION=
# Command line options
PACKAGECONFIG[dlt-system] = "-DWITH_DLT_SYSTEM=ON,-DWITH_DLT_SYSTEM=OFF"
PACKAGECONFIG[dlt-adaptor] = "-DWITH_DLT_ADAPTOR=ON,-DWITH_DLT_ADAPTOR=OFF,,dlt-daemon-systemd"
+PACKAGECONFIG[dlt-filetransfer] = "-DWITH_DLT_FILETRANSFER=ON,-DWITH_DLT_FILETRANSFER=OFF"
PACKAGECONFIG[dlt-console] = "-DWITH_DLT_CONSOLE=ON,-DWITH_DLT_CONSOLE=OFF,,dlt-daemon-systemd"
inherit autotools gettext cmake systemd
@@ -46,7 +51,8 @@ EXTRA_OECMAKE += "-DSYSTEMD_UNITDIR=${systemd_system_unitdir}"
PACKAGES += "${PN}-systemd"
SYSTEMD_PACKAGES = "${PN} ${PN}-systemd"
SYSTEMD_SERVICE_${PN} = " ${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'dlt.service', '', d)} \
- ${@bb.utils.contains('PACKAGECONFIG', 'dlt-system', 'dlt-system.service', '', d)}"
+ ${@bb.utils.contains('PACKAGECONFIG', 'dlt-system', 'dlt-system.service', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'dlt-dbus', 'dlt-dbus.service', '', d)}"
SYSTEMD_AUTO_ENABLE_${PN} = "enable"
SYSTEMD_SERVICE_${PN}-systemd = " \
${@bb.utils.contains('PACKAGECONFIG', 'dlt-adaptor', 'dlt-adaptor-udp.service', '', d)} \