From 06edc60e1ddb1503cab2ad0434b92f0cb053ac41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pasi=20Pet=C3=A4j=C3=A4j=C3=A4rvi?= Date: Wed, 24 Nov 2021 16:01:43 +0200 Subject: [PATCH] CI: Add inotify support for QNX Adds Filesystem event manager server to image and also add HOME env varbiable for root user. Task-number: QTBUG-99168 Pick-to: 6.2 6.3 Change-Id: I4df10f17f4e274dc0d21fea1a767c351ba3c8362 Reviewed-by: Samuli Piippo --- .../local/snippets/ifs_env.custom | 3 +++ .../local/snippets/post_start.custom | 14 ++++++++++++++ .../local/snippets/system_files.custom | 3 +++ .../local/snippets/uids.custom | 1 + 4 files changed, 21 insertions(+) create mode 100644 coin/provisioning/common/linux/qnx_qemu_build_files/local/snippets/ifs_env.custom create mode 100644 coin/provisioning/common/linux/qnx_qemu_build_files/local/snippets/post_start.custom create mode 100644 coin/provisioning/common/linux/qnx_qemu_build_files/local/snippets/uids.custom diff --git a/coin/provisioning/common/linux/qnx_qemu_build_files/local/snippets/ifs_env.custom b/coin/provisioning/common/linux/qnx_qemu_build_files/local/snippets/ifs_env.custom new file mode 100644 index 00000000..b993d53b --- /dev/null +++ b/coin/provisioning/common/linux/qnx_qemu_build_files/local/snippets/ifs_env.custom @@ -0,0 +1,3 @@ +# Add root HOME env variable +procmgr_symlink /data/home/root/ /home/root +HOME=/home/root diff --git a/coin/provisioning/common/linux/qnx_qemu_build_files/local/snippets/post_start.custom b/coin/provisioning/common/linux/qnx_qemu_build_files/local/snippets/post_start.custom new file mode 100644 index 00000000..81899afb --- /dev/null +++ b/coin/provisioning/common/linux/qnx_qemu_build_files/local/snippets/post_start.custom @@ -0,0 +1,14 @@ +# local/snippets/post_start.custom +# Commands executed from post_startup.sh. Executed at the end of system startup whether slm is in use +# or not +# +# To allow resource managers to be run properly with and without security policies, command lines +# should be written in one of the following forms: +# +# START(resmgr_t) resmgr DROPROOT(resmgr_uid) +# STARTU(resmgr_t, resmgr_uid) resmgr +# Where resmgr_t is the security type name (arbitrary but usually the name of the resmgr with _t appended), +# and resmgr_uid is the id to use for both uid and gid. DROPROOT is used only in cases where the +# resource manager supports a -U option for switching to non-root. +echo "---> Starting Filesystem event manager (fsevmgr)" +STARTU_P(fsevmg_t,__FSEVMG_ID__) fsevmgr -d -F __DEVB_ID__ -N __DEVB_ID__ diff --git a/coin/provisioning/common/linux/qnx_qemu_build_files/local/snippets/system_files.custom b/coin/provisioning/common/linux/qnx_qemu_build_files/local/snippets/system_files.custom index 9f88fc93..c1307e3c 100644 --- a/coin/provisioning/common/linux/qnx_qemu_build_files/local/snippets/system_files.custom +++ b/coin/provisioning/common/linux/qnx_qemu_build_files/local/snippets/system_files.custom @@ -27,3 +27,6 @@ lib/libpng16.so.16=usr/lib/libpng16.so.16 lib/liblzma.so.5=usr/lib/liblzma.so.5 lib/libbacktrace.so.1=usr/lib/libbacktrace.so.1 lib/libm.so.3=lib/libm.so.3 + +# for inotify +xbin/fsevmgr=sbin/fsevmgr diff --git a/coin/provisioning/common/linux/qnx_qemu_build_files/local/snippets/uids.custom b/coin/provisioning/common/linux/qnx_qemu_build_files/local/snippets/uids.custom new file mode 100644 index 00000000..9787971c --- /dev/null +++ b/coin/provisioning/common/linux/qnx_qemu_build_files/local/snippets/uids.custom @@ -0,0 +1 @@ +#define __FSEVMG_ID__ 50