aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoor <noor_ahsan@mentor.com>2013-06-14 18:15:53 +0500
committerFlorin Sarbu <florin.sarbu@windriver.com>2013-06-21 08:05:07 +0300
commitd198a74f84cb8054f7a5030c60dc7aaf293e8526 (patch)
tree326a7229ed73f52e6ccf665d9e2c2149b00636b6
parent0b372de72091100cac24f7f44d59d9c404131fd8 (diff)
downloadmeta-ivi-d198a74f84cb8054f7a5030c60dc7aaf293e8526.tar.gz
meta-ivi-d198a74f84cb8054f7a5030c60dc7aaf293e8526.tar.bz2
meta-ivi-d198a74f84cb8054f7a5030c60dc7aaf293e8526.zip
dlt-daemon: Fix multiple issues with service files.
* The newly included patch, systemd_service_installation.patch, is required because the cmake script in the dlt-daemon package tries to locate the systemd units directory on the host when cross-compiled. During cross compiling it should not see paths on local machine and make decesion based on it. On ubuntu 10.04 /lib/systemd/system folder does not exist so cross-compiling dlt-deamon results in no servie file image folder. So commented the if condition which checks the existance of /lib/systemd/system. Genivi issue link dealing with this is http://bugs.genivi.org/show_bug.cgi?id=67. * Created symlinks of dlt.service and dlt-system.service in basic.target.wants folder. Signed-off-by: Noor Ahsan <noor_ahsan@mentor.com>
-rw-r--r--recipes-extended/dlt-daemon/dlt-daemon-2.9.0/systemd_service_installation.patch24
-rw-r--r--recipes-extended/dlt-daemon/dlt-daemon_2.9.0.bb12
2 files changed, 35 insertions, 1 deletions
diff --git a/recipes-extended/dlt-daemon/dlt-daemon-2.9.0/systemd_service_installation.patch b/recipes-extended/dlt-daemon/dlt-daemon-2.9.0/systemd_service_installation.patch
new file mode 100644
index 0000000..8469a5e
--- /dev/null
+++ b/recipes-extended/dlt-daemon/dlt-daemon-2.9.0/systemd_service_installation.patch
@@ -0,0 +1,24 @@
+--- git/systemd/CMakeLists_old.txt 2013-03-12 16:53:37.052664326 +0500
++++ git/systemd/CMakeLists.txt 2013-03-12 16:53:57.052896347 +0500
+@@ -46,15 +46,15 @@ if(WITH_SYSTEMD)
+ message(STATUS "DLT adaptor udp configuration: APPID=${DLT_ADAPTOR_UDP_APPID} CTID=${DLT_ADAPTOR_UDP_CTID} PORT=${DLT_ADAPTOR_UDP_PORT}" )
+
+
+- if(EXISTS ${SYSTEMD_CONFIGURATIONS_FILES_DIR})
++ #if(EXISTS ${SYSTEMD_CONFIGURATIONS_FILES_DIR})
+ install(FILES ${PROJECT_BINARY_DIR}/systemd/dlt.service DESTINATION ${SYSTEMD_CONFIGURATIONS_FILES_DIR} )
+ install(FILES ${PROJECT_BINARY_DIR}/systemd/dlt-system.service DESTINATION ${SYSTEMD_CONFIGURATIONS_FILES_DIR} )
+ install(FILES ${PROJECT_BINARY_DIR}/systemd/dlt-receive.service DESTINATION ${SYSTEMD_CONFIGURATIONS_FILES_DIR} )
+ install(FILES ${PROJECT_BINARY_DIR}/systemd/dlt-example-user.service DESTINATION ${SYSTEMD_CONFIGURATIONS_FILES_DIR} )
+ install(FILES ${PROJECT_BINARY_DIR}/systemd/dlt-adaptor-udp.service DESTINATION ${SYSTEMD_CONFIGURATIONS_FILES_DIR} )
+ message(STATUS "Unit files will be installed to ${SYSTEMD_CONFIGURATIONS_FILES_DIR} after make install" )
+- else(EXISTS ${SYSTEMD_CONFIGURATIONS_FILES_DIR})
+- message(STATUS "Unit files will not be installed to ${SYSTEMD_CONFIGURATIONS_FILES_DIR} after make install")
+- endif(EXISTS ${SYSTEMD_CONFIGURATIONS_FILES_DIR})
++ #else(EXISTS ${SYSTEMD_CONFIGURATIONS_FILES_DIR})
++ # message(STATUS "Unit files will not be installed to ${SYSTEMD_CONFIGURATIONS_FILES_DIR} after make install")
++ #endif(EXISTS ${SYSTEMD_CONFIGURATIONS_FILES_DIR})
+
+-endif(WITH_SYSTEMD)
+\ No newline at end of file
++endif(WITH_SYSTEMD)
diff --git a/recipes-extended/dlt-daemon/dlt-daemon_2.9.0.bb b/recipes-extended/dlt-daemon/dlt-daemon_2.9.0.bb
index 58aaa15..a94e63d 100644
--- a/recipes-extended/dlt-daemon/dlt-daemon_2.9.0.bb
+++ b/recipes-extended/dlt-daemon/dlt-daemon_2.9.0.bb
@@ -21,7 +21,9 @@ LIC_FILES_CHKSUM = " \
file://MPL.txt;md5=ccdb2761cef70c8b2612624c323f89dc \
"
-SRC_URI = "git://git.projects.genivi.org/${PN}.git;protocol=git;tag=v${PV}"
+SRC_URI = "git://git.projects.genivi.org/${PN}.git;protocol=git;tag=v${PV} \
+ file://systemd_service_installation.patch \
+ "
S = "${WORKDIR}/git"
@@ -38,4 +40,12 @@ EXTRA_OECMAKE = "-DWITH_SYSTEMD=ON"
# as there is no such username
do_install_append() {
sed -i '/User/d' ${D}/${systemd_unitdir}/system/*.service
+
+ if [ ${@base_contains('EXTRA_OECMAKE', '-DWITH_SYSTEMD=ON', 'yes', 'no', d)} = yes ]; then
+ # Install the required systemd services links
+ install -d ${D}${base_libdir}/systemd/system/basic.target.wants
+ ln -sf ../dlt.service ${D}${base_libdir}/systemd/system/basic.target.wants/dlt.service
+ ln -sf ../dlt-system.service ${D}${base_libdir}/systemd/system/basic.target.wants/dlt-system.service
+ fi
+
}